TanroMath

Học tập / Giai đoạn 3 · THPT: VMO – IMO

Bài 19. Tổ hợp Olympic: đồ thị và đếm hai cáchLesson 19. Olympiad combinatorics: graphs and double counting

Bài họcThử thách6 câu hỏi

🎯 Sau bài này bạn sẽ

Dùng ngôn ngữ đồ thị: đỉnh, cạnh, bậc Đếm một đại lượng theo hai cách để tìm đẳng thức

Use the language of graphs: vertices, edges, degrees Count one quantity in two ways to obtain an identity

Đồ thị

Đồ thị gồm các đỉnh và cạnh nối các cặp đỉnh. Bậc của một đỉnh là số cạnh đi ra từ nó.

Bổ đề bắt tay: tổng bậc các đỉnh bằng hai lần số cạnh. Hệ quả: số đỉnh bậc lẻ luôn chẵn.

  • Đồ thị đầy đủ $n$ đỉnh có $\frac{n(n - 1)}{2}$ cạnh.
  • Cây $n$ đỉnh có đúng $n - 1$ cạnh.
  • Đi qua mọi cạnh đúng một lần (đường Euler) được khi số đỉnh bậc lẻ là 0 hoặc 2 — chính là bài toán bảy cây cầu Königsberg.

Định lý Ramsey nhỏ

Trong 6 người bất kỳ, luôn có 3 người đôi một quen nhau hoặc 3 người đôi một không quen nhau. (Chứng minh: xét một người A, theo Dirichlet A quen ít nhất 3 hoặc không quen ít nhất 3 người…)

Đếm hai cách

Đếm số cặp (học sinh, câu lạc bộ) theo hàng và theo cột của bảng sẽ cho hai biểu thức bằng nhau. Ví dụ: $\binom{n}{0} + \binom{n}{1} + \cdots + \binom{n}{n} = 2^n$ (cùng đếm số tập con).

Bài toán từ IMO

🏅 IMO 1987 — Bài 1

Gọi $p_n(k)$ là số hoán vị của tập $\{1, 2, \dots, n\}$ có đúng $k$ điểm bất động (phần tử $i$ đứng đúng vị trí $i$). Chứng minh rằng $$\sum_{k=0}^{n} k \cdot p_n(k) = n!.$$

Lời giải (hãy tự làm ít nhất 30 phút trước khi mở)

Đếm hai cách số cặp (hoán vị $\sigma$, phần tử $i$) sao cho $\sigma(i) = i$.

  • Đếm theo hoán vị: một hoán vị có đúng $k$ điểm bất động đóng góp $k$ cặp, và có $p_n(k)$ hoán vị như vậy. Tổng: $\sum k \cdot p_n(k)$.
  • Đếm theo phần tử: với mỗi $i$, số hoán vị giữ nguyên $i$ là $(n-1)!$ (sắp xếp tùy ý $n - 1$ phần tử còn lại). Có $n$ cách chọn $i$, nên tổng là $n \cdot (n-1)! = n!$.

Hai cách đếm cho cùng một số. $\blacksquare$

Ý nghĩa: trung bình một hoán vị ngẫu nhiên có đúng 1 điểm bất động, với mọi $n$.

Graphs

A graph consists of vertices and edges joining pairs of vertices. The degree of a vertex is the number of edges at it.

The handshake lemma: the sum of the degrees equals twice the number of edges. Consequence: the number of vertices of odd degree is always even.

  • The complete graph on $n$ vertices has $\frac{n(n - 1)}{2}$ edges.
  • A tree on $n$ vertices has exactly $n - 1$ edges.
  • A walk using every edge exactly once (an Euler path) exists when the number of odd-degree vertices is 0 or 2 — this is the Seven Bridges of Königsberg problem.

A small Ramsey theorem

Among any 6 people there are always 3 who all know each other or 3 who are all strangers. (Proof: take one person A; by pigeonhole A knows at least 3 people or does not know at least 3 people…)

Double counting

Counting the pairs (student, club) by rows and by columns of a table gives two equal expressions. Example: $\binom{n}{0} + \binom{n}{1} + \cdots + \binom{n}{n} = 2^n$ (both count the subsets).

A problem from the IMO

🏅 IMO 1987 — Problem 1

Let $p_n(k)$ be the number of permutations of $\{1, 2, \dots, n\}$ with exactly $k$ fixed points (element $i$ in position $i$). Prove that $$\sum_{k=0}^{n} k \cdot p_n(k) = n!.$$

Solution (try it yourself for at least 30 minutes before opening)

Count in two ways the pairs (permutation $\sigma$, element $i$) with $\sigma(i) = i$.

  • By permutation: a permutation with exactly $k$ fixed points contributes $k$ pairs, and there are $p_n(k)$ such permutations. Total: $\sum k \cdot p_n(k)$.
  • By element: for each $i$, the number of permutations fixing $i$ is $(n-1)!$ (arrange the other $n - 1$ elements freely). There are $n$ choices of $i$, so the total is $n \cdot (n-1)! = n!$.

Both counts give the same number. $\blacksquare$

Meaning: on average a random permutation has exactly 1 fixed point, for every $n$.

✍️ Luyện tập

Đồ thị đầy đủ 8 đỉnh có bao nhiêu cạnh?How many edges does the complete graph on 8 vertices have?

Một cây có 15 đỉnh thì có bao nhiêu cạnh?A tree has 15 vertices. How many edges does it have?

Đồ thị có tổng bậc các đỉnh bằng 40. Số cạnh là:A graph has degree sum 40. How many edges does it have?

Có thể có đồ thị 7 đỉnh mà mọi đỉnh đều có bậc 3 không?Is there a graph on 7 vertices in which every vertex has degree 3?

Theo định lý Ramsey, số người nhỏ nhất để luôn có 3 người đôi một quen hoặc đôi một không quen là:By Ramsey’s theorem, the smallest number of people guaranteeing 3 mutual acquaintances or 3 mutual strangers is:

$\binom{5}{0} + \binom{5}{1} + \cdots + \binom{5}{5} = ?$$\binom{5}{0} + \binom{5}{1} + \cdots + \binom{5}{5} = ?$
0 / 0 câu đã làm

Bình luận (0)

Chưa có bình luận nào. Hãy là người đầu tiên!