I have found a formula for the probability of winning a simple card game, however that formula has a summation nesting depth of 7 (i.e. 8 summations in total) and the computation time is astronomical. Consequently it is not possible, as it presently stands, to find a figure for the probability.
Simpler versions of the formula, with smaller nesting depths, take less time to compute (obviously) but the following should give you an idea of how tough this is for my computer:
- Nesting depth 1 (2 summations): 0.33 seconds
- Nesting depth 2 (3 summations): 7.33 seconds
- Nesting depth 3 (4 summations): ~10 minutes
- Nesting depth 7 (8 summations): ~1000 years?!?
So I seek to reduce this equation to something practical. I expect this will involve DO LOOPS?
See attached for the formula.
Hope you can help!
Many thanks Mick
Update: I reorganised the summations as 8 nested do loops (see attached) which brought the computation time down to a manageable duration, presumably due to much less RAM use. However the result suggests the formula is wrong anyway. Time for a rethink.