Le Monde puzzle [#928]

September 9, 2015
By

(This article was first published on Xi'an's Og » R, and kindly contributed to R-bloggers)

A combinatorics Le Monde mathematical puzzle:

How many distinct integers between 0 and 16 can one pick so that all positive differences are distinct?

If k is the number of distinct integers, the number of positive differences is

1+2+…+(k-1) = k(k-1)/2,

which cannot exceed 16, meaning k cannot exceed 6. From there, picking 6 integers at random makes it easy to check for the condition:

x=sort(sample(0:16,6))
y=outer(x[-1],x[-6],"-")
while (max(duplicated(y[lower.tri(y)]))==1){
  x=sort(sample(0:16,6))
  y=outer(x[-1],x[-6],"-")}

which quickly returns

> x
[1] 0  1  5  9 12 15

as a solution. Now, reading the puzzle solution of Le Monde today, on September 09, I discovered that the authors proposed a sequence of length 7, (0,1,2,4,5,7,11,16), which does not work since 1-0=2-1… and proved that 8 is an impossible value by quite a convoluted argument. Did I misread again?!

Filed under: Books, Kids, R Tagged: intervals, Le Monde, lower.tri(), mathematical puzzle

To leave a comment for the author, please follow the link and comment on their blog: Xi'an's Og » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

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)