**A** quick riddle from The Riddler that, when thinned to the actual maths problem, ends up asking for

which is equal to 2/3…. Anticlimactic.

an attempt at bloggin, nothing more…

**A** quick riddle from The Riddler that, when thinned to the actual maths problem, ends up asking for

which is equal to 2/3…. Anticlimactic.

**A** quick riddle from the Riddler, where the multinomial M(n¹,n²,100-n¹-n²) probability of getting three different labels out of three possible ones out of three draws is 20%, inducing a single possible value for (n¹,n²) up to a permutation.

Since this probability is n¹n²(100-n¹-n²)/161,700, there indeed happens to be only one decomposition of 32,340 as 21 x 35 x 44. The number of possible values for the probability is actually 796, with potential large gaps between successive values of n¹n²(100-n¹-n²) as shown by the above picture.

**A**nother simple riddle from the Riddler: *take a binary sequence and associate to this sequence a score vector made of the numbers of consecutive ones from each position. If the sequence is ten step long and there are 3 ones located at random, what is the expected total score? *(The original story is much more complex and involves as often strange sports!)

Adding two zeroes at time 11 and 12, this is quite simple to code, e.g.

f=0*(1:10) #frequencies for(v in 1:1e6){ r=0*f#reward s=sample(1:10,3) for(t in s)r[t]=1+((t+1)%in%s)*(1+((t+2)%in%s)) f[sum(r)]=f[sum(r)]+1} f=f/1e6

and the outcome recovers the feature that the only possible scores are 1+1+1=3 (all ones separated), 1+1+2=4 (two ones contiguous), and 1+2+3=6 (all ones contiguous). With respective frequencies 56/120, 56/120, and 8/120. With 120 being the number of possible locations of the 3 ones.

**A** riddle from the Riddler with a variation on the theme of breaking sticks: Given a stick of length L, what is the optimal manner to break said stick to achieve a maximal product of the individual lengths? While the pen & paper resolution is a one-line back-of-the-envelope calculation, with an impact of the length L, obviously, a quick R code leads to an approximate solution:

mw=function(k=2,l=10,T=1e6){ a=matrix(runif(T*k),k) for(i in 1:T)F=max(F,prod(l*a[,i]/sum(a[,i]))) return(F)}

with increasing inaccuracy when L grows, obviously.

**S**ome sums and limits found from a [vacation] riddle by The Riddler:

For the first method, Friend 1 takes half of the cake, Friend 2 takes a third of what remains, and so on. After infinitely many friends take their respective pieces, you get whatever is left.

For the second method, Friend 1 takes ½^{²}of the cake, Friend 2 takes ⅓^{²}of what remains, and so on. After infinitely many friends take their respective pieces, you get whatever is left.

For the third method, Friend 1 takes ½^{²}of the cake, Friend 2 takes ¼² of what remains, Friend 3 takes ⅙² of what remains after Friend 2, and so on. After your infinitely many friends take their respective pieces, you get whatever is left.