Finding number of different paths
Posted
by peiska
on Stack Overflow
See other posts from Stack Overflow
or by peiska
Published on 2010-05-28T13:15:00Z
Indexed on
2010/05/28
13:22 UTC
Read the original article
Hit count: 190
I have a game that one player X wants to pass a ball to player Y, but he can be playing with more than one player and the others players can pass the ball to Y.
I want to know how many different paths can the ball take from X to Y?
for example if he is playing with 3 players there are 5 different paths, 4 players 16 paths, if he is playing with 20 players there are 330665665962404000 paths, and 40 players 55447192200369381342665835466328897344361743780 that the ball can take. the number max. of players that he can play with is 500.
I was thinking in using Catalan Numbers? do you think is a correct approach to solve this? Can you give me some tips.
© Stack Overflow or respective owner