Question:
In a certain flower garden, each flower was either red, yellow, or blue, and all three colours were represented. A statistician once visited the garden and made the observation that whatever three flowers you picked, at least one of them was bound to be red. A second statistician visited the garden and made the observation that whatever three flowers you picked, at least one was bound to be yellow. Two logic students heard about this and got into an argument. The first student said: "It therefore follows that whatever three flowers you pick, at least one is bound to be blue, doesn't it?" The second student said: "Of course not!"
Which student was right, and why?
A few sample Questions from To Mock a Mocking Bird can be found here.
Answer:
The first student was right, and here is why.
Problem
I have to disagree with the authors answer. You can satisfy both the first and second statistician with combinations of two yellow and one red (YYR) or two red and one yellow (RRY)
To generate all 27 possibilities I wrote a quick Haskell list comprehension:
--ghci version --let r = 'R'; y = 'Y'; b = 'B'; fl = r:y:b:[] in putStr unlines [z|z<-[i:j:k:[]|i<-fl,j<-fl,k<-fl]] let r = 'R' y = 'Y' b = 'B' fl = r:y:b:[] in putStr unlines [i:j:k:[]|i<-fl,j<-fl,k<-fl]
The list of all 27 possibilities is:
RRR RRY RRB RYR RYY RYB RBR RBY RBB YRR YRY YRB YYR YYY YYB YBR YBY YBB BRR BRY BRB BYR BYY BYB BBR BBY BBB
But if I filter where at least one flower is yellow and least one flower is red I get:
--ghci version --let r = 'R'; y = 'Y'; b = 'B'; fl = r:y:b:[] in putStr unlines [i:j:k:[]|i<-fl,j<-fl,k<-fl,i==r||j==r||k==r,i==y||j==y||k==y] let r = 'R' y = 'Y' b = 'B' fl = r:y:b:[] in putStr unlines [i:j:k:[]|i<-fl,j<-fl,k<-fl, i==r||j==r||k==r, i==y||j==y||k==y]
This list of 12 possibilities including at least one red and yellow are:
RRY RYR RYY RYB RBY YRR YRY YRB YYR YBR BRY BYR
What am I misunderstanding?