Epic Systems Interview Question






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

Of course not but it would be helpful to explain why it is not. So let's see when we would profit from this wager:

# of people with same birthday x $1 > # of people with different birthday x $2

let's say # of people with same birthday = B then

B x 1 > (9 - B) x 2 => B > 6. So we need to find at least 7 people that has the same birthday with you to profit.

So we need to sum the probability of:

A) all 9 people having the same birthday +
B) any 8 out of 9 people having the same birthday +
C) any 7 out of 9 people having the same birthday

Picking N number of M people is Combination(M, N) where M > N. Any people to have same birthday with you is 1 / 365 hence any people to have different birthday is 1 - (1 / 365) = 364 / 365. So:

A = Combination(9, 9) x (1 / 365) ^ 9
B = Combination(9, 8) x (1 / 365) ^ 8 x (364 / 365)
C = Combination(9, 7) x (1 / 365) ^ 7 x (364 / 365) ^ 2

A + B + C = 4.15114 / 10^17 which is very unlikely.

- oa October 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

thanks

- Anonymous October 22, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Whoa man..... thanks

- Anonymous November 14, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

1) Is Combination(9,9) = 9C9 ?
2) A = 9C9 * (1/365) power 9.
Why do you multiply both ?
And why do you power to 9 ( 8, 7 in other cases) ?
3) When you compute A + B + C, what exactly are you computing ?

- Solution September 18, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

im fucked

- zack September 12, 2019 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is the birthday paradox problem.

In probability theory, birthday paradox pertains to the probability that in a set of randomly chosen people some pair of them will have the same birthday. In a group of at least 23 randomly chosen people, there is more than 50% probability that some pair of them will have the same birthday. Such a result is counter-intuitive to many.

For 57 or more people, the probability is more than 99%,

Thus for a group of 57 we can hope to find a pair of people to have the same birthdays.

As oa said above
let's say # of people with same birthday = B then

B x 1 > (9 - B) x 2 => B > 6. So we need to find at least 7 people that has the same birthday with you to profit.

It is highly unlikely that you find 7 people with the same birthday out of 10. No fool would take the bet. :):):)

- Avin April 23, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

I would take the bet because he doesnt have to pay me and I dont have to pay him. Its a win win situation for both me and my friend.

- Sudhi May 14, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Another approach that does not directly use birthday as probability. As earlier posts has ve correctly mentioned that atleast 7 people should have same b'day date to get profit.

No. of persons with same B'day 0   1   2  3  4  5  6  7  8  9
Profit                       -18 -15 -12 -9 -6 -3  0 +3 +6 +9

From above, favourable cases = 4 ( from 6 to 9, as 0 does not harm)
Total cases = 9

Probability of no loss = 4/9 < 50%

Hence asnwer is NO.

- cirus October 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think it should be YES,

As it mentions BirthDAY not birthDATE..
SO we will have 7 days and 10 people. chances of me finding same birth day as mine wil be 7/10

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

No, I prefer NOT.

10 person with same birthday with me :

There is 7 day in one week.
Probability in day "A" one person born is 1/7 = 0.14 (rounded).

Since its 10 people, the chance in day A for a person to born is 1.4 person.

This is only math after all. Its also a big chance the all people born in day "B, C, D, E, F, or G" without A at all, which means o n l y m e.

I got $1 for small chance someone born in same day (1.4 person out of 10)
My friend got $2 for BIG chance someone born in different day (8.6 person out of 10).

Maximum I could receive : 1.4 person = rounded to 1 person = $1 by math.
Maximum I could lost : 9 person = $18.

With a little luck:
When 7 people same birthday with me, I will win $7.
But my friend win $6 by only he is winning from 'different day of 3 person'.
(I am win 7 times and he win only 3 times but the money we got very close).

Even 6 people same birthday with me, I will only win $6.
And my friend win $8 from 4 different people.
(Its not fair at all)

But if I could force my lifetime luck maybe I could get $10 when all people born on day 'A'. It just a matter of luck, who knows.

But I will say "no, thanks. But I will say yes if we reverse" :)

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

It doesn't say they have to prove their birthday. I'd give them each a note that stated:

"My birthday is XX/XX/XXXX. I'll pay you a quarter to say the same when asked."

The 8 other guests would earn me $8.00. I'd lose $2.00 due to the likelihood my friend won't have my birthday, and pay the other guests $2.00 for their cooperation. The paper's to ensure my friend isn't aware of my plan and doesn't make them a similar offer.

I'd make $4.00 in the end.

If they heard the scenario being presented, I may need to bump it up to $0.50 for each instead to make it a 50/50 split so they didn't think I was being cheap and possibly not play along. I'd still profit.

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

WOW. You all are thinking to much. I feel sorry for all of you who spent so much time trying to figure this out with math. This question is subjective and even a child would know the answer. It is YES, because its my Birthday party and I only invited people with the same Birthday as me! Even my friend has the same birthday as me.

- #dropsthemic March 30, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

You're forgetting 1 person he finds definitely has the same birthday as you. The max he can find with diff birthday's = 8. $16. Thats enough for a 6-pack. I say go for it and let him shout you for being a good sport.

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

I'd accept the deal assuming that every person in the party won't have the birthday date as I do. All I have to do, is make sure half of the people in the party "pretend" to have the same birthday party as me and I can split the money with the people who helped pretend, but hey I still get $1.50, so that's worth it.

- unknown March 30, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Leave your friend, he is taking advantage of you with such odds :P

- chao October 07, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.


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