Mr. A has 3 fair dice: one of them has 8 faces, numbered 1 to 8. the other has 12 faces numbered 1 to 12 and the other has 20 faces numbered 1 to 20. What is the probability that when they are all thrown together, a sum which is a multiple of 13 shows up?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I wrote a simple code in MATLAB and got the solution. It will be great to see an analytical solution !!!
nTrials = 1e5; npass=0; for i=1:nTrials dice1 = floor(randi([1,8])); dice2 = floor(randi([1,12])); dice3 = floor(randi([1,20])); sum = dice1+dice2+dice3; if(rem(sum,13)==0) npass=npass+1; end end prob=npass/nTrials;