Example 1 A host has prepared 77 candies as gifts, and these candies are to be packed into $n$ bags, so that whether the children who come are 7 or 11, each child can receive a whole bag of candies, and each child receives an equal number of candies. Find the minimum value of $n$.
Let $n$ bags of candy be divided into 7 portions, each containing 11 candies, represented by 7 points $x_{1}, x_{2}, \cdots, x_{7}$. Suppose the candies are also divided into 11 portions, each containing 7 candies, represented by 11 points $y_{1}, y_{2}, \cdots, y_{11}$. If a bag of candy appears in both $x_{i}$ and $y_{i}$, then a line is drawn between $x_{i}$ and $y_{j}$, thus forming a bipartite graph $G$.

Graph $G$ must be connected; otherwise, we can take a maximum connected component $G^{\prime}$ of $G$ (the connected subgraph with the most edges in $G$), suppose $G^{\prime}$ contains $a$ points $x_{i}$ and $b$ points $y_{i}$, where $a \leqslant 7, b \leqslant 11$, and the equalities cannot hold simultaneously. Then these $a$ points $x_{i}$ contain $11 a$ candies, and $b$ points $y_{i}$ contain $7 b$ candies. By the connectivity of $G^{\prime}$, we have $11 a=7 b$. Since $(11,7)=1$, it follows that $7|a, 11| b$, but $a \leqslant 7, b \leqslant 11$, hence $a=7, b=11$, which is a contradiction (meaning $G^{\prime}$ can only be $G$). Since $G$ is a connected graph with a total of $7+11=18$ vertices, $G$ must have at least $18-1=17$ edges. Since each edge represents a bag of candy, we have $n \geqslant 17$.
On the other hand, if we divide 77 candies into 17 bags as follows:
$7,7,7,7,7,7,7,4,4,4,4,3,3,3,1,1,1$, then the conditions are met, so the minimum value of $n$ is 17.