Detective Nero Wolfe investigates the crime. The case involves 80 people, one of which is a criminal and another one is a witness (both are unknown). Each day detective may invite some of those 80 people and if there is a witness among them but no criminal, the witness will tell who is the criminal. What is the minimal number days needed for Nero Wolfe to figure out who is the criminal?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
It's easy to see a bound of 18 by arranging the 80 people in an 8 by 10 array, and taking each row and each column on a separate day.
Gotta think about this a bit.
Suppose we chose n subsets of people. To each of 80 people we can assign a code of length n, where nth digit is 1 if a person is in the subset, 0 otherwise. Main idea: if we can find two people, say A and B, such A's ones "dominate" B's ones, meaning that for each one in B's code A has one in the same spot, then we can say there may be a situation where A is a criminal, and B is a witness, which means that every set with witness has a criminal, so it is impossible to find a criminal. So now the problem is pure combinatorics: we need to find the smallest n such that exist 80 pairwise "incontainable" subsets of a set with n elements. This is a famous problem called Sperner's theorem
Log in to reply
Ah, OK. An anti-chain. (That's what we called a Sperner family.) So you need n large enough that its power set contains an anti-chain with 80 elements. And Sperner's theorem says that the largest anti-chain in the power set of an 8-element set contains only 70 elements. And that's not big enough. But if we go up to a 9-element set, we can contain an anti-chain with as many as 126 elements. Gotcha.
Please let us know the solution for this interesting problem as soon an possible....
by generalizing @Richard Desper 's approach to arbitrary dimensions, I think we can reduce the bound to 4+4+5 = 13 (consider a rectangular prism) ... by considering an unfilled 4d cube, we can reduce the bound to 3+3+3+3=12 since 3^4 = 81>80 ...
Log in to reply
Can you please explain the bound. If we consider a 4x4x5 (X Y Z) Rectangular Prism, if we consider the prism to be oriented along the 3 axes, then for example to have all rows in X direction checked, we need Y*Z trials that is 20 .
Imagine a 2D matrix of 10 rows and 8 columns.
The witness can be in any Cell in the above matrix. If Detective calls all people in a row which has the Witness, then possibility is that the Criminal could be in the same row.
If the Criminal is in the same row then the Witness will not identify him. Else the witness would say who the criminal is. If suppose the Criminal were in the same Row, then it would be better to have called all people in the column where the witness is.
In any case, to ensure either of these two chances to occur, we have to call people from all rows and all columns from the matrix given above.
Since we donot know which cell the Witness will be in.
Hence 10 + 8 = 18 Days will be required to complete this operation. If somebody have a better solution please share.
Log in to reply
@Abhra Gupta I was thinking that we always checks slices of dimension one less than the hyperprism -- eg, for 4x4x5 cube, check the five 4x4 slices, 4 4x5 slices, 4 other 4x5 slices -- does that work out? very likely i'm misunderstanding
@Abhra Gupta I was thinking that we always checks slices of dimension one less than the hyperprism -- eg, for 4x4x5 cube, check the five 4x4 slices, 4 4x5 slices, 4 other 4x5 slices -- does that work out? very likely i'm misunderstanding
What about this: we know that the Inspector invites some people. Now since the answer to this question is 9 days, 80/9 aprroximates to 9 people he invites every day. So 9 x 9 = 81, therefore it takes 9 days to find the witness and the criminal
I managed to bring it down from 18 to 15 by doing a modified grid. I paired everybody up, then put the pairs in a 6x7 grid (with 2 blank spots). This takes 13 days, plus a day each to interview the A halves and the B halves, making 15 days total.
I keep thinking that since the correct answer 9 is exactly half of the wrong answer of 18, that we're just missing a trick somehow.
Does anyone have the solution? I managed to get it down to 13 days, using a 9x9 grid and doing 2 columns and 2 rows at a time. This gives 9 days, plus 4 to separate out the groups of four, so 13 days total.
@George Ivanchyk I must insist you post a solution, if you have it!
bro it asks for minimal the correct answer should be 1
I got 158 days, I was still like 'fair enough'
Log in to reply
Even if you invite one by one, you only need 18 days :D
Wrong question correct answer should be 1 according to the question statement
This isn't a 100% full solution, but it got me the answer:
My first idea was to give everyone a 7-bit binary number, on day 1 invite everyone with a 0 in their 1-bit and then on day 2 invite everyone with a 1 in the 1-bit. Then do the 2-bits, then the 3-bits, and so on. This got me to 14 days, but it seemed possible to do better.
The next realization was that if I had an optimal strategy, I could give each person a number based on which days they were brought in. If the optimal strategy was n days, then everyone would end up with an n -bit number with a 1 for the 2 i bit if they were brought in on day i + 1 . But it's not enough just to get everyone a unique number, which can be done in 7 bits, because if two people, A and B , get numbers such that A 's set bits include all of B 's set bits, then B is never called in without A . If B is the witness and A the criminal, this doesn't work.
So how to ensure that we never have two people get numbers like that? One simple solution, make sure everyone has the same number of set bits. This works nicely for symmetry as well, meaning that everyone is called in on the same number of days. Now, letting n be the number of days for the optimal solution and k the number of days each person is called in, we can solve for up to ( k n ) people in our n days. This is maximized for k = 2 n , so we want ( ⌊ 2 n ⌋ n ) ≥ 8 0 . ( 4 8 ) = 7 0 is too small but ( 4 9 ) = 1 2 6 is good enough.
So this shows that 9 is possible, and also that 8 is not possible if everyone is brought in the same number of times . But that's as much as I thought through.
Why not the answer is 1 according to question statement. I think question is wrong
Log in to reply
I take it that you mean that, because Nero could get lucky on day 1, that 1 is the minimum?
The wording may be not 100% precise, but it's pretty clear that the idea is to get the minimum number of days in which Nero is guaranteed to find the criminal. Yes, you can get lucky on day 1 but you're not guaranteed to find the criminal on day 1 by any strategy, so no, 1 is not the answer.
It's pretty obvious that 1 is not intended to be the answer. Frankly, I find deliberately misinterpreting the question by nitpicking the wording in this way to be extremely distasteful.
No, I talked about 100% guarantee to find the criminal. If he calls all 80 people in office then witness will tell him who is the criminal, 100% confirmed. He didn't mention how many people should we call each day what is the limit of calling people. I think my answer is justified ? What do you say ? :)
Log in to reply
"if there is a witness among them but no criminal , the witness will tell who is the criminal" The witness will only speak up if the witness is in the set but the criminal is not. So if you call in all 80 people, the criminal is also guaranteed to be there and the witness will say nothing.
Log in to reply
Why would he not say his name, he will be caught instantly there will be no harm to witness, and in the question it is clearly mentioned witness know his name or saw him. So he can instantly recognise him the in the set of 80 by looking at all others. I think the question is not correct. I am confused
Log in to reply
@Aman Rajput – Because that's the way the problem is set up. You don't get to say "I think the witness would speak up anyway, therefore the question is wrong." When solving these sorts of problems, you have to take the problem at face value. If the problem says the witness will only speak up if the criminal is not present then you must work within those bounds and take that to be the way things work in the problem, even if you think it might play out differently in a real-world scenario.
Problem Loading...
Note Loading...
Set Loading...
Writing a solution for this one would take some time, hope someone can do it for me :)