Post ARgE0r8c8dNWaLGEvg by bwbeach@qoto.org
(DIR) More posts by bwbeach@qoto.org
(DIR) Post #ARgE0r8c8dNWaLGEvg by bwbeach@qoto.org
2023-01-15T21:43:53Z
0 likes, 1 repeats
A friend of mine posed the following puzzle: You have 12 marbles, which all have the same weight except one, which may be either heavier or lighter. How can you find the different one in three weighings on a balance scale?I know I’ve seen it before, but it still too me a while to work out a solution. Then I wanted to visualize the solution, and cobbled together haskell, graphviz, and a couple shell scripts.Then, of course, I saw my solution was wrong and had to re-work it.Spoiler, of course:https://github.com/bwbeach/puzzles/blob/main/weigh-twelve/README.md