P and Q is everywhere... O_o

  • Everlasting
    8 years ago

    It's like seriously, p and q is haunting me. I have been trying to study for a test I have tomorrow, and this is what I have been seen while studying discrete math:

    " let p and q be propositions. The conjunction of p and q, denoted by p^q, is the proposition "p and q." The conjunction p ^ q is true when both p and q are true and is false otherwise."

    Anyhow, in view that PnQ is on my mind, let me share a puzzle that I read on the book I'm studying. Can anyone solve it?

    In [sm78] Smullyan posed many puzzles about an island that has two kinds of inhabitants, Knights, who always tell the truth, and their opposites, knaves, who always lie. You encounter two people A and B. What are A and B if A says "B is a knight" and B says " The two of us are opposite types"?

    P.s. There's a possibility someone may have shared this puzzle before, but regardless...

  • hiraeth
    8 years ago

    Discrete math is fun, especially writing out the proofs. How far along are you in your course?

    regarding your puzzle:

    assume A is telling the truth, A's statement means that B is telling the truth. B is saying that they are both opposite, so if B is a knight (which is what A said), that means by B's statement, A is a knave. A cannot be both a knight and knave (unless you stuff A in a box), so this means that A's statement is false.

    A is the knave, and B is the knight.

    Edit: Not sure how far along you got in the other thread, but the logic gates come from these assertions, conjunction (and gates), disjunction (or gates), negation (inverter/not gate) the nor, conditionals (exclusive operator usually means one or the other, not both to make xor). Just a neat little tidbit I thought I'd add.

  • abracadabra
    8 years ago

    I immediately thought they're both knaves. How can it be as above if A cannot tell the truth?

    My brain is sleep deprived and is chiefly producing prolactin so I may be wrong.

    But I'm probably right.

  • hiraeth
    8 years ago

    You're right, had a lapse in logic when i was going for the proof by contradiction.

  • abracadabra
    8 years ago

    Sweet.

  • Larry Chamberlin
    8 years ago

    One for Abby

  • silvershoes
    8 years ago

    Abby!!!!

    Reminds me of that one scene in Labyrinth. Who remembers?

  • Larry Chamberlin
    8 years ago

    The door "men"

  • Liz
    8 years ago

    I thought of the Labyrinth, too.

    Still don't get it...... Lol

  • Everlasting
    8 years ago

    Mark, I haven't gotten to the proofs... I enjoyed the trig identities in pre-calc and trigonometry, are the proofs from discrete math similar? We started with Graph theory in chapter 10, and now, we are doing chapter 1, logic.

    I read part of the other thread.

    Abby, you are right! You got the right answer even sleep deprived. How do you do it?

    Poetess,

    I'm reposting the puzzle:

    "In [sm78] Smullyan posed many puzzles about an island that has two kinds of inhabitants, Knights, who always tell the truth, and their opposites, knaves, who always lie. You encounter two people A and B. What are A and B if A says "B is a knight" and B says " The two of us are opposite types"?"

    Okay, this is how I understood the puzzle. I hope I don't confuse you more.

    There are four possibles answers. One, "A" and "B" can be Knights. Two, "A" can be a knight while "B" can be a Knave. Third, "B" can be a knight while "A" can be a knave. And fourth, both "A" and "B" can be Knaves. I made a chart so it would be easier for us to see.

    ___________________
    Case- |- - A - - | - B - |
    ---------------------------
    -- 1 --| Knight | Knight|
    -- 2 --| Knight | Knave |
    -- 3 --| Knave | Knight|
    -- 4 --| knave | Knave |
    ---------------------------

    Now, our job is to figure out what kind of people we encountered in that island based on the responses they gave to us.

    So, so far, we know "A" said "B is a knight", and we know that "B" said "The two of us are opposite types".

    Now, let's think about our possible answers and let us make some assumptions.

    Case 1.

    If you take a look at the chart, case one implies that Both "A" and "B" are knights. So we just have to analyze both of their responses and make sure that both, "A" and "B", are telling the truth. If both are telling the truth, then both of them are knights.

    So, let's assume that "A" is a knight and it's telling the truth. "A" said " B is a knight", based on what "A" said, we believe that "B" must also be telling the truth.

    Thus, first, we have to analyze what "B" says in order to know if "B" is telling the truth or not. Then we can draw a conclusion whether both, "A" and "B" are both knights or not.

    "B" said, "The two of us are opposite types". Wait a minute.
    Basically, "B" is saying that one is a knight and the other is a knave. But how can that be possible??

    If I believe "B" then I would think of "A" as a knave, but if "A" is telling a lie, then what "A" said about "B" being a knight is false.. So there's something fishy about this scenario, and it doesn't make sense.

    Let's move to another possible answer and see if it becomes clearer.

    .
    Case 2.

    Again, if you take a look at the chart, case two implies that "A" is a knight and that "B" is a knave.

    Let's assume then, that "A" is telling the truth with what its says that "B is a knight." However, its response is creating a conflict with our possible assumption that "B" is a knave. So this doesn't make sense.

    Let's move to another possible answer.

    Case 3.

    Again, if you take a look at the chart, case three implies that "A" is knave, and that "B" is a knight.

    Let's assume then that "A" is not telling the truth with what it says that "B" is a knight. So, do you see? Our assumption is that "B" is a knight and that "A" is a knave, so there is a conflict because "A" is basically saying that "B" is not telling the truth but our assumption is saying that "B" must be telling the truth. So, this doesn't make sense.

    Let's move to our last possible answer.

    Case 4.

    Again, if you take a look at the chart, case fourth implies that both "A" and "B" are both knaves.

    Alright, lets try to see if this is true.

    If we assume that "A" is a knave then when "A" says that "B is a knight", we know that "A" is lying and that "B" is not a knight.
    So far this matches up with our scenario where both "A" and "B" are knaves.

    Now, we have to analyze "B's" response in order to determine whether B is lying or not.

    So, if we go with our scenario where "B" is also a knave, then when "B" says, "The two of us are opposite types", we can immediately know that "B" is lying and that the two of them are of the same type.

    Assuming that both are knaves doesn't create any conflict. And this scenario makes sense.

    ----------------------------------------------------

    I don't know if the above makes sense to anyone other than myself but here is the solution given in the book.

    "Let p and q be the statements that A is a knight and B is a knight, respectively, so that not P and not q are the statements that A is a knave and B is a knave respectively.

    We first consider the possibility that A is a knight; this is the statement that p is true. If A is a knight, then he is telling the truth when he says that B is a knight, so that q is true, and A and B are the same type.
    However, if B is a knight, then B's statement that A and B are of opposite types, the statement (p ^ notq) V (not ^ q), would have to be true, which it is not, because A and B are both knights. Consequently, we can conclude that A is not a knight, that is that p is false.

    If A is a knave, then because everything a knave says is false, A's statement that B is a knight, that is, that q is true, is a lie, which means that q is false and B is also a knave. Furthermore, if B is a knave, then B's statement that A and B are opposite types is a lie, which is consistent with both A and B being Knaves. We can conclude that both A and B are knaves." pg 13 (Rosen)

    -----------------------------------------------------------

    Here is another puzzle.

    What is the answer?

    1+4 = 5
    2+5 = 12
    3+6 = 21
    8+11= ?

  • nouriguess
    8 years ago

    77?

  • abracadabra
    8 years ago

    Hmm, Noura. I got the next increment, 96.

  • hiraeth
    8 years ago

    Same here, 96. Seems to be a+b = (ab)+a

  • nouriguess
    8 years ago

    Yeah, you both are right. Whateeevs.

  • Britt
    8 years ago

    ..............................

    what?

  • nouriguess
    8 years ago

    I did this "(7)(10) + 7"
    I should've done this "(8)(11) + 8"

  • Everlasting
    8 years ago

    Lol Britt

    Why the what?

    Anyone else have any other answer?

  • Britt
    8 years ago

    I am literally so confused. I'm telling you, I'm just not smart.

  • nouriguess
    8 years ago

    The answer could also be 187?

  • Everlasting
    8 years ago

    Britt, you are smart.

    This stuff can be confusing, I have to spend a lot of time in order to understand it. But I like the feeling that comes after the confusion when I finally understood... That's why I like puzzles.

    I noticed that if I try to break the information that I have into parts, (the things I know and the things I don't), then if I try to organize that information, the info starts to make some sense. However, it takes a lot of time for my brain to process it.

    Noura, how did you get 187?

    When I first did the puzzle, I got 40.

    1+4 = 5
    2+5 = 12
    3+6 = 21
    8+11 = 40

    This is what I did. I took the answer from the first line and I added the addition from the second line like this:

    1+4=5
    5+(2+5) = 12
    12+(3+6)=21
    21+(8+11)=40

    Then I saw that a friend got 96. The same way that Mark and Noura did.

    So I continued doing what I was doing but this time I followed the patterned that each line had until I arrived to 8+11=

    1+4=5
    2+5=12
    3+6=21
    4+7=32
    5+8=45
    6+9=60
    7+10=77
    8+11=96

  • nouriguess
    8 years ago

    Ughh. :(

    I did this:

    1+4=5
    2+5+5=12
    3+6+12=21
    4+7+21=33
    5+8+33=46
    6+9+46=61
    7+10+61=78
    8+11+78=97

    I have no idea why I said 187.

    My brain hurts. Bye.

  • Hellon
    8 years ago

    Noura...you are one digit out in the fourth line which makes all the other lines one out...

    4+7+21= 32

  • nouriguess
    8 years ago

    Haha omg. Okay.
    I want anotherrrr one.

  • Everlasting
    8 years ago

    Lol

    Here is another one:

    If 1+2=3
    3+4=21
    5+6=55
    Then 4+5=??

  • Larry Chamberlin
    8 years ago

    80

  • nouriguess
    8 years ago

    36?

  • silvershoes
    8 years ago

    36.

    Patterns give me an adrenaline rush. Who else loves cryptoquotes?

  • hiraeth
    8 years ago

    And regarding the proofs, yeah they're a similar to trig identities, there's a simple proof here: https://en.wikipedia.org/wiki/Mathematical_induction

    Graph theory is fun too, haven't take the second part yet, but done some of it through my other courses (discrete math 1 & 2, algorithms, and some of my other computer science courses as we had to implement some of the algorithms in code as an exercise).

    and i got 36 as well,

    ab+(a^2) seems to be the equation.

    Pretty sure I mentioned project euler to you, but just mentioning it to anyone else as well. It's a neat little site where you can solve math problems such as,

    "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

    Find the sum of all the multiples of 3 or 5 below 1000."

    If you find that sort of thing interesting, and might want to pick up coding (python is a great example), this site's for you, and coding isn't as bad as some might think, there's bit of a learning curve, but you pick it up pretty easily and only gets as complex as you want it.

    here's a sample program of python (one of the simpler, straight-forward languages, and note that elif simply means else if, which runs code if the above if condition fails:

    --------------------------------------------------------------

    "a = 10
    while a > 0:
    print a
    if a > 5:
    print "Big number!"
    elif a % 2 != 0:
    print "This is an odd number"
    print "It isn't greater than five, either"
    else:
    print "this number isn't greater than 5"
    print "nor is it odd"
    print "feeling special?"
    a = a - 1
    print "we just made 'a' one less than what it was!"
    print "and unless a is not greater than 0, we'll do the loop again."
    print "well, it seems as if 'a' is now no bigger than 0!"
    print "the loop is now over, and without furthur adue, so is this program!""

    --------------------------------------------------------------

    Sorry for kindaa derailing this thread, but thought I'd mention it if anyone is interested. (:

  • Liz
    8 years ago

    Lucero, thanks for taking time to explain that! It's kind of late, so I had to read it more than once. Lol. But I think I get it!

  • Everlasting
    8 years ago

    Ha! Yes, the answer is 36.

    Mark, thanks for the info. I actually prefer c++ rather than Python lol. (I am an amateur in both but I semi have the idea of how to code ). Now that I'm taking discrete math, it's making more sense. In c++, I was using Booleans to create loops but I had no idea how they worked, now it's making more sense. Oh and I got scared when i realized one of the loops I created, didn't stop. That was scary.

    Poetess, you're welcome. I'm glad.

    Jane, cryptoquotes? What is that? Mind giving an example?

  • Larry Chamberlin
    8 years ago

    1+2=3
    3+4=21
    5+6=55
    Then 4+5=
    (a+b)x a
    (1+2)x1=3
    (3+4)x3=(7)x3=21
    (5+6)x5=(11)x5=55
    (4+5)x4=(9)x4=36

    My mistake was that in my dyslexic haste I multiplied instead of adding
    (4x5)x4=80. If I'd taken the time to do it on paper I'd have seen it.

    BTW
    my formula is identical to Mark's
    (a+b)xa = axa + axb = a^2 + ab

  • silvershoes
    8 years ago

    A cryptoquote is a coded (encrypted) quote. One letter stands for another. Single letters, apostrophes, and the length and formation of words are all hints.

    See if you can solve this one:

    U'A DSWEQD DQMDQW WEQ WEUPMY U'OQ AIPQ WESP

    DQMDQW WEQ WEUPMY U ESOQP'W AIPQ.

    - RNBURRQ GSRR

  • Darren
    8 years ago

    I'd rather regret the things I've done than regret the things I haven't done. Lucille Ball

    ; - )

    Once I had guessed that WEQ was THE then the rest fell into place

  • nouriguess
    8 years ago

    ANOTHER ONE, JANE, PLEEEASE

  • silvershoes
    8 years ago

    Great job, Darren! The "I'd" and "I've" jumped out at me, and "the" was fundamental to cracking the code.

    Ok, another one...

    NV AFXVJMH FNGMI XVFUEZL WVFHIW NGGDQ. KGM YFK UEV

    GJ F YEQBXEZI.

    - YFXD IPFEZ

  • Everlasting
    8 years ago

    Ah, my brain....

    this is fun.
    Edit: I have no clue.

  • hiraeth
    8 years ago

    Be careful about reading health books. You may die of a misprint.

    - Mark Twain

    guessed KGM to be you since it was 3 letters and right after a period,, then guessed NV, v to be e, and slowly worked up.

    edit, luce take a cryptography course if this interests you, I'm enrolled in one right now, and it's offered a math course, some universities/colleges offer it as a comp. sci course, and it's pretty interesting, it still boggles my mind how something like:

    "ABCDEF0123456789" becomes 6E4A26CC438A2910D590FAEC0C5D0684, and how that mumbo jumbo can be decrypted again using the key, and how it can take a super computer 5.4 x 10^52 years to just brute force the key for certain algorithms.