Publications by xi'an

Le Monde puzzle [#1087]

24.02.2019

A board-like Le Monde mathematical puzzle in the digit category: Given a (k,m) binary matrix, what is the maximum number S of entries with only one neighbour equal to one? Solve for k=m=2,…,13, and k=6,m=8. For instance, for k=m=2, the matrix is producing the maximal number 4. I first attempted a brute force random filling of these matrices ...

1365 sym R (1031 sym/2 pcs) 4 img

(x=scan())%in%(2*4^(n=0:x)-2^n-1)

27.03.2019

One challenge on code golf is to find the shortest possible code to identify whether or not an integer belongs to the binary cyclops numbers which binary expansion is 0, 101, 11011, 1110111, 111101111, &tc. The n-th such number being this leads to the above solution in R (26 bits). The same length as the C solution [which I do not get] f(n){n=~n...

1057 sym 6 img

Le Monde puzzle [#1088]

28.03.2019

A board (Ising!) Le Monde mathematical puzzle in the optimisation mode, again: On a 7×7 board, what is the maximal number of locations that one can occupy when imposing at least two empty neighbours ? Which I tried to solve by brute force and simulated annealing (what else?!), first defining a target targ=function(tabz){ sum(tabz[-c(1,9),-c...

1356 sym R (871 sym/3 pcs) 2 img

no country for old liars

29.03.2019

A puzzle from the Riddler about a group of five persons, A,..,E, where all and only people strictly older than L are liars, all making statements about others’ ages: A: B>20 and D>16 B: C>18 and E<20 C: D<22 and A=19 D: E≠20 and B=20 E: A>21 and C<18 The Riddler is asking for the (integer value of L and the ranges or values of A,…,E. Afte...

1526 sym R (1242 sym/4 pcs)

BayesComp 20 [full program]

15.04.2019

The full program is now available on the conference webpage of BayesComp 20, next 7-10 Jan 2020. There are eleven invited sessions, including one j-ISBA session, and a further thirteen contributed sessions were selected by the scientific committee. Calls are still open for tutorials on Tuesday 07 January (with two already planed on Nimble and Aut...

880 sym 2 img

survivalists [a Riddler’s riddle]

21.04.2019

A neat question from The Riddler on a multi-probability survival rate: Nine processes are running in a loop with fixed survivals rates .99,….,.91. What is the probability that the first process is the last one to die? Same question with probabilities .91,…,.99 and the probability that the last process is the last one to die. The first quest...

1391 sym 10 img

Le Monde puzzle [#1094]

22.04.2019

A rather blah number Le Monde mathematical puzzle: Find all integer multiples of 11111 with exactly one occurrence of each decimal digit.. Which I solved by brute force, by looking at the possible range of multiples (and  borrowing stringr:str_count from Robin!) > combien=0 > for (i in 90001:900008){ j=i*11111 combien=combien+(min(strin...

958 sym R (138 sym/1 pcs) 2 img

Le Monde puzzle [#1099]

27.04.2019

A simple 2×2 Le Monde mathematical puzzle: Arielle and Brandwein play a game out of two distinct even integers between 1500 and 2500,  and y. Providing one another with either the pair (x/2,y+x/2) or the pair (x+y/2,y/2) until they run out of even possibilities or exceed 6 rounds. When x=2304, what is the value of y that makes Brandwein win? ...

1141 sym R (209 sym/1 pcs) 2 img

visualising bias and unbiasedness

28.04.2019

A question on X validated led me to wonder at the point made by Christopher Bishop in his Pattern Recognition and Machine Learning book about the MLE of the Normal variance being biased. As it is illustrated by the above graph that opposes the true and green distribution of the data (made of two points) against the estimated and red distribution....

1357 sym 8 img

a perfectly normally distributed sample

08.05.2019

When I saw this title on R-bloggers, I was wondering how “more perfect” a Normal sample could be when compared with the outcome of rnorm(n). Hence went checking the original blog on bayestestR in search of more information. Which was stating nothing more than how to generate a sample is perfectly normal by using the rnorm_perfect function. St...

1358 sym