In a school with $101$ students, each student has at least one friend among the other students. Show that for every integer $1<n<101$, a group of $n$ students can be selected from this school in such a way that each selected student has at least one friend among the other selected students.
Problem
Source: Turkey Junior National Olympiad 2022 P2
Tags: combinatorics
23.12.2022 22:41
Let every of the $101$ students select their best friend. Notice that each student must have one, as they all atleast have one friend. We will prove that we can select the students so that they are selected with their best friend. Notice that a student can have multiple best friends, if he is selected as a best friend by multiple others. Firstly, notice that there is a person with two best friends. If there isn't a person with two best friends, then each person has one best friend and he is the best friend of the other person. This would mean that there is a person without a best friend, or simply without a friend, contradicting the statement. Now, the algorithm to select $n$ students so that they are selected with atleast one of their best friends: First, order $a_1 \ge a_2 \ge \cdots \ge a_{101}$ with $a_1$ the number of best friends of the person with the most best friends, $a_2$ the number of best friends of the person with the second most best friends etc. First, select the person with the most best friends, who has $a_1$ best friends. We want to select $n$ people. If $a_1 \ge n-1$, then you're done, because just select $n-1$ of his best friends to get $n$ friends (including himself and the $n-1$ best friends). If $a_1 < n-1$, then there are two cases. Case 1: $a_1 = n-2$ If $a_1 = n-2$, then select $n-3$ of his best friends to get $n-2$ selected friends. Now, select an arbitrary pair of best friends to get $n$ best friends. Notice that you can always do this, as $a_1 < n-1$ so $a_1 < 100$ or $a_1 \le 99$. Therefore, there always exists a pair of best friends $x_1$ and $x_2$ which is a friendship not including the person with $a_1$. Case 2: $a_1 \le n-3$. Again, there are two cases. Case $2a$: $a_1$ isn't friends with $a_2$. Now, just select all of $a_1$'s $n-3$ best friends to get $n - (a_1+1) = n_1$ best friends selected. Now $n_1 \ge 2$ and now go to the person $a_2$. His friends aren't selected just like himself. Now, continue this algorithm. Case $2b$: $a_1$ is friends with $a_2$. Select $a_1-1$ of his best friends, all of his friends except $a_2$. Now, you selected $n - (a_1-1+1) = n -a_1 = n_2 \ge 2$ people. Continue with $a_2$. The person with $a_2$ friends his friends aren't selected, so continue this algorithm. Algorithm works, done.
23.12.2022 22:42
Solution from PuzzlingCane Let us handle the $n=3$ case first. Let $G$ be the graph where the vertices represent the students and the edges represent the friendships. If all students have exactly one friend, the sum of degrees of $G$ will be $101*1=101$ which is odd and therefore a contradiction. Therefore, there exists a student with at least 2 friends. If we take this student and 2 of his/her friends, we have a solution to the $n=3$ case. Let $4<=k<=101$ such that there exists a group with $k$ students satisfying the conditions given in the question. We will prove that there exists a group with $k-1$ students satisfying the conditions as well. Let us call the group with $k$ students $K.$ $Case 1:$ There exists a student in $K$ whose friends in $K$ all have at least two friends in $K.$ In this case, we can remove that student from $K$ and we will reach the desired group with $k-1$ students. $Case 2:$ Every student in $K$ is friends with at least one student in $K$ who has only one friend in $K.$ In this case, assume there exists a student $A$ in $K$ who has more than one friend in $K.$ We know $A$ has some friend $B$ in $K$ such that $B$ has no friends other than $A$ in $K$. However, this contradicts the statement of $Case 2.$ Therefore, in this case, every student in $K$ will have exactly one friend in $K,$ meaning that $K$ will consist of disjoint pairs of friends. $Case 2.1:$ Every student in $K$ has only one friend among everyone. Now we can use the fact that there exists a student $C$ with at least $2$ friends. In this case, $C$ cannot be in $K$ because $C$ has at least 2 friends. Any friend $D$ of $C$ also cannot be in $K$ because then $D's$ only friend would have to be $C$ and we already said $C$ cannot be in $K.$ Since we assumed $k>=4,$ $K$ contains at least two pairs of friends. If we remove two pairs of friends from $K$ and add $C$ and two of $C's$ friends to $K,$ we reach the desired group with $k-1$ students. $Case 2.2:$ There exists a student $E$ outside of $K$ who has at least one friend in $K.$ In this case, we can add $E$ to $K$ and remove another pair of friends from $K.$ Once again, we reach the desired group with $k-1$ students. The $n=2$ case is trivial, we proved the $n=3$ case and since the $n=101$ case holds according to the question's statement, the cases for $n=4,5,...,100$ also hold by induction. Therefore, we are done.
24.12.2022 19:50
My solution during the contest: $101$ is an odd number. So there should be at least a student that has more than one friends. So we don't need any proof for $n=2$ and $n=3$ cases. Now, we can consider 2 cases: If $n$ is an even number, we choose $2$ friends. If $n$ is an odd number, we choose a student that has least $2$ friends and student's $2$ friends. Then, we take 2 students that we didn't choose. There are 3 cases for them: $i)$ If they're friends we can choose both of them. $ii)$ If one of them has a friend from group of students which aren't choosen, we choose the student and the student's friend. $iii)$ If both of students have friends from group of students which are choosen, we choose both of them. In this way, we choose 2 students in all the cases. After finite repetition, we have $n$ students which are choosen.