Bộ bài tập tự sinh (10 câu · Suy luận logic, Thứ tự & Tập hợp)
Mã đề: 24082328 · Khớp 29 mẫu bài trong thư viện.
The integers $1, 2, 3, \dots, 8$ are written on a board. In each step, you erase any two numbers $a$ and $b$ and write $a + b - 1$. After $7$ steps, only $1$ number remains. What is that final number?
Xem đáp án và lời giải
Đáp án: $29$
Mỗi bước tổng các số giảm đi $1$. Sau $7$ bước, số cuối cùng bằng $(1 + 2 + \cdots + 8) - (8 - 1) = 36 - 7 = 29$.
To detect transmission errors, a computer appends $1$ parity bit to the $6$-bit code 011011 so that the total number of $1$s in the $7$-bit code is even. What is the total number of $1$s in the final $7$-bit code?
Xem đáp án và lời giải
Đáp án: $4$
Chuỗi ban đầu có $4$ bit $1$. Sau khi thêm bit kiểm tra $0$, tổng số bit $1$ chẵn là $4$.
Question 3
Trung bình · +20 điểm
A box contains $10$ balls of each of $3$ different colors. What is the minimum number of balls you must pull out without looking to guarantee having at least $4$ balls of the same color?
Xem đáp án và lời giải
Đáp án: $10$
Trường hợp xấu nhất rút mỗi màu $3$ viên: $3 \times 3 = 9$ viên. Viên thứ $10$ chắc chắn tạo đủ $4$ viên cùng màu.
Question 4
Trung bình · +20 điểm
Given binary inputs $A = 1, B = 1, C = 1, D = 0$, evaluate the four logic gates:
- $G_1 = A \text{ AND } B$
- $G_2 = C \text{ OR } D$
- $G_3 = A \text{ XOR } C$
- $G_4 = B \text{ XOR } D$
How many of these four gates output $1$?
Xem đáp án và lời giải
Đáp án: $3$
Tính từng cổng: $G_1 = 1, G_2 = 1, G_3 = 0, G_4 = 1$. Tổng số cổng có đầu ra $1$ là $3$.
Question 5
Trung bình · +20 điểm
One-way roads connect towns with travel times: $A\to B$ ($7$ min), $B\to C$ ($4$ min), $A\to C$ ($15$ min), $B\to D$ ($10$ min), and $C\to D$ ($5$ min). What is the shortest time (in minutes) to go from $A$ to $D$?
Xem đáp án và lời giải
Đáp án: $16$
So sánh $3$ lộ trình từ $A$ đến $D$:
- $A\to B\to C\to D$: $16$
- $A\to B\to D$: $17$
- $A\to C\to D$: $20$
Đường ngắn nhất mất $16$ phút.
In a survey of students who play at least one sport: $11$ play Soccer, $11$ play Basketball, $12$ play Tennis; $4$ play Soccer & Basketball, $4$ play Basketball & Tennis, $4$ play Soccer & Tennis, and $2$ play all three. How many students are in the survey in total?
Xem đáp án và lời giải
Đáp án: $24$
Theo công thức bù trừ $3$ tập hợp: $11 + 11 + 12 - (4 + 4 + 4) + 2 = 24$.
Question 7
Trung bình · +20 điểm
There is a pile of $33$ stones. Two players take turns removing $1$ to $3$ stones; the player who takes the last stone wins. How many stones should the first player take on the very first turn to guarantee a win?
Xem đáp án và lời giải
Đáp án: $1$
Để đưa về bội của $(3 + 1) = 4$, người đi trước bốc phần dư của $33$ chia cho $4$: $33 \equiv 1 \pmod{4}$, nên cần bốc $1$ viên.
In a $4 \times 4$ mini-Sudoku (using digits $1, 2, 3, 4$ once per row, column, and $2 \times 2$ box), row $1$ already has $2, 4$ and column $4$ already has $1$ outside row $1$. What digit MUST go in row $1$, column $4$?
Xem đáp án và lời giải
Đáp án: $3$
Hàng $1$ đã có $2, 4$ và cột $4$ đã có $1$, nên ô giao nhau chỉ có thể là chữ số còn lại là $3$.
Question 9
Trung bình · +20 điểm
Two piles have $6$ and $8$ stones. In each turn, a player removes any positive number of stones from one pile, and the player taking the last stone wins. How many stones should the first player remove from the larger pile to guarantee a win?
Xem đáp án và lời giải
Đáp án: $2$
Cần làm hai đống bằng nhau ($6$ và $6$) để luôn đối xứng lại nước đi của đối thủ, nên lấy đi $8 - 6 = 2$ viên.
Question 10
Khó · +30 điểm
$14$ islanders (each either a Knight who always tells the truth or a Knave who always lies) sit around a circular table. Every islander says: “The person sitting immediately to my left (clockwise) is a Knave.” How many Knights are at the table?
Xem đáp án và lời giải
Đáp án: $7$
Hiệp sĩ ngồi cạnh Kẻ gian (nói thật), còn Kẻ gian không thể ngồi cạnh Kẻ gian khác (nếu không lời nói sẽ thành thật). Vậy Hiệp sĩ và Kẻ gian ngồi xen kẽ nhau quanh bàn, nên có đúng $14 : 2 = 7$ Hiệp sĩ.