There are 4 persons A,B,C and D of which 2 are liars and 2 are truthtellers.
Each of these persons has a lucky and an unlucky number.
All the 8 numbers are different and they are from 1 to 9 only.
The sum of the lucky and unlucky numbers is the same for all four persons.
The sum of the lucky numbers is greater than the sum of the unlucky numbers.
Determine the lucky and unlucky numbers for each of them if they made the following statements:

A:
C's lucky number is 7.
The missing number is 5.

B:
C's unlucky number is 4.
D's lucky number is 2.

C:
A is a liar.
B's lucky number is 6.

D:
The product of B's numbers is 24.
A's lucky number is larger than any of the other numbers.

Note: The missing number is the number from 1 to 9 which is not any one of these people's lucky or unlucky number.

Solution:

The only solution is:
A:
Lucky Number: 9
Unlucky number: 1
B:
Lucky number : 4
Unlucky number : 6
C:
Lucky number : 7
Unlucky number : 3
D:
Lucky number : 8
Unlucky number : 2

Since the four people have lucky and unlucky numbers which add up to the same sum, I looked for all the possibilities where that is true.

There are three ways in which that can occur:
1 + 9 = 2 + 8 = 3 + 7 = 4 + 6     missing number is 5
1 + 8 = 2 + 7 = 3 + 6 = 4 + 5     missing number is 9
2 + 9 = 3 + 8 = 4 + 7 = 5 + 6     missing number is 1

I know that A must be either a truthteller or a liar.
I assumed that A is a truthteller.   If I find a contradiction, then I know A is a liar.   If I don't find a contradiction, then I have a found a valid solution.

If A is telling the truth, then I know that we will use the following combinations of lucky and unlucky numbers:
1 + 9 = 2 + 8 = 3 + 7 = 4 + 6 because the missing number is 5.
This means that C's lucky number is 7 and the unlucky number is 3.

It means that B is a liar because he said that C's unlucky number was 4, but we know it is 3.
It also tells us that D's lucky number is NOT 2.

Now we know that C is a liar because he is calling A a liar, but we know A is a truthteller.
This means that B's lucky number is NOT 6.

Since B and C are liars, it means that D is a truthteller.
Therefore, the product of B's numbers is 24.
So, B's numbers must be 4 and 6, but we know that his lucky number is not 6.
So, B's lucky number is 4 and his unlucky number is 6.
D's other statement tells us that A's lucky number must be 9, so his unlucky number is 1.

The only numbers left are 2 and 8, but we know that D's lucky number is NOT 2, so his lucky number is 8 and his unlucky number is 2.

This satisfies all the conditions, so we have a valid solution.   Had this given us a contradiction, we would know that A was a liar, and then work from there.

Here is K. Sengupta's excellent explanation:
Since the sums of lucky and unlucky numbers are the same for all players, the missing number can only be 1,5 or 9 with sums of respectively 11, 10 or 9.
We consider these 3 cases separately.

* missing number = 1.
This means A is a liar (he lies about the missing number), implying C is a Truthteller.
B's lucky number must be 6, B's unlucky number (11-6)=5.
6x5 != 30 implies D is a liar, which makes B a truthteller.
Then C's unlucky number must be 4, which makes his unlucky number 7, which is what A said.
This gives a conflict with A being a liar.

* missing number = 5
This means A is a truthteller, and C is a liar.
The lucky number of C is 7, the unlucky number of C is 3.
This makes B a liar and D a truthteller.
If the product of B's numbers is 24, and 3 is already taken by C, B's numbers must be 4 and 6.
As C is a liar, B's unlucky number must be 6, his lucky number 4.
As D is a Truthteller, A's lucky number must be 9, his unlucky number 1.
D has number 2 and 8; with B being a liar D's lucky number must be 8 and his unlucky number 2.
This gives a valid solution.

* missing number = 9.
This means A is a liar, C a truthteller.
B's lucky number must be 6, his unlucky number 3, which makes D a liar about the product of B's numbers.
B must be a Truthteller, making C's unlucky number 4 and his lucky number 5.
This gives a conflict with what A says about this number.

Click here for Koa Okano's excellent solution


Correctly solved by:

1. Kamal Lohia Holy Angel School,
Hisar, Haryana, India
2. Koa Okano Kalani High School,
Honolulu, Hawaii, USA
3. Mykel Edson New Hampshire, USA
4. Ivy Joseph Pune, Maharashtra, India
5. Kelly Stubblefield Mobile, Alabama, USA