Coded Paired Information

Logic Level 3

There are 10 people who are each thinking of a positive real number. You can approach any 2 of them, and they will tell you the product of their numbers.

What is the minimum number of pairs that you have to approach in order to figure out all the individual numbers?

If you think this cannot be done, enter the answer as -1.


The answer is 10.

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.

2 solutions

Calvin Lin Staff
Oct 31, 2016

Most people would be able to guess that the answer is 10, which can be obtained in a variety of ways. The harder part is to explain why we need at least 10, or why it cannot be done with 9 or fewer pairs. More generally, we need to ask n n questions (where n 3 n \geq 3 ).

Showing that n questions is a lower bound

Let each of the numbers that they are thinking of be denoted by a i a_i . Then, when we ask person i i and j j , we are given information of P i j = a i × a j P_{ij} = a_i \times a_j . We have n n variables, and naively speaking we would expect that we need at least n n equations in order to solve this. However, this is only true if we were restricted to linear equations. For example, if we were told ( a i i ) 2 = 0 \sum ( a_i - i ) ^2 = 0 in 1 equation, we can immediately conclude that a i = i a _ i = i . Hence, it is not immediately obvious that we need at least n n equations.

How then do we convert this into a linear equation? Well, we simply take the logarithm of each equation. Set b i = log a i b_i = \log a_i , which is allowed since a i a_i is positive. Now, when we're told the product, we know that log P i j = b i + b j \log P_{ij} = b_i + b_j , which is a linear equation. Now, it is obvious that with n n variables, we need at least n n linear equations to obtain a unique solution, and thus n n is a lower bound.

Showing that n questions is sufficient

It remains to show that for n 3 n \geq 3 , by asking certain n n pairs, we can obtain all of the individual values. We pick the first 3 people, and ask for their pairwise product. Then, we know the value of b 1 + b 2 , b 2 + b 3 , b 3 + b 1 b_1 + b_2, b_2 + b_3, b_3 + b_1 , from which we can easily determine b 1 , b 2 , b 3 b_1, b_2, b_3 and hence a 1 , a 2 , a 3 a_1, a_2, a_3 . For example, b 1 = log P 12 + log P 13 log P 12 b_1 = \log P_{12} + \log P_{13} - \log P_{12} .

Now, for each of the remaining n 3 n-3 people, we ask for the product P 1 i P_{1i} of person 1 and person i i . Since we already know b 1 = log a 1 b_1 = \log a_1 , we can calculate that b i = log P 1 i b 1 b_i = \log P_{1i} - b_1 and hence a i a_i .

Hence, since n n is a lower bound that can be achieved, it is the minimum.

Does this not necessitate that all the numbers are positive? Or at the least non-zero?

Janardhanan Sivaramakrishnan - 4 years, 7 months ago

Log in to reply

Yes. It should be positive. Sorry I forgot.

Chung Kevin - 4 years, 7 months ago

I've been told many times that we need n linear equations in order to solve n variables. However, by now I still haven't found a proof. Can you give me one?

William Nathanael Supriadi - 4 years, 6 months ago

Log in to reply

Are you familiar with linear algebra ? The ideas there would explain why (esp the conditions) under which we need exactly n n linear equations to solve for n n variables.

Alternatively, you can convince yourself that this is true by using induction , though it's harder to see what the necessary conditions are.

Calvin Lin Staff - 4 years, 6 months ago

Log in to reply

Well, I am familiar (and the lemma is quite obvious and trivial for me), but I don't think I can make a formal proof of it.

William Nathanael Supriadi - 4 years, 6 months ago
Ayush G Rai
Oct 30, 2016

Let the numbers thought by the 10 10 people be a , b , c , d , e , f , g , h , i , j a,b,c,d,e,f,g,h,i,j respectively.Now lets first focus on how to determine the numbers of first three people ( i e . a , b , c ) . (ie. a,b,c). So,after inquiring we get a b = x , b c = y , c a = z ab=x,bc=y,ca=z where x , y , z x,y,z are numbers[which we will know after inquiry].By this we will be able to determine the numbers a , b , c a,b,c individually.So we needed 3 3 pairs for this.We do the same for ( d , e , f ) (d,e,f) and ( g , h , i ) . (g,h,i). After doing all this,we get to know 9 9 numbers.So we need one last pair- i j ij so as to determine j . j. Therefore,totally 3 + 3 + 3 + 1 = 10 3+3+3+1=\boxed{10} pairs are required to know all the 10 10 numbers.

Why is that the minimum? Why can't it be done in 5 pairs?

Chung Kevin - 4 years, 7 months ago

Log in to reply

bcoz at first the min possible way to find 3 numbers is 3 ways.we can never find 2 numbers at the first attempt.

Ayush G Rai - 4 years, 7 months ago

Log in to reply

Doesn't quite work. For example, how do you know that we cannot "find 4 numbers in 4 pairs and find 6 numbers in 5 pairs"?

Arguments that are heavily reliant on "this is the constructive approach that I took" are often susceptible to "why isn't there a better way?". As such, they often require a different approach, like one which points out an invariant to show that "No matter what, you need at least k pairs to get k numbers".

Calvin Lin Staff - 4 years, 7 months ago

Log in to reply

@Calvin Lin https://i.imgsafe.org/86fb7d0700.png check this out sir

A Former Brilliant Member - 4 years, 7 months ago

@Calvin Lin Well i didnt say anything like "we cannot find 4 numbers in 4 pairs and find 6 numbers in 5 pairs".Well u rather have a good point that "We need at least k pairs to get k numbers".I tried it and it works.So i took a special case of it ie. by taking 3 numbers.Well i think i must work on the generalized form.

Ayush G Rai - 4 years, 7 months ago

Log in to reply

@Ayush G Rai In order to show that we have a minimum, we have to show that 1) It is a lower bound, 2) It exists.

What you've shown is 2) It exists, because "I have found a way that 10 pairs is sufficient".

What we need to show is that 1) It is a lower bound - Why can't we do better than 10?

Calvin Lin Staff - 4 years, 7 months ago

@Ayush G Rai https://i.imgsafe.org/86fb7d0700.png

check it out iu have sent it to calvin sir

A Former Brilliant Member - 4 years, 7 months ago

Log in to reply

@A Former Brilliant Member I think you completely misunderstood the question. The question is not "How many pairs of people are there". It is "How many pairs do we have to ask, in order to figure out their individual numbers".

Calvin Lin Staff - 4 years, 7 months ago

Log in to reply

@Calvin Lin 3 pairs , thats right

A Former Brilliant Member - 4 years, 7 months ago

Log in to reply

@A Former Brilliant Member that is the minimum

A Former Brilliant Member - 4 years, 7 months ago

We need that these numbers are positive. Otherwise, a , b , c , , i -a, -b, -c, \ldots, -i is a valid solution set. I've edited this requirement into the problem.

Can you update your solution to explain how "we will be able to determine the numbers a, b, c individually", and why the positive requirement is needed?

Calvin Lin Staff - 4 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...