pic#57300910 triangle

Solutions and discussion of yesterday's logic puzzles

This post is for discussion and solutions to the hard logic puzzles in my previous post. I recommend reading that one first, especially if you want to think about the puzzles without spoilers.
Collapse )

I feel like there should be some practical application here - some similar real-world situation where it looks at first and second glance like there's zero information that can be conveyed, but where a clever strategy means that actually it can, and the discrepancy between the apparent security and the actual information leak can be exploited.

I don't necessarily mean "exploited" in an immoral way: it could be an attack against economic deadweight loss, or against Moloch (Scott Alexander's term for tragedy-of-the-commons type situations where the sum of everyone's actions leads to a situation nobody wants but no individual can break the deadlock), or against entropy (in the sense of general chaos and decay, not in the information-theory-specific sense, confusingly), rather than against other people. Finding information leaks in apparently secure contexts sounds like the domain of fraudsters and hackers, but it could also be applied to things like reconstructing fragmentary ancient texts or recovering corrupted recordings that seem to be lost, or providing market information that was thought to be unknowable but which is useful to both buyers and sellers - or, of course, white-hat hacking, finding potential exploits for fraudsters and hackers and closing them.
pic#57300910 triangle

Four really hard logic puzzles

These have in common that they can sound impossible at first description, even (or perhaps especially) to seasoned puzzlers and/or people with some mathematical knowledge. In all cases, if I were presented with them for the first time and asked "either do this or provide a proof that it's mathematically impossible", I'd be inclined to start working on the impossibility proof first - but I'd be wrong.

I will discuss solutions in a separate post, so there are no spoilers in the body of this post (although there are spoilers for the yellow hats one in the linked ACX comment thread). You can discuss solutions in comments here if you like, or wait for the follow-up post. I will say, though, that some of the solutions are a bit involved, so if you're hoping for a solution as concise and elegant as "ask the guard what the other guard would say" you might be disappointed.

1. The 100 prisoners and boxes puzzle
This was first told to me by a colleague at Autonomy about 15 years ago.

There are 100 prisoners, and there's a room containing 100 boxes, where each box contains a piece of paper with one prisoner's name written on it, and each of the 100 names is in one box. The prisoners will each go one at a time into the room, look inside up to 50 of the boxes and close them again (so that the boxes look indistinguishable from if they'd never been opened), and leave by another exit before the next prisoner comes in.

If all the prisoners find their own names, all the prisoners will be released; if even one prisoner fails to find their own name, they'll all be executed. They can decide on a strategy together in advance, but once the first prisoner has entered the room they can't communicate.

This is a probabilistic puzzle: you're not expected to come up with a strategy that will guarantee success, but one that does significantly better than the infinitesimal chance of success you'd have if everyone just opened 50 boxes at random.

2. The chessboard puzzle
gerald_duck recently posted this and said that some maths celebrities like Matt Parker couldn't solve it.

There's a chessboard with a coin on each of the 64 squares, some showing heads, some showing tails. You see someone hide a very small piece of paper under one of the coins. You may optionally turn one of the coins over to its other side, and then you must leave the room, and your associate can come in and try to guess which coin the paper is hidden under. You can decide on a strategy together in advance, but you can't use any "physical" tricks like the coin you touched being warmer or having fingerprint grease on it or being off-centre in its square.

This is not a probabilistic puzzle: the aim is to come up with a strategy that will guarantee success.

3. The yellow hats puzzle
This was recently posted in a comment on Astral Codex Ten (Scott Alexander's new blog). Many of the commenters there seemed to think it was impossible. I'll quote it verbatim (partly because of the entertainingness of the failure consequences):
You and your thirty friends have been imprisoned by a mad logician.

You are going to be placed in a room together, each wearing either a buttercup yellow hat or a hat or a cadmium yellow hat (I like yellow!)

Each of you will then be simultaneously and secretly given the option to guess which shade of hat you are wearing (although you are allowed to demur and not guess if you choose). If any of you guess correctly and no-one guesses incorrectly then you will be released, but if anyone guesses incorrectly, or if all thirty-one of you decline to guess, then you will be sentenced to spend the next twenty years either unable to lie or unable to tell the truth, guarding a door which may or may not have a goat behind it.

Once the trial has started you are forbidden from communicating, but you can agree a strategy in advance. What is the best chance of escape you can manage?

4. The red/green/blue hats puzzle
You're in a group of five people. You will each be given a red, green, or blue hat, and then be seated opposite each other in a row of 2 and a row of 3 (so each person can see the people in the row opposite but not the ones in their own row). There are no guarantees about the distribution of the five hat colours: they could be any combination, like RRRRR, RGBBB, etc.

Your aim is for at least one of you to guess their own hat colour correctly.

You can decide on a strategy together in advance, but guesses are simultaneous (so you can't get any information from anyone else's guess before making your own guess).

This is not a probabilistic puzzle: the aim is to come up with a strategy that will guarantee success.
pic#57300910 triangle

There Is No Game: review

Remember the riddle about the prisoner who rubs his hands together until they're sore, uses the saw to saw a plank in half, puts the two halves together to make a whole, climbs out of the hole to escape, then shouts until he's hoarse, gets on the horse and rides home?

What that riddle does to words, There Is No Game does to the scenery and infrastructure of a computer game. What looks like part of the background or an element of the user interface might be an item you can interact with and repurpose in an ingenious way that shouldn't work and yet somehow does, like Mark Watney in The Martian turning space suits into water tanks for his potato farm and a motorised camera into a two-way communication device.

This is a game about thinking outside the box, often literally. It doesn't just break the fourth wall, it gleefully demolishes it and gives you the pieces to play with.

There's a chapter inspired by point-and-click adventures (think Monkey Island), one based on role-playing games (think Zelda), and one viciously parodying the new breed of free-to-play, pay-to-win Skinner-box games. But you don't play as the detective protagonist of the point-and-click game or the adventurer hero of the RPG; you get to look behind the scenes (complete with half-painted wooden scenery) and advance your own goals, while the actual protagonist bumbles around pursuing theirs, unknowingly helping or hindering you.

This is a game that celebrates ingenuity, persistence, and the sheer bloody-mindedness of players who refuse to accept the narrator's repeated insistence that there's nothing to see here and you should quit the game and find something else to do. It rewards the perversity of doing the opposite of what you're told and believing the opposite of what you're told. And those rewards are great: there is a unique gem of a game waiting to be discovered by those who don't give up easily.

(By which I mean, of course, that there is no game.)
pic#57300910 triangle

"Disposable income"?

A mortgage adviser wanted to know our disposable income. We weren't sure how to answer, and the more we tried to drill down into what he meant by it, the more confusing it got. The concept seems to rely on two assumptions, both of which I disagree with: 1) that there's a clear binary division between needs and wants, and 2) that this corresponds to the distinction between regular recurring payments and ad-hoc spending (apart from food).

Lots of spending is irregular but necessary (e.g. car breakdown, essential appliance breakdown, dentist bills, vet bills). And lots of spending is regular but non-essential and could be cut back if we were struggling (e.g. charity giving, kids' extracurricular activities, subscriptions to video streaming services/magazines/websites).

He talked in terms of "money left in your account", but that's also a concept I found confusing: all money is either spent, given away, or saved/invested, so all of these involve it leaving your account (unless you "save" it by just leaving it sitting there, but that's not different in any mortgage-relevant way from moving it to a savings account). Whether you save money using a regular standing order to a savings account/investment vehicle, or by manually transferring some ad-hoc whenever you have a bit spare, or by just leaving it in your current account, is not a function of how wealthy or financially stable you are, it's a function of temperament (and, if there's any correlation between that temperament and mortgage suitability, it would probably go the other way: people organised enough to bother setting up a regular transfer to savings/investments are probably a better mortgage risk, even if they thereby have "less disposable income").

I'm aware we're quite privileged in that we have enough money for all our needs and most of our wants. If we were quite a bit poorer, then we would pay all the essential fixed bills (mortgage/rent, utilities, council tax, etc) and then be like "this is how much we have left for food and any other costs this month," so then we might have a better-defined idea what our "disposable income" was (even though it would be very low in that situation). But presumably most people in a position to be speaking to a mortgage adviser aren't in that situation. For us it's more like a complex system with feedback loops: we spend on non-essential stuff to the extent that we have spare money, and spend less when money is tighter, but it's kind of organic and averaged out over longish time periods, not like "we have X pounds and Y pence left at the end of this month." Big discretionary purchases like furniture/appliances and (in non-pandemic times) holidays dwarf the small everyday discretionary spending on things like games or takeaways, so I have no idea what our "regular" spending on that kind of thing is without doing a big calculation with rolling averages, and even then it would depend massively on what arbitrary time period you pick.

Would you be able to answer the question "how much is your disposable income?" I'm not asking for a number, just asking if you think it's a meaningful question.
pic#57300910 triangle

Recent book

(The title of this post is in the singular because I've been too busy these last few months trying to juggle homeschooling to have much time for reading, but thankfully schools have reopened now.)

An Elegant Solution – Anne Atkins

This book is delightful. It's so very, very Cambridge. It richly evokes a world of punting and college architecture and porters and May Balls and the Assassins' Guild and Gardies and interesting conversations at odd hours of the day and night. I really liked both the main characters, and so much of it was familiar and relatable, like Charlotte saying Cambridge was the first place she really felt at home, and that she no longer stood out, and that some other freshers found this change difficult to adjust to but she liked it; or the bit about how the intense eight-week terms mean that romantic relationships develop as much in a few weeks as they would in a few years in an office; or Theo having spent his childhood being told off by adults who then got even angrier because they mistook his quiet expression of distress for nonchalant defiance.

Maths and cryptocurrency both play a major role in the story. The characters are clever, most of them in a playful and fun way, and there's a lot of wordplay and etymological puns and nerdy in-jokes. I kept reading out particularly entertaining bits to Alex.

It's not perfect. I found there were slightly too many viewpoint characters for me to keep track of comfortably, and it wasn't always clear when the narrative shifted from one to another: if the shift happened over a page break so there wasn't the clue of an extra line break, and if the new section just started using "he" or "she" rather than a name, which it often did, then it wasn't clear it wasn't still talking about the previous character. There are a couple of bits where the author seems to withhold information just for the sake of it, rather than because it contributes to the suspense in any meaningful way. The unsympathetic characters are a bit caricatured. There was a loose thread that I was expecting to see tied up and wasn't as far as I could tell (gur pvephzfgnaprf bs Gurb'f sngure'f qrngu). And there were a lot of proofreading mistakes (there are two proofreaders credited in the acknowledgements, but it isn't consistent about the hyphenation between the two of them, so one is a proofreader and the other a proof-reader; there are a lot of capitalisation mistakes around dialogue, like "Hello," She said; and there are lots of misspelled proper names, like "Oepidus" or "Glaxo Smith Klein" or Don "McClean"). And I was a bit unconvinced by some of the cryptocurrency details. But overall it was a really good book: delightful and enjoyable enough to abundantly make up for these flaws. I think atreic and geekette8 would probably like it.

There is apparently a prequel, which I'd like to read next.
pic#57300910 triangle

Bitcoin

Bitcoin is having a moment. It's appreciated from $30k to $57k just this year so far (I predict $60k by the end of February). Tesla made more money by investing in Bitcoin in the last month than by selling cars in the last year.

I bought some in 2018, but only a tiny amount: not enough to be worth it as a hedge against losing savings to inflation or even as a dectuple-your-money-in-three-years strategy (although in hindsight I should have invested enough to do those things), but more as a very long-term hedge against Bitcoin eating most or all of the whole world economy and the haves and have-nots being defined by whether you own any Bitcoin at all. That sounds ludicrous and far-fetched, and I admit it's only a remote possibility, but it seemed plausible enough to invest a trivial amount to put myself on the right side of that binary divide.

(I don't think Bitcoin will ever become the default currency for everyday buying and selling of goods, because of the transaction costs, although possibly some other currency built on top of or backed by Bitcoin might. But I do think it will become more and more attractive as a long-term store of value. Maybe in the future your savings will be denominated in Bitcoin and you'll convert some into another currency about as often as you withdraw from an ISA or a pension fund.)

The market capitalisation of an asset (I only learned this recently) is the total value of all of that asset, calculated by multiplying the total amount that exists by the current market value. The current market capitalisation of bitcoin is... (drum roll) just over $1 trillion. (Sanity check: $50k * 21 million ~= 1 trillion, and 21 million is the hard upper limit on how many bitcoins can ever exist. It's this hard limit that makes Bitcoin attractive as an inflation-proof store of value.)
(I know market cap is kind of an abstract theoretical concept, in that if everyone holding bitcoins tried to sell all at once that would tank the price and they wouldn't actually make $1 trillion between them. But this doesn't make Bitcoin "not real", because the same is true of gold, or shares in a company, or probably most foreign currencies.)

Total world wealth is apparently 360 trillion. That means Bitcoin already accounts for 1/360 of world wealth, which is actually a lot closer to "eating the whole world economy" than I had thought. It also means that Bitcoin can only grow by another 360 times at most (not counting real-terms growth in world wealth, which will probably be only low sigle-digit percentages per year, which is relatively negligible).
pic#57300910 triangle

Top-down and bottom-up processing

A couple of Scott Alexander's latest posts (and some of his earlier ones) relate to the balance between how much you rely on incoming sensory information versus priors, or bottom-up versus top-down processing. (This is not as simplistic as saying "some people won't change their pre-existing beliefs even when confronted with contradictory evidence." Top-down processing is a vital component of anyone's cognition. It's what allows you to see some unconnected pieces of dog through the gaps in a fence and effortlessly perceive a whole dog, or to hear a cashier's shout distorted by a noisy supermarket into "ex ease" and know it's overwhelmingly likely to be "next please" and not "sex cheese". Everyone needs to give some weight to their priors and some weight to the new incoming information; it's just that some people in some situations err more in one direction than the other.) The balance between the two types of processing has implications for all sorts of things in psychology, like autism, schizophrenia, and depression.

I think this has also given me a new insight into the iNtuition–Sensing axis of the Myers-Briggs Type Indicator.

(Brief digression about the MBTI: I'm not saying it has any particular objective validity (the Big Five is better for that, as it's supported by factor analysis), but pretty much any arbitrary personality classification system has some value, even Hogwarts houses, in that it provides a useful shorthand and shared vocabulary for talking about certain aspects of personality variation. Alex and I also found the MBTI helpful when we were at a church where we felt unhappy and alienated: it helped us understand that we weren't Wrong and the church wasn't Wrong, but the church was very F on the Thinking–Feeling axis and we were very T.)

I've always been a bit unsure about what the N–S axis represents. I thought maybe N meant "rich inner life, head in the clouds, comfortable with abstraction" and S meant "more concerned with concrete practical realities", and on that axis I'm more N. But now I'm wondering if another way of looking at the N–S axis is that it captures the the tradeoff space between top-down and bottom-up processing: how much you rely on new incoming sensory information versus the "intuition" of your priors. Under this interpretation, I'm very strongly S.

This is what makes me good at maths and programming and proofreading: I see the detail of what's actually there rather than what I expected to see. (Although I'm not completely immune to seeing what I expected to see: another pet hobby of Scott Alexander's is to sneak instances of repeated "the the" into his essays about top-down processing and seeing if anyone notices them, and even though I'm pretty good at spotting other typos, that one doesn't leap out at me in the same way. Luckily for my actual proofreading work, Word and Google Docs are good at spotting repeated words. Did you spot the "the the" I put in earlier in this post?)

It's also what makes me bad at engaging properly with Bible studies: I get hung up on the one point in the whole passage that says something that doesn't seem to make sense, and to me it feels like other people are spouting obvious platitudes while ignoring the elephant in the room, while to them it probably feels like I'm missing the forest for the trees and obsessing over a minor irrelevant detail. (The one time I ever led a study myself, it was on James 2, and I spent most of my preparation time trying to figure out whether there was any sensible explanation for the glaring inconsistency in verse 18 or whether it was just an error: where James, who is making an argument that faith without deeds is not enough and deeds are also needed, has his opponent saying "You have faith; I have deeds", rather than the other way round, and then answers them "Show me your faith without deeds, and I will show you my faith by my deeds." It turned out the others in the study had literally not noticed the inversion and had read it as if it said "You have deeds; I have faith", and even when I pointed it out, it didn't seem to bother them or have any effect on the high-level message they got from the passage, which was just that faith and deeds are both important.)

I'm also incapable of getting so absorbed in an activity that I forget to eat. I like the idea of being an abstract ethereal being of pure intellect who's untroubled by such base concerns as food, but in practice I can't pull it off, because the immediate sensory data of hunger is too salient for me and can't be overridden by mental focus on an activity.

Also, in the same way as Scott describes depressed people viewing all their expreiences through a depressive lens and therefore not being able to let neutral or positive experiences update their long-term depressive priors, I wonder if my "always like this fallacy" is something like the inverse of that: I over-update on my current experience, whether positive or negative, and feel like my whole life has always been like that and always will be. This seems to fit with over-weighting current incoming sensory information (using "sensory" in the same slightly broader way that Scott uses it) at the expense of priors.
pic#57300910 triangle

A few more Scott Alexander links

A couple more Scott Alexander posts I'm wishing I'd mentioned in my post last week are https://slatestarcodex.com/2014/02/23/in-favor-of-niceness-community-and-civilization/ and https://slatestarcodex.com/2017/03/24/guided-by-the-beauty-of-our-weapons/ , which are excellent arguments for arguing logically and in good faith rather than taking the importance of one's cause as an excuse for fighting dirty. "Logical debate has one advantage over narrative, rhetoric, and violence: it’s an asymmetric weapon. That is, it’s a weapon which is stronger in the hands of the good guys than in the hands of the bad guys. ... Violence is a symmetric weapon; the bad guys’ punches hit just as hard as the good guys’ do."

Also, shout-outs for a couple of his latest posts: https://astralcodexten.substack.com/p/covidvitamin-d-much-more-than-you , which is a great example of one of his examinations of the state of research in some area in science or medicine, where he points out some of the logical and statistical errors the researchers make; and https://astralcodexten.substack.com/p/book-review-the-cult-of-smart , which is a very interesting essay on intelligence and meritocracy and credentialism and so on (it's ostensibly a book review, but to a large extent he just uses the book as a jumping-off point for his own opinions on the topic, which makes it more interesting IMO than the phrase "book review" suggests). I don't agree with everything he says in this one, but I commend it to @Stark as an example of Scott getting emotional and impassioned about something (in part III).
pic#57300910 triangle

Scott Alexander (Slate Star Codex / Astral Codex Ten)

Scott Alexander is my favourite blogger/essayist. He's an extremely smart psychiatrist who writes fascinating, insightful, often very funny (but also long) posts about lots of aspects of psychology, cognition, medicine, science in general, politics and culture. His ideas have shaped my thinking more than any other writer, with the possible exception of CS Lewis. He writes lucidly and compellingly on interesting topics, and has a brilliant ability to draw together ideas from wildly different fields and spot illuminating parallels between them. Until last year he blogged at Slate Star Codex (which is a near-anagram of his name), where most of the archives of his posts still are, but now he's publishing new posts at Astral Codex Ten (which is a better anagram).

I'm making this post partly prompted by someone who asked me and other fans of Scott's to recommend some favourite posts from the archives for new readers, and partly because I'm planning a post based on some of his most recent posts, so I wanted to write this as context in case people don't know who he is when I mention him.

I found the "recommend your favourite post" request hard, as I have trouble consciously remembering specific essays of Scott's and what's in them, but I do find his ideas have shaped my thinking so much that I sometimes say or write things I think are my own ideas and later embarrassingly find them in one of his old essays, where I must have first come across them. But here's a non-exhaustive list of some of his posts I particularly like.

https://slatestarcodex.com/2014/09/10/society-is-fixed-biology-is-mutable/ contrasts social and biological solutions to social problems, e.g. banning leaded petrol; https://slatestarcodex.com/2015/01/31/the-parable-of-the-talents/ is about innate ability versus effort, and uses the straightforward example of basketball ability to illuminate the emotionally and politically fraught example of intelligence; https://slatestarcodex.com/2014/09/30/i-can-tolerate-anything-except-the-outgroup/ is about the paradox of tolerance and about the outgroup not necessarily being who you think it is; https://slatestarcodex.com/2014/11/21/the-categories-were-made-for-man-not-man-for-the-categories/ explores where you draw the lines between categories and why, because often there's no factually correct division but just a variety of possible divisions with different tradeoffs; he argues convincingly in favour of accepting trans people as the gender they say they are, which makes it a good one to cite against the people who bafflingly label a Jewish Democrat-voting Trump-denouncing blogger who lives in a poly group home in California as a dangerous right-wing extremist; and https://slatestarcodex.com/2014/11/03/all-in-all-another-brick-in-the-motte/ popularised the concept of a motte-and-bailey argument, a discussion about which was what prompted the original request for post recommendations.

https://slatestarcodex.com/2014/03/17/what-universal-human-experiences-are-you-missing-without-realizing-it/ covers things like aphantasia (lack of visual imagination), and I just find the general principle of the essay really useful and insightful: to remember not to assume your own experiences are universal. https://slatestarcodex.com/2017/10/02/different-worlds/ is more of the same (i.e. people's experiences are more different than you realise), but on an interpersonal rather than individual sensory/mental level. It deals with filter bubbles and the way that people, presumably through no fault or merit of their own, just seem to consistently find themselves surrounded by certain types of people and thus have certain types of life experiences which are dramatically different to those of other seemingly-similar people. I am not the woman quoted in part IV, but I could have written something similar.

https://slatestarcodex.com/2018/01/24/conflict-vs-mistake/ categorises two different approaches to disagreements; the first couple of paragraphs are a bit jargony so I recommend starting with "Mistake theorists treat politics..." When I first read this, I thought it was saying that mistake theory was obviously right and I thought its description of conflict theory was a grotesque caricature of how some other people allegedly operate; and yet there are people who read it and came away identifying as conflict theorists, so again that shows how people are more different than I first believed.

https://slatestarcodex.com/2014/03/08/the-slate-star-codex-political-spectrum-quiz/ captures a distinction in political attitudes that's quite central to my thinking and a concept I often want to refer people to.

He's also doing some really interesting original research on birth order effects (see https://slatestarcodex.com/2018/01/08/fight-me-psychologists-birth-order-effects-exist-and-are-very-strong/ ). His annual survey of around 8000 people who read his blog skews heavily in favour of firstborns, and he's controlled for things like "some demographics have larger families so are less likely to be firstborns): just out of readers with one sibling, 71.4% of them are the elder. An interesting question is what exactly is being correlated with firstborn-ness here. It's something like intelligence, but not precisely that: the effect doesn't seem to be as strong in groups that are selected for intelligence but not selected for a kind of nerdiness or intellectual interestedness. People have suggested all sorts of armchair theories about why the correlation might exist, some biological (e.g. parental age, depletion of maternal nutrients) and some social (either that firstborns get more parental attention because there's less competition, or that later-borns have the advantage of a close-age peer to copy from and interact with, whereas firstborns have to learn to figure out more stuff for themselves and/or spend more time in their own imagination), so Scott is working on refining his results by drilling down into the effects of biological versus social siblings (e.g. biological siblings you didn't necessarily grow up with, versus adopted or step-siblings that you grew up with but weren't biologically related to), and I'm looking forward to seeing those results.

There was a post on his old LiveJournal on futarchy (which I can't now find on archive.org), which was the first one I remember ever reading and thinking this guy is worth following.

I also love his short stories, especially https://slatestarcodex.com/2018/10/30/sort-by-controversial/ , which is a really insightful take on social conflict in the internet age, and has given us the concept of a "scissor statement", which is a generically useful piece of mental architecture in the same way as "motte and bailey"; https://www.gwern.net/docs/fiction/2011-yvain-thestoryofemilyandcontrol.html , about an identical twin who is the "control group" for her sister, which is chilling and creepy and a great example of interesting speculative fiction; and https://slatestarcodex.com/2015/06/02/and-i-show-you-how-deep-the-rabbit-hole-goes/ , which is just really fun.

He also makes some very fun, silly, and nerdy posts, like the recent https://astralcodexten.substack.com/p/list-of-fictional-cryptocurrencies , or his collections of Swifties, which are the best and cleverest I've seen anywhere: https://slatestarcodex.com/2014/08/14/fifty-swifties/ https://slatestarcodex.com/2015/06/15/fifty-more-swifties/ https://slatestarcodex.com/2015/10/02/swifties-3-the-race-is-not-to-the-swifty/