**I**n reply to my call for designs along the Norse farce pun, here is a nice proposal from Thomas, which stands so far as a strong competitor for the best design! I welcome more submissions: remember, a free mug to the winner!!!

## Archive for competition

## The Norse Farce [design #2]

Posted in Statistics with tags competition, design, mug, The Norse Farce on December 7, 2017 by xi'an## Le Monde [last] puzzle [#1026]

Posted in Books, Kids, R with tags competition, Kapla, Le Monde, mathematical puzzle, R, simulated annealing on November 2, 2017 by xi'an

**T**he last and final Le Monde puzzle is a bit of a disappointment, to wit:

A 4×4 table is filled with positive and different integers. A 3×3 table is then deduced by adding four adjacent [i.e. sharing a common corner] entries of the original table. Similarly with a 2×2 table, summing up to a unique integer. What is the minimal value of this integer? And by how much does it increase if all 29 integers in the tables are different?

**F**or the first question, the resulting integer writes down as the sum of the corner values, plus 3 times the sum of the side values, plus 9 times the sum of the 4 inner values [of the 4×4 table]. Hence, minimising the overall sum means taking the inner values as 1,2,3,4, the side values as 5,…,12, and the corner values as 13,…,16. Resulting in a total sum of 352. As checked in this computer code in APL by Jean-Louis:

This configuration does not produce 29 distinct values, but moving one value higher in one corner does: I experimented with different upper bounds on the numbers and 17 always provided with the smallest overall sum, 365.

firz=matrix(0,3,3)#second level thirz=matrix(0,2,2)#third level for (t in 1:1e8){ flor=matrix(sample(1:17,16),4,4) for (i in 1:3) for (j in 1:3) firz[i,j]=sum(flor[i:(i+1),j:(j+1)]) for (i in 1:2) for (j in 1:2) thirz[i,j]=sum(firz[i:(i+1),j:(j+1)]) #last if (length(unique(c(flor,firz,thirz)))==29) solz=min(solz,sum(thirz))}

and a further simulated annealing attempt did not get me anywhere close to this solution.

## Le Monde puzzle [poll]

Posted in Books, Kids with tags competition, Le Monde, mathematical puzzle on November 1, 2017 by xi'an**A**s the 25 Le Monde mathematical puzzles have now been delivered (plus the extraneous #1021), the journal is asking the players for their favourites, in order to separate ex-aequos. For readers who followed the entire sequence since puzzle #1001, what are your favourite four puzzles? (No more than four votes!)

## Le Monde puzzle [open problem]

Posted in Books, Kids with tags competition, Le Monde, majority rule, mathematical puzzle, open problem, voting paradox on October 23, 2017 by xi'an**W**hat should have been the last puzzle in Le Monde competition turned out to be an anticlimactic fizzle on how many yes-no questions are needed to identify an integer between 1 and 1025=2¹⁰+1 and an extension to replies possibly being lies…

**W**hat is much more exciting is that voting puzzle #1021 got cancelled because the authors of this puzzle thought the cascading majority rule would produce the optimal solution and it does not! (As exhibited by my R code.) So here is an open problem to ponder about! (And another puzzle in the pipeline to complete the competition.)

## Le Monde puzzle [#1024]

Posted in Books, Kids with tags Bertrand's paradox, competition, Le Monde, mathematical puzzle, Monty Hall problem, R, random walk, Université Paris Dauphine on October 10, 2017 by xi'an**T**he penultimate and appropriately somewhat Monty Hallesque Le Monde mathematical puzzle of the competition!

A dresser with 5×5 drawers contains a single object in one of the 25 drawers. A player opens a drawer at random and, after each choice, the object moves at random to a drawer adjacent to its current location and the drawer chosen by the player remains open. What is the maximum number of drawers one need to open to find the object?

In a dresser with 9 drawers in a line, containing again a single object, the player opens drawers one at a time, after which the open drawer is closed and the object moves to one of the drawers adjacent to its current location. What is the maximum number of drawers one need to open to find the object?

**F**or the first question, setting a pattern of exploration and, given this pattern, simulating a random walk trying to avoid the said pattern as long as possible is feasible, returning a maximum number of steps over many random walks [and hence a lower bound on the true maximum]. As in the following code

sefavyd=function(pater=seq(1,49,2)%%25+1){ fild=matrix(0,5,5) m=pater[1];i=fild[m]=1 t=sample((1:25)[-m],1) nomove=FALSE while (!nomove){ i=i+1 m=pater[i];fild[m]=1 if (t==m){ nomove=TRUE}else{ muv=NULL if ((t-1)%%5>0) muv=c(muv,t-1) if (t%%5>0) muv=c(muv,t+1) if ((t-1)%/%5>0) muv=c(muv,t-5) if (t%/%5<4) muv=c(muv,t+5) muv=muv[fild[muv]==0] nomove=(length(muv)==0) if (!nomove) t=sample(rep(muv,2),1)} } return(i)}

But a direct reasoning starts from the observation that, while two adjacent drawers are not opened, a random walk can, with non-zero probability, switch indefinitely between both drawers. Hence, a sure recovery of the object requires opening one drawer out of two. The minimal number of drawers to open on a 5×5 dresser is 2+3+2+3+2=12. Since in 12 steps, those drawers are all open, spotting the object may require up to 13 steps.

For the second case, unless I [again!] misread the question, whatever pattern one picks for the exploration, there is always a non-zero probability to avoid discovery after an arbitrary number of steps. The [wrong!] answer is thus infinity. To cross-check this reasoning, I wrote the following R code that mimics a random pattern of exploration, associated by an opportunistic random walk that avoids discovery whenever possible (even with very low probability) bu pushing the object towards the centre,

drawl=function(){ i=1;t=5;nomove=FALSE m=sample((1:9)[-t],1) while (!nomove){ nextm=sample((1:9),1) muv=c(t-1,t+1) muv=muv[(muv>0)&(muv<10)&(muv!=nextm)] nomove=(length(muv)==0)||(i>1e6) if (!nomove) t=sample(rep(muv,2),1, prob=1/(5.5-rep(muv,2))^4) i=i+1} return(i)}

which returns unlimited values on repeated runs. However, I was wrong and the R code unable to dismiss my a priori!, as later discussions with Robin and Julien at Paris-Dauphine exhibited ways of terminating the random walk in 18, then 15, then 14 steps! The idea was to push the target to one of the endpoints because it would then have no option but turning back: an opening pattern like 2, 3, 4, 5, 6, 7, 8, 8 would take care of a hidden object starting in an even drawer, while the following 7, 6, 5, 4, 3, 2 openings would terminate any random path starting from an odd drawer. To double check:

grawl=function(){ len=0;muvz=c(3:8,8:1) for (t in 1:9){ i=1;m=muvz[i];nomove=(t==m) while (!nomove){ i=i+1;m=muvz[i];muv=c(t-1,t+1) muv=muv[(muv>0)&(muv<10)&(muv!=m)] nomove=(length(muv)==0) if (!nomove) t=sample(rep(muv,2),1)} len=max(len,i)} return(len)}

produces the value 14.

## Monty Hall closes the door

Posted in Books, Kids, pictures with tags competition, conditional probability, game show, Monty Hall, Monty Hall problem, paradoxes, pop culture, Stigler's Law, The New York Times, USA on October 1, 2017 by xi'an**A**mong much more dramatic news today, I learned about Monty Hall passing away, who achieved long lasting fame among probabilists for his TV game show leading to the Monty Hall problem, a simple conditional probability derivation often leading to arguments because of the loose wording of the conditioning event. By virtue of Stigler’s Law, the Monty Hall game was actually invented earlier, apparently by the French probabilist Joseph Bertrand, in his *Calcul des probabilités*. The New York Times article linked with the image points out the role of outfits with the game participants, towards being selected by the host, Monty Hall. And that one show had a live elephant behind a door, instead of a goat, elephant which freaked out..!

## Le Monde puzzle [#1022 & #1023]

Posted in Books, Kids with tags competition, knapsack problem, Le Monde, long multiplication, mathematical puzzle, prime number on September 29, 2017 by xi'an**A**nother Le Monde mathematical puzzle where I could not find a solution by R programming (albeit one by cissors and papers was readily available!):

*An NT is a T whose head ( —) is made of 3 50×50 squares and whose body (|) is made of N 50×50 squares. What is the smallest possible side of a square containing four non-intersecting*

*NT’s when N=1,2,4? And what is the smallest value of N such that this square also contains a fifth NT?*

**T**he questions could have been solved by brute force simulation (or a knapsack algorithm?!) but I could not fathom an efficient way to code throwing T’s at random over an MxM grid.So instead I took scissors and paper and tried to fit four 1T, 2T, and 4T into the smallest squares, ending up with 4×4, 5×5, and 7×7 squares. Interestingly, four 5T also fit in a 7×7 square. And a 9×9 square accommodates the extra 7T. Compared with the “impossible” puzzle of last week, this is pretty anticlimactic..! (Actually, once the solutions were published, I realised the square containing the T’s did not have to be with integer side. Which means the smallest square for 3Ts was incorporating the glued T’s sideway. Fortunately, this did not impact the answer for the 7T’s!)

Going back to this “impossible” puzzle, the posted solution is somewhat… puzzling in that the resolution posits that the majority rule is the optimal allocation, when I am not sure it is [optimal]. Just because, when rerunning the same R code, I found instances when the minimal acceptable number of councillors was lower than the one returned by the majority rule.

And since this post get pushed down in the queue, here is as a bonus the equally anticlimactic puzzle #1023,

Find (a) a multiplication of two three-prime-digit numbers such that all digits everywhere in the long multiplication are prime and all three intermediary products have four prime digits, while the final result has six prime digits, and (b) a multiplication of two three-digit numbers such that the digits of the first one are odd (o), the digits of the second are even (e), the three intermediary products are all of the formeoe, and the final product is of the formeoeo. [The website has two pictures to help if this description is too unclear!]

This is indeed straightforward to code with one solution to (a) and two to (b) since the number of cases to examine is quite limited.