Formula for calculating Exotic wagers such as Trifecta and Superfecta

Posted by JohnnyCantCode on Stack Overflow See other posts from Stack Overflow or by JohnnyCantCode
Published on 2009-07-10T21:57:58Z Indexed on 2010/04/21 3:53 UTC
Read the original article Hit count: 773

Filed under:
|

I am trying to create an application that will calculate the cost of exotic parimutuel wager costs. I have found several for certain types of bets but never one that solves all the scenarios for a single bet type. If I could find an algorithm that could calculate all the possible combinations I could use that formula to solve my other problems.

Additional information: I need to calculate the permutations of groups of numbers. For instance;

Group 1 = 1,2,3
Group 2 = 2,3,4
Group 3 = 3,4,5

What are all the possible permutation for these 3 groups of numbers taking 1 number from each group per permutation. No repeats per permutation, meaning a number can not appear in more that 1 position. So 2,4,3 is valid but 2,4,4 is not valid.

Thanks for all the help.

© Stack Overflow or respective owner

Related posts about formula

Related posts about algorithm