N Truths and 5-N Lies

Logic Level 3

Which of these statements are truths and which are lies?

  1. Statement 2 and Statement 5 are either both truths or both lies.
  2. Statement 3 and Statement 5 are either both truths or both lies.
  3. Exactly two of the statements are truths.
  4. Statement 1 and Statement 2 are either both truths or both lies.
  5. Statement 3 is a lie.

Enter your answer as a five digit string where the digits represent the statements in numerical order, where a 1 indicates a truth, and a 0 indicates a lie. For example, if all of the statements are truths except for Statement 4, you would enter 11101.


The answer is 10100.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Discussions for this problem are now closed

Walker Anderson
Jun 12, 2014

To begin, if Statement 5 is a truth, Statement 3 must be a lie, and if Statement 5 is a lie, Statement 3 is a truth. They may not be both truths or both lies, so Statement 2 must be a lie.

Since Statement 2 is a lie, Statement 4 is asking if Statement 1 is a lie as well. The same logic as above can be used again: if Statement 4 is a truth, Statement 1 would be a lie, and vice versa.

Notice that there is one definite lie (2) and two pairs (3 and 5, 1 and 4) that must each contain one truth and one lie. This means that there must be a total of 2 truths, so Statement 3 is a truth.

Since Statement 3 is a truth, Statement 5 must be a lie.

Statements 2 and 5 are both lies, so Statement 1 is a truth.

Finally, since Statement 1 is a truth, Statement 4 must be a lie.

Statements 1 and 3 are the truths, so the answer is 10100 \boxed{10100} .

How can you say that if statement 3 is truth, statement 5 is a lie? In the 2nd line of the ques. it is written that - statement 3 and 5 are either both truths or both lies .

PUSHPESH KUMAR - 6 years, 12 months ago

If statement 3 is true while statement 5 is false, or vice versa, then it follows logically that statement 2 is FALSE. You are assuming that statement 2 is true, when it can't be.

Another way to word statement 2 is "statement 3 and statement 5 have the same truth value"

Eric Aniag - 6 years, 12 months ago

How can 3 and 5 be true and not true respectively. The question suggests something else.

Rajdeep Bharati - 6 years, 12 months ago

E1. Now lets consider S2. Here both 3 and 5 can't be Truth/Lie because if S5 is true,S3 should be false. And if S5 is false S3 should be false. Here S5 decides whether S3 is true or false. So Statement 2 is false.

See friend S5 says that S3 is false. If you assume S5 is true then S3 is false because S5 being true implies S3 is a lie. I think you have understood this. See my explanation.

Akshay Nagraj - 6 years, 11 months ago

How do you know where to start with these kinds of problems? I wrote out a truth table, but that got pretty complicated...

Vijitha Sridhar - 6 years, 12 months ago

Most of the statements in such puzzles come as general statements. But eventually to have a solution, you need a concrete statement. Even otherwise, you can model all the statements as an Linear programming problem, like your set of equations where you set out to solve for the unknown variables. Actually this approach is easier than the truth table approach because have a set of equations and a set of unknowns will let you know if a solution exists based on Linear algebra results. I hope this answers your question/doubt. Have fun!

Jayaram Balabaskaran - 6 years, 11 months ago

Why can't it be 10010

Chirag Jindal - 7 years ago

Then 3 would be true, negating 3, resulting in a paradox.

Shawn Ong - 6 years, 12 months ago

First assume that 5 is true. In which case, 3 has to be a lie. If 3 is a lie, then 2 has to be a lie too. Which means 1 will also eventually be a lie. This leaves us with the truth value of 4. Given the truth values of 1 and 2, it makes 4 true. This would eventually make 3 also true, which is a contradiction to the truth value of 5. Therefore, the only possibility is 5 has to be false. This makes 3 true. If 4 is true, then both 1 and 2 have the same truth values. If both of them carry the same truth values, then one of 3 or 5 would be a contradiction. Hence both dont carry same truth values. This eventually means 4 is false. Since 3 is true and 5 is false, 2 has to be false. Since 3 is true the only other truth value has to be assigned to 1. Hence 10100.

Akshay Nagraj
Jun 19, 2014

I am adding a solution. If my solution is correct and same as others please ignore this solution. I haven't yet read any of the other solutions. If my solution is not perfect please comment the corrections. Statement 1: Both 2 and 5 are T/L Statement 2: Both 3 and 5 are T/L Statement 3: Exactly 2 are T Statement 4: Both 1 and 2 are T/L Statement 5: Statement 3 is a lie

E1. Now lets consider S2. Here both 3 and 5 can't be Truth/Lie because if S5 is true,S3 should be false. And if S5 is false S3 should be false. Here S5 decides whether S3 is true or false. So Statement 2 is false.

E2. Now lets consider S1. S1 is true because both S2 and S5 can be false.

E3. From E2 S5 is false, this implies S3 is true.

E4. Since S1 is T and S2 is F. S4 is F

E5. Now 2 Statements are true and 3 statements are false. Which prove S3 to be true.

Please comment my mistakes.

I think i have to explain E2. Here {after E1} assume S1 is false. i.e., S1- F S2- F S3- F (since S5 is true) S4- T (because both S1 and S2 are false) S5- T (If S1 is false S5 has to be opposite of S2 so T) Now there are 2 truths. This means that S3 is true. But according to us S3 is false. This contradicts our assumption i.e., S1 is F. So S1 is true.

Jc Borja II
Jun 15, 2014

In 2, it is stated that "Statement 3 and Statement 5 are either both truths or both lies.", while number 3 states that "Exactly two of the statements are truths." If 2,3, and 5 are considered TRUE, then number 3 does not apply. Therefore 2 is a lie.

In 4, "Statement 1 and Statement 2 are either both truths or both lies." We'll get back on this later.

In 1, "Statement 2 and Statement 5 are either both truths or both lies." Since Statement 2 is a lie, we need 5 as a lie for 1 to be come a true. IF 1 is a true, it will make 1 and 2 unlike, which also makes 4 false. But let's see...

In Statement 5, "Statement 3 is a lie." If it is a lie, then 5 is a true, Then it will also apply the conditions of 3. Therefore 5 is a LIE. So as what I said earlier, we need 5 as a lie for 1 to be come a true. IF 1 is a true, it will make 1 and 2 unlike, which also makes 4 false. Now that 5 is a lie, everything I have stated is now correct, which is true/false/true/false/false...

Darnesh Narla
Jun 15, 2014

Start off with the 3rd statement. If that is assumed to be true, then we are left with one other true statement of the remaining 4 and it's then quite obvious that statement 5 mus be a lie. Now, if statement 1 is true, with the previous assumption of only 2 true statements, statement 2 must be a lie which will be supported by statement 4 if it's a lie. So, we are left with statements 1 and 3 as truths and the remaining ones as lies.

Note that the simplest statement is S5, so we should begin here. S5 determines the validity of S3. Is S3 is true, this is convenient because we then know how many statements are T and how many are F. We hope S3=T, so we begin by supposing S5=F. Then one other statement is T, and the rest are F. If S2=T, contradiction, so S2=F. This implies S1=T. Now by S3, S4=F. Check that all conditions satisfied. The solution is then 10100.

We are lucky that S5 is simple. How can we solve this problem if there are not 5, but 50 statements, each of which may affect the validity of several other statements. There must be some programming approach which I hope someone will enlighten me about.

Joshua Benabou - 6 years, 12 months ago

The brute force way to program this is to consider that if the solution is ABCDE where each letter is 0 or 1, then there are only 32 possibilities. You can test all 32 methodically.

So set up a loop from 0 to 31, corresponding to all solutions. For example the nmber 29 is represented by 11101 (all true except 4).

Inside the loop, for each given solution such as 11101 you then step through the statements and see if they were true if the test solution has a 1 and false if it had a 0. If so then you found the answer:

 Set ANSWER to -1
 Set loop S1=0 to 1
   Set loop S2=0 to 1
     Set loop S3=0 to 1
       Set loop S4=0 to 1
         Set loop S5=0 to 1

        Set FOUNDANSWER to TRUE.

   1.  Does S2=S5?  YES both are 1.  No action.
    2.  Does S3=S5?  YES both are 1.  No action.
    3.  Does S1+S2+S3+S4+S5=2? NO, it is 4.  STOP:  SET FOUNDANSWER to FALSE (and go to end of loop)
   (4.  S4 is 0 instead of a 1.  So the question would have been S1<>S2?  NO both are 1.  Another STOP.
   (5.  Would have been S3=0?  NO S3 is 1.  Another STOP)

 If FOUNDANSWER is still TRUE then all conditions were met and print S1...S5 and set ANSWER to the loop counter

   End loop x 5

If ANSWER is still -1 at the end of all 5 loops, there was no solution. Otherwise ANSWER is the solution.

To do this for 50 independent statements, you would go through 2^50 cycles which is 1024^5 which is a trillion cycles. So brute force is not a good approach for bigger numbers of statements... you can save some time if the language lets you jump out of the loop as soon as you learn the answer is false and if you know there is only 1 solution and so you can stop as soon as you find the first.

Member Wilcox - 6 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...