Jump to content
BrainDen.com - Brain Teasers


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by gavinksong

  1. Count the Flags

    (Hello, friends. This is yet another puzzle from BWOC. I don't know the solution to this one yet, so I was thinking we could work on this together.) You are tasked with designing a robot to explore a large but finite maze. The maze is drawn on a square grid, and walls exist on some of the edges of the square grid. Some of the squares contain a flag. Your robot may interact with the world in the following ways: 1) Check which of the 4 adjacent edges contain walls. 2) Move to one of the 4 adjacent squares (provided there is no wall in the way). 3) Check if there is a flag on your square. 4) Pick up a flag (provided there is a flag on your square and the robot is not already holding a flag). 5) Put down a flag (provided the robot is holding a flag and there is not already a flag on your square). 6) Generate a random bit. 7) Output a number. Your robot will be placed in a maze. The maze will contain some number of flags (from 100 to 1000). All flags will be reachable from the robot’s starting position. Your robot is tasked with determining the number of flags. The robot may take as long as it needs, but may only output one number and must output the correct answer eventually, with probability 1. The catch is that your robot is not Turing complete. It only has a finite amount of memory. You can give your robot as much memory as you need, but it must succeed on arbitrarily large mazes
  2. Determining an ellipse given a foci

    I stand by my answer.
  3. Determining an ellipse given a foci

    My thoughts exactly... except is it possible with four points?
  4. Westworld Mafia

    It hurts to know that Flamebirde was not on board. Just in this case here, if he had saved me instead, nobody would have died. Even if Nana had chosen somebody else to kill, it would have been 3v1, and I would have called her out, and it would have been possible to lynch/kill both of us on the following days/nights (bona can block the remaining suspect N3 if flamebirde is dead). Either way, plasmid's method was foolproof since the worst case ends in a tie. It would have been 100% foolproof if we had asked Flamebirde if he had used his vote manip in D1. It's weird how nobody thought to ask. @araver random question: how does it appear on the NP when someone's been targeted for a kill by multiple roles? (^i can't figure out how to change font color on mobile) That is what you said when you originally suggested it, and I'm sure everyone agreed with the logic of it (even Nana). As planned, you must have immediately known that the baddie's ODTG vote manip was gone... which is what makes it even stranger that you didn't speak up. Deeply ingrained Mafia reflexes/paranoia, I suppose?
  5. Westworld Mafia

    Actually, reading that made me realize we definitely could have known if we had just asked Flamebirde - unless he was the baddie which still would have been fine. So actually, a lot of plans would have worked - if we had known that. Also, slowly starting to realize that, contrary to what Nana said, plasmid was always able to clear himself if bona didn't block him since Hector's role would appear next to his kill, which means my original plan could have been a lot simpler. Anyways, it was fun! Thank you. Man, the end of D1 was a big twist for me. I had Flamebirde pegged as Dolores, Nana as the baddie, and bona as indy - and I couldn't help but think that Aura 2.0 was definitely not indy because of the thing. So basically, I wasn't even expecting a vote manip. I'm glad it happened though, not because it gave the goodies an advantage, but just because it was kind of cool. It wouldn't be Westworld themed without a few twists.
  6. Westworld Mafia

    Fair enough. There were a few problems with your analysis of the first plan, but as far as I can tell, baddie can't win with the new plan. In fact, since I know that I'm not the baddie, I see it as a guaranteed win. I didn't realize that the name of the acting role appears next to every kill in the NP.
  7. Westworld Mafia

    Indeed, I did leave that part out. Like I said, I was operating under the assumption that I was not the baddie. If plasmid claimed that he had been blocked and NK'd you, it would clear bona and obviously you since you'd be dead. That just leaves me and Flamebirde as the other two suspects, and again, I was operating under the assumption that I was not the baddie. If plasmid NK'd Flamebirde instead, he would have to claim he was blocked, clearing bona, while I would clear you, leaving only me and plasmid as suspects. And again, if you operate under the assumption that I am not the baddie, then plasmid's cover is blown. And yes, if bona blocks plasmid, then every time I wrote 2 v 1 for D2 in my original analysis should instead be read as 3 v 1. Also, the case of "Flamebirde baddie / Nana NK" would result in an identical scenario to the one above where "plasmid baddie / Nana NK", which is why I was saying it would implicate Flamebirde (as one of two suspects). Anyways, these are just minor updates. It might seem strange that I formulated and shared an entire strategy based on the assumption that I wasn't the baddie. However, as it is literally the only assumption I've made in an otherwise foolproof strategy, to reject it is equivalent to saying that it is more likely for that assumption to be false than it is for an alternative strategy to fail. Intuitively, based on the fact that I am a role spy who can't be cleared without being killed, I don't think there would be another strategy that hinges on fewer assumptions (although you're welcome to try to come up with one). But even if there were, given that I claimed first without any counter-claims, I think I'm currently the least likely to be the baddie. And if I am, then I at least deserve to win for being ballsy.
  8. Westworld Mafia

    I guess that's true. I initially thought this would allow a baddie plasmid to claim that he was blocked, NK Nana, and then blame Flamebirde. But I guess in that case we can just lynch Flamebirde and see if he saves himself.
  9. Westworld Mafia

    Just to be clear, here's my analysis of how my strategy might play out. However, this is all assuming everyone believes that I am who I say I am.
  10. Westworld Mafia

    Actually, I'm pretty sure Nana's claim defaults to Clementine since I claimed Maeve. Since you've claimed Teddy, Plasmid must claim Hector. I think Flamebirde is in the clear, both because of his behavior and since Aura 1.0 probably wasn't Dolores (she forgot about Dolores' block in her jab at plasmid). Also, hopefully, I'm mostly in the clear for claiming first. plasmid will be cleared if Hector acts tonight, although it could be a bit confusing if Hector and the baddie choose the same target. Therefore, I'm going to role spy Nana and ask Flamebirde to save me. I suggest Hector target bonanova since Teddy is a non-factor. Also, if Nana is Clementine she should hold off on using her save since we can't afford to potentially lose three goodie votes for tomorrow. As long as Flamebirde and I are telling the truth, that should net us a goodie win. Actually, we would win even if Flamebirde was the baddie as long as Nana holds off on her save. I guess you guys mainly just have to trust me.
  11. Westworld Mafia

    That was really unexpected. Anyways, I suppose the game is pretty much set if we all reveal our roles? I claim Maeve.
  12. Westworld Mafia

  13. Protecting Airplanes

    It was a man by the name of Abraham Wald. This story happened to be in the preface of a book that my dad bought me that I never read. Edit: also, he specifically suggested that the engine should be armored since it was statistically the least damaged area for returning planes.
  14. Westworld Mafia

    On the other hand, I would really like to hear from bonanova. 1. gavinksong - voting for bonanova2. Flamebirde - voting for Aura 2.03. Nana77 - voting for plasmid4. plasmid - voting for Aura 2.05. Aura 2.0 6. bonanova - voting for Aura 2.0
  15. Westworld Mafia

    Maybe it's bad to make inferences from this, but that makes it sound like Aura isn't indy. Edit: it also makes it sound like Aura 1.0 probably wasn't Hector.
  16. Westworld Mafia

    Sure thing! I didn't know that was the convention. 1. Gavinksong - voting for Flamebirde2. Flamebirde - voting for bonanova3. Nana77 - voting for plasmid4. plasmid - voting for Nana5. phil18826. bonanova
  17. Determining an ellipse given a foci

    After some more thought,
  18. Determining an ellipse given a foci

    Minor grammar correction: the singular form of foci is focus. Without really thinking about it, I'm going to guess:
  19. Protecting Airplanes

    This is classic.
  20. A gambling problem

    Just at a glance,
  21. Westworld Mafia

    Is it a rule that you need to post publicly before N1 to be active? I either didn't know that or was late. No, it's impossible; indy is invulnerable N1. Can't tell if feigning ignorance is a ploy to trick us into thinking you're not indy. AND you asked before if indy's trap prevents voting when the rules state that the trap doesn't silence. What to think? Not sure how this works, but shouldn't we be going after indy first? Or is a simultaneous goodie and indy win possible? Tentatively, my vote: 1. Gavinksong - voting for Flamebirde 2. Flamebirde - voting for bonanova 3. Nana77 - voting for plasmid 4. plasmid - voting for Nana 5. phil1882 6. bonanova
  22. This is another problem from Google Code Jam that blew my mind. It is still blowing my mind. It just so happens to be from the same round as the problem I posted earlier. Like before, there is a small input and a large input for this problem. For the large input, n can reach up to 2 billion. Thus, in order to calculate the answer in a reasonable amount of time (and precision*), some key mathematical insights are required. What are they? *for non-coders: since computers cannot store real numbers with infinite precision, most operations on "floating point numbers" cause a gradual loss in precision. In our case, it would almost definitely result in an incorrect answer.
  23. Connect Four

    The classic board game Connect Four has a winning strategy for the first player. The traditional dimensions of the board is 7 wide by 6 tall. For which dimensions does the first player have a winning strategy?
  24. Connect Four

    The classic board game Connect Four has a winning strategy for the first player. The traditional dimensions of the board is 7 wide by 6 tall. For which dimensions does the first player have a winning strategy?
  25. Balancing Gold Coins

    A reversal of a classic problem. You have a bag of gold coins. They are all of the exact same weight except one, which is a fake. You have a balance scale, which you can only use N times. What is the maximum number of coins from which you can pick out the fake?