Hi everyone,
I have a tricky task Let me clarify that step by step below.
Input
First of all, I need to find out the way how I specify: Let's say that formula will go from combination 1 to 197. We currently know that all combinations are sort from the biggest price to the lowest one.
Secondly, I need to set up the rule saying, once you drove through a specific place, DO NOT drive through that point again.
e.g. We take the combination #1 F, A, O and we know that cannot drive again to those points. So a formula looks for other combinations the next possible combination is #1 3 since M, K, N do not match with previous combination F, A, O. Now we have already 6 places where the car cannot drive anymore. F, A, O, M, K, N. Then the next available combination is E, I, J. And it goes like that until it does not have all possible combinations found.
We can say that all found combinations are below:
[TABLE="width: 500"]
<tbody>[TR]
[TD]combination[/TD]
[TD]place1[/TD]
[TD]place2[/TD]
[TD]place3[/TD]
[TD]income[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]F[/TD]
[TD]A[/TD]
[TD]O[/TD]
[TD]16556[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]M[/TD]
[TD]K[/TD]
[TD]N[/TD]
[TD]12126[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]E[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]10610[/TD]
[/TR]
[TR]
[TD]74[/TD]
[TD]Q[/TD]
[TD]T[/TD]
[TD]R[/TD]
[TD]5500[/TD]
[/TR]
[TR]
[TD]93[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]C[/TD]
[TD]4695[/TD]
[/TR]
</tbody>[/TABLE]
TOTAL Income is 49549. This result is based on the fact, that formula goes from combination #1 to #1 97 where biggest incomes are first. What if the table is sort in a different way? How many combinations can be there? 197 factorial? How can find the best distribution in order to get the highest income value?
I have a tricky task Let me clarify that step by step below.
Input
- table with 5 columns
- columns are: combination, place1, place2, place3, income
- column combination represents a number of each combination (combination of 3 places)
- place1, 2, 3 are basically points where a car needs to go
- income says how much we get paid to drive in a specific combination (way)
First of all, I need to find out the way how I specify: Let's say that formula will go from combination 1 to 197. We currently know that all combinations are sort from the biggest price to the lowest one.
Secondly, I need to set up the rule saying, once you drove through a specific place, DO NOT drive through that point again.
e.g. We take the combination #1 F, A, O and we know that cannot drive again to those points. So a formula looks for other combinations the next possible combination is #1 3 since M, K, N do not match with previous combination F, A, O. Now we have already 6 places where the car cannot drive anymore. F, A, O, M, K, N. Then the next available combination is E, I, J. And it goes like that until it does not have all possible combinations found.
We can say that all found combinations are below:
[TABLE="width: 500"]
<tbody>[TR]
[TD]combination[/TD]
[TD]place1[/TD]
[TD]place2[/TD]
[TD]place3[/TD]
[TD]income[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]F[/TD]
[TD]A[/TD]
[TD]O[/TD]
[TD]16556[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]M[/TD]
[TD]K[/TD]
[TD]N[/TD]
[TD]12126[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]E[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]10610[/TD]
[/TR]
[TR]
[TD]74[/TD]
[TD]Q[/TD]
[TD]T[/TD]
[TD]R[/TD]
[TD]5500[/TD]
[/TR]
[TR]
[TD]93[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]C[/TD]
[TD]4695[/TD]
[/TR]
</tbody>[/TABLE]
TOTAL Income is 49549. This result is based on the fact, that formula goes from combination #1 to #1 97 where biggest incomes are first. What if the table is sort in a different way? How many combinations can be there? 197 factorial? How can find the best distribution in order to get the highest income value?