Fog Creek Software
Discussion Board


new puzzles up... check 'em out.

Michael H. Pryor
Wednesday, February 6, 2002


If the white triangle is frobby, then the rule is either "white or circle" or it is "black or triangle." By either of these rules (demonstrating that in a 2x2 system, both rules are equivalent), the white triangle and the black circle ARE frobby, while the white circle and the black triangle are not.

Tim Keating
Wednesday, February 6, 2002

Heh, the title sort of gives a mean hint to everything.  Was it the subconsious effect of the hint, or your massive brain-power honed by constant lovin' contact with the Machine? ;-)

Red Davis
Wednesday, February 6, 2002


3.  E, F & 5.  The rule only states that Odd numbers must map to Vowels.  It doesn't mention whether or not Even Numbers map to non-vowels.  So you should turn over the 5 to confirm that it has a vowel on the flipside, the F to ensure that it's an even number, and the E to ensure that it has an odd number.  The flipside of 2 proves nothing with relation to the rule stated.



Wednesday, February 6, 2002

I don't think you need to turn over the E.
The rule is "odds must have vowels", not "vowels must have odds".

So whether the E has a an odd number or not doesn't affect the rule.

Jonno Downes
Wednesday, February 6, 2002

You only need to turn over the 5 and the F. The 5 to prove that the letter on the other side is a vowel, and the F to prove that the number on the other side is not odd. The rule says that an odd number must have a vowel, but it doesn't say that a vowel must have an odd number, so the E card doesn't need to be checked. Likewise, the rule also says nothing about the letter accompanying an even number, so the 2 doesn't need to be checked.

Greg Shoom
Wednesday, February 6, 2002

Don't feel bad if you got either of these wrong... the success rate in the general population is something like 5%. I'm serious. See the Shafir paper I referred to.( - there's a good theoretical reason why humans make these mistakes.

I am curious as to whether the success rate would be higher among top notch programmers. I would actually guess that good programmers would get this right at a much higher rate. If you know a bunch of programmers, ask them these problems and see if the results correlate to how good they are at coding.

Joel Spolsky
Wednesday, February 6, 2002

Ah, I may be being dumber than usual, but the first question, as phrased, is apparently unanswerable.

1) "White Triangle" is frobby, so the thought-of-shape-and-colour is either "white + not triangle" or "not white + triangle".

2) So, "White ellipse" would suffice.

3) which would mean that "white triangle" and "white circle" were frobby.

4) Or, "Black ellipse" would suffice

5) which would mean that "black..."

Really, if you're going to pose supposedly brain-testing questions, at least phrase them unambiguously.  If I were asked this in an interview I'd get very scared about the communication skills of the questioner.

Matt Clark
Wednesday, February 6, 2002

The answer to part two is "Two cards, the card showing 5 and the card showing F".  Nobody cares about the E or the two, as there is no rule that relates to their opposite faces.  We have to verify that '5' has a vowel on the other side, and that 'F' does not have an odd number on it's opposite side.

Note that the 'rule' is only 'proved' if these are the *only* four cards in the problem set.

Matt Clark
Wednesday, February 6, 2002

Do excuse me, where above I said:

4) Or, "Black ellipse" would suffice
5) which would mean that "black..."

I meant of course:

4) Or, "Pink triangle" would suffice
5) which would mean that "not pink + triangle"...

Momentary lapse of reason y'know.  Sorry for any inconvenience caused ;-)

Matt Clark
Wednesday, February 6, 2002


Really, if you're going to pose supposedly correct contradictions, at least phrase them correctly. If you were to respond that way in an interview I'd get very scared about your communication skills.

John Lemitz
Wednesday, February 6, 2002

I got the first part right, after about 5 minutes of thought. My first impression, though, was absolutely backwards. After about two minutes, I decided that it was partly indeterminate, and then I figured it out.

For the second part, I got that we have to check the 5 to confirm it has a vowel, but I didn't get that we needed to make sure the F (the only exposed consonant) wasn't covering an odd number.

I hate these things.

Jeff Paulsen
Thursday, February 7, 2002

John, you are too right!  Goes to show I should never take part in an interview at midnight either...

Seriously though, does anyone else feel that the shapes and colours that the questioner could have in mind need explicitly limiting?

Matt Clark
Thursday, February 7, 2002

Most people have discussed about the second part, and little else must be said there (yes, the correct answer is that you need to flip two cards).

About the first question, nobody has given the general answer: if you are given a "floppy" object, then there is only another one "floppy" object---the one that differs in the two "characteristcs". I.e., if you are given the black triangle as "floppy", then the white circle is "floppy"also, and they are the only two that are "floppy". The demonstration is easy enough so everybody can work it by itself ;-).

Obviously, this is true if we deal with a LIMITED AND PREVIOUSLY SPECIFIED POPULATION. So no elipses or pink flamingos here.

P.S. I hope this is understandable, as English is not my main language.

Alberto Molina
Thursday, February 7, 2002


FROBBY, FROBBY and FROBBY, not FLOPPY. Sorry, but my brain must have been on vacation when I wrote the previous post.

Alberto Molina
Thursday, February 7, 2002

Actually, I think it unlikely that top-notch coders will do statistically significantly better than average at the card-flipping task (properly called the Wason card task or problem) - if I recall correctly, other highly logical types have been tested and fall out at the same rate.  The problem is that the examples used (numbers and letters) are abstract.  There's some interesting research in cognitive science on the difficulties abstractions have for human reasoning. It turns out that if you replace the abstract rules with social rules (I'll give an example in a second), people do much much better.

Example (logically equivalent to the 2/5/F/E problem): the drinking age is 21.  You have four cards, each with the age of a person on one side and their drink of choice on the other.  The cards currently read:

drinking vodka
drinking water
17 years old
25 years old

Which cards do you have to turn over to check that no one's breaking the rule?

Much easier, isn't it?

Ben Scofield
Thursday, February 7, 2002

To answer Matt's question, I think that the first sentence of Part I clearly limits the universe of possible shapes to the four specified.

However, if I heard this question in an interview situation and I was expecting a trick, I might say something like "just to clarify, the shape of which you are thinking is in the set of 4 that was just described, right?" Good programmers keep an eye out for unexpected inputs, so it would be a good question to ask even though the problem isn't very ambiguous.

Beth Linker
Thursday, February 7, 2002

Here's another way to think about it...frobbiness demonstrates an exlusive-or relationship between the characteristics of two shapes. If we call white "true" and black "false," and circle "true" and triangle "false" (the values are completely arbitrary, and not important to the solution), then a white XOR triangle = true, and black XOR circle = true. Remember, if the value is "true" that means it's the same as the shape our questioner is thinking of - if false, it's different. Now, assign the opposite values. white is false, black is true, circle is false, triangle is true. white XOR triangle = true, black XOR circle = true.

There is no case where white is true and triangle is true, or where white is false and triangle is false, because then we know that the white triangle would not be frobby. We know that "black" and "circle" will always have the opposite values of "white" and "triangle" because a shape can't have two colors, or two shapes. Therefore, we've exhausted all the possibilities there are.

That's all dandy, but I think the easiest way to think about it is this. We know that a white triangle is frobby. This means that he is either thinking of a black triangle or a white circle. A black circle meets the standards of frobbiness for both shapes.

Mark Ashton
Thursday, February 7, 2002

Interesting problems.  I think I might have gotten some inadvertent help on the "frobby" puzzle by reading Joel's discussion on his site about thinking through disjunctions.  As a result, some neurons may have fired in my brain that wouldn't have otherwise.

Even so, I got the right answer to the frobby puzzle pretty fast (a few seconds), and without really thinking through it.  As soon as I read what the shapes were, I immediately and subconsciously had them in a chart arrangement, with one column for each color and one row for each shape.  That turned out to make the rest of the puzzle really easy.  I immediately equated "frobby" to applying to two shapes on a diagonal.  As soon as I read the white triangle was frobby, I knew the black circle was, too, and the other two were not.  All of this was amazingly subconscious, so much so that I had to go over it several times and make sure I hadn't made a mistake.

The second problem was easy, too, especially since given the stuff I've been programming lately, I eat, drink, and breathe logic.  The notion that "X implies Y" is equivalent to "!X or Y" and "!(X and !Y)" is bone-deep in me, as they say.  Obviously you only need to verify that "X and !Y" never happens, so you only need to check the 5 (X) and the F (!Y).

And sure enough, I kick ass at programming.  :-)  :-)  (Actually, I'm a bit on the slow side, I think; I tend to work everything down to its most basic fundaments.  For example, I may find myself trying to write a GUI in such a way that I'll never have to write a GUI again.  That tack has not yet succeeded.)

Paul Brinkley
Thursday, February 7, 2002

If I'm not mistaken, part II says:

"...the rule is that a card with an odd number on one side must have a vowel on the other?" With a question mark in the end.

Unless it's a typo, the text doesn't specify ANY rules at all. It just offers a hypothesis.
To prove that hypothesis, you need to turn over ALL the cards because there is no information about the cards.

Maxim Pogorelov
Thursday, February 7, 2002

Actually, my take on it would be only the 5 and F need to be flipped.

The 2 doesn't need to be flipped because there's no rule about even numbers, which is why the E does not need to be flipped - it could be even or odd.

We do need to make sure that the F doesn't contain an odd number on the reverse side, and that the 5 contains a vowel, thus meeting the rule:

"the rule is that a card with an odd number on one side must have a vowel on the other"

Craig Fruth
Thursday, February 7, 2002

So we can generalize frobbishness to mean that the set of items which are frobbish with the defining entity posses some but not all of the attributes of the defining entity.  In such a case it may be necessary to further breakdown frobishness into n-frobbishness where an entity has exactly n of the specified attributes.  Obviously one cannot be frobbish to an entity with only one attribute.

Is there any such thing as inverse frobbery?

Hamish Muirhead
Thursday, February 7, 2002

Frobbieness is simply the XOR truth table...

A  B  Result
0  0      0
0  1      1
1  0      1
1  1      0

A is white/black
B is triangle/circle
Result = frobbieness.

assign 0's and 1' at will.

No matter how you set it up, the item of the opposit shape AND color is frobby -- the others are not.

Del Miller
Friday, February 8, 2002

Considering I'm a vegetable with a capital S, I think I've got rather decent skills in English. However, I've yet to find 'frobb'y in any dictonary. Thus I take it to be:

a) nonsense
b) slang

Of course, this has little to do with the logical solution, I just became curious about the meaning of 'frobby'.

Lennart Fridén
Friday, February 8, 2002

Frobby is a nonsense word - (AFAIK anyway :)

Greg Mitchell
Friday, February 8, 2002

"Frobby" is probably an allusion to "frob":

Paul Brinkley
Friday, February 8, 2002

Concerning the second puzzle:

The question states: "what is the minimum number of cards you should turn over to prove the rule is true (and which cards would they be)?"

The rule is: "a card with an odd number on one side must have a vowel on the other."

Depending upon what's behind the 5, the minimum number of cards we need to turn over is either one or two.  We don't care about the 2 or the E, since the rule doesn't apply to them, as Craig stated above.

But we need to turn over the 5.  If there isn't a vowel behind the 5, we're done - the rule is false.  But if there *is* a vowel behind the 5, then we need to turn over the F to make sure there isn't an odd number behind it.

Andy Shyne
Friday, February 8, 2002

Andy Shyne, the puzzle stated "what is the minimum number of cards you should turn over to prove the rule is true" so although you're quite right in that we only need to turn over one card in order to prove that the rule is false (if it is) we still need to turn over two cards in order to prove it true.

Lennart Fridén
Saturday, February 9, 2002

Ben's comments were interesting but a bit counter-intuitive, so I wish more information were available.

Perhaps people in general have trouble with abstractions, but computer programmers work with abstractions all the time.  I would expect them to have a better average score than the average of the general population.

As far as substituting a social rule for an abstract rule: no, it didn't really seem that much easier.  But it was hard to compare the two.  I had already worked through the problem with the abstract rule, so the second version of the problem with the social rule seemed a bit easier because I had already worked through the problem.

Gary Chatters
Saturday, February 9, 2002

the second puzzle is solvable by the logic proposition :
if a => b  ==  ~b => ~a .

shailesh kumar
Thursday, February 28, 2002

the second puzzle was easily solved by the proposition that  :  if a implies b then ~b implies ~a.

shailesh kumar
Thursday, February 28, 2002

*  Recent Topics

*  Fog Creek Home