[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1617.0. "Doing floors" by TRACE::GILBERT (Ownership Obligates) Mon Jun 01 1992 15:15

    If x and y are positive real numbers, what is the smallest positive
    integer n such that
    
    	       x            x
    	floor(---) = floor(---) ?
    	      n+y           n
T.RTitleUserPersonal
Name
DateLines
1617.1we want easy problems! please ! :-)STAR::ABBASIi^(-i) = SQRT(exp(PI))Tue Jun 02 1992 03:1825
      	         x            x
          floor(---) = floor(---)    ------------- (1)
           	n+y           n

    when (1) is true then:

         -xy + y (x mod n)
    n = ----------------------        -----------------(2)
        x mod(n+y) - x mod n


    so the problem is : find n such that {  -xy + y (x mod n) } is minimum
    subject to condition (1) . 

    one observation is found, denominator of (2) is 1 for all values
    of n such as (1) is true, i tried it with
    x=12,y=.5, n=5 and n=4  , these values meet condition (1), but n=4
    is the minimum, in both cases you get denominator of (2) as 1 (ignoring
    the sign, it cancels with nominator of (2) ).

    is this problem fit for linear programming (some kind of simplex
    method?, which i have not studied...)

    /nasser
1617.2TRACE::GILBERTOwnership ObligatesTue Jun 02 1992 18:5121
>         -xy + y (x mod n)
>    n = ----------------------        -----------------(2)
>        x mod(n+y) - x mod n
>    so the problem is : find n such that {  -xy + y (x mod n) } is minimum
>    subject to condition (1) . 

Huh?  I don't follow that.  Besides minimizing the (fractional part of!?!)
the numerator, shouldn't some consideration be given to the denominator,
which also depends on n?

>    is this problem fit for linear programming (some kind of simplex
>    method?, which i have not studied...)

Perhaps, but I don't think so.

> we want easy problems! please !   :-)

Is this problem not easy?

For reference:  This problem appeared in Fibonacci Quarterly, problem H-296.
I haven't seen the solution, if any.
1617.3GUESS::DERAMODan D'Eramo, zfc::deramoTue Jun 02 1992 19:0926
>    If x and y are positive real numbers, what is the smallest positive
>    integer n such that
>    
>    	       x            x
>    	floor(---) = floor(---) ?
>    	      n+y           n
        
        Well, I'll solve two thirds of the cases. :-)
        
        x < y
        
        	Since we are given that 0 < x, 0 < y, and 1 <= n,
        	then if x < y it follows that 0 < x/(n+y) < 1 and
        	so the first floor is 0.  Therefore the second
        	floor is 0, so x < n.  The smallest positive n
        	for which this is true, given 0 < x, is floor(x)+1.
        
        x = y
        
        	Here x/(n+y) <= x/(1+x) < 1, so both floor's must
        	be 0 and so again n is floor(x)+1.
        
        It remains to solve the problem for 0 < y < x. :-)
        
        Dan
        
1617.4late night rampling..STAR::ABBASIi^(-i) = SQRT(exp(PI))Wed Jun 03 1992 01:3126
>>         -xy + y (x mod n)
>>    n = ----------------------        -----------------(2)
>>        x mod(n+y) - x mod n
>>    so the problem is : find n such that {  -xy + y (x mod n) } is minimum
>>    subject to condition (1) . 
>
>Huh?  I don't follow that.  Besides minimizing the (fractional part of!?!)
>the numerator, shouldn't some consideration be given to the denominator,
>which also depends on n?
    
    as i said, it seemd that denominator is always 1. ( i only did few
    tries), that is why i ignored denomenator,... i must be wrong.
    
>> we want easy problems! please !   :-)

>Is this problem not easy?
>
>For reference:  This problem appeared in Fibonacci Quarterly, problem H-296.
>I haven't seen the solution, if any.
    
    uhmm, i guess a problem is easy if one can solve it, else it is hard..
    
    any way, whish i have more time to work on these problems you post, they 
    seem fun, but i got to go and struggle with my homeworks.. :-(
    
    /Nasser