1. (12%)
(a) How many integer solutions of satisfy
(b) In how many ways can we select three distinct integers from 1 to 29 such that their sum is a multiple of 3?
參考解答:
(a)
(b) 84 + 900+ 120 + 120 = 1224
2. (8%) A tree T has 2n vertices of degree 1, 3n vertices of degree 2, and n vertices of degree 3.
(a) Determine the value of n.
(b) What is the minimum number of edges that can be added to T so that the resultant graph will have an Euler circuit?
參考解答:(a) n = 2 (b) 3
3. (10%) Given a the number of derangements is defined as the number of arrangements of where none of the numbers are in their natural position. Take as an example, 4,3,2,1 is considered as one of the dearrangements. We define for convenience.
For all use combinatorial arguments to prove the following equation
Remarks: No marks will be given if your proof is not a combinatorial one.
參考解答:
考慮n個數作排序,共種可能,可分成以下幾種情形:
假設有n個數在自然位置上,則剩餘0個人不在自然位置上,方法數為
假設有n-1個數在自然位置上,則剩餘1個人不在自然位置上,方法數為
假設有n-2個數在自然位置上,則剩餘2個人不在自然位置上,方法數為
…
假設有0個數在自然位置上,則剩餘n個人不在自然位置上,方法數為
所以n個數作排序之方法數為
4. (10%) On the set define relation is a nonnegative even integer.
(a) Prove or disprove that is a partial order on .
(b) Prove or disprove that is a total order on .
Remark: No marks will be given if you do not show your work.
參考解答:
(a)
因為為非負偶數,所以 因此具reflexive.
假設 則 所以具antisymmetric.
假設 則存在為非負整數使得 所以具transitive.
因此為partial order on
(b) 取 因為 所以不為total order on
5. (6%) Please answer whether each of the following statements is correct.
(a)
(b)
(c)
(d)
(e)
(f)
參考解答:(a) T (b) T (c) F (d) T (e) F (f) F
6. (6%)
(a) Please draw the graph with the following sequential representation.

(b) Please draw the graph with the following representation of adjacency multilists.

參考解答:
(a)

(b)

7. (18%)
(a) Please draw the min heap (shown as follows) following a delete min.

(b) Please draw the min-max heap (shown as follows) following a delete min.

(c) Please draw the deap (shown as follows) following a delete min.

(d) Please draw the min leftist tree (shown as follows) following a delete min.

(e) Please draw the 2-3-4 tree (shown as follows) following the deletion of 15.

(f) Please draw the red-black representation of 2-3-4 tree shown in (e).
參考解答:
(a)

(b)

(c)

(d)

(e)

(f)

8. (30%) For an input connected undirected graph G,
- the HP problem asks if G contains a Hamiltonian path; and
- the HC problem asks if G contains a Hamiltonian circuit.
(a) Describe a polynomial-time reduction from HP to HC, and explain why such a reduction works.
(b) Describe a polynomial-time reduction from HC to HP, and explain why such a reduction works.
Remark: No marks may be given if the reduction does not work, or the explanation is incomplete.
參考解答:略
試題(pdf):連結
有任何問題,或想要完整解釋的,歡迎在下方留言唷!
Jackson
您好,想問畫圖7(d) node 10 左子應該是 15 不是 5 吧?
還有 7(f) 不是指畫原圖的意思嗎? 謝謝
mt
對誒~7(d)錯了,然後7(f)應該是要畫原本的圖沒錯,感謝提醒。
Mason
不好意思 想請問一下 第6題的 (b) 小題,N2 跟 N5 好像不會Linked 到,所以1 與 3、0 與 2的點應該不會相連 !? 不知道是不是我會錯意了,感謝指教~~
mt
你說的沒錯喔~感謝提醒!