BrainDen.com - Brain Teasers

# plasmid

VIP

1742

22

1. ## The Most Wonderful Prince

I’m going to make the math easier by
2. ## 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 wo
3. ## 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:
4. ## 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.
5. ## 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.
6. ## 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.
7. ## 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:
8. ## 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.
9. ## I want the butterscotch

Two more clarification questions
10. ## Code to the safe

Is it allowable to design a key that can open multiple different locks? If each lock has multiple positions where a subset of the pins at each position (potentially at different positions for each lock) need to be raised to the correct height in order to be opened, then it would be fairly straightforward to design one key for each general while still using the total number of locks in the answers above. If you're limited in how many positions the pins of a lock can be in, then things might get complicated.
11. ## Coin hunt

So if you have N coins to choose from, instead of needing log2N coins to specify its position you can guarantee that you only need (log2N / 2) + 1 flips. Nice move to halve the upper limit, but with 1000 coins you could still be in for an hour of nyan. That might work well for random configurations ... the math to figure out how many flips it would take on average would be difficult and maybe worth being its own question. But the worst case scenario if the bazillion coin is in the middle, the left half is all heads, and the right half is all tails would be a real pain.

Ok.
13. ## Baggage on a conveyor belt

SMH, continuing from that last line of formula... Edit: Nevermind, I think you have to calculate the value over the range of integration for the numerator and denominator separately, I don't think you can just divide through like that. And after looking it up, those limits go to zero so I've got an indeterminate 0/0 still.
14. ## Baggage on a conveyor belt

Does not compute when I try a Poisson distribution. I might be doing something wrong.

This one

17. ## Coin hunt

Flipping the same coin twice would be indistinguishable from not flipping it at all to your buddy. So you would just be exposing yourself to more nyaning without accomplishing anything.
18. ## Coin hunt

It looks like harey and aiemdao have sort of similar strategies, and that the number of coins flipped would be up to log base 2 of the total number of coins. With harey's answer it could be less for certain numbers of coins in play, but not for all. But if there are more than even a mere 32 coins, then you could be in for up to a solid hour of nyan-ing which might not be worth a bazillion bucks. Try for an approach with less, especially when the number of coins gets large.
19. ## 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
20. ## Traffic jams

This might count as an ah-hah if it's true.
21. ## Obtuse triangles in a circle

Not an answer, but a description of a potential approach and what would still be needed to make it work since this has gone for a while without being cracked.
22. ## Pairing the points

Probably not what you have in mind, but I realized part of my previous answer was superfluous so this is a little more elegant and gets rid of some hand waving.

24. ## I’m not a gardener

Right on, Cygnet! Hopefully things make sense to readers with that answer in mind, but I'll go ahead and say what I was thinking for each of the clues.
25. ## I’m not a gardener

None of the above, I’m afraid. A barrel (particularly if it’s a wine barrel) could fit most of the clues except for the oddly even adulating when not dispensing slight, and for wine I would have called the roses red and white instead of pink and white while for this riddle it definitely should be pink and white. I can say that thirteen is not involved in this riddle; the oddly even among the 14 is among a natural group of 14. And a bringer of good luck is involved, but I’m looking for something that can do everything from grow the pink and white roses, adulate or dispense slight, and fit the l
×

• #### Activity

• Riddles
×
• Create New...