OpenLab Assignment #2: Create a logical puzzle

Make a translation puzzle (Due Thursday, October 3).  Your assignment this week is to take a common phrase – a saying, a quote, a song lyric, or anything recognizable to most people – and translate it into logical notation.  You should break it up into individual parts (such as P, Q and R), and then combine them using logical notation to create your phrase.  This is meant to be a puzzle for your classmates, so do NOT include the original phrase.

Your submission should include: the individual parts P, Q, R etc. (written in English), and the puzzle itself (written in logical notation).

Extra Credit.  You can earn extra credit by responding to a classmate’s puzzle – either by being the first person to correctly guess the phrase, or by making suggestions, or by offering an alternative way of translating the phrase into logical notation.

Here are two examples:

1.

P: you're happy
Q: you know it
R: clap your hands

Puzzle:   ( P \wedge Q) \Rightarrow R

Answer: “If you’re happy and you know it, clap your hands”

2.

P(x,y): you can fool person x at time y

Puzzle:   \sim (\forall x,y P(x,y)) 

Answer: “You can’t fool all the people all the time”

How do I type logical notation on the OpenLab?  This is not too hard — BUT it takes a little getting used to.  Here’s an example. If you type this into a comment:

Here is a statement:  $latex P \wedge Q $

then (after you post the comment) you should see this:

Here is a statement:  P \wedge Q 

Each equation or expression begins with “$latex ” and ends with “$”.  In between “$latex ” and  “$” you type your math — many things you type just as they are, like letters and numbers, but each special symbol has a special code.  In the example above, we use the code “\wedge” to produce the upside-down vee which means “and”.

Here are a few more examples:

Type this: to get this result:
$latex P \vee Q$ P \vee Q
$latex P \Rightarrow Q$ P \Rightarrow Q
$latex \sim P$ \sim P
$latex \bar{P}$ \bar{P}
$latex P \Leftrightarrow Q$ P \Leftrightarrow Q
$latex \forall x, P(x)$ \forall x, P(x)
$latex \exists x, P(x)$ \exists x, P(x)
$latex \forall x \exists y ( P(x) \vee Q(y)) \implies R(x,y) $ \forall x \exists y ( P(x) \vee Q(y)) \implies R(x,y)

LaTeX tester.  Want to test out your LaTeX code before you post it in a comment?  There is a LaTeX tester here, where you can type in your formula, hit the button, and see how it looks: http://samples.geekality.net/latex/.
NOTE:  When you use the test, do NOT include the dollar signs or the word “latex” — just include the stuff in between.

Finally, if you submit a comment but you find it doesn’t look right, don’t hesitate to make corrections and submit it again – you will NOT be penalized for multiple submissions!

57 responses to “OpenLab Assignment #2: Create a logical puzzle

  1. P: You can handle me at my worst
    Q: You deserve me at my best

    Puzzle:
    \sim P\Rightarrow \sim Q

  2. L- I get Logical
    I- Trust my Instincts
    T-I get in trouble

    L\(wedge Q ($latex\sim I \Rightarrow T$))

  3. L- I get Logical

    I-Trust my Instincts

    T-I get in trouble

    Puzzle:
    L \wedge (\sim I \Rightarrow T)

  4. Guys, I’m loving these puzzles so far – nice work!

  5. Albina Yevdayeva

    P: love
    Q: life
    Puzzle:
    P \Leftrightarrow Q

  6. Albina Yevdayeva

    P : you
    Q: being good
    \forall x, P \Rightarrow Q

  7. Albina Yevdayeva

    sorry, i meant:
    Q: you
    P: being good
    Puzzle:
    \forall x, Q \Rightarrow \sim P

  8. Albina Yevdayeva

    OMG, I got confused !!!

    • Hi Albina,
      I like your setup! BUT I’m not sure I follow the puzzle – if you have the universal quantifier \forall x, then there should also be an ‘x’ running around in the P and Q somewhere, P(x) and Q(x).

  9. P(x)- Humans with common sense exist
    R(x)- A world some place out there
    ~S(x)- This is not a place I want to live

    Puzzle:
    \exists x, R(x) \wedge (P(x) \Rightarrow S(x))

    • Their exists a world some place out there and if humans with common sense exist then this is the place I want to live .

    • Great puzzle! I recommend using just “S(x)” in your original definition, to mean the positive statement “This is a place I want to live” — then modify the Puzzle using \sim in order to get the meaning you want.

  10. it may not be easy but it is worth it
    puzzle
    p=it may not be easy
    Q=but it is worth it
    ~P=>Q

    • Hi Ms. Desir – I like the sentiment! But right now, if p=it may not be easy, then in your puzzle \sim P seems to mean “it may NOT not be easy” — there’s a double negative there! (does this make sense? Write back if not).

      • Should it just be P instead since its already negative .. Would it be if p then q . I was under the impression the puzzle should be related to the phrase but maybe it’s contrapositive or its inverse.

        • Yes, you could use just P in the puzzle (since it’s already negative) . As long as the puzzle gives the phrase you want, the form (contrapositive, etc), doesn’t matter.

  11. P: The King’s horse(x)
    Q: The King’s man(y)
    R: Could put Humpty together again…….

    \forall x\forall y, P(x)\wedge Q(y)\Rightarrow \sim R

  12. worry too much ,happiness will come less
    P: worry too much
    Q: happiness will come less
    Puzzle
    P=>Q
    ~P=>~Q

  13. Q: You have nothing nice to say
    P: Don’t say anything.

    Q P \Rightarrow Q P

  14. Q: You have nothing nice to say
    P: Don’t say anything.

    Q \Rightarrow P

  15. Q: You have nothing nice to say
    P: Don’t say anything.

    Q \Rightarrow P

  16. Actually, even then, it’s not correct. It should be:

    Q: You have something nice to say
    P: Say something.

    Q \Rightarrow P

  17. We should be able to delete posts here

    Q: You have something nice to say
    P: Say something.

    ~Q \Rightarrow ~P

    • Hi Alphatron,
      Yes, the ability to edit comments would be helpful. This way does allow me to see your thought process, however – excellent work developing your idea!

  18. If you go away, you can’t expect people to keep your place for you.
    P: you go away
    Q: you can’t expect people to keep your place for you
    P \ Rightarrow Q

  19. If you go away, you can’t expect people to keep your place for you.
    P: you go away
    Q: you can’t expect people to keep your place for you
    P \ rightarrow Q

  20. If you go away, you can’t expect people to keep your place for you.
    P: you go away
    Q: you expect people to keep your place for you

    P \Rightarrow latex \sim Q

  21. If you go away, you can’t expect people to keep your place for you.
    P: you go away
    Q: you can’t expect people to keep your place for you
    latex P \Rightarrow \sim Q

  22. I don’t know why I can’t get the correct expression, when I put it in latex tester it works??

  23. P: build your own dreams
    Q: someone will hire you to build theirs.
    ~P=>Q

  24. P: All you need
    Q: A dollar
    R: A dream
    P \Rightarrow Q\wedge R

  25. P: Diet
    Q: Exercise
    R: A healthy life
    latex$ (\sim P \wedge \sim Q) \rightarrow \sim R$

  26. Trying again!
    P: Diet
    Q: Exercise
    R: A healthy life
    (\sim P \wedge \sim Q) \rightarrow \sim R

  27. P: Walk the dog
    Q: Clean your room
    R: you’ll get punished

    $ sim (P \vee Q) \implies R $

  28. P: Walk the dog
    Q: Clean your room
    R: you’ll get punished

    \sim (P \vee Q) \implies R

  29. P: You are Schrodinger’s cat
    Q: You are dead
    R: You are alive

    P \Rightarrow (Q \wedge R)

  30. Thank you professor I got it finally.
    P : you go away
    Q :you can’t expect people to keep your place for you
    P \Rightarrow \sim Q

    • Great work with the latex!

      A final suggestion — make a change to get rid of the double-negative in your logic (the expression \sim Q would mean “you can’t NOT expect people to keep your place for you$)

  31. Albina Yevdayeva

    D. Santos
    If you don’t clean the room and walk the dog, you will get punished.
    Patty Arredondo
    With no diet and exercise, don’t expect a healthy life.

  32. Albina Yevdayeva

    Saloua
    If you go away, you can’t expect people to keep your place for you

  33. P: The pokemon is yellow
    Q: It is a pikachu

    P \Rightarrow Q

  34. Q: you fall for everything
    P: You don’t stand for anything

    P \Rightarrow Q

Leave a Reply to Ms. Desir Cancel reply

Your email address will not be published. Required fields are marked *