Birds Problem-Brain Teaser- Amazon interview question

2.5k Views Asked by At

Three people consider as A,B,C went for sight seeing.
A,B and C each individually saw a bird that no other saw.(Eg: If A saw a bird the same is not seen by B and C)
Each pair saw a yellow bird that the other pair dint see(Eg: If AB saw a bird the same is not seen by BC and CA)
3 people together saw a yellow bird.

Question Find the total number of birds and the number of yellow birds seen all together?

2

There are 2 best solutions below

0
On

If I don't overlook any subtlety in the problem, in the minimal case, each bird determines a nonempty subset of $\{A,B,C\}$ (its obervers), hence there are at least $7$ birds, and at least $4$ of these are yellow.

0
On

I disagree I think only 6 birds are needed
A sees bird A not seen by B & C
B sees bird B not seen by A & C
C sees bird C not seen by A & B
A and B see yellow bird AB not seen by C
A and C see yellow bird AC not seen by B
B and C see yellow bird AC not seen by A

A, B and C have all seen a yellow bird (nowhere is written it has to be the same bird) so we are done.

If the birds A,B and C are all blue then A, B and C have all seen a blue bird as well.

But they did go to the wrong place at a reasonable bird watching place you will see hundreds of birds.