Interview Question






Comment hidden because of low score. Click to expand.
1
of 1 vote

As stated, must roll a 10 and 11 before rolling a 7
P(10)=3/36 P(11)=2/36 P(7)= 6/36
Two options: a) 10 first or b) 11 first
a) P that 10 is rolled before 7 is rolled:
P(10)/P(7)= 3/6
then 11 rolled before 7 is rolled:
P(11)/P(7)= 2/6
These are two sequential, independent events:
Therefore: P(10 then 11 before 7)= 3/6*2/6=6/36
b) P that 11 is rolled before 7 is rolled:
P(11)/P(7)= 2/6
then 10 rolled before 7 is rolled:
P(10)/P(7)= 3/6
Therefore P(11 then 10 before 7)= 2/6*3/6=6/36

Sum a) plus b) = 12/36 = 33.33%

Don't believe it? Get out the dice. Record 10-7, 10-11-7, 11-7, 11-10-7 and 7-7 and ignore all other rolls. Number of sequences of 10-11-7 plus 11-10-7 should be ~1/3 of 7-7

- canuck January 09, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

summation of (nc2(3/36)(2/36)(30/36)^n-2)) over n=2 to infinity ;);)

- deepak.neralla February 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can you explain more

- Messi February 08, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

D1: 1 2 3 4 5 6
D2: 1 2 3 4 5 6

Probability for each sum:

2 3 3 4 4 4 5 5 5 5 6 6 6 6 6 7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 10 10 10 11 11 12

10 - 3
11 - 2
7  - 6

probality of getting 10, 11 and 7 in any order is below:

1. 3/11 2/11 6/11
2. 3/11 6/11 2/11
3. 2/11 3/11 6/11
4. 2/11 6/11 3/11
5. 6/11 2/11 3/11
6. 6/11 3/11 2/11

In above combinations only case 1 and 3 are requires as they will get before 7 (2 out of 6 possibilities)

2/6*(3/11*2/11) = 2/121

- Anonymous February 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The question does not limit it to 3 trials, so you can have any number of trials in between that is different than the three.
Also, the order you gave does not take into account multiple occurrences of the same number.

- seral May 19, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

if only dice are thrown 3 times

- anonymous February 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hey guys. It is a brain teaser. The correct answer should be 1/4. The chance for 10 to be before 7 is equal to the chance for 10 to be after 7. Thus, the event will be 10 before 7---1/2, 11 before 7----1/2. Thus, the probability is 1/4.

- bylike March 04, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Not sure about that.
10 can occur through two combinations, (5, 5) and (6, 4).
11, (6, 5)
Since the requirement is 10 followed by 11, it is conditional probability, probability of 10 * probability of 11
7 can occur three ways, (6, 1), (3, 4), (5, 2)

Following this logic, I got 1/54. Please let me know if I'm overlooking something here.

- Sameer March 19, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I'm getting

SUM (nC2*(3/36)*(2/36)*(30/36)^(n-3)*(6/36)) from n=3 to infinity.
And, it sums up to 43/216
Here is why its the sum:

A few scenarios:
10 11 7
11 10 7
10 11 6 4 10 11 7
etc...

- hhh March 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is why I frickin' HATE probability questions. aLl these answers seem correct to me :-(

- Anonymous April 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The solution by Anonymous on February 08, 2011 seems to be correct and logical...dont indulge in nc's unless absolutely sure

- Anonymous June 10, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

There are 18 (6 * 6 / 2) possible out comes, where 2 for 10 (4x6 and 5x5), 1 for 11 (5x6). There are 3 possible out comes for 7 (1x6, 2x5 and 3x4). So possibility of rolling 10 or 11 before 7 is 1/2.

- Anonymous May 18, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

required prob, p = pr(10)pr(11) + pr(11)pr(10 before 7) + p(10)pr(11 before 7) + pr(anything other than 10, 11 and 7)*p

pr(rolling a 10 before 7) = pr(10) + pr(anything other than 10 and 7) * pr(10) + pr(anything other than 10 and 7)^2 * pr(10) + pr(anything other than 10 and 7)^3 * pr(10) + pr(anything other than 10 and 7)^4 * pr(10) + ...
=1/12 + (1 - 3/36 - 6/36)*1/12 + ....
= 1/12 + (3/4 * 1/12) + ((3/4)2 * 1/12) + ((3/4)3 * 1/12) + ...
= 1/12 * sum for i = 0 to infinity of (3/4)i
= 1/12 * (1/(1-3/4))
= 1/12 * 4 = 1/3

Similarly pr(rolling a 11 before 7) = 1/4

So p = 3/36*2/36 + 2/36*1/3 + 3/36 * 1/4 + (1 - 3/36 - 2/36 - 6/36)p
p = 2/(36*12) + 8/(36*12) + 9/(36*12) + 25/36 * p
11/36*p = 19/(36*12)

=>p = 19/(12*11)

- Kailash Gupta August 30, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The correct answer is 17/132.

Let’s see how we arrive at this answer:

It is understood that:
P(7) = 6/36
P(10) = 3/36
P(11) = 2/36

As you can see, there are only 11 dice combinations that are relevant to this question. If one of the other 25 dice combinations that produce a 2, 3, 4, 5, 6, 8, 9, or 12 comes up, it means nothing. The dice are simply picked up and re-rolled.

There are four possible outcomes in this game when the dice are rolled:
Outcome A: 7 is rolled
Outcome B: 10 is rolled
Outcome C: 11 is rolled
Outcome D: Another number is rolled, dice are picked up and re-rolled

Outcome D simply resets us at the beginning of the problem. It is irrelevant to our probability calculations. Therefore, for every roll of the dice, there are only 3 relevant outcomes Outcome A, B, and C. Outcome D can effectively be ignored.

Let us call it a Win if we succeed in rolling a 10 and an 11 before rolling a 7.
Let us call it a Loss if we roll a 7 before rolling a 10 and an 11.

We then need to break down the problem using a probability tree. There are three things that can happen with our first roll. Remember that there are 11 combinations we care about. Therefore, the denominator for the initial roll will be 11.

Case 1:
7 is rolled first.
P = 6/11
This will result in a loss. This branch of the probability tree ends right here.

Case 2:
10 is rolled first.
P=3/11
We still have a chance to win. We must now roll an 11 before rolling a 7. Because we already rolled a 10, we no longer care If we roll a 10 again. If a 10 is rolled, we will pick up the dice and roll again. Therefore, after rolling a 10 first, there are only 8 dice combinations we care about. There are two things that can happen now: we roll a 7 and lose, or we roll an 11 and win.
11 is rolled second
P=2/8
This results in a win. The probability of winning if we roll a 10 first is given by the following expression:
(3/11)*(2/8) = 6/88 = 3/44

Case 3:
11 is rolled first
P = 2/11
We still have a chance to win. We must now roll a 10 before rolling a 7. Because we already rolled an 11, we no longer care if we roll an 11 again. If an 11 is rolled, we will pick up the dice and roll again. Therefore, after rolling an 11, there are only 9 dice combinations we care about. There are two things that can happen now: we roll a 7 and lose, or we roll a 10 and win.
10 is rolled second
P = 3/9
This results in a win. The probability of winning if we roll an 11 first is given by the following expression:
(2/11)*(3/9) = 6/99 = 2/33

Therefore, the total probability of winning is:
3/44 + 2/33 = 17/132 or .12878787.

This is the correct answer. If you don’t believe me, try it either using real dice or by running a simulation on Excel. You should be winning just over 1/8 of the time.

- Anonymous August 04, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More