Blog Archives

sequence riddle

August 9, 2017
By
sequence riddle

The riddle this week on The Riddler was about finding the largest sequence of integers between 1 and 100 such that each integer is only used once and always followed by a multiple or a factor. A basic R code searching at random [and programmed during a massive downpour on Skye] led to a solution […]

Read more »

Le Monde puzzle [#1707]

July 27, 2017
By
Le Monde puzzle [#1707]

A geometric Le Monde mathematical puzzle: Given a pizza of diameter 20cm, what is the way to cut it by two perpendicular lines through a point distant 5cm from the centre towards maximising the surface of two opposite slices?  Using the same point as the tip of the four slices, what is the way to […]

Read more »

RNG impact on MCMC [or lack thereof]

July 12, 2017
By
RNG impact on MCMC [or lack thereof]

Following the talk at MCM 2017 about the strange impact of the random generator on the outcome of an MCMC generator, I tried in Montréal airport the following code on the banana target of Haario et al. (1999), copied from Soetaert and Laine and using the MCMC function of the FME package: library(FME) Banana <- […]

Read more »

easy riddle

July 11, 2017
By
easy riddle

From the current Riddler, a problem that only requires a few lines of code and a few seconds of reasoning. Or not. N households each stole the earnings from one of the (N-1) other households, one at a time. What is the probability that a given household is not burglarised? And what are the expected […]

Read more »

[un]solved riddles

July 3, 2017
By
[un]solved riddles

On the Riddler of last week, first a birthday puzzle: Given a group of 23 persons, what is the probability of observing three pairs of identical birthdays? which can be found by a quick simulation as ave=0 for (t in 1:1e6){ dupz=dates[duplicated(sample(1:365,23,rep=TRUE))] ave=ave+as.integer((length(dupz)==3)& (length(unique(dupz))==3))}} ave/M returning a value of 0.0183, but which combinatoric resolution I […]

Read more »

thinning a Markov chain, statistically

June 12, 2017
By
thinning a Markov chain, statistically

Art Owen has arXived a new version of his thinning MCMC paper, where he studies how thinning or subsampling can improve computing time in MCMC chains. I remember quite well the message set by Mark Berliner and Steve MacEachern in an early 1990’s paper that subsampling was always increasing the variance of the resulting estimators. […]

Read more »

datazar

June 3, 2017
By
datazar

A few weeks ago and then some, I [as occasional blogger!] got contacted by datazar.com to write a piece on this data-sharing platform. I then went and checked what this was all about, having the vague impression this was a platform where I could store and tun R codes, besides dropping collective projects, but from […]

Read more »

continental divide

May 18, 2017
By
continental divide

While the Riddler puzzle this week was anticlimactic,  as it meant filling all digits in the above division towards a null remainder, it came as an interesting illustration of how different division is taught in the US versus France: when I saw the picture above, I had to go and check an American primary school […]

Read more »

Le Monde puzzle [#1006]

May 2, 2017
By
Le Monde puzzle [#1006]

Once the pseudo-story [noise] removed, a linear programming Le Monde mathematical puzzle: For the integer linear programming problem max 2x¹+2x²+x³+…+x¹⁰ under the constraints x¹>x²+x³, x²>x³+x⁴, …, x⁹>x¹⁰+x¹, x¹⁰>x¹+x² find a solution with the maximal number of positive entries. Expressed this way, it becomes quite straightforward to solve with the help of a linear programming R […]

Read more »

a secretary problem with maximum ability

April 27, 2017
By
a secretary problem with maximum ability

The Riddler of today has a secretary problem, where one measures sequentially N random variables until one deems the current variable to be the largest of the whole sample. The classical secretary problem has a counter-intuitive solution where one first measures N/e random variables without taking any decision and then and only then picks the […]

Read more »


Subscribe

Email:

  Subscribe