Question 571
From $4$ boys and $6$ girls, how many $3$-person committees contain exactly $2$ boys and $1$ girl?
Xem đáp án và lời giải
Đáp án: $36$
Số cách chọn là $\binom{4}{2} \times 6 = 36$.
Luyện tập / Chủ đề Combinatorics · Tổ hợp
Bài tập quy tắc đếm, hoán vị, chỉnh hợp, tổ hợp, nguyên lý Dirichlet, bất biến và xác suất thống kê.
Đăng nhập để lưu tiến độ và tích lũy điểm trên bảng xếp hạng.
From $4$ boys and $6$ girls, how many $3$-person committees contain exactly $2$ boys and $1$ girl?
Đáp án: $36$
Số cách chọn là $\binom{4}{2} \times 6 = 36$.
Moving only Right or Up along the grid lines, how many shortest paths are there from $A$ to $B$?
Đáp án: $126$
Cần đi tổng cộng $9$ bước gồm $5$ bước sang phải và $4$ bước lên trên, nên số đường đi là $\binom{9}{4} = 126$.
A math club has $8$ members. How many ways are there to choose a committee of $3$ members?
Đáp án: $56$
Số cách chọn là tổ hợp $\binom{8}{3} = 56$.
Two standard $6$-sided dice are rolled. How many outcomes give a sum equal to $6$?
Đáp án: $5$
Liệt kê các cặp $(a, b)$ với $1 \leqslant a, b \leqslant 6$ và $a + b = 6$, ta có đúng $5$ kết quả.
Events $A$ and $B$ are independent with $P(A) = 0.4$ and $P(B) = 0.5$. What is $P(A \cup B)$?
Đáp án: $0.70$
For independent events, $P(A \cap B) = 0.4 \times 0.5 = 0.20$, so $P(A \cup B) = 0.4 + 0.5 - 0.20 = 0.70$.
Events $A$ and $B$ are independent with $P(A) = 0.5$ and $P(B) = 0.6$. What is $P(A \cup B)$?
Đáp án: $0.80$
For independent events, $P(A \cap B) = 0.5 \times 0.6 = 0.30$, so $P(A \cup B) = 0.5 + 0.6 - 0.30 = 0.80$.
Events $A$ and $B$ are independent with $P(A) = 0.5$ and $P(B) = 0.2$. What is $P(A \cup B)$?
Đáp án: $0.60$
For independent events, $P(A \cap B) = 0.5 \times 0.2 = 0.10$, so $P(A \cup B) = 0.5 + 0.2 - 0.10 = 0.60$.
Events $A$ and $B$ are independent with $P(A) = 0.3$ and $P(B) = 0.4$. What is $P(A \cup B)$?
Đáp án: $0.58$
For independent events, $P(A \cap B) = 0.3 \times 0.4 = 0.12$, so $P(A \cup B) = 0.3 + 0.4 - 0.12 = 0.58$.
Events $A$ and $B$ are independent with $P(A) = 0.4$ and $P(B) = 0.4$. What is $P(A \cup B)$?
Đáp án: $0.64$
For independent events, $P(A \cap B) = 0.4 \times 0.4 = 0.16$, so $P(A \cup B) = 0.4 + 0.4 - 0.16 = 0.64$.
Events $A$ and $B$ are independent with $P(A) = 0.3$ and $P(B) = 0.5$. What is $P(A \cup B)$?
Đáp án: $0.65$
For independent events, $P(A \cap B) = 0.3 \times 0.5 = 0.15$, so $P(A \cup B) = 0.3 + 0.5 - 0.15 = 0.65$.
Events $A$ and $B$ are independent with $P(A) = 0.4$ and $P(B) = 0.5$. What is $P(A \cup B)$?
Đáp án: $0.70$
For independent events, $P(A \cap B) = 0.4 \times 0.5 = 0.20$, so $P(A \cup B) = 0.4 + 0.5 - 0.20 = 0.70$.
[Part B · Medium] A cloud network pipes data from source S to sink T. Each arrow shows the maximum bandwidth capacity (in Gbps) of that one-way link. What is the Maximum Flow (in Gbps) that can be sent simultaneously from S to T?
Mạng đám mây truyền dữ liệu từ nguồn S tới đích T, số trên mỗi mũi tên là băng thông tối đa (Gbps) của kênh truyền một chiều đó. Luồng cực đại (Maximum Flow, tính bằng Gbps) có thể truyền đồng thời từ S sang T là bao nhiêu? (Chỉ điền số)
Đáp án: $15$
Answer / Đáp án: 15
Step-by-step (EN): Verify via the Max-Flow Min-Cut Theorem:
S -> A -> C -> T.S -> A -> B -> D -> C -> T (C->T is now saturated at $6+2=8$, B->D uses $2$).S -> B -> D -> T (D->T is saturated at $7$, B->D is saturated at $2+7=9$).Total flow $= 6 + 2 + 7 = 15\text{ Gbps}$. Now check the cut $X = \{S, A, B, D\}$, $Y = \{C, T\}$: edges crossing $X \to Y$ are A->C ($6$), D->C ($2$), and D->T ($7$), whose capacity sum is $6 + 2 + 7 = 15$! Since flow $=$ cut capacity, $15$ is strictly optimal.
Giải chi tiết (VI): Áp dụng Định lý Luồng cực đại – Lát cắt cực tiểu (Max-Flow Min-Cut):
S -> A -> C -> T.S -> A -> B -> D -> C -> T.S -> B -> D -> T.Tổng luồng đạt $6 + 2 + 7 = 15\text{ Gbps}$. Kiểm tra lát cắt $X = \{S, A, B, D\}$ sang $Y = \{C, T\}$ gồm đúng $3$ cạnh đi qua là A->C ($6$), D->C ($2$) và D->T ($7$) có tổng dung lượng $6 + 2 + 7 = 15$. Vậy luồng cực đại chính xác bằng $15$.
Computational Thinking / Tư duy Máy tính: Network Flow & Ford–Fulkerson / Max-Flow Min-Cut Theorem (Luồng cực đại trên mạng).
[Part B · Medium] The Levenshtein (Edit) Distance between two strings is the minimum number of single-character edits (insert, delete, or substitute 1 letter) needed to transform one string into the other. What is the edit distance between "KITTEN" and "SITTING"?
Khoảng cách chỉnh sửa Levenshtein (Edit Distance) giữa hai xâu ký tự là số phép biến đổi đơn tối thiểu (chèn $1$ ký tự, xóa $1$ ký tự, hoặc thay thế $1$ ký tự) để biến xâu này thành xâu kia. Khoảng cách chỉnh sửa giữa "KITTEN" và "SITTING" là bao nhiêu? (Chỉ điền số)
Đáp án: $3$
Answer / Đáp án: 3
Step-by-step (EN): 1) Substitute K -> S: "SITTEN"
2) Substitute E -> I: "SITTIN"
3) Insert G at the end: "SITTING" ($3$ edits). Since the length increases by $1$ (requiring at least $1$ insertion) and aligned prefix characters differ in at least $2$ positions (K != S and E != I), fewer than $3$ edits is impossible.
Giải chi tiết (VI): Ta cần ít nhất $3$ phép biến đổi:
1) Thay K -> S: "SITTEN"
2) Thay E -> I: "SITTIN"
3) Chèn G vào cuối: "SITTING".
Do độ dài tăng từ $6$ lên $7$ (tốn ít nhất $1$ phép chèn) và có ít nhất $2$ vị trí ký tự lệch nhau (K/S, E/I), không thể ít hơn $3$ bước.
Computational Thinking / Tư duy Máy tính: Edit Distance / Approximate String Matching DP (Quy hoạch động khoảng cách xâu Levenshtein).
[Part B · Medium] How many structurally distinct Binary Search Trees (BSTs) can store the $4$ keys {1, 2, 3, 4}?
Có bao nhiêu Cây tìm kiếm nhị phân (BST) có hình dạng cấu trúc khác nhau lưu trữ tập $4$ khóa {1, 2, 3, 4}? (Chỉ điền số)
Đáp án: $14$
Answer / Đáp án: 14
Step-by-step (EN): The number of BSTs on $n$ keys is the $n$-th Catalan number $C_n = \dfrac{1}{n+1}\binom{2n}{n}$ (with $C_0=1, C_1=1, C_2=2, C_3=5$): $$C_4 = C_0 C_3 + C_1 C_2 + C_2 C_1 + C_3 C_0 = 5 + 2 + 2 + 5 = 14.$$
Giải chi tiết (VI): Số cây BST phân biệt trên $n$ khóa chính là số Catalan thứ $n$: với $C_0=1, C_1=1, C_2=2, C_3=5$, chọn lần lượt gốc $r \in \{1, 2, 3, 4\}$ ta có: $$C_4 = C_0 C_3 + C_1 C_2 + C_2 C_1 + C_3 C_0 = 5 + 2 + 2 + 5 = 14.$$
Computational Thinking / Tư duy Máy tính: Catalan Numbers & Recursive Tree Enumeration (Số Catalan đếm cấu trúc cây nhị phân).
In sorting task #6, a list of $6$ distinct numbers is in completely reverse order. What is the minimum number of adjacent swaps needed to sort it into increasing order?
Đáp án: $15$
Số cặp nghịch thế tối đa của dãy $6$ phần tử là $\dfrac{6(5)}{2} = 15$.