Publications by xi'an

another riddle

28.03.2016

A very nice puzzle on The Riddler last week that kept me busy on train and plane rides, runs and even in between over the weekend. The core of the puzzle is about finding the optimal procedure to select k guesses about the value of a uniformly random integer x in {a,a+1,…,b}, given that each guess y produces the position of x respective to y (l...

2716 sym R (608 sym/4 pcs) 4 img

Le Monde puzzle [#956]

04.04.2016

A Le Monde mathematical puzzle with little need of R programming: Does there exist a function f from N to N such that (i) f is (strictly) increasing, (ii) f(n)≥n, and (iii) f²(n)=f(f(n))=3n? Indeed, the constraints imply (i) f²(0)=0, hence that that f(0)=0, (ii) f(1)=2 as it can be neither 1 (else f²(1) would be equal to 1, not to 3) nor ...

1957 sym R (302 sym/1 pcs) 8 img

Statistical rethinking [book review]

05.04.2016

Statistical Rethinking: A Bayesian Course with Examples in R and Stan is a new book by Richard McElreath that CRC Press sent me for review in CHANCE. While the book was already discussed on Andrew’s blog three months ago, and [rightly so!] enthusiastically recommended by Rasmus Bååth on Amazon, here are the reasons why I am quite impressed by...

8821 sym 8 img

Le Monde puzzle [#958]

10.04.2016

A knapsack Le Monde mathematical puzzle: Given n packages weighting each at most 5.8kg for a total weight of 300kg, is it always possible to allocate these packages  to 12 separate boxes weighting at most 30kg each? weighting at most 29kg each? This can be checked by brute force using the following R code #generate packages paca=runif(1,0,5.8)...

1141 sym R (857 sym/2 pcs) 6 img

Le Monde puzzle [#959]

19.04.2016

Another of those arithmetic Le Monde mathematical puzzle: Find an integer A such that A is the sum of the squares of its four smallest dividers (including1) and an integer B such that B is the sum of the third poser of its four smallest factors. Are there such integers for higher powers? This begs for a brute force resolution checking the integ...

1817 sym R (270 sym/2 pcs) 8 img

an integer programming riddle

20.04.2016

A puzzle on The Riddler this week that ends up as a standard integer programming problem. Removing the little story around the question, it boils down to optimise 200a+100b+50c+25d under the constraints 400a+400b+150c+50d≤1000, b≤a, a≤1, c≤8, d≤4, and (a,b,c,d) all non-negative integers. My first attempt was a brute force R code since t...

1015 sym R (572 sym/3 pcs) 4 img

Le Monde puzzle [#960]

27.04.2016

An arithmetic Le Monde mathematical puzzle: Given an integer k>1, consider the sequence defined by F(1)=1+1 mod k, F²(1)=F(1)+2 mod k, F³(1)=F²(1)+3 mod k, &tc. [With this notation, F is not necessarily a function.] For which value of k is the sequence the entire {0,1,…,k-1} set? This leads to an easy brute force resolution, for instance w...

2106 sym R (168 sym/2 pcs) 6 img

gap frequencies [& e]

28.04.2016

A riddle from The Riddler where brute-force simulation does not pay: For a given integer N, pick at random without replacement integers between 1 and N by prohibiting consecutive integers until all possible entries are exhausted. What is the frequency of selected integers as N grows to infinity? A simple implementation of the random experiment ...

2137 sym R (797 sym/6 pcs) 12 img

a Simpson paradox of sorts

05.05.2016

The riddle from The Riddler this week is about finding an undirected graph with N nodes and no isolated node such that the number of nodes with more connections than the average of their neighbours is maximal. A representation of a connected graph is through a matrix X of zeros and ones, on which one can spot the nodes satisfying the above condit...

1657 sym R (1190 sym/2 pcs) 6 img

AISTATS 2016 [#1]

10.05.2016

Travelling through Seville, I arrived in Càdiz on Sunday night, along with a massive depression [weather-speaking!]. Walking through the city from the station was nonetheless pleasant as this is an town full of small streets and nice houses. If with less churches than Seville! Richard Samworth gave the first plenary talk of AISTATS 2016  with a...

2764 sym 6 img