/
Google/Microsoft interview Google/Microsoft interview

Google/Microsoft interview - PowerPoint Presentation

tawny-fly
tawny-fly . @tawny-fly
Follow
342 views
Uploaded On 2019-03-16

Google/Microsoft interview - PPT Presentation

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 dont know much about planes but lets think by proxy What other large vehicles ID: 756864

couples boys girls problem boys couples problem girls country 747 ratio strategy children boy stop tons people bus step

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Google/Microsoft interview" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Google/Microsoft interviewSlide2

Problem 1

Estimate the weight of a 747. Slide3

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). Slide4

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? Slide5

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?

1

St

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. Slide6

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?

1

St

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…Slide7

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, N

B

or N

G

? Of course, N

B

= N. So, need to focus on N

G

Draw a BIG diagram. Slide8

Problem 2

couples

Offspring generation #

N/2

N/2

BBBBBBBBBBBBB GGGGGGGGGGGGG

1

2

3

BBBBBB GGGGGG

N

/4

N

/8

BBB GGG

Count girls: N

G

= N/2 + N/4 + N/8 + … = N = N

B