1 / 164

Coding Theory, Card Tricks and Hat Problems

Ho Chi Minh City, September 30, 2007. Coding Theory, Card Tricks and Hat Problems . Michel Waldschmidt Université P. et M. Curie - Paris VI Centre International de Mathématiques Pures et Appliquées - CIMPA. http://www.math.jussieu.fr/~miw/coursHCMUNS2007.html.

weldon
Télécharger la présentation

Coding Theory, Card Tricks and Hat Problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ho Chi Minh City, September 30, 2007 Coding Theory, Card Tricks and Hat Problems Michel Waldschmidt Université P. et M. Curie - Paris VI Centre International de Mathématiques Pures et Appliquées - CIMPA http://www.math.jussieu.fr/~miw/coursHCMUNS2007.html

  2. Coding Theory, Card Tricks and Hat Problems Ho Chi Minh City September 30, 2007 Starting with card tricks, we show how mathematical tools are used to detect and to correct errors occuring in the transmission of data. These so-called "error-detecting codes" and "error-correcting codes" enable identification and correction of the errors caused by noise or other impairments during transmission from the transmitter to the receiver. They are used in compact disks to correct errors caused by scratches, in satellite broadcasting, in digital money transfers, in telephone connexions, they are useful for improving the reliability of data storage media as well as to correct errors cause when a hard drive fails. The National Aeronautics and Space Administration (NASA) has used many different error-correcting codes for deep-space telecommunications and orbital missions. http://www.math.jussieu.fr/~miw/

  3. Coding Theory, Card Tricks and Hat Problems Ho Chi Minh City September 30, 2007 Most of the theory arises from earlier developments of mathematics which were far removed from any concrete application. One of the main tools is the theory of finite fields, which was invented by Galois in the XIXth century, for solving polynomial equations by means of radicals. The first error-correcting code happened to occur in a sport newspaper in Finland in 1930. The mathematical theory of information was created half a century ago by Claude Shannon. The mathematics behind these technical devices are being developped in a number of scientific centers all around the world, including in Vietnam and in France. http://www.math.jussieu.fr/~miw/

  4. I know which card you selected • Among a collection of playing cards, you select one without telling me which one it is. • I ask you some questions where you answer yes or no. • Then I am able to tell you which card you selected.

  5. 2 cards • You select one of these two cards • I ask you one question and you answer yes or no. • I am able to tell you which card you selected.

  6. 2 cards: one question suffices • Question: is-it this one?

  7. 4 cards

  8. First question: is-it one of these two?

  9. Second question: is-it one of these two ?

  10. 4 cards: 2 questions suffice Y Y Y N N Y N N

  11. 8 Cards

  12. First question: is-it one of these?

  13. Second question: is-it one of these?

  14. Third question: is-it one of these?

  15. 8 Cards: 3 questions YYY YYN YNY YNN NYY NYN NNY NNN

  16. Yes / No • 0 / 1 • Yin — / Yang - - • True / False • White / Black • + / - • Heads / Tails (tossing a coin)

  17. 3 questions, 8 solutions 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

  18. 16 Cards • If you select one card among a set of 16, I shall know which one it is, once you answer my 4 questions by yes or no.

  19. 12 0 4 8 13 1 5 9 10 14 6 2 11 15 7 3 Label the 16 cards

  20. 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 1 In binary expansion:

  21. Y Y Y Y N N Y Y Y N Y Y N Y Y Y Y Y Y N N N Y N Y N Y N N Y Y N Y Y N Y N N N Y Y N N Y N Y N Y N N N N N Y N N Y N N N Y Y N N Ask the questions so that the answers are:

  22. 0000 1100 0100 1000 1101 0001 0101 1001 0110 1010 1110 0010 0111 1111 0011 1011 The 4 questions: • Is the first digit 0 ? • Is the second digit 0 ? • Is the third digit 0 ? • Is the fourth digit 0 ?

  23. More difficult: One answer may be wrong!

  24. One answer may be wrong • Consider the same problem, but you are allowed to give (at most) one wrong answer. • How many questions are required so that I am able to know whether your answers are right or not? And if they are right, to know the card you selected?

  25. Detecting one mistake • If I ask one more question, I shall be able to detect if there is one of your answers which is not compatible with the others. • And if you made no mistake, I shall tell you which is the card you selected.

  26. Detecting one mistake with 2 cards • With two cards I just repeat twice the same question. • If both your answers are the same, you did not lie and I know which card you selected • If your answers are not the same, I know that one is right and one is wrong (but I don’t know which one is correct!).

  27. 4 cards

  28. First question: is-it one of these two?

  29. Second question: is-it one of these two?

  30. Third question: is-it one of these two?

  31. 4 cards: 3 questions Y Y Y Y N N N Y N N N Y

  32. 4 cards: 3 questions 0 0 0 0 1 1 1 0 1 1 1 0

  33. 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1 Correct triple of answers: Wrong triple of answers One change in a correct triple of answers yields a wrong triple of answers

  34. Boolean addition • even + even = even • even + odd = odd • odd + even = odd • odd + odd = even • 0 + 0 = 0 • 0 + 1 = 1 • 1 + 0 = 1 • 1 + 1 = 0

  35. Parity bit • Use one more bit which is the Boolean sum of the previous ones. • Now for a correct answer the sum of the bits should be 0. • If there is exactly one error, the parity bit will detect it: the sum of the bits will be 1 instead of 0.

  36. 8 Cards

  37. YYYY 0000 YYNN 0011 YNYN 0101 YNNY 0110 NYYN 1001 NYNY 1010 NNYY 1100 NNNN 1111 4 questions for 8 cards Use the 3 previous questions plus the parity bit question

  38. First question: is-it one of these?

  39. Second question: is-it one of these?

  40. Third question: is-it one of these?

  41. Fourth question: is-it one of these?

  42. 16 cards, at most one wrong answer: 5 questions to detect the mistake

  43. YYYYY NNYYY YNYYN NYYYN YYYNN NNYNN YNYNY NYYNY YYNYN NNNYN YNNYY NYNYY NNNNY NYNNN YNNNN YYNNY Ask the 5 questions so that the answers are:

  44. Correcting one mistake • Again I ask you questions where your answer is yes or no, again you are allowed to give at most one wrong answer, but now I want to be able to know which card you selected - and also to tell you whether and when you lied.

  45. With 2 cards • I repeat the same question three times. • The most frequent answer is the right one: vote with the majority.

  46. With 4 cards I repeat my two questions three times each, which makes 6 questions

  47. With 8 Cards I repeat 3 times my 3 questions, which makes 9 questions

  48. With 16 cards, this process requires 34=12 questions

  49. 16 cards, 7 questions • Recall: if you select one card among 16, only 3 questions are required if all answers are correct. • With 4 questions, we detect one mistake. • We shall see that 7 questions allow to recover the exact result if there is at most one wrong answer.

More Related