1 / 8

Google/Microsoft interview

Google/Microsoft interview. Problem 1. Estimate the weight of a 747. . Problem 1. Estimate the weight of a 747. Ok, 747 is a vehicle designed to carry people. We don’t know much about planes, but let’s think by proxy. What other large vehicles carry passengers?

merle
Download Presentation

Google/Microsoft interview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google/Microsoft interview

  2. Problem 1 • Estimate the weight of a 747.

  3. Problem 1 • Estimate the weight of a 747. • Ok, 747 is a vehicle designed to carry people. We don’t know much about planes, but let’s think by proxy. What other large vehicles carry passengers? • Busses. Assume 747 = 6 buses. 4 in a row + 2 on top. Each bus ~ 60 people. So 747 ~ 360 people. Sounds about right. A bus weighs 5-10 tons. So, a 747 weighs between 6*5 and 6*10 = 30-60 tons. (43 tons, actually).

  4. Problem 2 • In a country where couples want boys, they use the following strategy: couples have children until they have a boy, then stop. What is the ratio of boys to girls in this country?

  5. Problem 2 • In a country where couples want boys, they use the following strategy: couples have children until they have a boy, then stop. What is the ratio of boys to girls in this country? • 1St step: get your feet wet. Play with the problem. Start with N=2 couples. You can have 2 boys. Or you can have 4 girls and then 2 boys. So, looks like all possible ratios are possible.

  6. Problem 2 • In a country where couples want boys, they use the following strategy: couples have children until they have a boy, then stop. What is the ratio of boys to girls in this country? • 1St step: get your feet wet. Play with the problem. Start with N=2 couples. You can have 2 boys. Or you can have 4 girls and then 2 boys. So, looks like all possible ratios are possible. • Of course, each of these outcomes has its own different probability. So, we could consider all outcomes and work out the probabilities. But that would be kind of difficult…

  7. Problem 2 • In a country where couples want boys, they use the following strategy: couples have children until they have a boy, then stop. What is the ratio of boys to girls in this country? • Alternative. Let’s go to the large N limit. Appropriate for “country”. Will simplify things. Exactly ½ couples will have boys, ½ will have girls. • First, what is easier to find, NB or NG? Of course, NB = N. So, need to focus on NG • Draw a BIG diagram.

  8. Problem 2 Count girls: NG = N/2 + N/4 + N/8 + … = N = NB Offspring generation # 3 N/8 BBB GGG 2 BBBBBB GGGGGG N/4 BBBBBBBBBBBBB GGGGGGGGGGGGG N/2 1 N/2 couples

More Related