Tuesday, June 28, 2011

Few Google Puzzles

How do you get a fair result with an unfair coin? i.e it is expected to come more heads than tails.

Answer: Take HT as Heads, and TH as Tails, and Other times re flip the coin, now the probabilities are same.

You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

Additional Note:

  • There are 5 rational pirates, A, B, C, D and E. They find 100 gold coins. They must decide how to distribute them.
  • The pirates have a strict order of seniority: A is superior to B, who is superior to C, who is superior to D, who is superior to E.
  • The pirate world's rules of distribution are thus: that the most senior pirate should propose a distribution of coins. The pirates, including the proposer, then vote on whether to accept this distribution. If the proposed allocation is approved by a majority or a tie vote, it happens. If not, the proposer is thrown overboard from the pirate ship and dies, and the next most senior pirate makes a new proposal to begin the system again.
  • Pirates base their decisions on three factors. First of all, each pirate wants to survive. Second, each pirate wants to maximize the number of gold coins he receives. Third, each pirate would prefer to throw another overboard, if all other results would otherwise be equal

Answer: It might be expected intuitively that Pirate A will have to allocate little if any to himself for fear of being voted off so that there are fewer pirates to share between. However, this is as far from the theoretical result as is possible.

This is apparent if we work backwards: if all except D and E have been thrown overboard, D proposes 100 for himself and 0 for E. He has the casting vote, and so this is the allocation.

If there are three left (C, D and E) C knows that D will offer E 0 in the next round; therefore, C has to offer E 1 coin in this round to make E vote with him, and get his allocation through. Therefore, when only three are left the allocation is C:99, D:0, E:1.

If B, C, D and E remain, B knows this when he makes his decision. To avoid being thrown overboard, he can simply offer 1 to D. Because he has the casting vote, the support only by D is sufficient. Thus he proposes B:99, C:0, D:1, E:0. One might consider proposing B:99, C:0, D:0, E:1, as E knows he won't get more, if any, if he throws B overboard. But, as each pirate is eager to throw each other overboard, E would prefer to kill B, to get the same amount of gold from C.

Assuming A knows all these things, he can count on C and E's support for the following allocation, which is the final solution:
A: 98 coins
B: 0 coins
C: 1 coin
D: 0 coins
E: 1 coin

Also, A:98, B:0, C:0, D:1, E:1 or other variants are not good enough, as D would rather throw A overboard to get the same amount of gold from B.

Note: The game can easily be extended to up to 200 pirates (or further even if you don't increase the amount of gold).

You have to get from point A to point B. You don’t know if you can get there. What would you do?

Best Answer: Well, point A is where you are now. You know how you go into a mall, and they have the "mall map" inside a case and you look for the "you are here" spot? That's your reference point, and if you have even the slightest sense of direction, you can find the store you want on the map and start walking to it.

Next...point B. In the same scenario above point B would be the store you looked for and started walking toward. So, in other words, point B is where you want to go. In the mall example you could locate the store and go in the exact opposite direction following only the outer walls and still get there. Not very effective, but the end result would be successful...albeit very delayed.

Or, you could locate the store, point yourself in that direction, and walk straight to it and get there much faster and much more efficiently. Successful end result and with a lot of extra time to spare when compared to the walking the other way. Right?

Something else that can come up even in your "direct" walk to point B is distraction. After all; you're in a mall. You're bound to see some shoes you just "got to have". Or you'll stop and drool over that awesome surround sound digital megaDef home theater system. Maybe you'll decide to stop and sample that divine cinnamon roll that's been wafting up your nose for the past 15 minutes. You get the idea. Distractions can keep you from arriving at your desired location. If not for good, at least for a significantly postponed time.

In your ongoing marketing efforts you need to get from point A (where you are now) to point B (your desired end result, location, or outcome) in an efficient, timely manner to be as effective and successful as possible. So you'll need to keep some key points in mind:

  • Know (not think you know) where you are
  • Know (not think you know) where you want to go
  • See clearly where "point B" is or clearly, vividly visualize yourself there
  • Be aware of what your distractions are or could be and build up barriers against them

And don't stop until you get there...then you'll begin to prepare for a new "point B"
This isn't mystical. It isn't magical. It isn't mind control or mind over matter. It's the good ol' work ethic. You keep working at it until you achieve it. I don't buy into the "work smarter not harder" cliche' either. No way. You work smarter AND harder.

Increase your skills consistently so you can achieve more in less time. Learn more software programs to streamline your efficiency. But then you gotta (as we used to say in high school choir) practice, practice, practice! You don't get better simply by "being smarter". I like to say: Education without Application leads to a Continuation of Frustration. So apply that wonderful brain of yours to the task at hand and do it until you do it better than anybody.

Once you've developed this approach to your efforts...your sphere of influence will be made up of bold, straight lines you can walk with confidence.

Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

I would argue that the COLOR of the shirt is less important than the OCCASION you wear the shirt for.The best top level hash to make on the shirts would be when the shirt is appropriate to wear. Divide the shirts into Work Shirts, Leisure Shirts, and Gym Shirts (insert other categories as you see fit). Then when it’s time to select a shirt for work in the morning, you don’t have to think about what COLOR you want to wear. Maybe then organize the work shirts by color.

Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?

Day1: nothing happens. As every woman would be expecting that one of the men, she knows for adultery should die. No one would kill her own husband.
Day2: When no one dies, each woman would instantly come to know that her husband has cheated, and each woman would kill their husband. So everyone dies.

If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?

Let p be the probability of seeing a car in a given 10 minutes. Then (1-p) is the probability of not seeing a car in 10 minutes, and (1-p)3 is the probability of not seeing a car in 30 minutes. But:
     (1-p)3 = 0.05
--> p = 0.63159...

If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?

Assume for now the angle is 0 degrees, but hour hand moves about 0.5 degrees in one min, and in 15 minutes he moves by 7.5 degrees, so the angle is 7.5 degrees.

No comments:

Post a Comment