Back to Student Worksheet
CS Grade 6-8 Answer Key

CS: Logic Puzzles and Propositional Logic

Use true and false statements to solve logic problems

Answer Key
Name:
Date:
Score: / 15

CS: Logic Puzzles and Propositional Logic

Use true and false statements to solve logic problems

CS - Grade 6-8

Instructions: Read each problem carefully. Use AND, OR, NOT, and IF...THEN to represent logical ideas. Show your reasoning in the space provided.
  1. 1

    Let P mean 'It is raining' and Q mean 'I take an umbrella.' Write the statement 'If it is raining, then I take an umbrella' using P, Q, and IF...THEN.

    The word 'if' usually points to the condition that comes first.

    The statement is written as IF P THEN Q. This means that whenever P is true, Q should also be true.
  2. 2

    Let P be true and Q be false. Is the statement P AND Q true or false? Explain your answer.

    The statement P AND Q is false because an AND statement is true only when both parts are true.
  3. 3

    Let P mean 'The robot sees a wall' and Q mean 'The robot sees a hole.' What does P OR Q mean in words?

    In computer science, OR usually allows one part, the other part, or both parts to be true.

    P OR Q means 'The robot sees a wall or the robot sees a hole.' In logic, OR is usually true if at least one of the two parts is true.
  4. 4

    Let P mean 'The password is correct.' Write NOT P in words, then explain when NOT P is true.

    NOT P means 'The password is not correct.' NOT P is true when P is false, so it is true when the password is incorrect.
  5. 5

    Complete the truth table for P AND NOT Q. Use the row order: P true and Q true, P true and Q false, P false and Q true, P false and Q false.

    First find NOT Q in each row, then combine it with P using AND.

    The results are false, true, false, and false. P AND NOT Q is true only in the row where P is true and Q is false.
  6. 6

    For the statement IF P THEN Q, which row makes the whole statement false: P true and Q true, P true and Q false, P false and Q true, or P false and Q false?

    Think of it as a promise: if P happens, then Q must happen.

    The row P true and Q false makes IF P THEN Q false. A conditional is broken only when the condition happens but the promised result does not happen.
  7. 7

    Two students, A and B, are in a logic puzzle. Truth-tellers always tell the truth, and liars always lie. A says, 'B is a liar.' B says, 'A and I are the same type.' Determine who is a truth-teller and who is a liar.

    Try assuming A tells the truth first, then check whether B's statement fits.

    A is a truth-teller and B is a liar. If A tells the truth, then B is a liar, and B's statement that they are the same type is false, which fits.
  8. 8

    A logic circuit has inputs P and Q. First, P and Q go into an AND gate. Then the result goes into a NOT gate. What expression does the circuit represent?

    The circuit represents NOT (P AND Q). The AND result is found first, and then the NOT gate reverses that result.
  9. 9

    Use De Morgan's law to rewrite NOT (P AND Q) using OR and NOT.

    De Morgan's law changes AND to OR and places NOT on each part.

    NOT (P AND Q) is equivalent to (NOT P) OR (NOT Q). This means that if P and Q are not both true, then at least one of them is false.
  10. 10

    A game door opens only if the player has a key AND has entered the secret code. Let K mean 'has a key' and C mean 'entered the secret code.' Write a logic expression for the door opening.

    The expression is K AND C. The door opens only when the player has both the key and the secret code.
  11. 11

    A rule says: 'If a number is divisible by 4, then it is even.' Write the converse of this statement and decide whether the converse is always true.

    The converse switches the condition and the result.

    The converse is 'If a number is even, then it is divisible by 4.' The converse is not always true because 6 is even but is not divisible by 4.
  12. 12

    Evaluate the expression (P OR Q) AND R when P is false, Q is true, and R is true.

    The expression is true. P OR Q is true because Q is true, and then true AND R is true because R is also true.
  13. 13

    Complete the truth table for P OR (NOT Q). Use all four possible combinations of P and Q.

    Find NOT Q first, then compare it with P using OR.

    The results are true for P true and Q true, true for P true and Q false, false for P false and Q true, and true for P false and Q false.
  14. 14

    Three boxes are labeled A, B, and C. Exactly one box has a prize. The clues are: If the prize is in A, then clue 1 is true. Clue 1 says 'The prize is not in B.' Clue 2 says 'The prize is in C.' You learn that clue 2 is false. Which box has the prize?

    Start with the fact that clue 2 is false, so C cannot have the prize.

    The prize is in A. Since clue 2 is false, the prize is not in C. Exactly one box has the prize, and if it were in B, clue 1 would be false. The consistent choice is A.
  15. 15

    A security system unlocks when K AND (C OR B) is true. K means 'the user has a key card,' C means 'the user knows the code,' and B means 'the user has a backup badge.' Will it unlock if K is true, C is false, and B is true? Explain.

    Work inside the parentheses first.

    The system will unlock. C OR B is true because B is true, and K AND true is true because K is also true.
LivePhysics™.com CS - Grade 6-8 - Answer Key