Daniel Fortunov's Blog


 

 Daniel Fortunov's Blog » Mr P and Mr Q Solution

 2 Comments- Add comment | Back to Personal Blog Written on 04-Apr-2008 by asqui

Here is my solution to the Mr P and Mr Q Logic Puzzle I posted recently:

Five Of DiamondsAssumptions:

  1. "number" refers to one of {2, 3, 4, 5, 6, 7, 8, J, Q, K, A} (ie. 'Picture cards' have a "number")
  2. "suit" refers to one of {H, S, C, D}
  3. Let U be the set of all (number,suit) card tuples.
    U = {
    (A,H), (Q,H), (4,H),
    (J,S),
    (8,C), (4,C), (2,C), (7,C), (3,C)
    (A,D), (5,D)
    }
  4. Mr P knows the number.
  5. Mr Q knows the suit.
Phase 1:
  • P cannot ascertain what card it is.
  • Therefore it must be a card which is not uniquely identifiable by its number (which P already knows).
Let A be the set of cards in U which share a number.
A = {
(A,H),(Q,H),(4,H)
(A,D),(5,D),
}
  • Q now knows that the soultion is in the set A.

Phase 2:
  • Q knew that P wouldn't be able to uniquely identify the card, based on knowing it's suit.
  • Therefore the suit of the card must be one for which all numbers of that suit are duplicated (if a card is not one whose number is duplicated then P would have known what card it was, given that he already knows the number)
  • So, the suit of the card must be a suit which appears in set A. Namely, hearts or diamonds.
Phase 3:
  • Given Q's statement, P makes the deduction in Phase 2.
  • P knows the number of the card, and knows that it is in set A, and from this he concludes the solution.
  • Therefore the number of the card must be one which uinquely identifies a card from set A, namely, the number must be one of {Q, 4, 5}.
Let C be the set of cards in A for which this holds true.
C = {
(Q,H),(4,H)
(5,D),
}

Phase 4:
  • Given P's statement, Q makes the deduction in Phase 3.
  • Q knows the suit of the card, and now knows that it is in set C, and this allows him to discover the solution.
  • So the solution is a card in set C which is uniquely identifiable by its number, namely (5,D).
Send to a friend

Comments

  • written on 04-Apr-2008

    Steve says:

    I think we need to have another poker night!

  • written on 05-Apr-2008

    chickerino says:

    how is that less difficult than programming!

Leave a Comment









Loading …
  • Server: web1.webjam.com
  • Total queries:
  • Serialization time: 469ms
  • Execution time: 578ms
  • XSLT time: $$$XSLT$$$ms