logic puzzle for you

This is a discussion on logic puzzle for you within the A Brief History of Cprogramming.com forums, part of the Community Boards category; >>If one side of a card is a vowel, the number on the other side is a number. In most ...

  1. #31
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    >>If one side of a card is a vowel, the number on the other side is a number.
    In most cases numbers are numbers.

    By reversable I ment the rule. eg that an odd number has a vowel on the other side.

    You can not assume that each card has a letter on one side and a number on the other.
    Just as you can not assume that the cards do not have a face and a back (ie different sides like playing cards). If so then you would not need to turn the three as it has the 'wrong' side showing.

    Yes, it all comes down to 'do I have to remove all chance of the rule being wrong'.

    In which case you must turn two.
    [to prove the 3 still fits the rule (ie has a number or vowel on the other side)]
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  2. #32
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    Look at a statement such as
    P implies Q.
    There are several different ways to say this
    if P then Q.
    Q if P.
    Q is a necessary condition for P.
    P is a sufficient condition for Q.

    Now look at what conditions is P implies Q a true statement.

    P is true and Q is true
    P is false and Q is true
    P is false and Q is false.

    And it is a false statement when
    P is true and Q is false. Thus using => to stand
    for implies P=>Q is logically equivalent to ~P or Q for the truth tables of both statements is the same.

    Now there are several ways to prove this kind
    of statement. You can prove it directly:
    assume P and then work with it until Q. Or indirectly by prove by contrapositive:
    if ~Q=>~P or by prove by contradiction ~(P=>Q)=>c,
    ~(~P or Q)=>c, (P and ~Q)=>c . In words you want to show P and ~Q implies a contradiction. "~" stands for not, c for contradiction.

    If we look at the rule
    For all cards c, if c is an odd number then c is a vowel. There's no need to mention flipping it as a card cannot be an odd number and even. To prove a statement of this kind we must show that our implication: If c is an odd number then c is a vowel for all cards c. There is also a number of ways to prove a universal statement of this kind. The simpliest is just to go through each card and proving for each member c that If c is an odd number then c is a vowel. If we know that c is even then the implication is true and if we know that c is odd the contrapositive is true. Thus the only two cases where it is required to flip the card c is when c is odd and when c is even.

  3. #33
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Huh??

    >>Thus the only two cases where it is required to flip the card c is when c is odd and when c is even.

    Huh??? What about letters? The card is odd and even.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #34
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    >> If c is an odd number then c is a vowel for all cards c.

    This should be
    if c is a vowel, then c is an odd number.

    And it follows that we would have to flip a card if c is a vowel or c is even. This is because we either show
    if c is a vowel, then c is an odd number or the indentical statement if c is an even number, then c is not a vowel.

  5. #35
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    Posts
    1,412
    You logic doesn't take into account the distinct possiblity that there could a a vowel on the unseen side of a consanant. If an 'E' was on the other side of the 'K', does the rule pass?

    The only answer to that question is "no it doesn't."

    But... you may argue that the rule states that there is a number on the other side. Exactly! If there isn't a number on the other side of a consonant or a vowel, and that letter is a vowel... the rule fails.

    Same rule and here are my cards...


    3 K M 4 A

    How many do you need to flip to prove the rule? Two you say...


    Here is the back of those cards.

    A E I O U

    Hmmmm... seems like four cards made it fail. Too bad you only flipped two...
    Blue

  6. #36
    Unregistered
    Guest
    OK. I've read around this and - hold on to your family jewels - it's from psychologists who have studied this.

    There are two possible correct answers based on the original question:

    A and 4 must be turned to prove the rule

    OR

    4 cards (can't remember which)

    depending on the syntax of the original question.

    For everyone like me who asked 'is the rule reversible?' apparently this is a common fallacy in solving logic problems of this nature. The reason that we do this is that we tend towards 'real-world' analogies in our problem solving methodologies and will therefore instinctively reject logical statements if they are bizarre! That's to say that logic can produce results that, although they are clearly bollocks, are still logically correct. Legal 'logic' may spring to mind in this context, but I assure that is something more related to what plops forth from the poop-tube of bull. In any event the 'is it reversible' question (from me anyway) was prompted by the analogy with: 4x3=3x4 (ie reversible rule) but 4/3!=3/4(ie rule NOT reversible) ; it's still wrong though. The other thing about 'real-world' problem solvers is that they invariably work in the real-world (now there's a surprise) and have a scientific background (read core sciences: physics, chemistry etc) where empirical observation is fairly mandatory. Pure (as opposed to Applied) Maths heads fare better presumably because they don't get out enough ( ) or that they can overcome the instinct to reject bizarre conclusions(?).

    Betazep, I think has explored all possibilities except - all possibilities ie the quantum 'real-world' scenario where the opposite side of each card exists in a superposition of ALL posssibilities, however wierd, and therefore cannot be determined until each card is flipped and observation pins it down to one of the multiplicity of possibilities.

    Nick's discussion/explanation is, apparently, 'classic' and generic in that it reduces the problem to it's boolean core and deals with it in that abstract way.

    Other important things to note (from the shrinks) are:

    1. Two-thirds of people cannot readily solve these kind of problems, irrespective of IQ.

    2. Intelligence cannot be accurately measured from this kind of problem solving although they do figure highly in IQ tests. As an example, consider the creative imagination of Einstein who visualised how things might appear if he were riding on a ray of light and came up with relativity (ok, that's an oversimplification, but you get the picture). Or Kekule, with the ring structure for Benzene who had a 'vision' of a snake swalling its own tail.

    3. The ability to solve problems of this kind do improve with age and experience. Clearly any programmer viewing Nick's algorithmic(?) approach should be better equipped to deal with future problems of this nature. I am not a real programmer and therefore exempt myself from having to re-read, study and understand his brain-cell fissioning discourse.

    I'm going to hazard a guess that the correct answer is 2 cards - ie the A and the 4 because I believe that Ian did not state the question verbatim from the test paper.

    That, of course, also means that Ian himself may well have entered the wrong answer in his test. I would be really interested to know when the results for that test come back whether two-thirds of the class got it wrong.

    By the way, the text I ripped this info from is ~20 yrs old and everything I have reproduced here may have been superceded.

    And yes, I did get it wrong. Both times.

  7. #37
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    ...and I am 'unregistered' above with large, waffly monologue...but forget to...and can't edit....

  8. #38
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    This problem was worded badly.

    You have 5 cards
    You must prove the rul by turning over as few cards as possible.
    the rule is : If the letter on side of a card is a vowel , the number on the other side is odd.
    From this statement you know that
    if one side is a vowel then the other side is a number and
    if one side is not a number then the other side is not a vowel"

    but I suppose you don't know
    if one side is a number then the other side is a letter or
    if one side is a letter then the other side is a number.

    You logic doesn't take into account the distinct possiblity that there could a a vowel on the unseen side of a consanant. If an 'E' was on the other side of the 'K', does the rule pass?
    No, this is not possible because if one side is a consanant and the
    other side is a vowel then it violates "if one side is not a number then other side is not a vowel".

  9. #39
    Registered User
    Join Date
    Jan 2002
    Posts
    381
    >>A and 4 must be turned to prove the rule

    The only part i don't get is the 4.
    Why does that need to be turned over?

  10. #40
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    the answer is posted.

    the answer has been confirmed with the author of the test, however if you would like to argue the point withe someone who has a phd in maths and in computer science
    Monday - what a way to spend a seventh of your life

  11. #41
    Unregistered
    Guest
    If the answer is two then at some point on the test it must have been declared that each card has a number on one side and a letter on the other

  12. #42
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    Posts
    1,412
    >>>No, this is not possible because if one side is a consanant and the
    other side is a vowel then it violates "if one side is not a number then other side is not a vowel".<<<

    EXACTLY!!! And if it violates the rule, the rule is not proved!!!!

    On top of that... you are adding a premise. You cannot add a premise to the rule. You are assuming that there cannot be a letter on the other side of a letter because that would be a logical premise that you are gathering from the rule (therin lies the problem... you cannot trust the rule). No such premise was made.

    In the rule itself, it states that there is a number (an odd one at that) on the other side of a vowel. So if there isn't a number on the other side of a vowel, then the rule fails. If there isn't an odd number on the other side of a vowel, then the rule fails.

    I understand where you are coming from... I originally stated two because I, like you, assumed that the premise of the entire puzzle is that a number is on the other side of a letter (be it consonant or a vowel).

    But we cannot justify that without such a premise being available outside of the rule... and it is not.

    That rule as written can fail, as I showed above, if there is either an even number on one side of a vowel, or if there is a letter on the other side of a vowel. (hell it could fail if there is a symbol on the other side of a vowel...)

    The A fails if anything other than an odd number is on the other side (even, letter, symbol, or nothing at all).

    The 3 passes for any number, letter, or symbol, or nothing at all.

    The 4 fails if there is a vowel.

    The M fails if there is a vowel.

    The K fails if there is a vowel.

    There is really nothing you can argue about that, though many seem to try... all the arguements come down to, "but he meant... but it implies a premise of... blah blah blah".

    The rule as stated can fail as I showed above. If it can fail as such... you must flip the cards that have the possibility of making the rule fail.... four cards.


    >>>I'm going to hazard a guess that the correct answer is 2 cards - ie the A and the 4 because I believe that Ian did not state the question verbatim from the test paper. <<<

    That is very very likely... and I bet that the original question did only leave room for two.
    Blue

  13. #43
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    Posts
    1,412
    >>the answer has been confirmed with the author of the test, however if you would like to argue the point withe someone who has a phd in maths and in computer science<<

    Yeah... have him read these posts, and email me. betazep@hawaii.rr.com


    >>If the answer is two then at some point on the test it must have been declared that each card has a number on one side and a letter on the other<<<

    I am thinking so...
    Blue

  14. #44
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    you all care waaaayy to much about a silly logic question...

  15. #45
    _B-L-U-E_ Betazep's Avatar
    Join Date
    Aug 2001
    Posts
    1,412
    LOL... yeah, I am about done trying to explain.
    Blue

Page 3 of 4 FirstFirst 1234 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 06-06-2008, 06:26 PM
  2. Crossword Puzzle Program
    By Loctan in forum C++ Programming
    Replies: 2
    Last Post: 08-01-2006, 12:08 AM
  3. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21