Publications by xi'an
A precursor of ABC-Gibbs
Following our arXival of ABC-Gibbs, Dennis Prangle pointed out to us a 2016 paper by Athanasios Kousathanas, Christoph Leuenberger, Jonas Helfer, Mathieu Quinodoz, Matthieu Foll, and Daniel Wegmann, Likelihood-Free Inference in High-Dimensional Model, published in Genetics, Vol. 203, 893–904 in June 2016. This paper contains a version of ABC Gi...
3020 sym 2 img
riddles on Egyptian fractions and Bernoulli factories
Two fairy different riddles on the weekend Riddler. The first one is (in fine) about Egyptian fractions: I understand the first one as Find the Egyptian fraction decomposition of 2 into 11 distinct unit fractions that maximises the smallest fraction. And which I cannot solve despite perusing this amazing webpage on Egyptian fractions and making...
2039 sym 2 img
another attempt at code golf
I had another lazy weekend go at code golf, trying to code in the most condensed way the following task. Provided with a square matrix A of positive integers, keep iterating the steps take the highest square ????² in A. find the smallest adjacent neighbour ???? replace x² with x and n with nx until no square is left (with neighbour defined a...
1246 sym 2 img
Le Monde puzzle [#1104]
A palindromic Le Monde mathematical puzzle: In a monetary system where all palindromic amounts between 1 and 10⁸ have a coin, find the numbers less than 10³ that cannot be paid with less than three coins. Find if 20,191,104 can be paid with two coins. Similarly, find if 11,042,019 can be paid with two or three coins. Which can be solved in a...
1280 sym R (145 sym/1 pcs) 2 img
Le Monde puzzle [#1105]
Another token game as Le Monde mathematical puzzle: Archibald and Beatrix play with a pile of n>100 tokens, sequentially picking m tokens from the pile with m being a prime number [including m=1] or a multiple of 6, the winner taking the last tokens. If Beatrix knows n and proposes to Archibald to start, what is the value of n? Which cannot be ...
1394 sym R (251 sym/1 pcs) 2 img
CRAN does not validate R packages!
A friend called me the other day for advice on how to submit an R package to CRAN along with a proof his method was mathematically sound. I replied with some items of advice taken from my (limited) experience with submitting packages. And with the remark that CRAN would not validate the mathematical contents of the associated package manual. Nor ...
1808 sym 4 img
a non-riddle
Unless I missed a point in the last riddle from the Riddler, there is very little to say about it: Given N ocre balls, N aquamarine balls, and two urns, what is the optimal way to allocate the balls to the urns towards drawing an ocre ball with no urn being empty? Both my reasoning and a two line exploration code led to having one urn with only o...
827 sym R (154 sym/1 pcs)
Gibbs sampling with incompatible conditionals
An interesting question (with no clear motivation) on X validated wondering why a Gibbs sampler produces NAs… Interesting because multi-layered: The attached R code indeed produces NAs because it calls the Negative Binomial Neg(x¹,p) random generator with a zero success parameter, x¹=0, which automatically returns NAs. This can be escaped by...
1627 sym 6 img
Le Monde puzzle [#1109]
A digital problem as Le Monde current mathematical puzzle: Noble numbers are such that they only involve different digits and are multiple of all their digits. What is the largest noble number? Hmmmm…. Brute force? Since the maximal number of digits is 10, one may as well try: k=soz=9 for (t in 1:1e3){ sol=1 while (sol<10^(k-1)){ u=samp...
831 sym R (140 sym/1 pcs) 2 img
Le Monde puzzle [#1110]
A low-key sorting problem as Le Monde current mathematical puzzle: If the numbers from 1 to 67 are randomly permuted and if the sorting algorithm consists in picking a number i with a position higher than its rank i and moving it at the correct i-th position, what is the maximal number of steps to sort this set of integers when the selected inte...
1314 sym R (595 sym/2 pcs) 2 img