Blog

All timestamps are based on your local time of:

 [ « Newer ] [ View: List | Cloud | Calendar | Latest comments | Photo albums ] [ Older » ]

 Puzzle solution 2020-03-17 20:45:35

In a a previous post I described a puzzle. A couple of people I've talked to since have mentioned that they thought about it but couldn't figure out the answer, so here it is. (If you don't want spoilers, stop reading now!)

The "magic square" chosen by the Devil is one of 64 possibilities. Or, in information theory terms, it's 6 bits of information (since each bit encodes one of two possibilities, and 2^6 is 64). So we need to somehow convey 6 bits of information to our friend, yet do so by flipping at most one token on the board.

The way to do this is to define 6 "parity sets" such that each parity set gives you 1 bit of information, and overlap them such that with a single token flip you can control the bit produced by each parity set. A parity set is simply an area of the board where you count up the number of "up" tokens. The parity (even or odd) of that number produces the bit of information.

So for example, consider a parity set that is the top half of the board (the first four rows). If there are an odd number of "up" tokens in that half of the board, the bit produced by that parity set is a 1. If there are an even number, the bit produced is a 0. By flipping any token in the top half of the board, you can change the bit produced from 1 to a 0 or vice-versa. And now consider a second parity set that is the left half of the board (the first four columns). Likewise that parity set produces a 1 or a 0. Importantly, if you flip a token in the top-left quarter of the board, you will change the bits produced by both parity sets. If you flip a token in the top-right quarter of the board, you will change the bit of only the first parity set and not the second. Flipping a bit in the bottom-left quarter will change the bit of only the second parity set and not the first.

We can extend this concept to create the following six parity sets:
- rows 1,2,3,4
- rows 1,2,5,6
- rows 1,3,5,7
- columns 1,2,3,4
- columns 1,2,5,6
- columns 1,3,5,7

Flipping the token in row 1, column 1 will change the parity of all six sets, while (for example) changing the token in row 5, column 6 will change the parity of sets 2, 3, and 5.

So the complete solution is like so: with your friend beforehand, you decide on the 6 parity sets (the above is one possibility) and their interpretation. One interpretation is that you take a 1 for an odd number of "up" tokens in the set, or a 0 for an even number, and glue together those six bits into a 6-bit number (e.g. 011001). That number then encodes the position of the "magic square", as it can represent 64 different values. Then, when you are in the room with the Devil, and he selects the "magic square", you work backwards to figure out the 6-bit number you want to encode, and flip the appropriate token so that the six parity sets produce the bits you need. Ta-da!

 Theories of Childhood 2019-09-28 19:35:12

Book #28 of 2019 is Theories of Childhood, by Carol Mooney. At long last, a book that succintly describes some of the different theories of early child development, without a lot of prescriptive advice. It let me build some mental models of how children develop so that I have a foundation for evaluating other how-to articles and such. It's a short book and doesn't have too much detail but is a good starting point, and I can probably now find other books that build on the different theories in more detail.

The only question I have is why the author chose these particular 5 theories and if there any other ones that might be good to know as well.

 Your Baby and Child 2019-09-14 05:38:28

Book #27 of 2019 is Your Baby and Child by Penelope Leach. I was recommended the book on the grounds that it explained child development processes, which is something I am very interested in. Sadly this turned out not to be the case, but is just another opinionated/prescriptive parenting book from which you have to tease out the development process yourself.

That being said, it's a pretty comprehensive book and covers a lot of ground (I just skimmed some of it, specially the later sections). I did like how it splits the material into different stages (newborn/settled baby/toddler/child/etc.) rather than use explicit age ranges, because those age ranges vary a lot in practice. But the book is dated, and some of the material is no longer "best practice" or has been rejected by the latest scientific research. And that material is mixed in with everything else, so it's hard to take anything the book says at face value.

 Joy in the Morning 2019-08-28 11:02:39

Book #26 of 2019 is Joy in the Morning, last of my Wodehouse binge. Certainly very similar to the previous books, in that the same scenarios appear over and over but are glued together in different sequences. While it was fun I'm glad I'm done with this series for now.

 More Wodehouse 2019-08-26 14:55:00

Books #22, #23, #24, and #25 of 2019 are Something Fresh, Heavy Weather, The Inimitable Jeeves, and The Code of the Woosters, all by P. G. Wodehouse. The last of the four I found the best, but they all were pretty good. Amusing as they are, there does appear to be some amount of repetition of themes, more than I would expect.

 The Information 2019-08-21 04:39:50

Book #21 of 2019 is The Information by James Gleick. It's a comprehensive but easy-to-read book on information. It starts with the transition from oral to written history, and goes all the way to quantum information theory concepts, spending the most amount of time on Claude Shannon's work on developing information theory. I found it quite good, although it took me a while to get through as I had to stop periodically and absorb stuff. There was a bunch of stuff in there that made for interesting thought-fodder. Wouldn't recommend it to a general public though; good for somebody with a general interest in information theory.

As a tangent, here's a (variant of a) puzzle I was forwarded not too long ago on WhatsApp. Usually I dislike those things, but this puzzle intrigued me as it seemed impossible to solve at first and took me a few days to figure out.

You, your friend, and the Devil play a game. You and the Devil are in the room with a 8x8 chess board with 64 tokens on it, one on each square. Meanwhile, your friend is outside of the room. The token can either be on an up position or a down position, and the difference in position is distinguishable to the eye. The Devil randomizes the tokens on the board (so it's a random mix of up and down) and chooses one of the 64 squares and calls it the magic square. Next, you may choose one token on a square and flip its position. Then, you leave the room, and your friend comes in and must guess what the magic square was by looking at the state of the board. You and your friend may agree on some strategy beforehand, but there are no "side channels" for leaking information other than the tokens on the chessboard.

Bonus points if you can explain the solution without using concepts from information theory (I couldn't).

 Thank you, Jeeves 2019-08-05 06:39:50

Book #20 of 2019 is Thank you, Jeeves by P. G. Wodehouse. Hi-liarious! The writing style kind of reminded me of Douglas Adams or Terry Pratchett, but the content is somewhat different. I very much enjoyed it though, and parts had me LOL'ing.

 Investing: The Last Liberal Art 2019-07-31 11:21:08

Book #19 of 2019 is Investing: The Last Liberal Art. I saw this randomly while browsing in a library and it sounded interesting so I picked it up. It was a bit of a rollercoaster, because:

(1) What I expected based on the jacket was that it would give a quick overview of the main ideas from different disciplines in a way that would encourage me to learn more about them.

(2) After reading the first chapter, I was very disappointed, because it seemed like it was really "pick a concept from a discipline and shoehorn it into some theory/explanation of how the stock market works". To be specific, the first chapter chose the concept of "equilibrium" from physics. Which just really rubbed me the wrong way, because it seemed like he was taking ideas totally out of context and mis-applying them.

(3) After reading the rest of the chapters, I understand a bit more what the author was trying to do. I still don't think he did a particularly good job, but at least the book pointed me to some interesting ideas that I hadn't thought about before, and can guide me to other interesting books.

Still not a book I would recommend overall, but I'm glad I didn't quit after the first chapter since the later ones redeemed the book a bit.

 The Girl in the Plain Brown Wrapper 2019-07-11 20:36:11

Book #18 of 2019 is The Girl in the Plain Brown Wrapper, last one of the Travis McGee books available at my local library. Now I need to find something else. This one was slightly better than average of the lot, I'd say.

 The Green Ripper 2019-07-11 20:34:35

Book #17 of 2019 is The Green Ripper, yet another of the Travis McGee books. This one was a little meh. There's a similar Jack Reacher book, although of course this one came first.

 [ « Newer ] [ View: List | Cloud | Calendar | Latest comments | Photo albums ] [ Older » ]

(c) Kartikaya Gupta, 2004-2020. User comments owned by their respective posters. All rights reserved.
You are accessing this website via IPv4. Consider upgrading to IPv6!