A $6 \times 6$ square grid is colored like a chessboard, starting with an orange square at the top-left corner. How many orange squares are there in total?
Xem đáp án và lời giải
Đáp án: $18$
Bảng $6 \times 6$ có $36$ ô, số ô màu cam là $\lceil 36 / 2 \rceil = 18$.
A $4 \times 4$ square grid is colored like a chessboard, starting with an orange square at the top-left corner. How many orange squares are there in total?
Xem đáp án và lời giải
Đáp án: $8$
Bảng $4 \times 4$ có $16$ ô, số ô màu cam là $\lceil 16 / 2 \rceil = 8$.
A $6 \times 6$ square grid is colored like a chessboard, starting with an orange square at the top-left corner. How many orange squares are there in total?
Xem đáp án và lời giải
Đáp án: $18$
Bảng $6 \times 6$ có $36$ ô, số ô màu cam là $\lceil 36 / 2 \rceil = 18$.
A full binary tree has $1$ root at level $0$, $2$ nodes at level $1$, and doubles at every next level. How many nodes are there in total from level $0$ to level $3$?
Xem đáp án và lời giải
Đáp án: $15$
Tổng số nút là $1 + 2 + 4 + \cdots + 2^{3} = 2^{4} - 1 = 15$.
A bag contains $32$ marbles in $4$ colors: red, blue, yellow, and white ($8$ of each color). Without looking, what is the minimum number of marbles to draw to guarantee $5$ marbles of the same color?
Trong túi có $32$ viên bi gồm $4$ màu: đỏ, xanh, vàng, trắng (mỗi màu có $8$ viên). Không nhìn vào túi, cần lấy ra ít nhất bao nhiêu viên bi để chắc chắn có $5$ viên bi cùng màu?
Xem đáp án và lời giải
Đáp án: $17$
Trường hợp xấu nhất lấy ra mỗi màu đúng $4$ viên: $4 \times 4 = 16$ (viên) thì chưa màu nào đủ $5$ viên.
Lấy thêm $1$ viên nữa (tổng $17$ viên) chắc chắn sẽ có ít nhất $1$ màu đạt $5$ viên.
In tree #1-1, a full binary tree has $1$ root at level $0$, $2$ nodes at level $1$, and doubles at every next level. How many nodes are there in total from level $0$ to level $3$?
Xem đáp án và lời giải
Đáp án: $15$
Điểm cần lưu ý: Tổng số nút của cây nhị phân đầy đủ cao h là $2^{h+1}-1$.
Cách suy luận: Cộng số nút từng tầng: $1 + 2 + 4 + 8 = 15$.