Logical Reasoning A Lesson in the “Math + Fun!” Series Jan. 2005 Logical Reasoning Slide 1 About This Presentation This presentation is part of the “Math + Fun!” series devised by Behrooz Parhami, Professor of Computer Engineering at University of California, Santa Barbara. It was first prepared for special lessons in mathematics at Goleta Family School during the 2003-04 and 2004-05 school years. The slides can be used freely in teaching and in other educational settings. Unauthorized uses are strictly prohibited. © Behrooz Parhami Jan. 2005 Edition Released First Jan. 2005 Revised Logical Reasoning Revised Slide 2 Aging Three Years in One Year? Amy says that she was 10 years old the day before yesterday and that she will turn 13 next year. How is this possible? (Think for a few minutes before you advance to the next slide.) The day before yesterday Yesterday Today 2004 2005 Jan. 1 Age: Dec. 31 10 11 Jan. 2005 Dec. 31 2006 This year Next year 12 Logical Reasoning 13 Slide 3 Mislabeled Bags We have three bags, each holding two balls. One bag has two black balls. One bag has two white balls. One bag has one black and one white ball. The bags are labeled black, white, and mixed. None of the labels is correct, however. Correct the labeling by drawing a ball from only one bag. Extra challenge: B B W W M M Jan. 2005 W M B M W B M W M B B W Logical Reasoning The number of balls in bags is not known, but they are all black, all white, or mixed. How do you solve the puzzle In this case? Minesweeper: Example of a reasoning game Slide 4 Making Change for a Dollar Can you have more than one dollar in change and still not be able to give exact change for one dollar? Extra challenge: What is the most amount of change that you can have and still not be able to give exact change for one dollar? Jan. 2005 Logical Reasoning Slide 5 River-Crossing Problems There are people, animals, and things on one side of a river They must be transported to the other side There is a boat that cannot carry all of them at once There are restrictions on who can be left alone with whom or what Example: Person, fox, duck, corn must cross Boat can carry the person plus one animal/thing Fox and duck should not be left together Duck and corn should not be left together P P F D C Jan. 2005 F C P D P F D C C P F D P D F C Logical Reasoning P D C F F P C D F D C P D C F Slide 6 Graphs to Solve River Crossings Example: Person, fox, duck, corn must cross Boat can carry the person plus one animal/thing Fox and duck should not be left together Duck and corn should not be left together P P F D C F C P D FC/PD PDC/F PFC/D C Our previous solution D/PCF F/PCD Jan. 2005 D From each state, there are a number of legal “moves” P F D C C/PFD PFDC/- F PDF/C Logical Reasoning PD/CF -/PDCF A different solution Slide 7 Activity 1 – River Crossing Three soldiers get to a river they must cross; there’s no bridge in sight. They spot two boys playing in a tiny boat. The soldiers ask the boys if they can use the boat to cross the river. The boat is so tiny that it can carry only one soldier or the two boys. How can the three soldiers cross the river? S1 S2 S3 B1 B2 Jan. 2005 Logical Reasoning Slide 8 Activity 2 – Bridge Crossing 2 min 1 min Flashlight 9 min 5 min Four people must cross a bridge in 16 minutes or less. Individually, they can cross in 1, 2, 5, and 9 minutes. It is dark, so a flashlight is needed. They have only one flashlight. At most two can cross together. They must walk at the pace of the slower person. No other equipment is available. P1 P2 P5 P9 Jan. 2005 Logical Reasoning Slide 9 Three Heads and Five Hats Amy, Bert, and Cindy are arrested in Fantasyland and taken to an ogre. They are shown five hats, two white and three black. They are lined up, Amy in front, Bert in the middle, and Cindy last. They are blindfolded and one of the five hats is placed on each one’s head. The blindfolds are removed, but each one can see only those in front of him/her. The ogre says that if any of them correctly guesses the color of his or her hat in less than one minute, all three will be set free; otherwise, . . . No one says anything for 58 seconds On the 59th second, Amy shouts “black”, and they are set free. How did she know? Black! ? Black! ? ? Black! Cindy Bert Jan. 2005 Amy Logical Reasoning Slide 10 Activity 3: Blue or Red Spot? Angelica, Bob, and Chuckie go to a job interview. The manager says that she will put a red or blue spot on each forehead. Each will see the spots on the other foreheads, but not the one on his/her own. There are no mirrors in the room. The manager puts red spots on all three foreheads. She tells them that if they see a red spot, they should raise their right hand; as soon as a person knows the color of his/her spot, he/she should lower his/her hand After a minute or so, Angelica lowers her hand and says “I must be red.” Why? Red! Angelica Chuckie Bob Jan. 2005 Logical Reasoning Slide 11 Which Switch Turns the Light on? There are three light switches in one room and a lightbulb in an adjacent room. You know that the lightbulb is off now. You are allowed to go or look into the other room only once. How can you tell which light switch turns the lightbulb on? Flipping one switch and checking on the lightbulb may not provide the answer. Flipping two switches and checking on the lightbulb may not provide the answer. Hint: How can you tell a lightbulb that has just been turned on from one that has been on for a while? Solution: Flip the first switch; wait for a few minutes; flip the first switch again. Flip the second switch and go into the next room. If the lightbulb is off, but warm to the touch, the first switch controls it; if it is on, the second switch controls it; if it is off, but cold, the third switch controls it. Jan. 2005 Logical Reasoning Slide 12 Truth Tellers and Liars Two tribes live on the LiaTru island. Members of one tribe always tell the truth; members of the other tribe always lie. For example, if you ask a boy on the LiaTru island “Are you a boy?” he will answer “Yes” if he is a truth teller and “No” if he is a liar. If a girl on the LiaTru island is 10 years old and you ask her “Are you 9 years old?” she will answer “No” if she is a truth teller and “Yes” if she is a liar. Members of the two tribes can recognize each other, but you can’t tell them apart. Puzzle 1: On your way to GFS, you arrive at a fork in the road. Someone appears, but you don’t know whether he is a truth teller or a liar. How can you find out which way leads to GFS? Which way to GFS? That way! Puzzle 2: How can you discover whether a person you meet is a truth teller or a liar? Jan. 2005 Logical Reasoning Slide 13 Activity 4: Truth Tellers and Liars Puzzle 1: You meet two people, A and B. A says, “Both of us are from the liars tribe.” Which tribe is A from? What about B? Puzzle 2: You meet two people, C and D. C says, “Exactly one of us is from the liars tribe.” Which tribe is D from? Puzzle 3: You meet two people, E and F. F says, “It is not the case that both of us are from the truth tellers tribe.” Which tribe is E from? What about F? Jan. 2005 You A B Puzzle 4: You meet two people, G and H. Each of the two makes a statement: G: “We are from different tribes.” H: “G is from the liars tribe.” Which tribes are G and H from? Logical Reasoning Slide 14 Truth Tellers, Liars, and Randoms Three tribes live on the LiaRanTru island. Members of one tribe always tell the truth; members of the second tribe always lie; members of the third tribe answer completely at random. For example, if you ask a boy on the LiaRanTru island “Are you a boy?” he will answer “Yes” if he is a truth teller, “No” if he is a liar, and “Yes” or “No” (unpredictable) if he is a random. Members of the tribes can recognize each other, but you can’t tell them apart. Puzzle : Three people from the LiaRanTru island, one representing each tribe, come to town. You must identify who is from which tribe by asking only three yes/no questions. Each question must be directed to only one person, but you can ask the same person multiple questions. P1 P2 P3 Hint : There are 6 possibilities for P1, P2, P3: LRT, LTR, RLT, RTL, TLR, TRL Jan. 2005 Logical Reasoning Slide 15 Activity 5: Other Logical Puzzles Puzzle 1: Twelve black socks and 12 white socks are mixed up in a drawer. How many socks must you pull out, blindly, to get a matching pair for sure? Puzzle 2: Three travelers are told that their hotel room costs $30, so they pay the clerk $10 each. The clerk later realizes that he made a mistake and should have only charged them $25. He gives the bellboy $5 to return to the travelers. The bellboy is dishonest and gives each of them only $1, keeping $2 for himself. So the travelers actually spent $27 and the bellboy pocketed $2. What happened to the other dollar of the original $30? Jan. 2005 Puzzle 3: Two mathematicians are walking down the street. The first says to the second, "I know you have three children. What are their ages?" The second replies, “The product of their ages is 36." The first says, "I can't tell their ages from that." The second says, “Well, the sum of their ages is the same as that address across the street." The first says, "I still can't tell." The second says, "The oldest is visiting his grandfather today." The first says, "Now I know their ages." Can you tell their ages? Logical Reasoning Slide 16 Next Lesson Thursday, February 3, 2005 A problem to think about: How many squares can you find that have dots in their corners? Jan. 2005 Logical Reasoning Slide 17