Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Your Favorite Math/Logic Riddles?

Posted by Cliff on Sat Oct 15, 2005 11:35 PM
from the top-10-mind-twisters dept.
shma asks: "Whether you're involved in the Sciences, Mathematics, or Engineering, you undoubtedly enjoy finding simple solutions to seemingly difficult problems. I'm sure you all have a favorite mind-bender, and who better to share it with than the Slashdot community? Post your own problems and try to solve others. Just one request: If you have figured out the solution, link to it in a post, rather than write it out where anyone can see it." What brain benders tickle your fancy?
"Here's a sample to consider: You're in a dark room with 50 quarters, 18 of which are heads up. You are allowed to move around the coins or flip some or all of them, if you wish. Problem is, it's too dark to tell what you're moving or flipping (no, you can't figure it out by touch either). Your job is to split the coins into two groups, each of which has the same number of heads up coins. How do you accomplish this?"
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Soduku (Score:4, Interesting)

    by beacher (82033) on Saturday October 15 2005, @11:37PM (#13800847) Homepage
    They drive me nuts. Array and vecor logic. Fun

    -B
  • by Paladine97 (467512) on Saturday October 15 2005, @11:38PM (#13800854) Homepage
    I wouldn't say I have a favorite problem but often when I'm bored I'll pen down the Pythagorean theorem and solve it manually. 0 = ax*x + bx + c. I'll work it out until I get the solution that (I hope) everybody knows and loves! It helps to keep my math skills alive during boring meetings.
  • by Omnieiunium (872399) <canadiancanuck@noSPaM.gmail.com> on Saturday October 15 2005, @11:38PM (#13800857) Journal
    Is obviously 42
        • Re:Ok, here's mine (Score:4, Insightful)

          by radtea (464814) on Sunday October 16 2005, @09:38AM (#13803163)

          what's the next line?

          5.

          No finite sequence determines the subsequent.

          As such, "math puzzles" of the "what is the next number?" kind are not math puzzles at all--they are psychology and common-knowledge puzzles. They should be stated, "I'm thinking of a number. To me, the number is the next in the following sequence: (...). Your job is to guess, based on what you know of me (or people like me), of mathematics, and of common knowledge, which of the infinite number of mathematical relationships betweeen the numbers in that sequence is the one that is important to me."

          People who work in numerical methods are only too aware of how little information finite sequences contain beyond their own bounds. Interpolation is hard enough. Extrapolation is virtually impossible. Even simple sequences like "1,2,3,4..." can have literally anything as the next value--it is trivial to come up with generating functions that give integers for the first few integer arguments and wildly varying irrational values after that. Unless you know what the generating function is, the finite sequence tells you nothing. Guessing the generating function from a finite sequence is all about guessing what the questioner knows and what kind of generating function a person with their knowlege (or common knowledge) is likely to choose that would produce the given sequence.

          A modicum of mathematical knowledge is still required, but far more psychology is necessary.

  • easy one (Score:5, Funny)

    by zanderredux (564003) on Saturday October 15 2005, @11:39PM (#13800859) Homepage
    prove that a^n=b^n+c^n for any n.
  • by heinousjay (683506) on Saturday October 15 2005, @11:40PM (#13800866) Journal
    Turn a light on.
    • by radtea (464814) on Sunday October 16 2005, @09:50AM (#13803240)
      Turn a light on.

      I was once a judge at a "Phyics Olympics" where there was one puzzle in which students had to figure out the wiring if a circuit consisting of a couple of light bulbs and a couple of switches. They were "supposed" to solve the puzzle by flipping the switches, noting what lights were on and off, and inferring the circuit.

      One team took the apparatus apart and inspected the wiring.

      I gave 'em full marks.

      The head judge went spare.

      Science is not a game, and there aren't any rules according to which you are "supposed" to solve the problem. Alexander the Great was demonstrating the practice of experimental science when he unravelled the Gordian knot, and Feyrabend was onto something when he said, "Anything goes."

      Puzzles set by humans have more to do with communication between the puzzle-setter and the puzzle-solver than anything else. Some people even decry computer-generated puzzles because of this--they say that the pleasure they get from solving puzzles comes from the feeling of interaction with another mind.
  • Petals of the Rose (Score:5, Interesting)

    by Alien54 (180860) on Saturday October 15 2005, @11:41PM (#13800871) Journal
    I personally like the petals of the rose [google.com]

    Bill Gates is said to have solved the problem by memorizing the combinations first [borrett.id.au], the brute force approach.

    It ones of those that requires a knack for seeing the simple things

      • though i can see how frustrating it would be if you didn't pick up on this quickly :)

        Unfotunately, one rumor says that the smarter you are, the longer it takes to figure out.

        Because smart people often fall for complex solutions.

        • by Tim Browse (9263) on Sunday October 16 2005, @09:45AM (#13803210)
          Unfotunately, one rumor says that the smarter you are, the longer it takes to figure out.

          Max: My teacher tells me beauty is on the inside.
          Fletcher: That's just something ugly people say.

          -- "Liar Liar"

  • by Doc Ruby (173196) on Saturday October 15 2005, @11:47PM (#13800903) Homepage Journal
    42
  • by LeonGeeste (917243) * on Saturday October 15 2005, @11:57PM (#13800964) Journal
    I met a man with seven wives. Every wife had seven sacks, and every sack had seven cats, and ever cat had seven kits. Kits, cats, sacks, and wives, how many were going to St. Ives?
  • by Quirk (36086) on Saturday October 15 2005, @11:58PM (#13800976) Homepage Journal
    Since I tend to muck about in philosophy, history and epistemology I'll go with perhaps the most ancient riddle.

    Epimenides was a Cretan who made one immortal statement: "All Cretans are liars."

    "The Epimenides paradox [wikipedia.org] is a problem in logic. This problem is named after the Cretan philosopher Epimenides of Knossos (flourished circa 600 BC), who stated , "Cretans, always liars". There is no single statement of the problem; a typical variation is given in the book Gödel, Escher, Bach (page 17), by Douglas R. Hofstadter.

  • Truth vs. Lies (Score:4, Insightful)

    by sheetsda (230887) <doug.sheets@ g m a i l . c om> on Sunday October 16 2005, @12:01AM (#13800987)
    You find yourself before indistinguishable two doors, each with a statue. One door will lead to salvation, the other to death. The statue that guards the door to salvation always tells the truth, the statue to the door to death always lies. You may pose only one question to only one statue. What do you ask to determine which door is which?

    Answer(ROT13): Nfx nal dhrfgvba gb juvpu lbh nyernql xabj gur nafjre. Gb qrgrezvar juvpu qbbe vf juvpu lbh arrq gb xabj gur eryngvbafuvc bs gur nafjre lbh ner tvira gb gur gehgu. Gur guvat V yvxr nobhg guvf evqqyr vf vg sbeprf lbh gb pbafvqre gur bcrengbe va gur ybtvpny fgngrzrag gb or gur inevnoyr. Nqqvgvbanyyl crbcyr nera'g hfrq gb nfxvat dhrfgvbaf jura gurl nyernql xabj gur nafjre fb gurl graq abg gb or noyr gb guvax bs n fbyhgvba evtug njnl. Gur jubyr guvat orpbzrf boivbhf jura lbh cbfr n dhrfgvba fhpu nf "Ner gurer gjb fgnghrf urer?"
    • by Hektor_Troy (262592) on Sunday October 16 2005, @12:48AM (#13801294)
      Can I switch the statue for one talking bull frog? Cause I know the answer to that one. Pick it up, open one door, throw it down that hall, close door and wait a bit.

      Curtesey of The 10th Kingdom
  • Lightbulb problem (Score:5, Interesting)

    by Ellen Spertus (31819) on Sunday October 16 2005, @12:02AM (#13800996) Homepage
    Given:
    • One room has three switches, labeled A, B, and C.
    • Another room has three light bulbs, labeled 1, 2, and 3.
    • Each switch is connected to one bulb, but you do not know which is connected to which.
    • When inside either room, you cannot see the other room.
    • You begin in the room with the switches and may turn the switches on and off in any way you choose.
    • Once you leave the room with the switches, you may not reenter it. You may, however, go to the room with the light bulbs.
    How can you determine which switch is connected to which light? Here is a hint [nicemice.net] and solution [nicemice.net].

    I like this problem because people are ordinarily good at logic have so much trouble with it. I once had the pleasure of meeting Donald Knuth and stumped him with this puzzle.

    • by TheVoice900 (467327) <kamilNO@SPAMkamilkisiel.net> on Sunday October 16 2005, @04:45AM (#13802212) Homepage
      I know lots of people have commented on using the hot/cold method to determine which bulb is which, there's another problem with that as well: You don't know the initial state of the bulbs.

      Say for example all the bulbs are initially ON, and you flip two of the switches to what you think is on. Then when you flip one of them to what you think is "off" and wait a while, and go in to the room, you'll find two bulbs on, but you'll misidentify them because the one you thought you switched to "off" you actually turned "on". Not to mention they could be in mixed states initially..
  • Sticky Triangles (Score:5, Interesting)

    by Doc Ruby (173196) on Sunday October 16 2005, @12:15AM (#13801090) Homepage Journal
    Let's say I have a stack of sticks: all identical, inflexible, unbreakable. Sticks can touch only at their ends, not in between.

    If I give you 3 sticks, you can make one triangle. If I give you 2 more sticks (5), you can make 2 triangles. If I give you another stick (6), how can you make 4 triangles?
  • by nyri (132206) on Sunday October 16 2005, @12:16AM (#13801098)
    Is ..:: Riddles ::.. [berkeley.edu]. In has (amogst others) the famous "prison with a lamp" problem:

    100 prisoners are imprisoned in solitary cells. Each cell is windowless and soundproof. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Each day, the warden picks a prisoner equally at random, and that prisoner visits the central living room; at the end of the day the prisoner is returned to his cell. While in the living room, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.

    Before this whole procedure begins, the prisoners are allowed to get together in the courtyard to discuss a plan. What is the optimal plan they can agree on, so that eventually, someone will make a correct assertion?
  • There is a king and there are his n prisoners. The king has a dungeon in his castle that is shaped like a circle, and has n cell doors around the perimeter, each leading to a separate, utterly sound proof room. When within the cells, the prisoners have absolutely no means of communicating with each other.

    The king sits in his central room and the n prisoners are all locked in their sound proof cells. In the king's central chamber is a table with a single chalice sitting atop it. Now, the king opens up a door to one of the prisoners' rooms and lets him into the room, but always only one prisoner at a time! So he lets in just one of the prisoners, any one he chooses, and then asks him a question, "Since I first locked you and the other prisoners into your rooms, have all of you been in this room yet?" The prisoner only has two possible answers. "Yes," or, "I'm not sure." If any prisoner answers "yes" but is wrong, they all will be beheaded. If a prisoner answers "yes," however, and is correct, all prisoners are granted full pardons and freed. After being asked that question and answering, the prisoner is then given an opportunity to turn the chalice upside down or right side up. If when he enters the room it is right side up, he can choose to leave it right side up or to turn it upside down, it's his choice. The same thing goes for if it is upside down when he enters the room. He can either choose to turn it upright or to leave it upside down. After the prisoner manipulates the chalice (or not, by his choice), he is sent back to his own cell and securely locked in.

    The king will call the prisoners in any order he pleases, and he can call and recall each prisoner as many times as he wants, as many times in a row as he wants. The only rule the king has to obey is that eventually he has to call every prisoner in an arbitrary number of times. So maybe he will call the first prisoner in a million times before ever calling in the second prisoner twice, we just don't know. But eventually we may be certain that each prisoner will be called in ten times, or twenty times, or any number you choose.

    Here's one last monkey wrench to toss in the gears, though. The king is allowed to manipulate the cup himself, k times, out of the view of any of the prisoners. That means the king may turn an upright cup upside down or vice versa up to k times, as he chooses, without the prisoners knowing about it. This does not mean the king must manipulate the cup any number of times at all, only that he may.

    Assume that both the king and the prisoners have a complete understanding of the game as I have just explained it to you, and that the prisoners were given time beforehand to come up with a strategy. The king was able to hear the prisoners discuss, however, so also assume that if there is a way to foil a strategy, the king will know it and exploit the weakness. The prisoners must utilize a strategy that works in absolutely every single possible case.

    Now you must figure out not only how to keep the prisoners alive, but how to also ensure their eventual freedom. When can any one of them be certain they've all been in the central chamber of the dungeon at least once? And how? Don't try to imagine any trickery like scratching messages in the soft gold of the chalice. The problem is as simple as it sounds. The prisoners have absolutely no way of communicating with each other except through the two orientations of the chalice. If any of them attempts any trickery at all they will all be beheaded. All the prisoners can do is turn the chalice upside down or right side up, as they choose, whenever they are called into the chamber.



    (written by a former roomate)
    • MOD PARENT TROLL (Score:4, Informative)

      by LeonGeeste (917243) * on Sunday October 16 2005, @03:24PM (#13805159) Journal
      I had a conversation with Brian0918 on AIM this morning, in which he revealed he's really trolling when I pointed out to him there is no solution (see my other posts) on this topic. Here's a little tidbit: ". i usually just post the problem to get people into big disputes, which so far has worked 2 out of 2 times". If you want the full conversation, email me at sbartaNOSPAM_at_MAPSONgmail.com.
      • It's a terribly written version of the "warden and his prisoners" problem, which you can google. The only difference other than confusing language is the original problem has two on/off switches, and each prisoner must flip one, rather than one that can be left alone.

        *Spoiler* Don't read the following if you don't wanna know the answer:

        1) The prisoners elect one of their own to be a counter, the rest we will call non-counters.

        2) When a non-counter comes into the chalice room, if he can he will put the chalice right side up. If it's already right side up, he'll leave it alone. However, each non-counter will only do this once. If he's already flipped it in the past, and it's upside down, he'll leave it upside down.

        3) Every time the counter comes in, he checks the chalice. If it's upside down, he'll do nothing. If it's right side up, he'll flip it, and add one to his count. Once he's flipped it n times (n being the prisoner count), he knows everyone has done it. If the original state of the chalice is known, the problem can be modified so he only needs to flip it n-1 times.
  • hats (Score:3, Interesting)

    by blackcoot (124938) on Sunday October 16 2005, @12:20AM (#13801121)
    let's see... the problem goes roughly like this:

    you have five hats (two red, three black) and three people. you queue the people up in order of height and have them face the same way (this way the tallest person can see the two people in front of him/her, the middle person can see the shortest person, and the shortest person can't see anyone). you put a hat on each person's head and instruct them that they are not allowed to take the hat off or turn around. you then ask them to tell you what color their hat is. after a while, the person at the front of the line correctly announces the color of his/her hat. how did the person at the front of the line know and what were the other hat colors?
    • Re:hats (Score:3, Interesting)

      If the tallest person saw two red hats in front of him, he would immediately know his had was black and say "My hat is black!" He didn't, therefore he either sees two black hats or one black hat and one red hat.

      Knowing this, the second person looks at the hat in front of him. If he sees a red hat, he knows his is black. Since he does not see a red hat, his is either red or black, he doesn't know. But knowing this, the first guy can deduce that his hat is black.

      I don't think you can know what the oth
  • you're given a globe (Score:3, Interesting)

    by rmm4pi8 (680224) <{ten.noitcelfere ... } {ta} {rellimr}> on Sunday October 16 2005, @12:40AM (#13801254) Homepage
    Assuming the earth is a perfect sphere, describe the solution set of points where you can go 1 mi south, 1 mile east, and 1 mile north and return to your starting point. Hint: the cardinality of the set is R cross Z + 1 (and yes, I know that's equal to R, but expanding it makes it a more effective hint). Feel free to email me for more hints.
  • by Council (514577) <rmunroe@nOSPam.gmail.com> on Sunday October 16 2005, @10:25AM (#13803399) Homepage
    Oh, woe is me. I have a perfect logic puzzle, but was unlucky enough to be otherwise engaged when this story was posted. (By the way: a soft couch, a carefully selected DVD, half a bottle of rum, and a girl. Guess which element to this excellent scenario was fucking ruined by copy protection? I'll give you a hint: I may have just switched sides in this movie piracy debate. Fuck the RIAA. It was a perfectly legal store-bought DVD. Fuck them all.)

    But anyway, logic puzzles. This logic puzzle is excellent. I've had it up on my site (http://www.xkcd.com/blue_eyes.html [xkcd.com]), and after I got boingboing'ed I got a lot of email about it, so I've been able to tweak the wording to get rid of most of the confusing stuff, leaving only the logic. It's extremely subtle; I've never seen anything like it.

    Here's the puzzle:

    A group of people live on an island. They are all perfect logicians -- if a conclusion can be logically deduced, they will do it instantly. No one knows the color of their eyes. Every night at midnight, a ferry stops at the island. If anyone has figured out the color of their own eyes, they [must] leave the island that midnight.

    On this island live 100 blue-eyed people, 100 brown-eyed people, and the Guru. The Guru has green eyes, and does not know her own eye color either. Everyone on the island knows the rules and is constantly aware of everyone else's eye color, and keeps a constant count of the total number of each (excluding themselves). However, they cannot otherwise communicate. So any given blue-eyed person can see 100 people with brown eyes and 99 people with blue eyes, but that does not tell them their own eye color; it could be 101 brown and 99 blue. Or 100 brown, 99 blue, and the one could have red eyes.

    The Guru speaks only once (let's say at noon), on one day in all their endless years on the island. Standing before the islanders, she says the following:

    "I can see someone with blue eyes."

    Who leaves the island, and on what night?

    There are no mirrors or reflecting surfaces, nothing dumb, It is not a trick question, and the answer is logical. It doesn't depend on tricky wording, and it doesn't involve people doing something silly like creating a sign language or doing genetics. The Guru is not making eye contact with anyone in particular; she's simply saying "I count at least one blue-eyed person on this island who isn't me."

    And lastly, the answer is not "no one leaves."
    • Re:Riddle (Score:4, Funny)

      by Tuxedo Jack (648130) on Saturday October 15 2005, @11:41PM (#13800874) Homepage
      None.

      You haul your ass to a bakery, shell out twenty bucks, and get a box or two full of cupcakes, then you go Cid Highwind on everyone.

      "Siddown and eat your goddanm cupcakes!"
    • None, just keep the sprinkles on the side as an option.
    • At least 20, but as many as 34 cupcakes, right?

      40 people = 20 teenagers (1/2) 10 adults (1/4) and 10 babies (remaining 1/4)

      Half the babies (5 people) don't like cupcakes and one fifth of the babies left (1 person, 1/5 of the five babies left after the 5 that don't like cupcakes). This leaves 34 people who are still wanting cupcakes.

      Chocolate cupcakes and sprinkled cupcakes are not exclusive of each other because you can have chocolate cupcakes with sprinkles, so you can disregard the whole thing about w
    • Re:Infinity (Score:4, Interesting)

      by Frequency Domain (601421) on Saturday October 15 2005, @11:45PM (#13800894)
      Then you may like this one: X to the X to the X to the... = 2. What is X if the left hand side is an infinite sequence of powers?
      • Solution (Score:4, Interesting)

        by Frequency Domain (601421) on Saturday October 15 2005, @11:48PM (#13800906)
        Since it's an infinite sequence, you can separate the left-most X and rest still equals 2. Thus X^2 = 2, so X = sqrt(2).
        • Re:Solution (Score:5, Interesting)

          by wildsurf (535389) on Sunday October 16 2005, @02:48AM (#13801866) Homepage
          Since it's an infinite sequence, you can separate the left-most X and rest still equals 2. Thus X^2 = 2, so X = sqrt(2).

          Disprufe(TM) by contradiction:

          1. Suppose sqrt(2) ^ sqrt(2) ^ sqrt(2) ^ ... = n.
          2. Then, sqrt(2) ^ (sqrt(2) ^ sqrt(2) ^ ...) = n.
          3. Hence, sqrt(2) ^ n = n.
          4. Therefore, n obviously equals 4, because sqrt(2) ^ 4 = 4.
          5. Hence, sqrt(2) ^ sqrt(2) ^ sqrt(2) ^ ... equals 4, not 2, so it can't be the solution to the original problem.

          What's wrong with this logic? ;-)
    • Jugs (Score:3, Interesting)

      If you have a 5 gallon jug and a 3 gallon jug of water, and a hose so u can refill any as u please. What are the steps to get exactly 4 gallons of water?
      Fill the 5G jug. Pour it into the 3G jug, so you have 2G in the 5G jug. Empty the 3G jug & pour the 2G from the 5G jug into the 3G jug. Refill the 5G jug & finish filling the 3G jug. It will only take 1G, so you will have 4G in the 5G jug.
    • What is the degree of the angle between the hour hand and the minute hand when it is 2:15?
      22.5 degrees.

      Yes, you can do it iteratively until inifinity, but the minute hand is at 90 degrees off 12, and the hour hand is at 60 for 2, plus 30/4 for the :14, = 67.5. The difference is 22.5
    • The problem, as stated, is incomplete. If it is being defined recursively, we need some starting conditions, like x(1) = 1. However, as the OP didn't actually ask a question, I'll state what I think he was trying for here:

      This is called the "Collatz Conjecture [wikipedia.org]": given a positive integer a_1 = n, let a_i = a_{i-1}/2 if a_i is even, and a_i = 3a_{i-1}+1 if n is odd. Repeat. In other words, take a number, divide by two if it's even and take three times it plus one if it's odd, and repeat ad nauseum. Try a f
    • Generalized problem: find a similar method (to the division by 3 or 6 rules) for any integer. Not all are fast ways, but there is a relatively simple solution for any integer. A fun one to try is 11. Hint: write the number in base 11 and use modular arithmetic.
    • by Stalus (646102) on Sunday October 16 2005, @12:16AM (#13801094)

      Simply place any 18 coins into the second group and flip those over.

      If you flip a coin over that was heads, it is now tails and is eliminated from consideration. If you flip a coin over that was tails, it marks with heads a coin selected that was not heads. Therefore after 18 coins are flipped, the number of heads in the second pile is equal to the number of heads that are left in the first pile.

    • Except... (Score:5, Informative)

      by nwbvt (768631) on Sunday October 16 2005, @12:33AM (#13801198)
      Dividing by zero is not "perfectly valid algebra". Division is not closed on the set of real numbers. Its not really a riddle if you lie in the problem description. Otherwise the solution to the sample problem could be "Pull out 9 of the quarters into a seperate group. I was lying when I said you couldn't see any of them."