WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday Puzzler -- Friends and Strangers

Posts

Friday Puzzler -- Friends and Strangers

#1

Friday Puzzler -- Friends and Strangers

Alex Y

At a party, a group of people is called a group of friends if each pair of people in the group knew each other before the party. A group of strangers is one in which no pair of people in the group knew each other before the party.

What is the smallest party (fewest attendees) that will assure that there is EITHER a group of three friends OR a group of three strangers at the party?

If that one falls too quickly, try to determine the smallest party possible to assure that there is a group of four friends or a group of four strangers. An intermediate step may be to try four friends or three strangers.

Re: Friday Puzzler -- Friends and Strangers

#2

Re: Friday Puzzler -- Friends and Strangers

Larry Barrett

If I understand the puzzle correctly, I think the answer to the first question is 4.

If there are 4 people, A, B, C, D, the possible pairs are AB, AC, AD, BC, BD, CD.

If A and B are the only friends, then the other 5 pairs are strangers.

If A and B are friends, and A and C are friends, then the other 4 pairs are strangers.

If A and B are friends, A and C are friends, and B and C are friends, then there are

3 groups of friends and 3 groups of strangers.

Re: Friday Puzzler -- Friends and Strangers

#3

Counter-example

Alex Y

In a party of 4, if:

AB, AC, BD, CD were friends, while

AD, BC were strangers,

you wouldn't be able to pick out three people who were all friends (three friendships) or three who were all strangers.

ABC is not a group of friends, because BC are strangers

ABD is not a group of friends, because AD are strangers

ACD is not a group of friends, because AD are strangers

BCD is not a group of friends, because BC are strangers

Similarly, none of the four possible groups of three are all strangers.

Re: Friday Puzzler -- Friends and Strangers

#4

Facts about Friends and Strangers

Alex Y

This one seems not to be going anywhere.

It is interesting to me that the difficulty of solving it grows VERY fast as the size of the friend or stranger groups grows.

To make sure you have a friend or stranger group of 4, you need to have a party of 18 people.

For five (the very unfair version of this puzzle I first saw), the best mathematicians with modern computers can do is to say that the smallest party assuring you of a group of 5 friends or strangers is in the range of 43 to 48.

Why can't they just grind out the possibilities and see what works? That's where it gets interesting. To test all the possibilities with a parties of up to 48 it would take approximately 10^680 times as many calculations as the groups of 3 case.

If you are like me, it is hard to imagine what a number like that is. So I looked at some other large numbers for perspective. If every atom in the observable universe (10^80) were a computer able to solve the 3-group problem in 1 billionth of a second, those computers working since the big bang (13.9 billion years, or 4.3x10^17 seconds) would still be woefully inadequate to examine all the possibilities to determine which of 43-48 is the smallest number guaranteeing a group of 5!

CS pros here, please set me straight if I am misinterpreting the statement that complexity of this problem is O(2^(n^2)).

Mathematicians have used other methods than brute force to seek answers, but results quickly get pretty meaningless. For a group of ten friends or strangers, the best they have been able to say is that you need a party of somewhere between 798 and 23,556 guests!

I'll leave the 3-group problem out there for a while in case anyone is still working on it (and may be able to back into it based on info here).

Re: Friday Puzzler -- Friends and Strangers

#5

A party of five is not big enough

Alex Y

To see why, arrange five people in a circle, with each person knowing the person to their left and right, but being strangers with the two people across the circle from them. A diagram will show why this doesn't yield a group of 3 friends or strangers.

The red lines are friend pairs while the blue lines are stranger pairs.


In fact, this points to the much broader problem from which this is drawn, with many possible colors of network lines connecting nodes

Re: Friday Puzzler -- Friends and Strangers

#6

Re: A party of five is not big enough

Larry Barrett

This diagram, and your last comment, makes clear why a group of 4 or 5 people is not sufficient, and suggests to me that the answer to your original problem is 6.

If any one person was friends with 1 other person, he must therefore be a stranger to the remaining 4. And if friends with 2 other persons, he must therefore be a stranger to the remaining 3.

Re: Friday Puzzler -- Friends and Strangers

#7

Six is correct, but why?

Alex Y

Larry, you are correct that the party size needed is six, but I don't follow your reasoning. You mention two cases, of an individual having 1 or 2 friends and therefore 4 or 3 strangers, but how does that assure that here will be a group of three that are mutual friends or mutual strangers?

Proof of this was a question on the William Lowell Putnam Mathematical Competition exam in 1953.

Re: Friday Puzzler -- Friends and Strangers

#8

Re: Six is correct, but why?

Larry Barrett

In 1953 I was only 12, so no wonder I only got partial credit on this one.

Re: Friday Puzzler -- Friends and Strangers

#9

Re: Six is correct, but why?

Alex Y

LOL! I missed that one as well.

There are five other people at the party besides person A, so A has either at least 3 friends or at least 3 strangers at the party. Let's assume he has three friends.

Pick three of A's friends, B, C, and D

Case 1: B, C, and D are mutual strangers. Then you have a group of three.

Case 2: At least one pair of these three knows each other, say B and C. Then A,B,C forms a threesome of mutual friends.

With the analogous argument if A has three strangers at the party, we get:

QED

Re: Friday Puzzler -- Friends and Strangers

#11

Very interesting. Thanks.


👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.