## Brain-Teaser 520

**From The Sunday Times, 30th May 1971** [link]

“What’s inside it?” asked the Mole wriggling with curiosity.

“There’s cold chicken inside it”, replied the Rat briefly: “cold-tongue-cold-ham-cold-beef-pickled-gherkins-salad-french-rolls-cress-sandwiches-potted-meat-ginger-beer-lemonade-soda-water…”

“Oh, stop”, cried the Mole in ecstasies. “This is too much for one picnic. We can have another tomorrow on what’s left”.

“Do you really think so?” inquired the Rat seriously. “Let’s see. There’s only salad-pickled-gherkins-french-rolls-and-soda-water enough for two days: so if we have ham today we’ll have beef tomorrow; if we have potted meat today we’ll have cress sandwiches tomorrow; and if we have tongue today we’ll have lemonade tomorrow”.

“If we save the cress sandwiches for tomorrow we’ll have the beef today; if we keep the potted meat for tomorrow we’ll have the ginger beer today; and if we keep the lemonade for tomorrow we’ll have the ham today”. The Mole was entering into the spirit of the thing.

“In any event we’ll have the lemonade and ginger beer on different days, and likewise the beef and the chicken”, Rat shrieked excitedly.

“And if we have the chicken and cress sandwiches together, we’ll have the potted meat the day after we have the tongue”. The Mole rolled on his back at the prospect. “And we’ll eat every scrap”.

Which of the eight items did they save for the second day?

[teaser520]

## Jim Randell 12:10 pm

on26 May 2020 Permalink |The following Python program checks all possible assignments of days to the 8 items in question, and then checks to find which assignments satisfy all the conditions.

It runs in 50ms (on my new laptop).

Run:[ @repl.it ]Solution:The cold beef, potted meat and lemonade was saved for the second day.LikeLike

## John Crabtree 8:10 pm

on25 June 2020 Permalink |There are 9 statements for 8 unknowns. If Ch is true for chicken today, and ~Ch is true for chicken tomorrow,then the statements may be written as boolean equations:

1. H.~B + ~H = 1

2. P.~Cr + ~P = 1

3. T.~L + ~T = 1

4. ~Cr.B + Cr = 1

5. ~P.G + P = 1

6. ~L.H + L = 1

7. L XOR G

8. B XOR Ch

9. [(Ch XNOR Cr).~P.T] + (Ch XOR Cr) = 1

Combining equations 5, 7, 6, 1, 4, 2 and 8 gives

1 = (~P.G + P).( L XOR G).(~L.H + L).(H.~B + ~H).(~Cr.B + Cr).(P.~Cr + ~P).(B XOR Ch)

= ~P.G.( L XOR G).(~L.H + L).(H.~B + ~H).(~Cr.B + Cr).(P.~Cr + ~P).(B XOR Ch) +

….P.(P.~Cr + ~P).(~Cr.B + Cr).(H.~B + ~H).(~L.H + L).( L XOR G).(B XOR Ch)

= ~P.G.~L.H.~B.Cr.Ch + P.~Cr.B.~H.L.~G.~Ch

Combing this with equation 9 gives ~P.G.~L.H.~B.Cr.Ch.T = 1

Equation 3 is satisfied, but is not required to solve the teaser by this method

The items to be saved for tomorrow are given by ~B,~L and ~P, ie cold Beef, Lemonade and Potted meat.

Starting with any assumption other than T or ~T and working through the equations 1-2, and 4-8 in some order and finally 9 gives either a consistent solution,or a contradiction (reductio ad absurdum). If one starts by assuming T, then equation 3 is used before the others. If ~T is assumed, then equation 9 gives Ch.~Cr + ~Ch.Cr = 1, and both conditions have to be checked to show that ~T is not true

LikeLike