Sorting Fractions: Does Adding 1 to the Denominator Affect Order?

In summary, the conversation discusses a problem involving sorting a sequence of increasing fractions. The question is whether adding 1 to the denominator affects the ordering of the sequence. The speaker provides an example of a sequence and asks if adding 1 to the denominator preserves the order. The speaker also brings up the issue of equivalent fractions and how they should be treated in the sorting algorithm. The conversation concludes by discussing a specific example and how the order of the sequence changes after adding 1 to the denominator.
  • #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!
 
Physics news on Phys.org
  • #2


You said the fractions are increasing so this might not be an issue but..

How do you treat fractions that are equivalent eg 1/2 and 4/8. If you rank 4/8 before 1/2 then the order would change.
 
  • #3


How about the sequence...

9/19, 1/2 which is 0.474 , 0.5 so increasing as per your rule.

becomes
9/20, 1/3 which is 0.45 , 0.333 which is decreasing
 

Related to Sorting Fractions: Does Adding 1 to the Denominator Affect Order?

1. What is the purpose of sorting fractions?

Sorting fractions allows us to arrange fractions in order from smallest to largest or vice versa, making it easier to compare and perform operations on them.

2. Does adding 1 to the denominator always affect the order of fractions?

No, adding 1 to the denominator only affects the order of fractions if the numerators are the same. If the numerators are different, the order will remain the same.

3. How does adding 1 to the denominator affect the order of fractions with the same numerator?

Adding 1 to the denominator will cause the fraction to decrease in value, therefore changing its position in the order. For example, 1/4 is smaller than 1/3, but when we add 1 to the denominator of 1/4, it becomes 1/5 which is now larger than 1/3.

4. Can the order of fractions with different denominators be affected by adding 1 to the denominator?

No, the order of fractions with different denominators will not be affected by adding 1 to the denominator. The only time the order changes is when the numerators are the same.

5. Is there a specific rule for sorting fractions with added denominators?

There is no specific rule for sorting fractions with added denominators. The order will depend on the specific fractions being compared and whether or not their numerators are the same.

Similar threads

Replies
24
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
975
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
11
Views
615
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
Back
Top