Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAFinally! Took a long time to get there.
Took the Pascal triangle approach with a twist - rather than build the full triangle i used the binomial co-efficient formula (see here for details) to calculate the row I wanted using an iterative macro. Fortunately I had already done Challenge 74, so was able to use my solution for that to calculate the factorials, although I did have to make a small change to deal with 0!.
To work out how to re-assign the values that fall outside the grid I found this page, which gives a good explanation and some examples on how this should , be done.
A final point - I ran the supplied solution part way through to see how that approached things. The final probabilities for 5 columns and 9 rows don't sum to 1. That can't be so?
Factorial Macro
I think my solution is pretty concise. The app interface asks the user to select the starting slot (1-5) they wish to choose. This slot is assigned a probability of 1, and the remaining slots are assigned a starting probability of 0.
I then use the multi-row formula tool to calculate relative probabilities at four checkpoints throughout the plinko board (these checkpoints are wherever the nails line up with the start and finish positions, or where the blue triangles appear in the margins). When the coin is not near the margin (slots 2-4), it has a 50% chance of remaining in the same slot at the next level down, and a 25% chance of shifting one slot left or right. In slots 1 and 5, a coin has a .75% chance of remaining in the same position at the next level down, and a 25% chance of shifting one slot towards the middle. I've used a carefully constructed conditional statement within the multi-row formula tool to instantiate this logic.
I'd start from position 1 if I wanted to get to the Alteryx slot at the bottom! Very much a brute force approach to get to the answer though!
I went a slightly different route here with a simulation rather than a strict formulaic approach. These are my results after 10,000 iterations:
You spin my head right round, right round
This challenge was a calculating process mayhem made me dizzy on how to approach.
Got to i took help of the solution to understand and solve. I need to come back on this and solve it again
On a spree to binge complete weekly challenges
Adrenaline rush