Math, asked by jabaharsarkar8682, 11 months ago

Given a six sided die flipped infinite times to get a sum n then no. Of ways to get it are

Answers

Answered by rishika79
0

Answer:

Step-by-step explanation:

Let the function to find X from n dice is: Sum(m, n, X)

The function can be represented as:

Sum(m, n, X) = Finding Sum (X - 1) from (n - 1) dice plus 1 from nth dice

+ Finding Sum (X - 2) from (n - 1) dice plus 2 from nth dice

+ Finding Sum (X - 3) from (n - 1) dice plus 3 from nth dice

...................................................

...................................................

...................................................

+ Finding Sum (X - m) from (n - 1) dice plus m from nth dice

So we can recursively write Sum(m, n, x) as following

Sum(m, n, X) = Sum(m, n - 1, X - 1) +

Sum(m, n - 1, X - 2) +

.................... +

Sum(m, n - 1, X - m)

Hope it helps you...

Similar questions