If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
n-1 phone calls will totally inform 2 fans (the two last calling), leaving n-2 fans, which still need to be informed somehow. How can you do that in less than n-2 calls?
I take this back! In fact, the answer is bigger than n (if n>4)! Think I've solved it now but I'll give the others more time (that's also my excuse to let me check it )
If you do have the answer, already, then I've just got to say I'm impressed. Nobody in my year at college was able to do this one, and a few of them are pretty tuned in. So, kudos .
You were indeed right to assume 1-to-1 conversations only, the original question was a bit clearer about that before I snookerfied it.
Well, the answer is definitely not greater than n. The question is whether it is ever less than n, except when n=2 (when the answer is 1).
Let's think...
I take this back! In fact, the answer is bigger than n (if n>4)! Think I've solved it now but I'll give the others more time (that's also my excuse to let me check it )
Wait, in the situation of 3 people.
A calls B, A tells B their score, B tells A their score. B calls C, B tells C their score and A's score. C tells B their score. But A still needs to know C's score, so in the case of 3, 3 calls are still required.
With 4 people.
A calls B, A and B are fully updated. B calls C, B and C are fully updated, but A still needs to know C's score. C calls D, then C and D are fully updated. If D then calls A, A knows everything, but B still doesn't know D's score. So B and D still need to talk or B and A need to talk again. So with 4 people I guess you need 5 calls.
Now with 5 people.
A-B, B-C, C-D, D-E, E-A. Then you need B-D, C-E. That's 7.
If n is 2 then the answer is 1.
If n is 3 then the answer is 3. A to B, A to C, B to C.
If n is 4, then the answer is 6. A to B, A to C, A to D, B to C, B to D, C to D.
If n is 5, then the answer is 10. A to B, A to C, A to D, A to E, B to C, B to D, B to E, C to D, C to E, D to E.
So if you look at this, I'm going to throw otu the formula:
With n people and n games, the number of required phonecalls is (n-1)+(n-2)+(n-3) etc. I know there's a proper formula for this, but I've forgotten how it goes.
So in the above examples:
n = 2 -> n-1 = 1
n = 3 -> (n-1) + (n-2) = 2 + 1 = 3
n = 4 -> (n-1) + (n-2) + (n-3) = 3 + 2 + 1 = 6
n = 5 -> (n-1) + (n-2) + (n-3) + (n-4) = 4 + 3 + 2 + 1 = 10
Maybe someone smarter can give the exact formula for this?
elvaago, you won't need this many calls! Remember that it's not necessary for each pair of people to speak. Once I know the score from your match, I can tell it to robert602 on the phone - you don't need to speak to him on the phone directly.
PS Your formula would be n(n-1)/2. But it is too big.
I had been assuming that someone could not speak to two or more other people at the same time. Is that the case, however, or are people allowed to be on more than one call at once?
If n is 2 then the answer is 1.
If n is 3 then the answer is 3. A to B, A to C, B to C.
If n is 4, then the answer is 6. A to B, A to C, A to D, B to C, B to D, C to D.
If n is 5, then the answer is 10. A to B, A to C, A to D, A to E, B to C, B to D, B to E, C to D, C to E, D to E.
So if you look at this, I'm going to throw otu the formula:
With n people and n games, the number of required phonecalls is (n-1)+(n-2)+(n-3) etc. I know there's a proper formula for this, but I've forgotten how it goes.
So in the above examples:
n = 2 -> n-1 = 1
n = 3 -> (n-1) + (n-2) = 2 + 1 = 3
n = 4 -> (n-1) + (n-2) + (n-3) = 3 + 2 + 1 = 6
n = 5 -> (n-1) + (n-2) + (n-3) + (n-4) = 4 + 3 + 2 + 1 = 10
Maybe someone smarter can give the exact formula for this?
Surely the least is 1 phone call because there could have been 2 people watching two games?
Alex... I haven't read the question properly yet but from a very quick skim I think it is asking for the fewest in terms of n. So the answer would be a function of n. 1 phone call works if n is 2, but you need to give an answer that would work for any n.
Leave a comment: