Bộ bài tập tự sinh (10 câu · Suy luận logic, Thứ tự & Tập hợp)
Mã đề: 39568212 · Khớp 29 mẫu bài trong thư viện.
To detect transmission errors, a computer appends $1$ parity bit to the $6$-bit code 101110 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$.
Four dominoes are placed in a chain so touching halves have equal dots: $[5|\,6]$–$[6|\,x]$–$[x|\,3]$–$[3|\,2]$. If the total number of dots on all four dominoes is $33$, what is $x$?
Xem đáp án và lời giải
Đáp án: $4$
Tổng các chấm đã biết là $5 + 2(6) + 2(3) + 2 = 25$, nên $2x = 8 \Rightarrow x = 4$.
Question 3
Trung bình · +20 điểm
In a race among Leo, Lucas, Noah, and Anna (no ties):
- Lucas finished right behind Leo.
- Anna finished last.
- Noah finished ahead of Leo.
Who won $1$st place?
Xem đáp án và lời giải
Đáp án: Noah
Thứ tự từ $1$ đến $4$ là: Noah, Leo, Lucas, Anna. Vậy Noah về nhất.
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 $3, 2$ and column $4$ already has $4$ outside row $1$. What digit MUST go in row $1$, column $4$?
Xem đáp án và lời giải
Đáp án: $1$
Hàng $1$ đã có $3, 2$ và cột $4$ đã có $4$, nên ô giao nhau chỉ có thể là chữ số còn lại là $1$.
In a game of Nim, there are three piles with $3$, $4$, and $11$ stones. On your turn, you may remove any positive number of stones from a single pile (the player taking the last stone wins). How many stones must you remove from the pile of $11$ to reach a winning Nim-sum ($0$) position?
Xem đáp án và lời giải
Đáp án: $4$
Tính tổng XOR hai đống đầu: $3 \oplus 4 = 7$. Cần giảm đống $11$ xuống còn $7$, tức là bốc đi $11 - 7 = 4$ viên.
Question 6
Trung bình · +20 điểm
Given binary inputs $A = 1, B = 1, C = 0, D = 1$, 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 = 1, G_4 = 0$. Tổng số cổng có đầu ra $1$ là $3$.
Question 7
Trung bình · +20 điểm
Letters $A$–$Z$ are numbered $1$–$26$ ($A=1, \dots, Z=26$). A Caesar cipher shifts every letter forward by $10$ positions, wrapping around after $26$ back to $1$. What position number does letter #18 shift to?
Xem đáp án và lời giải
Đáp án: $2$
Ta có $18 + 10 = 28$. Vì vượt quá $26$, quay vòng trừ đi $26$ được $2$.
A wheel map has $1$ central region surrounded by a ring of $5$ outer regions (each outer region touches the center and its $2$ neighboring outer regions). What is the minimum number of colors needed so that no two touching regions share the same color?
Xem đáp án và lời giải
Đáp án: $4$
Vùng tâm dùng $1$ màu riêng. Vòng ngoài gồm $5$ vùng cần xen kẽ $2$ màu nếu $5$ chẵn (tổng $3$ màu) và $3$ màu nếu $5$ lẻ (tổng $4$ màu). Vậy cần ít nhất $4$ màu.
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$.
Question 10
Trung bình · +20 điểm
There is a pile of $37$ stones. Two players take turns removing $1$ to $4$ 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: $2$
Để đưa về bội của $(4 + 1) = 5$, người đi trước bốc phần dư của $37$ chia cho $5$: $37 \equiv 2 \pmod{5}$, nên cần bốc $2$ viên.