Archive for The Riddle of the Sands

blind monty hall

Posted in R, Statistics with tags , , , , , , , , on January 10, 2022 by xi'an

As I was waiting for my boat on a French Guiana beach last week, I thought back about a recent riddle from The Riddler where an item does a random walk over a sequence of N integers. Behind doors. The player opens a door at the same rate as the item, door that closes immediately after. What is the fastest strategy to catch the item? With a small value of N, it seemed that repeating the same door twice and moving from 1 to N and backward was eventually uncovering the item.

Here is the cRude code I later wrote to check whether or not this was working:

  p=1+t%%N #starting item position
  h=v=s=m=1 #h=door, v=attempt number, s=direction, m=repeat number
    p=ifelse(p==1,2, #no choice
             ifelse(p==N,N-1, #no choice
                    ifelse(p==h-1,p-1, #avoid door
                           ifelse(p==h+1,p+1, #avoid door
                                  p+sample(c(-1,1),1))))) #random

and the outcome for N=100 was a maximum equal to 198. The optimal strategy leads to 196 as repeating the extreme doors is not useful.

The Riddle of the Sands [not a book review]

Posted in Books, Kids, pictures, Travel with tags , , , , , on May 22, 2017 by xi'an

Visiting Dublin last weekend led me to learn of the sad end of the author of The Riddle of the Sands, (Robert) Erskine Childers.  To my surprise, I indeed found out when reading about the Irish Civil War of the early 20’s that he was executed by a firing squad as a member of the anti-Treaty Sinn Féin. What could have led the author of the role model of classical spy novels, The Riddle of the Sands, to this tragical ending?! While his book was immensely popular in Britain, to the point of impacting the preparations for war in the years before WWI, and while he served as instructor of pilots towards a possible attack of Germany through the very Frisian islands appearing in the novel, he turned progressively towards Irish nationalism, smuggling weapons on his own boat, and opposing the treaty with Britain to  the point of joining the anti-treaty Sinn Féin. When a pistol was found at his home, he was sentenced to death and executed two days later.

the Coorong wetlands

Posted in pictures, Travel with tags , , , , , , , , , , on August 10, 2012 by xi'an

During this trip in southern Australia, we spent a day travelling the Coorong National Park, south of Adelaide. This is a long stretch of coastal wilderness wetlands protected by seceral rows of dunes stretching inland for a few kilometres before hitting merino sheep and Angus beef grazing prairies, with a laguna and lots of wild animals: we saw a few emus, (dead and alive) wallabies, a flattened echidna, pelicans, and even a dingo (or lone dog?) while driving along the Prince’s Highway (not mentioning the many road-kills that we could not identify!). It is a beautiful area in which I would have loved to spend (much) more time, especially with our rented camping-car being available: the dunes are fantastic, covered with a sort of maquis, there is hardly anyone around, and parts of the coast can only be accessed by the 4WD beach track (in good weather conditions). The surf was pounding real hard at the place we stopped (42 Mile Crossing) and there were a few fishermen sitting on the sand there. The sand was mostly covered by thick layers of pink seashells and there were also shells in most bushes, captured as the plants were growing. A truly magical place of rugged beauty that beat the Great Ocean Road in my opinion (even though I also loved this part of trip, presumably because it was winter and there was hardly anyone on the road, alas missing the Twelve Apostles at sunset by a dozen minutes or so!)…. The Coorong Peninsula also reminded of this great spy novel The Riddle of the Sands by Erskine Childers, even though it takes place in the Dutch wetlands.

%d bloggers like this: