Brain-Teaser 734: Golden orchard
From The Sunday Times, 10th August 1975 [link]
A farmer grows apples in an orchard divided into plots —three to the East and three to the West of a central path. The apples are of two types — for eating (Cox, Laxton, Pearmain) and for cider making (Tremlitt, Coppin, Kingston).
Adjacent plots contain apples of different basic type. The apples are of six colours (red, green, russet, golden, orange, yellow) and of six tastes (sweet, sour, acid, tart, pleasant, bitter).
They ripen at different times, either early or late in July, August and September. Those ripening in early or late September are in plots directly opposite. Those South of Pearmain do not ripen in August. Tart are directly West of the acid variety, which ripens in early August. Yellow apples and those maturing in late September are adjacent. Yellow and orange are of the same type. Orange are North of pleasant and also North of Pearmain. Kingstons are adjacent to golden. Green is South of bitter.
Cox ripen in early July, and Laxtons ripen early in a different month. Tremlitts are red, and Kingstons mature after Coppins, which are not sour.
If cider apples taste unpleasant, what are the characteristics of the apples in North East plot? (Name, colour, taste, ripens).
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 2 (1981).
I think the puzzle as published in The Sunday Times and in the book is open to interpretation, and my first attempt using a reasonable interpretation gave two solutions (neither of which are the published solution). After examining the given solution in the book I think the following wording is clearer:
A farmer grows apples in an orchard divided into plots — three to the East and three to the West of a central track. Adjacent plots are separated by a shared fence. The apples are of two basic types — for eating (Cox, Laxton, Pearmain) and for cider making (Tremlitt, Coppin, Kingston).
Neighbouring plots contain apples of different basic type. The apples are of six colours (red, green, russet, golden, orange, yellow) and of six tastes (sweet, sour, acid, tart, pleasant, bitter).
They ripen at different times, either early or late in July, August and September. Those ripening in early or late September are in plots directly opposite each other. Those directly South of Pearmain do not ripen in August. Tart are directly West of the acid variety, which ripens in early August. Yellow apples and those maturing in late September are in adjacent plots. Yellow and orange are of the same basic type. Orange are directly North of Permain, which are pleasant. Kingstons and golden are in adjacent plots. Green is directly South of bitter.
Cox ripen in early July, and Laxtons ripen early in a different month. Tremlitts are red, and Kingstons mature after Coppins, which are not sour.
If cider apples are neither pleasant nor sweet, what are the characteristics of the apples in North-East plot?
[teaser734]





Jim Randell 10:20 am on 11 September 2024 Permalink |
When I first tackled this puzzle (using the text from the 1981 book, and what I considered to be the most reasonable interpretation of the text), I found two solutions. And neither of them matched the published solution.
According to the solution published in The Sunday Times [link] there were:
However, I think the wording of the puzzle is too vague to permit a single solution.
Having looked at the answer in the book, I constructed the alternative wording, which I hope is clearer.
Using the [[
SubstitutedExpression]] solver from the enigma.py library, we can assign the characteristics to the plots.This run-file executes in 81ms. (Internal runtime of the generated code is 1.2ms).
#! python3 -m enigma -rr SubstitutedExpression # plots are: # # 1 || 2 # --++-- # 3 || 4 # --++-- # 5 || 6 # # we need to assign each of the six characteristics from each group # to a different plot number # # Eating: A = Cox; B = Laxton; C = Permain # Cider: D = Tremlitt; E = Coppin; F = Kingston # # Colour: G = red; H = green; I = russet; J = golden; K = orange; L = yellow # # Taste: M = sweet; N = sour; P = acid; Q = tart; R = pleasant; S = bitter # # Season: T = early Jul; U = late Jul; V = early Aug; W = late Aug; X = early Sep; Y = late Sep --base=7 --digits="1-6" --distinct="ABCDEF,GHIJKL,MNPQRS,TUVWXY" # row adjacency (W, E) --code="row_adj = {(1, 2), (3, 4), (5, 6)}" # col adjacency (N, S) --code="col_adj = {(1, 3), (2, 4), (3, 5), (4, 6)}" # adjacent plots contain apples of different types "{A, B, C} in ({1, 4, 5}, {2, 3, 6})" # those ripening in early/late September (X, Y) are opposite "ordered(X, Y) in row_adj" # Southerly neighbour of Permain (C) do not ripen in Aug (V, W) "C not in {5, 6}" # implies Permain (C) is not in southernmost row "(C, V) not in col_adj" "(C, W) not in col_adj" # tart (Q) are directly West of acid (P) "(Q, P) in row_adj" # acid (P) ripens in early Aug (V) "P = V" # yellow apples (L) and those maturing in late Sep (Y) are adjacent "ordered(L, Y) in col_adj" # yellow (L) and orange (K) are of the same type "len(intersect([{L, K}, {A, B, C}])) != 1" # orange (K) are Northerly neighbours of pleasant (R), and also Northerly neighbours of Permain (C) "(K, R) in col_adj" "(K, C) in col_adj" # Kingston (F) are adjacent to golden (J) "ordered(F, J) in col_adj" # green (H) is Southerly neighbour of bitter (S) "(S, H) in col_adj" # Cox (A) ripen in early Jul (T) "A = T" # Laxtons (B) ripen early in [not Jul] (V, X) "B in {V, X}" # Tremlitts (D) are red (G) "D = G" # Kingstons (F) mature after Coppins (E) "[T, U, V, W, X, Y].index(F) > [T, U, V, W, X, Y].index(E)" # Coppins (E) are not sour (N) "E != N" # cider apples do not taste pleasant (R) or sweet (M) "R not in {D, E, F}" "M not in {D, E, F}" # make sure all the variables are filled out "true(A, B, C, D, E, F, G, H, I, J, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y)" --template="(A B C D E F) (G H I J K L) (M N P Q R S) (T U V W X Y)" --solution="" --denest=-1And the following Python program can be used to make the output more friendly:
from enigma import (SubstitutedExpression, join, printf) p = SubstitutedExpression.from_file("teaser734b.run") # labels for the characteristics label = dict( # Type: A="Cox", B="Laxton", C="Permain", D="Tremlitt", E="Coppin", F="Kingston", # Colour: G="red", H="green", I="russet", J="golden", K="orange", L="yellow", # Taste: M="sweet", N="sour", P="acid", Q="tart", R="pleasant", S="bitter", # Season: T="early Jul", U="late Jul", V="early Aug", W="late Aug", X="early Sep", Y="late Sep", ) # solve the puzzle for s in p.solve(verbose=0): # collect the characteristics for each plot d = dict((k, list()) for k in [1, 2, 3, 4, 5, 6]) for k in sorted(s.keys()): d[s[k]].append(label.get(k)) # output the solution for k in sorted(d.keys()): printf("{k} -> {v}", v=join(d[k], sep="; ")) printf()Solution: The North-East plot contains Cox, russet in colour, sweet in taste, and ripens in early July.
The full solution is:
LikeLike