Jump to content
BrainDen.com - Brain Teasers


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by plasmid

  1. Clarification: when I walked the odd numbered N-gons I always turned clockwise. When I walked the multiple of 4-gons I always turned counterclockwise. For now, suppose I always alternated between an odd-gon and a 4x-gon without bothering to keep edge number monotonically increasing. So 3-gon, 4-gon, 5-gon, 8-gon, 7-gon, 12-gon, 9-gon, etc with clockwise turns on blue and counterclockwise on red. (Otherwise, yeah, it would be a mess.)
  2. 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?
  3. That looks like it nailed it, PG! As for a way of saying it in under a minute...
  4. I'll call that a hit. My thinking was...
  5. 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).
  6. Not a balloon, something else that's more characteristically under a peaked wave and mostly concealed.
  7. On the right track, but I get more riled up upon harpooning.
  8. 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.
  9. On the right track, but not quite there yet.
  10. 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
  11. How I'm interpreting it so far:
  12. Optimizing Captain Ed’s answer a little more
  13. 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. I know of a way to do this while flipping no more than two coins. And a hint:
  15. I’m going to make the math easier by
  16. 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. 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. 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. 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. 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. 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. 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. Two more clarification questions
  • Create New...