## Nature snapshots [10 November]

Posted in Books, Kids, Travel, University life with tags , , , , , , , , , , , , , on December 11, 2022 by xi'an

As I was reading Nature in a [noisy] train from Coventry to London, I came across

## a new Monty Hall riddle

Posted in Books, Kids, Mountains, pictures, R, Statistics, Travel with tags , , , , , , , , , on May 22, 2020 by xi'an

The Riddler was sort of feeling the rising boredom of being under lockdown when proposing the following variant to the Monty Hall puzzle:

There are zero to three goats, with a probability ¼ each, and they are allocated to different doors uniformly among the three doors of the show. After the player chooses a door, Monty opens another door hidding a goat or signals this is impossible. Given that he did open a door, what is the probability that the player’s door does not hide a goat?

Indeed, a straightforward conditional probability computation considering all eight possible cases with the four cases corresponding to Monty opening a door leads to a probability of 3/8 for the player’s door. As confirmed by the following R code:

```s=sample
m=c(0,0)
for(t in 1:1e6)m=m+(range(s(1:3,s(1:3,1)))>1)
```

## X entropy for optimisation

Posted in Books, pictures, Statistics, Travel, University life with tags , , , , , , , , , , , on March 29, 2018 by xi'an

At Gregynog, with mounds of snow still visible in the surrounding hills, not to be confused with the many sheep dotting the fields(!), Owen Jones gave a three hour lecture on simulation for optimisation, which is a less travelled path when compared with simulation for integration. His second lecture covered cross entropy for optimisation purposes. (I had forgotten that Reuven Rubinstein and Dirk Kroese had put forward this aspect of their technique in the very title of their book. As “A Unified Approach to Combinatorial Optimization, Monte-Carlo Simulation and Machine Learning”.) The X entropy approaches pushes for simulations restricted to top values of the target function, iterating to find the best parameter in the parametric family used for the simulation. (Best to be understood in the Kullback sense.) Now, this is a wee bit like simulated annealing, where lots of artificial entities have to be calibrated in the algorithm, due to the original problem being unrelated to an specific stochastic framework. X entropy facilitates concentration on the highest values of the target, but requires a family of probability distributions that puts weight on the top region. This may be a damning issue in large dimensions. Owen illustrated the approach in the case of the travelling salesman problem, where the parameterised distribution is a Markov chain on the state space of city sequences. Further, if the optimal value of the target is unknown, avoiding getting stuck in a local optimum may be tricky. (Owen presented a proof of convergence for a temperature going to zero slowly enough that is equivalent to a sure exploration of the entire state space, in a discrete setting, which does not provide a reassurance in this respect, as the corresponding algorithm cannot be implemented.) This method falls into the range of methods that are doubly stochastic in that they rely on Monte Carlo approximations at each iteration of the exploration algorithm.

During a later talk, I tried to recycle one of my earlier R codes on simulated annealing for sudokus, but could not find a useful family of proposal distributions to reach the (unique) solution. Using a mere product of distributions on each of the free positions in the sudoku grid only led me to a penalty of 13 errors…

```1    2    8    5    9    7    4    9    3
7    3    5    1    2    4    6    2    8
4    6    9    6    3    8    5    7    1
2    7    5    3    1    6    9    4    8
8    1    4    7    8    9    7    6    2
6    9    3    8    4    2    1    3    5
3    8    6    4    7    5    2    1    9
1    4    2    9    6    3    8    5    7
9    5    7    2    1    8    3    4    6
```

It is hard to consider a distribution on the space of permutations, 𝔖⁸¹.

## wet summer reads [book reviews]

Posted in Books, Kids, Mountains, pictures, Travel with tags , , , , , , , , , , , , , , , , , , , , on September 24, 2017 by xi'an

“‘Oh ye of little faith.’ Rebus picked up his lamb chop and bit into it.” Ian Rankin, Rather be the Devil

Rebus’ latest case, a stray cat, a tree that should not be there, psychological worries in Uppsala, maths formulas, these are the themes of some of my vacation books. I read more than usual because of the heavy rains we faced in Northern Italy (rather than Scotland!). Ian Rankin’s latest novel Rather be the Devil reunites most of the characters of past novels, from John Rebus to Siobhan Clarke, Malcolm Fox, Big Ger’ Cafferty, and others. The book is just as fun to read as the previous ones (but only if one has read those I presume!), not particularly innovative in its plot, which recalls some earlier ones, and a wee bit disappointing in the way Big Ger’ seems to get the upper hand against Rebus and the (actual) police. Nonetheless pleasant for the characters themselves, including the City of Edinburgh itself!, and the dialogues. Rebus is not dead yet (spoiler?!) so there should be more volumes to come as Rankin does not seem to manage without his trademark detective. (And the above quote comes in connection with the muttonesque puzzle I mention in my post about Skye.)

The second book is a short story by Takashi Hiraide called The Guest Cat (in French, The cat who came from Heaven, both differing from the Japanese Neko ko kyaku) and which reads more like a prose poem than like a novel. It is about a (Japanese) middle-aged childless couple living in a small rented house that is next to a beautiful and decaying Japanese garden. And starting a relation with the neighbours’ beautiful and mysterious cat. Until the cat dies, somewhat inexplicably, and the couple has to go over its sorrow, compounded by the need to leave the special place where they live. This does not sound much of a story but I appreciated the beautiful way it is written (and translated), as well as related to it because of the stray cat that also visits us on a regular basis! (I do not know how well the book has been translated from Japanese into English.)

The third book is called Debout les Morts (translated as The Three Evangelists) and is one of the first detective stories of Fred Vargas, written in 1995. It is funny with well-conceived characters (although they sometimes verge so much on the caricature as to make the novel neo-picaresque) and a fairly original scenario that has a Russian doll or onion structure, involving many (many) layers. I was definitely expecting anything but the shocking ending! The three main characters (hence the English translation title) in the novel are 35-ish jobless historians whose interests range from hunter-gatherers [shouldn’t then he be a pre-historian?!] to the Great [WWI] War, with a medieval expert in the middle. (The author herself is a medieval historian.) As written above, it is excessive in everything, from the characters to the plot, to the number of murders, but or maybe hence it is quite fun to read.

The fourth book is Kjell Eriksson‘s Jorden ma rämna that I would translate from the French version as The earth may well split (as it is not translated in English at this stage), the second volume of the Ann Lindell series, which takes place in Uppsala, and in the nearby Swede countryside. I quite enjoyed this book as the detective part was is almost irrelevant. To the point of having the killer known from the start. As in many Scandinavian noir novels, especially Swedish ones, the social and psychological aspects are predominant, from the multiple events leading a drug addict to commit a series of crimes, to the endless introspection of both the main character and her solitude-seeking boyfriend, from the failures of the social services to deal with the addict to a global yearning for the old and vanished countryside community spirit, to the replacement of genuine workers’ Unions by bureaucratic structures. Not the most comforting read for a dark and stormy night, but definitely a good and well-written book.

And the last book is yet again a Japanese novel by Yôko Ogawa, The Housekeeper and The Professor, which title in French is closer to the Japanese title, The professor’s favourite equation (博士の愛した数式), is about a invalid maths professor who has an 80 minutes memory span, following a car accident. His PhD thesis was about the Artin conjecture. And about his carer (rather than housekeeper) who looks after him and manages to communicate despite the 80 mn barrier. And about the carer’s son who is nicknamed Root for having a head like a square root symbol (!). The book is enjoyable enough to read, with a few basic explanations of number theory, but the whole construct is very contrived as why would the professor manage to solve mathematical puzzles and keep some memory of older baseball games despite the 80mn window. (I also found the naivety of the carer as represented throughout the book a wee bit on the heavy side.)

Not a bad summer for books, in the end!!!

## Stoneleigh Abbey

Posted in pictures, Running, Travel with tags , , , , , , on June 2, 2016 by xi'an