File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programming Diversions and the fly likes Applying psychology Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Applying psychology " Watch "Applying psychology " New topic

Applying psychology

HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
You are pesented with four cards showing "A" , "D" , "4" and "7" respectively.
You are told that each card has a letter on one side and a number on the other and are also given the following rule: "IF there is a vowel on one side, there is an even nmber on the other."
Your task is to say which of the cards you should turn over in order to say whether the rule is true or false.
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
You must turn over "A" and "7" to see if the rule is true!

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
All of them.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Why not "A" and "4"
or "D" and "7" ?
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
In the original problem, are we to assume that the following is definitely true?
each card has a letter on one side and a number on the other

but the following may not be true, and must be tested?
IF there is a vowel on one side, there is an even nmber on the other.

If my understanding is correct, then I agree with Bert, turn over A and 7. If A has an odd number, or 7 has a vowel, then the "rule" is disproven. The D is irrelevant becasue it isn't a vowel, so the rule does not apply to it, and it doesn't matter what the other side says. The 4 does not require testing because if the other side is a vowel, the 4 satisfies the rule, and if the other side is not a vowel, the rule does not apply. Either way, the rule cannot be possibly be disproven by the 4 card, so there's no benefit to turning it over.
Of course if "each card has a letter on one side and a number on the other" is not a given, then Dmitry is correct, and we need to turn over all cards.
And also, in any case, we can never guarantee that the rules is true for all possible cards. We can stay or that it's false, or that it's true for all the cards we have seen. That's as close as we can get here.

"I'm not back." - Bill Harding, Twister
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
The answer lies in the following :-

"The majority of people think you must turn over cards A and 4, the vowel card and the even-number card. It is thought that those who would turn over these cards are thinking "I must turn over A to see if there is an even number on the other side and I must turn over the 4 to see if there is a vowel on the other side." Such thinking supposedly indicates that one is trying to confirm the statement If a card has a vowel on one side, then it has an even number on the other side. Presumably, one is thinking that if the statement cannot be confirmed, it must be false. This explanation then leads to the question: Why do most people try to confirm a statement, when the task is to determine if it is false? One explanation is that people tend to try to fit individual cases into patterns or rules. The problem with this explanation is that in this case we are instructed to find cases that don't fit the rule. Is there some sort of inherent resistance to such an activity? Are we so driven to fit individual cases to a rule that we can't even follow a simple instruction to find cases that don't fit the rule? Or, are we so driven that we tend to think that the best way to determine whether an instance does not fit a rule is to try to confirm it and if it can't be confirmed then, and only then, do we consider that the rule might be wrong?"
BTW , the answer was "A" and "7" and Jim's explanation was succinct
(marked by compact precise expression without wasted words) unlike the one I read . Bert's even more so.
Here are two variations :
If a person is drinking beer, then the person is over 19-years-old.
(This is supposedly easier because it uses concrete examples in a social setting that people relate to more easily).
18yr , not beer , 19yr , indeterminate age , beer

if there are two primes on one side, the other side must show their product.
Pick your numbers and determine the logic you'd apply to determine which cards must be turned round.
[ December 28, 2003: Message edited by: HS Thomas ]
Vanessa Larson

Joined: Oct 14, 2004
Posts: 1
I understand completely the logic involved with arriving at the answer y'all did.

My boyfriend received an assignment similar to this and we are having a "discussion" about it.

Same situation, BUT "What is the minimum number of cards you would have to turn over to determine whether the statement is false, and which specific cards would you turn over, and why?"

I said it would have to be 2 cards, if you disproved it beforehand, that was alright - but if you turned over A and got an even number, you couldn't stop there and say the statement was true, you would have to try 7 to say that the letter on the other side isn't a vowel.

A --> B

The only situation underwhich "If a card has a vowel on one side, then it always has an even number on the other side" is false is the one in which you start with a vowel and get an odd number. To have that situation you could say not B and A would have to be true. That is why I picked the 7.

I could go on and on with my explanation, the point?

I say 2 and he says 1.

What do y'all think?

- Vanes.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

While it is POSSIBLE to determine if it is true or false in 1 turn, you cannot garantee it will be done in one.

so i'd say you need to turn over AT LEAST 1, but NO MORE than 2.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

I guess some people do it wrong, because of the usage of symetrie.

From "If there is a vowel on one side, there is an even number on the other."
it's easy to think
"If there is no vowel on one side, there is an odd number on the other."
"If there is an even number on the one side, there is a vowel on the other."

In a situation like:
if a > b then b < a it works:
if b < a then a > b and
if !(a > b) then !(b < a).
kayal cox
Ranch Hand

Joined: Aug 19, 2004
Posts: 376
I am one of the "majority of people" who thought that they should turn over A and 4. I was kicking myself after reading the subsequent posts for missing something so trivial.
And it was thought-provoking to read HS Thomas's post!! Good one.
I agree. Here's the link:
subject: Applying psychology
It's not a secret anymore!