There is an octagonal die with 8 faces having values 1 to 8 on each face. It is thrown 4 times in a sequence. In how many ways can you get a sum which is less than or equal to 20?
2865
This is a question based on both upper limit and lower limit
Given that A+B+C+D≤20
This can be written as A+B+C+D+E=20
Where 1≤A,B,C,D≤8
Applying a lower limit of 1 to A,B,C,D
A+B+C+D+E=16
Number of ways = 20C4 = 4845
Giving an upper limit of 8 to A (this makes A=9)
A+B+C+D+E=8
Number of solutions = 12C4
Similarly, violating the conditions for A,B,C & D= 4*12C4