- #1
DataHead
- 1
- 0
Hello friends,
I am attempting to solve this problem for a sorting algorithm with a lot of elements in fraction form (I'm avoiding floating point operations). My question is:
Given a sequence of increasing fractions, does adding 1 to the denominator affect the ordering of th sequence?
Given the sequence for example:
1/5, 3/4, 8/10 ... a/b, x/y where x/y > a/b
If I add 1 to thye denominator:
1/(5+1) , 3 / (4+1), 8 / (10+1) ... a /(b+1), x/(y+1)
is the order of the sequence preserved?
thanks!
I am attempting to solve this problem for a sorting algorithm with a lot of elements in fraction form (I'm avoiding floating point operations). My question is:
Given a sequence of increasing fractions, does adding 1 to the denominator affect the ordering of th sequence?
Given the sequence for example:
1/5, 3/4, 8/10 ... a/b, x/y where x/y > a/b
If I add 1 to thye denominator:
1/(5+1) , 3 / (4+1), 8 / (10+1) ... a /(b+1), x/(y+1)
is the order of the sequence preserved?
thanks!