Use the bubble sort to put 7, 1, 9, 5, 3, 6 into increasing order.
Show that x2 + 2x + 5 is O(x3) but that x3 is not O(x2 + 2x + 5).
Describe an algorithm to find both the largest and the smallest integers in a finite sequence of integers.
Let S be the subset of the set of ordered pairs of integers defined recursively by Basic step: (0, 0) ∈ S. Recursive step: If (a, b) ∈ S then (a + 2, b + 3) ∈ S and (a + 3, b + 2) ∈ S.
List the elements of S produced by the first five applications of the recursive definition.
Let S be the subset of the set of ordered pairs of integers defined recursively by Basic step: (0, 0) ∈ S. Recursive step: If (a, b) ∈ S then (a + 2, b + 3) ∈ S and (a + 3, b + 2) ∈ S.
Show that 5|a + b when (a, b) ∈ S.
Devise a recursive algorithm to find the nth term of the sequence defined by a0 = 1, a1 = 2, and an = 2an−1 + 3an−2 for each positive integer n ≥ 2.
Show that an undirected graph has an even number of vertices of odd degree
Use Kuratowski's theorem to show that the following Petersen graph is nonplanar.
Use Huffman coding to encode the following symbols with frequencies listed: A:0.17, B:0.08, C:0.26, D:0.12, E:0.05, F:0.07, G:0.14, H:0.11. What is the average number of bits used to encode a character.
What is the postfix form of the expression ((x + y) + 3 × 4) + ((x − 5) / 3 + 7).
可觀看題目詳解,並提供模擬測驗!(免費會員無法觀看研究所試題解答)