5

Problem: Professor Liyung wants to make a math club consisting of his $40$ students. But there is a problem. Every student is enemies with two other students. And no one wills to be a member of the club if any of his enemies is already a member of the club. Let $M$ be the maximum number of members the club can have. Find the sum of all possible values of $M$. (If student $A$ is an enemy with student $B$, then student $B$ is an enemy with student $A$.)

This is a problem from a local math contest in my city held on last month. Here is the solution I think of :

My thoughts: For every student chosen to be in the club, two students can't be a member of the club. So, the maximum number of members of the club is $20$.

I'm confused of the statement "Find the sum of all possible values of $M$" as there is only one value of $M$ in my solution. And I also believe that the problem would not be so easy as this was the second last problem in the contest and most of the problems there were not easy. But I couldn't think of other solution to the problem.
So, I want to know if my solution is correct or not. If not, what is the correct solution?

Update: A generalization to this problem has been discussed here.

Oshawott
  • 4,028
  • 1
    The statement "For every student chosen to be in the club, two students can't be a member of the club" may be false because there might be a case that two students have a common enemy. – soupless Jul 14 '21 at 11:27
  • The question seems to be suggesting that there can be more than one possible $M$ – Henry Jul 14 '21 at 11:27
  • Your solution is a possible $M$: make the students stand in a circle: each student's two enemies are standing immediately next to them, and you choose alternate students for the club – Henry Jul 14 '21 at 11:29
  • 1
    And that gives a possible approach: partition the $40$ students into circles with each student's two enemies standing immediately next to them, and choose as many students as possible from each circle to join the club. For example if you had $12$ circles of $3$ and $1$ of $4$ so $12\times3+1\times 4=40$, I think you could have $M=12 \times 1+1\times 2=14$. – Henry Jul 14 '21 at 11:38
  • I think the point is that M (defined as THE maximum number of members of the club) depends not only on the number 40, but on the actual relationships between students. If the students are disposed in a circle (like @Henry 's example), then M=20. But if, say, there is more than 1 circle, M could be smaller. Edit: I mean Henry's first example – Lorenzo Pompili Jul 14 '21 at 11:40
  • 1
    Is the enemy relation symmetric? – peterwhy Jul 14 '21 at 11:43
  • @peterwhy I think we are assuming it, but good question XD – Lorenzo Pompili Jul 14 '21 at 11:44
  • 1
    It seems likely that the answer is $119$ – Henry Jul 14 '21 at 12:13
  • @Henry how do you get that? – Oshawott Jul 14 '21 at 12:20
  • 2
    @Unknown $14+15+16+17+18+19+20$ – Henry Jul 14 '21 at 12:36

2 Answers2

8

Let $M$ be maximal subset of students no two in it are enemy. Then each student not in $M$ has at least one enemy in $M$ and every one in $M$ has exactly two enemies in $G\setminus M$. So by double counting we have $$2\cdot |M| \geq |G|-|M|\implies |M|\geq {|G|\over 3} \implies |M|\geq 14$$

Now for the upper bound. If we consider this group $G$ of students as a graph when two vertices are connected iff they are enemies, then we see this graph is, since each vertex has degree exactly $2$, disjoint union of some cycles $C_1,C_2,...C_k$. Since $\varepsilon = 40$ we have $$ |C_1|+|C_2|+...+|C_k| = 40 $$ But we can take at most half vertices from each cycle in $M$ so $|M|\leq 20$.

All values between $14$ and $20$ can be achieved:

  • For $|M|=14$ take every second vertex on $C_{4}$ and one vertex from each of twelve $C_3$.
  • For $|M|=15$ take every second vertex on $C_{10}$ and one vertex from each of ten $C_3$.
  • For $|M|=16$ take every second vertex on $C_{16}$ and one vertex from each of eight $C_3$.
  • For $|M|=17$ take every second vertex on $C_{22}$ and one vertex from each of six $C_3$.
  • For $|M|=18$ take every second vertex on $C_{28}$ and one vertex from each of four $C_3$.
  • For $|M|=19$ take every second vertex on $C_{34}$ and one vertex from each of two $C_3$.
  • For $|M|=20$ take every second vertex on $C_{40}$.

So, the result is $119$.

user1001001
  • 5,236
nonuser
  • 91,557
2

Suppose you order students into "enemy loops". For example, start with a student (who we will give the name 1) and randomly pick one 1's enemies (who we will name 2). Then, we pick 2's enemy who was not 1, and continue until we close the loop by getting to 1's other enemy.

The following statements hold:

  1. Every student will be in exactly one loop. This is because each student has exactly two enemies, and the enemy property is mutual between students

  2. Every loop will contain at least three students. This is because every enemy if every member of a loop will be a member of the same loop.

  3. There must be an even number of loops of odd size. This comes from the fact that the total number of students is even, and that every student must be in exactly one loop

  4. If a loop has $N$ students, no more than $\lfloor \frac N2\rfloor$ students from that loop can be in the club. This can be proved by use of the pigeonhole principle.

  5. As a result of the above, M can be taken by summing $\lfloor \frac N2\rfloor$ over every loop.

  6. Combining two even loops into a larger even loop has no impact on the value of M. Combining an even sized loop with an odd sized loop has no impact on the value of M. Combining two odd sized loop into an even sized loop increases $M$ by one. This is because the floor operation only impacts the value if the size of the loop is odd, in which case it reduces its argument by $\frac 12$.

  7. We can divide our students into a maximum of 13 loops, of which a maximum of 12 can be odd.

Based on these claims, we can state that depending on the enmity distribution, we can have anywhere from $M=14$ to $M=20$, so the total of all possible values of $M$ is $\sum_{M=14}^{20}M$=119.

Moko19
  • 2,663