Jump to content
BrainDen.com - Brain Teasers


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by plasmid

  1. Walk the pattern

    I once stood on a Cartesian plane at (0, 0) facing north (along the positive y-axis). I pulled out a rug in the shape of a regular triangle (which I call a 3-gon) and set it on the plane with one vertex at my feet at (0, 0) and with the center in the direction I was facing along the y-axis. I then started walking forward on the rug until I got to the center of the 3-gon, at which point I stopped and turned clockwise until I was facing a vertex, and I walked to that vertex of the 3-gon. Then I pulled out a rug in the shape of a square (which I call a 4-gon), put it with one vertex at my feet and with the center straight ahead of my current view (after that previous clockwise turn). I walked to the center of the 4-gon and then turned counterclockwise (instead of clockwise like on the odd-numbered N-gon rug), and started walking again as soon as I was facing a new vertex of the 4-gon. I kept repeating that for every odd numbered N-gon and every multiple of 4-gon. Which way was I facing after I did that forever?
  2. Coin hunt

    I have a rare coin that’s worth a bazillion dollars and I’ll give you and a buddy a chance to win it. I’ll bring you (but not your buddy yet) into a room where I have a bunch of coins lined up in a row, probably randomly distributed between being heads up and tails up, and I’ll tell you which coin among those is the bazillion dollar coin. Then you’ll exit the room and your buddy will come in through another entrance (so you can’t communicate after I tell you which is the bazillion dollar coin) and tell me which coin to give to the two of you. That wouldn't be a very fair game, so you can also tell me to flip whichever coins you want before you leave the room and your buddy comes in. (I’m flipping them myself to make sure you don’t send codes with subtle placement of the coins or such tomfoolery.) But you have to watch 10 minutes of Nyan Cat for every coin I flip so you want to minimize the number of flips lest you go insane. I’m not saying beforehand how many coins will be in the room, and you only get one minute to tell your buddy a strategy (just words that can be spoken in under a minute, no written cheat sheets) before it’s time to play the game. Clock starts now. (I would credit the source of where I heard the original form of this puzzle that I'm modifying, but I can't remember the source any more.)
  3. Coin hunt

    That looks like it nailed it, PG! As for a way of saying it in under a minute...
  4. I’m not Moby Dick

    I feast on meals of mindless fare With blubber to keep it all in For what’s inside should stay right there Or you’ll face a calamitous end ‘Neath peaking wave I spend the days While mostly conceal’d, I presume Unless my presence breath betrays As characteristic’s my spume Alas, I find myself engaged By man with a wretched harpoon Assaulted thus, I shriek enraged With hellish retort for the goon
  5. I’m not Moby Dick

    I'll call that a hit. My thinking was...
  6. I’m not Moby Dick

    Getting warmer, but I'll definitely cause you (the listener of the riddle) more calamity if my insides get out and have my own "peaked wave" in the sea to sit under (mostly).
  7. I’m not Moby Dick

    Not a balloon, something else that's more characteristically under a peaked wave and mostly concealed.
  8. I’m not Moby Dick

    On the right track, but I get more riled up upon harpooning.
  9. I’m not Moby Dick

    Not a sink disposal. While I imagine the last stanza has happened with some of those, I hope it's not commonplace enough to belong in a riddle.
  10. I’m not Moby Dick

    On the right track, but not quite there yet.
  11. Poisoned Needles

    How I'm interpreting it so far:
  12. Optimizing Captain Ed’s answer a little more
  13. The Most Wonderful Prince

    Is there an easier way to reach the solution? If I try to handle the case of an infinite number of princes to choose from, and I deal with the exact formula I was working with initially instead of the simplified approximation that I ended up using to be able to actually calculate an answer, then I get
  14. Coin hunt

    I know of a way to do this while flipping no more than two coins. And a hint:
  15. The Most Wonderful Prince

    I’m going to make the math easier by
  16. Dumb robot

    I changed the way the algorithm works, so that it more systematically checks all possible paths for all possible mazes and is guaranteed to eventually find the shortest possible set of instructions that will solve every maze of size n x n. The bad news is that it takes a long time to run. Even after doing what I could to make this run reasonably efficiently, it still could only process a 3 x 3 maze and will take a while to process even a 4 x 4 maze, albeit on a crummy laptop. If this was a question posed to programmers, and the person asking the question knew full well that the numbers would get huge fast (checking all possible instructions for a 17 step solution would mean checking 417 = 17 billion potential solutions against almost 4000 mazes for the 4 x 4 case) and was making the point that you'll need to come up with something other than exhaustive brute force (sort of like the algorithm I had earlier but probably a smarter version), then it would make sense. At any rate, this is a solution for any 3 x 3 maze with the shortest possible number of moves.
  17. The Most Wonderful Prince

    This is a start but not a complete answer. If you care only about whether the Princess picks the Most Wonderful Prince, and don’t care whether a failed attempt gets her the second best guy or the village donkey because you consider anything less than the best to be a loss:
  18. Dumb robot

    It reached a final set of instructions for a 5 x 5 maze, which I'm sure you're all dying to see... This will work (unless my program is buggy), but I would be surprised if this is anywhere near optimal. And I'm not going to attempt a 10 x 10.
  19. Dumb robot

    Was this a problem posed to a bunch of programmers? A solution for any 4x4 maze (although IDK whether or not this is an optimal one) is But when I tried running the algorithm to solve any 5x5 maze, it's been running for a while and still hasn't found a solution. I can't guarantee that this approach will find one. I'll paste the perl code below.
  20. 100 white marbles

    I agree with Rainman; we need a description of how the marbles were selected to be placed into the jar in the first place. If you were to say that someone flipped a fair coin 100 times and put a white marble in the jar if he saw head and a black marble in the jar if he saw tails, then that would be enough of a description to take on the problem. And I bet the answer would be a lot different if someone picked a random number from 0 to 100 with equal probability and put N white marbles and 100-N black marbles in the jar.
  21. Baggage on a conveyor belt

    Ah, the hospital's rule. Of course. I vaguely remember that from high school. More importantly, I also found out that my memory of integration by parts was faulty, and that seems to have been the real issue. From the top:
  22. Baggage on a conveyor belt

    If you do that and the (uv) term is x(F3-1), then at x=infinity wouldn't you end up with infinity times zero? If there's a rule about the limit of multiplication between x and functions with e-x as x goes to infinity, then maybe I could use that in the route I was taking.
  23. I want the butterscotch

    Two more clarification questions