Let x be a rational number in (113/191 ,184/311). Find x=a/b when is known that a<400.

{ 113/191 < a/b < 184/311 }

Printable View

- April 14th 2010, 04:09 AMAlso sprach ZarathustraI am hope that my question belongs here.
Let x be a rational number in (113/191 ,184/311). Find x=a/b when is known that a<400.

{ 113/191 < a/b < 184/311 } - April 14th 2010, 07:26 AMFailure
I have no elegant mathematical answer to your question. But an answer can relatively easily be found with the help of a little program: since there are only finitely many candiadates for a/b to consider.

For example, I have hacked together (rather hastily) the following Python script:

Code:`from math import floor, ceil`

lb = 113.0/191.0 # lower bound of interval

ub = 184.0/311.0 # upper bound of interval

maxnum = 399.0 # max for numerator

checked = 0 # number of pairs a/b checked

found = 0 # number of a/b with lb < a/b < ub found

# we are not too fussy about the lower limit for the denominator,

# but because the numerator is limited we need not consider that

# many numerators a:

for b in range(1,ceil(maxnum/lb)):

for a in range(ceil(lb*b),max(ceil(lb*b)+1, ceil(ub*b))):

checked += 1

if (lb < float(a)/b and float(a)/b < ub):

found += 1

print "found: a/b = %d/%d" % (a,b)

print "total: checked %d, found %d" % (checked, found)

So if this program does not contain a major flaw, the only a/b that satisfies your requirements is 297/502 - April 14th 2010, 09:12 AMAlso sprach Zarathustra
You did a wonderful job!!! But... I looking for a mathematical solution...

Another question(that comes with your answer...) is: to prove that there is only one number such this.

Thank you again for your effort! - April 14th 2010, 09:28 AMFailure
Of course, we are all looking for more elegant and general, in a word "mathematical" ways of answering such questions. On the other hand, for this purpose one would want to state the problem in a more general form, for otherwise the effort that goes into finding a general answer might not get amortized properly...

Quote:

Another question(that comes with your answer...) is: to prove that there is only one number such this.

That aside, I think that the program does an exhaustive search (there are only finitely many possibilities in any case), and I am thus quite confident that there are no other solutions to your problem.

Btw: Initially I considered the possibility of searching the Stern?Brocot tree - Wikipedia, the free encyclopedia , but came to the conclusion that even if that could be done, the difference to the much simpler approch that I finally used would mainly be to arrive at a much more complex program (with correspondingly higher probability of such a program containing a bug). - April 15th 2010, 12:06 AMOpalg
This is one of those cases where the simplest method works best. If p/q < r/s then (p+r)/(q+s) lies in the interval ( p/q , r/s). So this problem is solved by , as the computer analysis confirms.

Of course, this method does not show that the answer is unique (subject to the condition a<400).