Articles by xi'an

Le Monde puzzle [#1110]

September 15, 2019 | xi'an

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 ...
[Read more...]

Le Monde puzzle [#1109]

September 3, 2019 | xi'an

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 (...
[Read more...]

Gibbs sampling with incompatible conditionals

July 22, 2019 | xi'an

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 ...
[Read more...]

a non-riddle

July 11, 2019 | xi'an

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 ... [Read more...]

CRAN does not validate R packages!

July 9, 2019 | xi'an

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 ...
[Read more...]

Le Monde puzzle [#1105]

July 7, 2019 | xi'an

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 ...
[Read more...]

Le Monde puzzle [#1104]

June 17, 2019 | xi'an

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 […]
[Read more...]

another attempt at code golf

June 11, 2019 | xi'an

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 ...
[Read more...]

riddles on Egyptian fractions and Bernoulli factories

June 10, 2019 | xi'an

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 ...
[Read more...]

A precursor of ABC-Gibbs

June 6, 2019 | xi'an

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 Gibbs where parameters are sequentially ...
[Read more...]

an attempt at code golf

May 14, 2019 | xi'an

Having discovered codegolf on Stack Exchange a few weeks ago, I spotted a few interesting puzzles since then but only got the opportunity at a try over a quiet and rainy weekend (and Robin being on vacation)! The challenge was to write an R code for deciding whether or not ...
[Read more...]

easy Riddler

May 9, 2019 | xi'an

The riddle of the week is rather standard probability calculus If N points are generated at random places on the perimeter of a circle, what is the probability that you can pick a diameter such that all of those points are on only one side of the newly halved circle? ...
[Read more...]

a perfectly normally distributed sample

May 8, 2019 | xi'an

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 ... [Read more...]

visualising bias and unbiasedness

April 28, 2019 | xi'an

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 ...
[Read more...]

Le Monde puzzle [#1099]

April 27, 2019 | xi'an

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, ...
[Read more...]

Le Monde puzzle [#1094]

April 22, 2019 | xi'an

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+(...
[Read more...]

survivalists [a Riddler’s riddle]

April 21, 2019 | xi'an

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 ...
[Read more...]

BayesComp 20 [full program]

April 15, 2019 | xi'an

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 ...
[Read more...]

no country for old liars

March 29, 2019 | xi'an

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 [Read more...]

Le Monde puzzle [#1088]

March 28, 2019 | xi'an

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 ...
[Read more...]
1 5 6 7 8 9 45

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)