Possible Ratios for Integers Between 20 and 70

  • Context: Undergrad 
  • Thread starter Thread starter bugatti79
  • Start date Start date
  • Tags Tags
    Ratios
Click For Summary

Discussion Overview

The discussion revolves around calculating the number of possible ratios defined by the equation R=1- (P1*S2/P2*S1), where P1, P2, S1, and S2 are integers between 20 and 70. Participants explore combinatorial methods to determine the total number of unique ratios, considering the implications of repeated values and the nature of permutations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant questions how the figure of 51*51*51*51 was determined and suggests it relates to combinatorial theory.
  • Another participant proposes that the total number of combinations should be calculated, noting that many permutations will yield the same ratio due to repeated values.
  • It is noted that there are 51 integers in the range [20, 70], leading to 51 choices for each variable, resulting in 514 combinations, but this does not account for duplicates.
  • Participants discuss the complexity of eliminating duplicates, with one suggesting that enumerating possibilities may be necessary to accurately calculate unique ratios.
  • There is a mention of the challenge in deriving a neat expression to determine all ratios without duplicates in combinatorial terms.
  • One participant explores a simpler case of the ratio and discusses the logarithmic approach to express combinations using powers, questioning the feasibility of achieving exact values.

Areas of Agreement / Disagreement

Participants generally agree that the problem involves combinatorial reasoning and that many permutations will yield the same ratio. However, there is no consensus on the exact method to calculate the unique ratios or how to handle duplicates effectively.

Contextual Notes

Participants express uncertainty regarding the assumptions involved in counting permutations and the implications of repeated values. The discussion highlights the complexity of accurately determining unique ratios from the defined variables.

bugatti79
Messages
786
Reaction score
4
Hi Folks,

I need to calculate the number of possible ratios for the following

R=1- (P1*S2/P2*S1) where P1,P2,S1,S2 are integers between 20 and 70?

Some one came up with a figure of 51*51*51*51 possible ratios but I don't know how this was determined. What branch of Math does this generally fall under...arithmetic sequences?

thanks
 
Mathematics news on Phys.org
I wouldn't know the proper name either but I would venture to say something along the line of Combinatorial Theory?...that sounds fancy...anyway just Combination/Permutation stuff.

Think decimal system, for example, you have two variables P and S and they can take values from 0 to 9...how many different combinations PS can you make? Answer: 00, 01, 02...99; that's going to be a total of 100 or 10x10 (10 for the amount of values each variable can take).

get it?

The same for your case, you just need to count the number of all possible values to each variable to find out the total number of permutations.

...but this is not going to be the total number of ratios of interest to you, since the variables can take on similar values and because 3x5 = 5x3, etc, there will be many instances where your permutations will have the exact same value...so, your total will be less than 51*51*51*51

Hope this helps.
 
Yes it is combinatorics - the site already linked to is the best introduction to this subject on the web IMHO.

514 has been generated simply by noting that there are 51 integers in the range [20, 70], so for each 51 choices of P1 there are 51 choices of S1 making 512 possibilities, and for each of these there are 51 choices of P2 etc.

However this ignores the fact that choices for (P1, S1, P2, S2) such as (a, b, c, d) and (b, a, d, c) will give equal ratios, as will for example (20, 20, 20, 20) and (40, 40, 40, 40). The first one of these can be fairly easily catered for*, but I can't see any way around the second other than enumerating each of the possibilities and calculating them (well I suppose you could look at which integers had common factors and treat them carefully, but this would be a lot harder to program correctly and the computation time even for 1.8 million combinations is insignificant).* there are 512 possibilities for (P1, S1) and for (P2, S2) but we can reduce each of these to (512 +51) / 2 to allow for the swapping P1 and S1 or P2 and S2. The total number of possibilities are therefore reduced to (512 + 51)2 / 4 ≈ 1.8x106.
 
MrAnchovy said:
Yes it is combinatorics - the site already linked to is the best introduction to this subject on the web IMHO.

514 has been generated simply by noting that there are 51 integers in the range [20, 70], so for each 51 choices of P1 there are 51 choices of S1 making 512 possibilities, and for each of these there are 51 choices of P2 etc.

However this ignores the fact that choices for (P1, S1, P2, S2) such as (a, b, c, d) and (b, a, d, c) will give equal ratios, as will for example (20, 20, 20, 20) and (40, 40, 40, 40). The first one of these can be fairly easily catered for*, but I can't see any way around the second other than enumerating each of the possibilities and calculating them (well I suppose you could look at which integers had common factors and treat them carefully, but this would be a lot harder to program correctly and the computation time even for 1.8 million combinations is insignificant).* there are 512 possibilities for (P1, S1) and for (P2, S2) but we can reduce each of these to (512 +51) / 2 to allow for the swapping P1 and S1 or P2 and S2. The total number of possibilities are therefore reduced to (512 + 51)2 / 4 ≈ 1.8x106.

Thanks guys,

Not sure I follow the * description. Could you elaborate a little further..? When you say the first one, are you referring to (20,20,20,20)?
I guess this going to be tricky to implement in excel...!
cheers
 
Sorry, (20, 20, 20, 20) was a terrible example, let me try again to make it a bit clearer:

... However out of the 514 possible permutations, many of them will give equal ratios.

Consider P1=a, S1=b, P2=c, S2=d (from now on I will write this as (a, b, c, d). This gives the ratio ad/bc, but exactly the same ratio is given by (d, c, b, a), (d, b, c, a) and (a, c, b, d). It is tempting to think that we can simply divide 514 by 4 but this will not treat the situation when a=d or b=d correctly. What we actually want is the number of combinations (a, d): this is given by (512+51)/2. So the total number of ratios with distinct numerators and denominators wil be taking all (512+51)/2 possible numerators with all (512+51)/2 possible denominators. This will give approximately 1.8x106 possibilities.

There is a further category of duplicated ratios, for example (20, 21, 22, 23) and (40, 42, 44, 46) but I can't see any easy way to eliminate these other than enumerating each of the possibilities and calculating them (well I suppose you could look at which integers had common factors and treat them carefully, but this would be a lot harder to program correctly and the computation time even for 1.8 million combinations is insignificant).

Note that the current version of Excel has just over 106 rows per sheet so it might be possible to enumerate these over 2 sheets, but I have no idea whether that is feasible from a memory/recalc time point of view.
 
MrAnchovy said:
Sorry, (20, 20, 20, 20) was a terrible example, let me try again to make it a bit clearer:

... However out of the 514 possible permutations, many of them will give equal ratios.

Consider P1=a, S1=b, P2=c, S2=d (from now on I will write this as (a, b, c, d). This gives the ratio ad/bc, but exactly the same ratio is given by (d, c, b, a), (d, b, c, a) and (a, c, b, d). It is tempting to think that we can simply divide 514 by 4 but this will not treat the situation when a=d or b=d correctly. What we actually want is the number of combinations (a, d): this is given by (512+51)/2. So the total number of ratios with distinct numerators and denominators wil be taking all (512+51)/2 possible numerators with all (512+51)/2 possible denominators. This will give approximately 1.8x106 possibilities.

There is a further category of duplicated ratios, for example (20, 21, 22, 23) and (40, 42, 44, 46) but I can't see any easy way to eliminate these other than enumerating each of the possibilities and calculating them (well I suppose you could look at which integers had common factors and treat them carefully, but this would be a lot harder to program correctly and the computation time even for 1.8 million combinations is insignificant).

Note that the current version of Excel has just over 106 rows per sheet so it might be possible to enumerate these over 2 sheets, but I have no idea whether that is feasible from a memory/recalc time point of view.

1) That makes things a little clearer although I am still not sure how you arrived at (51^2+51)/2?

2) So there is no easy way of deriving a neat expression that determines all ratios without duplicates in Combination/Permutation Theory?

3)Also on a slight tangent. For the simpler case of 1-S1/P1 for each variable between 20 and 70. This would mean 51^2. But what in the case where P1 varies from 20 to 70 and S1 from 20 to 30. We would get 51*(11)=561...right? I would like to write this using the nth power. So to find the required power to base 51 we take logs...ie

51^n=561 implies n=1.6099. But its difficult to get exactly 561 with this method right?

thanks
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 131 ·
5
Replies
131
Views
9K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
10K