Tuesday, June 7, 2011

Heaven or Hell



Over a dinner with friends a very interesting question was asked.The problem statement is given below.I tried reasoning the answer using Truth Table.

Problem Statement
"Two gatekeepers are standing in front of Hell and Heaven i.e one of them is in front of Hell and the other in front of Heaven. One of them tells the truth and the other lie.
If a third person is allowed to ask just one question to either of the above guys, how will he know which is hell and which is heaven?"


Solution:

In simple terms the anwser is that the third person will ask one of the gatekeeper
"what will the other gatekeeper say which is heaven or hell?"

Some prerequistes:

Let the two gatekeepers be Joe and Janet

Initial Assumption:
Joe knows
What Joe will say when asked about heaven or hell i.e they know the absolute truth.
Janet Knows:
What Janet will say when asked about heaven or hell i.e they know the absolute truth.

Joe Compliment Means Joe Tells about What Janet will say.

Reverse Janets Truth Table values : 1’ to 0 and 0 to 1

Janet’s Compliment: Means Janet Tells about What Joe will say.

Reverse Joe’s Truth Table values : 1’ to 0 and 0 to 1

Scenario 1:

Prerequisites:

Joe says truth and stays in Heaven.

Janet says lie and stays in Hell ;-)

1 is heaven and 0 is hell.

S.NO

Person

Truth Value for Joe

Truth Value for Janet

1

Joe knows

1

0

2

Janet Knows

1

0

3

Janet will say(Compliment(2))

0

1

4

Joe Will say

1

0

Hence Reversing (or complimenting again) Janet’s or Joe’s Complimented Truth ,since were are allowed to ask only one question will determine which is heaven and which is hell.

Absolute Truth of Joe

Absolute Truth of Janet

Since Janet Lies Compliment 3

Compliment(3)

1

0

Absolute Truth of Joe

Absolute Truth of Janet

Get value from column 4

1

0

Hence Joe is in heaven and can be derived at by asking question to either Janet or Joe.


Scenario 2:

Prerequisites:

Joe says truth and stays in Hell.

Janet says lie and stays in Heaven .

1 is heaven and 0 is hell.

S.NO

Person

Truth Value for Joe

Truth Value for Janet

Remark

1

Joe knows(Absolute Truth)

0

1

2

Janet Knows(Absolute Truth)

0

1

3

Janet will say(Compliment(2))

1

0

4

Joe Will say

0

1

Remains as is .. since he says the truth

Absolute Truth of Joe

Absolute Truth of Janet

Since Janet Lies Compliment 3

Compliment(3)

0

1

Absolute Truth of Joe

Absolute Truth of Janet

4

0

1

Hence this time around Janet is heaven and can be derived at by asking question to either Janet or Joe.

Scenario 3:

Prerequisites:

Joe says lie and stays in Heaven.

Janet says truth and stays in Hell.

1 is heaven and 0 is hell.

S.NO

Person

Truth Value for Joe

Truth Value for Janet

Remark

1

Joe knows(Absolute Truth)

1

0

2

Janet Knows(Absolute Truth)

1

0

3

Janet will say

1

0

4

Joe Will say(Compliment(1))

0

1

Since Joe Lies

Absolute Truth of Joe

Absolute Truth of Janet

Since Joe Lies Compliment 3

Compliment(3)

1

0

Absolute Truth of Joe

Absolute Truth of Janet

4

1

0

Hence Joe would be in heaven even though he lied.

Scenario 4:

Prerequisites:

Joe says lie and stays in Hell.

Janet says truth and stays in Heaven.

1 is heaven and 0 is hell.

S.NO

Person

Truth Value for Joe

Truth Value for Janet

Remark

1

Joe knows(Absolute Truth)

0

1

2

Janet Knows(Absolute Truth)

0

1

3

Janet will say

0

1

4

Joe Will say(Compliment(1))

1

0

Since Joe Lies

Absolute Truth of Joe

Absolute Truth of Janet

Since Joe Lies Compliment 3

Compliment(3)

1

0

Absolute Truth of Joe

Absolute Truth of Janet

4

1

0

Hence Janet would be in heaven even though he lied.

If you still think you havent got it, write a comment ;-).. After all we all want to go to heaven and you dont want to miss the question when asked at the "Pearly Gates".



No comments:

Post a Comment