My crazy die has one side with one pip on it, two with two pips , and three on each of three remaining sides.
I tossed it 7 times in a row and wrote down the result of those tosses as a 7 digit number.
What is the probability that this number
a. Is bigger than 1231111?
b. Contains at least one triplet of identical digits?
c. Is divisible by 3?
d. Exhibits all the 3 features mentioned above?
10 for D1=1 to 3
20 P1=D1//6
30 for D2=1 to 3
40 P2=P1*D2//6
50 for D3=1 to 3
60 P3=P2*D3//6
70 for D4=1 to 3
80 P4=P3*D4//6
90 for D5=1 to 3
100 P5=P4*D5//6
110 for D6=1 to 3
120 P6=P5*D6//6
130 for D7=1 to 3
140 P7=P6*D7//6
150 Num=1000000*D1+100000*D2+10000*D3+1000*D4+100*D5+10*D6+D7
160 Flag=1
170 if Num>1231111 then Aprob=Aprob+P7:else Flag=0
180 if D2=D3 and (D1=D2 or D3=D4) or D4=D5 and (D3=D4 or D5=D6) or D5=D6 and D6=D7 then
190 :Bprob=Bprob+P7:else Flag=0
200 if
Num@3=0 then Cprob=Cprob+P7:else Flag=0
210 if Flag then Dprob=Dprob+P7
220 next
230 next
240 next
250 next
260 next
270 next
280 next
290 print Aprob;Bprob;Cprob;Dprob
300 print Aprob/1;Bprob/1;Cprob/1;Dprob/1
finds
44063/46656 11629/23328 3455/10368 1819/11664
0.9444230109739368998 0.4984996570644718792 0.3332368827160493827 0.1559499314128943758
as the rational, and decimally approximate, solutions to parts a, b, c and d respectively, assuming a triplet must be successive within the number.
|
Posted by Charlie
on 2014-02-03 18:47:16 |