0

I am re-visiting the following problem which has been driving me crazy.
Note:
I checked the first few suggested similar mathSE queries, re handshakes, and nothing seemed on point.

https://math.stackexchange.com/questions/3843512/number-theory-and-combinatorics

For reference, I am quoting the problem and a key subsequent comment.

Suppose 91 distinct positive integers greater than 1 are given such that there are at least 456 pairs among them which are relatively prime. Show that one can find four integers a, b, c, d among them such that gcd(a, b) = gcd(b, c) = gcd(c, d) = gcd(d, a) = 1.

$[E_1]:$

It can be solved by pigeonhole principle. Observe 456 = 91 * 5 + 1

My Work

First, I assumed (perhaps wrongly) that the original problem is equivalent to the following :

You have 91 people who shake hands with each other. Of the $\binom{91}{2}$ possible handshakes, exactly 456 handshakes occurred. Prove that there exist 4 people A, B, C, D such that A shook hands with B, B shook hands with C, C shook hands with D, and D shook hands with A.

The above is a critical assumption. If it is wrong, then all of the following analysis must be dismissed.

Edit
Per Brian M. Scott's comment, the correct interpretation is that at least 456 handshakes occurred. Assuming that this is the only interpretation-mistake, it seems as if the analysis should not be discarded.

Then, I tried to use the comment (i.e. $[E_1]$). My first (crude) attempt was to reason that at least one of the people shook hands with 6 (other) people. Later I re-visited this reasoning. However, initially, my reaction to this was so what?

Then I decided to ignore the comment and start from scratch.

$[E_2]:$
I saw that if you group 4 people (e.g. persons A, B, C, D) together, and want to guarantee that the appropriate chain of handshakes exists, then out of the 6 possible handshakes that can occur among the 4 people, at least 5 of the 6 handshakes must actually occur.

That is, given 4 people, although it is possible that a satisfying chain of handshakes exists among the 4 people, when only 4 out of the 6 possible handshakes occur, if 5 out of the 6 possible handshakes occur, you are guaranteed that a satisfying chain of handshakes exists among the group of 4 people.

Therefore, I tentatively reduced the problem to showing that there must exist at least one group of 4 people such that of the 6 handshakes possible among the group, at least 5 of the 6 actually occurred.

Then I thought:

$[E_3]:$
why not partition the 91 people into groups of 4, in ascending order (i.e. people 1 through 4, people 5 through 8, ..., people 85 through 88) and ignore people 89 through 91.

My reasoning is that at most 3 hand-shakes occurred among people 89 through 91, which left 453 hand shakes to be distributed among the groups. If each group had at most 4 hand shakes, that would account for
$(22 \times 4) = 88$ hand shakes.

Then I saw that this reasoning was bad because the most intra-group
hand shakes that could occur was
$(22 \times 6) = 132$ hand shakes,
which left ($453 - 132 = 321$) hand shakes unaccounted for.
The unaccounted hand shakes can only be explained by inter-group hand shakes.

This meant that my approach (i.e. $[E_3]$) of arbitrarily dividing the 91 people into 22 (fixed) specific groups of 4 with 1 remaining group of 3 was problematic because the possibility of inter-group handshakes must be considered.

Then, I ping-ponged back to $[E_1]$, looking for inspiration. I saw that I had actually made a mistake. The 456 handshakes each involve two people. Therefore, there are actually ($456 \times 2$) "man-handshakes" to be accounted for. This meant that the $912$ "man-handshakes" had to be distributed among 91 people, so somebody had to shake hands with at least 11 other people. My reaction to this was again, so what?

Edit
Here, I am disagreeing (perhaps wrongly, I am fatigued) with Brian M. Scott's 2nd comment, which may (also) be non-critical. Per my reactive comment, if you have 3 people, and they each shake hands twice, you only have 3 handshakes, not 6.

Meta-cheating, I noticed that on the original query, someone (else) had upticked the comment corresponding to $[E_1]$, which strongly suggests that this idea should somehow be used.

However, since nothing came to mind, I again ping-ponged (i.e. temporarily dismissing $[E_1]$), and asked myself whether approach $[E_3]$ could be somehow be rehabilitated, with analysis including consideration of inter-group handshakes. Again, no joy.

It seems to me that I am misinterpreting the significance of $[E_1]$. Instead of using $[E_1]$ to partition (i.e. into comprehensive and mutually exclusive groups) the handshakes by how many people's hands person 1 shook, person 2 shook, ... I should consider alternate partitioning schemes.

There are $\binom{91}{4} = 2,672,260$ possible groups of 4, so distributing the 456 handshakes among these 2 million+ 4-groups will lead nowhere.

It seems to me that $[E_1]$ and $[E_2]$ must somehow be combined, but nothing comes to mind.

Request further hint (i.e. I'd like to buy a vowel).

Addendum
Reaction to Brian Moehring's answer.

As someone new to graph theory and dusty with Cauchy-Schwarz, I had to do some work to verify the details in his answer. I regard his answer, as-is, as complete. This section (Addendum) merely fills in some of the arithmetic.

First of all, Cauchy-Schwarz gives

$\displaystyle \left(\sum_{k=1}^n ~a_kb_k\right)^2 ~\leq ~ \left[\sum_{k=1}^n (a_k)^2\right] \times \left[\sum_{k=1}^n (b_k)^2\right].$

If $\sum_{k=1}^n a_k ~=~ r,~ \sum_{k=1}^n \left[(a_k)^2\right] ~=~ s,~$ and $1 = b_1 = b_2 = \cdots = b_n,~$ then

$[G_1]:~ r^2 \leq sn.$


Let $n \equiv ~$ the number of vertices.

Let $I \equiv \{1,2,\cdots,n\}.$

$\forall ~i ~\in ~I,~$ let $~v_i ~\equiv~$ vertex $i$.

$\forall ~i ~\in ~I,~$ let $~d_i ~\equiv~$ the # of edges with $v_i$ as one of the endpoints.

Since there are $m$ edges, and each edge has $2$ endpoints,
$[G_2]:~\sum_{i=1}^n d_i = 2m.$

$[G_3]:~$ Let $S = \sum_{i=1}^n \left[(d_i)^2\right] ~\Rightarrow~ \langle \text{using} ~[G_1] ~\text{and} ~[G_2]\rangle ~4m^2 \leq Sn.$

$\forall ~i ~\in ~I,~$ let $~f_i ~\equiv~$ the # of paths of length 2, with $v_i$ as the middle vertex.

Let $m ~\equiv~ $ the total # of edges (i.e. handshakes).

$\displaystyle [G_4]:~ \text{to show:} ~m ~>~ \frac{1}{4} n \left(1 + \sqrt{4n-3}\right) ~\Rightarrow ~$ the graph has a 4-cycle.


Proof

From the last paragraph in Brian's Answer,
$[G_5]:~$
if $~\sum_{i=1}^n f_i ~>~ \binom{n}{2}$
then the graph has a 4-cycle.

Since $v_i$ has $d_i$ edges,
$f_i$, the number of paths of length 2 with $v_i$ as the middle vertex
will be $\frac{d_i(d_i - 1)}{2}.$
Note that this is formula is (also) valid for $d_i < 2.$

Thus,
$[G_6]:$
$\displaystyle \sum_{i=1}^n f_i ~=~ \sum_{i=1}^n \left[\frac{(d_i)^2}{2} - \frac{d_i}{2}\right]$

$\displaystyle ~= ~\langle ~\text{using} ~[G_2] ~\text{and} ~[G_3]\rangle \left[\frac{S}{2} - m\right]$

$\displaystyle \geq ~\langle ~\text{using} ~[G_3]\rangle ~ \left(\frac{2m^2}{n} - m \right)$.

Using $[G_5],~$ and $~[G_6],~$ the conjecture in $~[G_4]~$
may be shown by showing that
$[G_7]: ~m ~>~ \frac{1}{4} n \left(1 + \sqrt{4n-3}\right) ~\Rightarrow ~ ~ \left(\frac{2m^2}{n} - m \right) ~>~ \binom{n}{2}$.

$m ~>~ \frac{1}{4} n \left(1 + \sqrt{4n-3}\right) ~\Rightarrow ~$

$\left(m - \frac{1}{4}n\right) ~>~ \left(\frac{1}{4} n \sqrt{4n-3}\right) ~~\Rightarrow $

$(4m - n) > n \sqrt{4n-3} ~\Rightarrow $

$\left(16m^2 - 8mn + n^2\right) ~ > ~ n^2(4n-3) ~\Rightarrow $

$\left(16m^2 - 8mn + 4n^2 - 4n^3\right) > 0 ~\Rightarrow $

$\left(4m^2 - 2mn + n^2 - n^3\right) > 0 ~\Rightarrow$

$(4m^2 - 2mn) > (n^3 - n^2) ~\Rightarrow $

$\frac{2m^2 - mn}{n} > \frac{n^2 - n}{2} ~\Rightarrow $

$\left(\frac{2m^2}{n} - m\right) > \binom{n}{2}.$

Thus, $[G_7]$ is proved, which proves $[G_4]$.

Applying $[G_4]$ with $m=456$ and $n=91$ gives

$456 > 455 = \frac{1}{4}(91)\left(1 + \sqrt{361}\right) ~\Rightarrow~ $ the graph has a 4-cycle.

user2661923
  • 35,619
  • 3
  • 17
  • 39
  • 1
    Your initial assumption is incorrect: the problem says (in handshake terms) that at least $456$ handshakes took place. Your argument that someone had to shake hands with at least $11$ other people is also incorrect: one person shaking hands with $11$ others is $11$ handshakes and therefore $22$ ‘man-handshakes’. – Brian M. Scott Sep 28 '20 at 17:10
  • @BrianM.Scott Good points. I am going to edit my query accordingly, citing your comment. – user2661923 Sep 28 '20 at 17:13
  • 1
    In looking into this, I would sooner describe this with graph theory. With $q$ a prime power, a square-free graph on $q^2+q+1$ vertices will have at most $\frac{1}{2}(q^2+q+1)(q+1)$ edges and so in the case of $q=3^2=9$ a square-free graph on $9^2+9+1=91$ vertices has at most $\frac{1}{2}(9^2+9+1)(9+1)=\frac{1}{2}\cdot 910=455$ edges. See this paper and the Results section 2.1 and 2.2. I'm not familiar enough with the problem to quickly find an elementary proof however. – JMoravitz Sep 28 '20 at 17:25
  • @BrianM.Scott on 2nd thought, I disagree with your 2nd point. Consider three people, each of whom shake hands twice among each other. There are 6 man handshakes but only 3 actual handshakes. – user2661923 Sep 28 '20 at 17:27
  • @user2661923: Only one handshake is possible for each pair: two integers cannot be relatively prime to each other twice. – Brian M. Scott Sep 28 '20 at 17:34
  • @BrianM.Scott right, so if you have 3 people, and they each shake hands with both other people, you have 3 total handshakes, but 6 "man handshakes". Extending, if you have 91 people, and they each shake hands 10 times, you have 455 handshakes, but 910 "man handshakes". I am tired, but this does seem right. – user2661923 Sep 28 '20 at 17:38

1 Answers1

3

In the graph theory book I used as a student (Bondy/Murty, 2008), this is an immediate consequence of exercise 2.1.15, which references theorem 2.2:

Theorem 2.2 Any simple graph $G$ with $\sum_{v \in V} \binom{d(v)}{2} > \binom{n}{2}$ contains a quadrilateral.

2.1.15 Using Theorem 2.2 and the Cauchy-Schwarz Inequality, show a simple graph $G$ contains a quadrilateral if $m > \frac{1}{4}n(\sqrt{4n-3}+1)$.

Here, $d(v)$ denotes the degree of vertex $v$, $m$ denotes the number of edges, and $n$ denotes the number of vertices, so $m=456$ and $n=91$ here.

The proof to theorem 2.2 follows by noting that the sum on the left counts the paths of length $2$ indexed by the middle vertex. If this sum is greater than the number of pairs of vertices in the graph, then by the pigeonhole principle one pair of vertices must be the endpoints of two distinct paths of length $2$, which gives a quadrilateral when taken together.

  • Your answer almost makes studying graph theory seem attractive. – user2661923 Sep 29 '20 at 22:19
  • Hah! I'm far from a proponent of learning pure graph theory for its own sake, but these types of questions in graph theory with a more enumerative flair have often been interesting. – Brian Moehring Sep 29 '20 at 22:55
  • @BrianMoehring Do you have a name for either of these, or know when they were first published? I know of 2.1.15 as "India Team Selection Test 2001", which was when I first came across it. – Calvin Lin Oct 01 '20 at 02:43
  • @CalvinLin I wouldn't have a clue about theorem 2.2 in name or when it was first published. 2.1.15 seems to have originally been published by Istvan Reiman in 1958 under the title "Über ein Problem von K. Zarankiewicz". I found some people calling it the "Reiman theorem" but I'd never heard that before researching it (possibly due to its unfortunate proximity to "Riemann", but at this point I'm just speculating) – Brian Moehring Oct 01 '20 at 03:09
  • Thanks very much! – Calvin Lin Oct 01 '20 at 05:36