Jump to content
BrainDen.com - Brain Teasers

harey

Members
  • Posts

    219
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by harey

  1. I see, I found the solution for 8 generals, confused by range() in Python. The distribution for 7 generals:
  2. The hard part is to generate the lock numbers from the generals, the formulas are quite complicated: There is a way to cheat: Both programs give the same list: The distribution: The solution sure is not unique, various combinations are possible. Not talking about the possibility that the lock 1 has to be unlocked to unlock locks 2 and 3.
  3. Hint 0: Hint 1: Hint 1.1: Hint 2: Hint 2.1:
  4. Congratulations, works. I checked it: I suspect a kind of recursivity, but it probably will not show up for small n. For n=2 and n=3, the robot stays where it should, which does not seem evident for larger n.
  5. I do not really understand what you mean by "simple path", but I think the answer is no. The figure H is OK, but you can very well have: * * * * * c * * * c * c c * * * c * * * * * * * * c * ... Your list must work for all these cases, as well as for all grids where there is/are one/three/four cement blocks. i.e. the solution Molly Mae proposed would not work for the first maze (so it does not matter anymore that it works for the 2nd and 3rd). Even calculating the number of possibilities for 2 blocks gives me headaches. 7 * 6 / 2? Wrong, the robot must be free to leave the corner and the lower right corner must remain accessible. To get insane...
  6. An interesting variant. The problem states "there is a path", but it does not state "there is a path for the robot". I think it is easier we stay with moving just to the next square.
  7. Each square of an n x n grid of squares is either filled with cement blocks or left empty, such that there is at least one path from the top left corner to the bottom right corner of the grid. Outside the grid everything is filled with cement. A robot is currently located at the top left corner and wants to get to the bottom right corner, but it only knows the value of n and doesn't know the layout of the grid. It also has no method of observing its surroundings, and it is your job to give it instructions to ensure it ends up at its destination. Your instructions should be a finite list of directions (Up, Down, Left, Right) - the robot will try to move in the indicated directions in order, and, if there is a cement wall in the way at some step, it will simply fail to move in the corresponding direction and continue on with the next instruction in the list. Since the robot has no way of sensing whether it has reached its destination, it might reach the destination somewhere in the middle of your list of instructions and then later leave. The goal is to give a list of instructions, depending only on n, such that after following your instructions the robot is guaranteed to end its journey in the bottom right corner of the grid. The bad news: I do not know the solution and I cannot ask for hints.
  8. Evident after translating it to college version: Just a little bit late... I guess in a test, half an hour would be allocated for this question. I get depressed when I realize the time I needed.
  9. The plot for all cases: Strategy I knew it would be hard, but not THAT hard.
  10. There are 9 cards on the table, numbered 1 to 9, face up. You and I alternatively pick one card. The first one who can produce exactly 3 cards summing up exactly 15 wins. What is your strategy?
  11. I found a strategy, but far from sure it is optimal.
  12. True so far. But it does not imply that it is not advantageous to i.e. wait for the 3 next cards and call "Stop!" After the next 3 cards, the p(next card is R)=p(the last card is R) still holds - but with (most probably) a different p.
  13. I do not think there is need to use the spoiler anymore. If the blue are excluded because every room houses a green man, the same way you cannot accept even a single new guest.
  14. Brilliant, surprisingly interesting and leading to a major annoyance. Well, now back to the original problem. Everybody leaves, the hotel is empty. The green and blue men arrive all together and go to the room they occupied previously. Is this problem equivalent to the first one? Precision: By equivalent, I mean that the problems are announced in a slightly different way, but the answers remain the same. Something this way: Aunt: If I give you 5 bananas and take back 2 bananas, how many bananas have you? John: I do not know. Aunt: I met your teacher and she told me you make this kind of problems at school. John: Yes, but we do it with apples. Just do not tell me that the men know now the room numbers. Besides being clairvoyant, they can move in time. Forwards, backwards and sideways.
  15. Sorry for 'discard', I meant these numbers build a {set} from which elements can be removed. And yes, we remain in rationals. What if l only paint those between 0.5 and 0.6, even leaving .53745 unpainted? Did I not paint an infinite number of numbers? We turn in round here. You claim that if you can remove an infinite amount of elements from a set, the set will be empty - I claim there may remain some elements (and even more then removed, depending on circumstances). I suppose you apply a 'law' or a 'theorem'. Can you give me the (Wikipedia) reference?
  16. Maybe an idea. There is an infinite number of numbers between 0 and 1. I have the opportunity to discard an infinite number of numbers between 0 and 1. How much are you willing to bet that nothing remains between 0 and 1?
×
×
  • Create New...