111 年 國立臺灣聯合大學系統(清華、政治、陽明交通、中央四校聯招)研究所電機類《離散數學》
第 1. 題21 分
True or False? Please briefly justify your answer. Answers without correct justification will get zero point.
(1-1) [3 points] for every non-negative integer, .
(1-2) [3 points] In a group of five people, where each two are either friends or enemies, there must be either three mutual friends, or three mutual enemies.
(1-3) [3 points] If is an integer and is a positive integer, then .
(1-4) [3 points] If all the edge weights on a graph are distinct, the minimum spanning tree is unique.
(1-5) [3 points] Let be a positive integer, and be integers. If divides , then divides for some .
(1-6) [3 points] Let be a graph with vertices and edges. Let be the minimum degree of the vertices of . We have .
(1-7) [3 points] Given a set of positive integers, none exceeding , there are at least two integers in this set that divides another integer in the set.
登入後即可作答並保存紀錄。
(1-1)
題目引文: for every non-negative integer, .
- 核心觀念:非負整數的界限與全稱命題(Universal Quantifier )的否定。
- 解題方法:全稱命題宣稱「對所有非負整數 均成立」。要證明其為假,只需舉出一個不滿足該不等式的**反例(Counterexample)**即可。
- 選項分析:
計算右式得 。題目敘述「所有非負整數 皆滿足 」。若取 ,則 確實為非負整數,但 不成立。因此該敘述為假。 - 解題技巧:看到含有「for every」、「for all」的全稱敘述,優先尋找反例。只要取一個足夠大的數字即可快速說明其不成立。
【答案】False
(1-2)
題目引文:In a group of five people, where each two are either friends or enemies, there must be either three mutual friends, or three mutual enemies.
- 核心觀念:拉姆齊理論(Ramsey Theory)與拉姆齊數 。
- 解題方法:將 5 個人視為完全圖 的 5 個頂點,兩人之間的關係(朋友或敵人)視為邊的雙色著色(2-coloring)。若要保證必定存在 3 個互相為朋友或 3 個互相為敵人(即同色 ),需要檢驗 5 個頂點是否達到拉姆齊數的門檻。
- 選項分析:
根據拉姆齊定理(6 人聚會定理),保證存在 3 個互相為朋友或 3 個互相為敵人的最小人數為拉姆齊數 。當人數僅有 5 人時,可以構造以下反例:
將 5 個人排成一圈(構形為 5-環圖 ),規定每個人只與相鄰的 2 人為朋友,與不相鄰的 2 人為敵人。在此配置下:- 朋友關係形成的圖為 ,最大團(Clique)大小為 2,不存在 3 個互相為朋友的人。
- 敵人關係形成的圖為 的補圖(同構於 ),最大團大小亦為 2,不存在 3 個互相為敵人的人。
因此,在 5 人的群體中不必然存在 3 個互相為朋友或敵人的人,該敘述為假。
- 解題技巧:熟記經典拉姆齊數 。當人數少於 6 人(例如 5 人)時,五邊形 是無同色三角形(Monochromatic )的最標準反例構造。
【答案】False
(1-3)
題目引文:If is an integer and is a positive integer, then .
- 核心觀念:費馬小定理(Fermat's Little Theorem)的前提條件與同餘性質。
- 解題方法:費馬小定理指出,若 為質數且整數 與 互質(即 ),則 。檢視本題是否滿足定理所需的兩大關鍵前提條件。
- 選項分析:
題目僅假設 為正整數、 為整數,並未限定 為質數,亦未限定 :- 反例 1(模數非質數):取 ,則 。
- 反例 2(不互質):即使取質數 ,若取 ,則 。
由於缺乏前提條件,同餘式不必然成立,該敘述為假。
- 解題技巧:數論定理的前提條件(如「質數」、「互質」)是考試極常見的陷阱。看到 卻沒寫明 為質數且 時,可直接代入小合數(如 )驗證反例。
【答案】False
(1-4)
題目引文:If all the edge weights on a graph are distinct, the minimum spanning tree is unique.
- 核心觀念:最小生成樹(Minimum Spanning Tree, MST)的唯一性、切集性質(Cut Property)與環性質(Cycle Property)。
- 解題方法:利用反證法搭配環性質進行證明。在連通加權圖中,若所有邊的權重皆不相同,則任何環上的最大權重邊都是嚴格唯一的,同理任何切集上的最小權重邊也是嚴格唯一的,這將確保生成樹的唯一性。
- 選項分析:
假設圖中存在兩棵不同的最小生成樹 與 。因為 ,必存在至少一條邊 。
將 加入 中會形成唯一的環 。由於 不含環, 中必定存在另一條邊 。
因為圖中所有邊的權重互不相同,故 :- 若 ,則將 中的 替換為 可得到權重更小的生成樹,與 為最小生成樹矛盾。
- 若 ,則將 中的 替換為 可得到權重更小的生成樹,與 為最小生成樹矛盾。
由矛盾可知,不可能存在兩棵不同的最小生成樹,故最小生成樹必為唯一,該敘述為真。
- 解題技巧:記住重要定理「邊權重互異 最小生成樹唯一」。注意其逆命題不一定成立(即使有相同權重的邊,最小生成樹仍可能唯一)。
【答案】True
(1-5)
題目引文:Let be a positive integer, and be integers. If divides , then divides for some .
- 核心觀念:歐幾里得引理(Euclid's Lemma)與質數的整除性質。
第 2. 題10 分
Multiple Choices (select one or more answer choices). Each option is worth of 1 point. However, a wrong choice gets -1 point penalty. For example, if the correct answer is (a)(b)(c) and your answer is (d)(e), you get -5 points. If your answer is (a)(b), you get 3 points. If you left it blank, you get zero point.
(2-1) [5 points] Select the true statement below. Suppose you do not know what my favorite number is (but you do know that 31 is a prime).
(a) If 31 is prime, then 31 is my favorite number.
(b) If 31 is my favorite number, then 31 is prime.
(c) If 31 is not prime, then 31 is my favorite number.
(d) 31 is my favorite number or 31 is prime.
(e) 31 is my favorite number or 31 is not my favorite number.
(2-2) [5 points] Let A, B, and C be sets, and let and be functions. Let be the composition, for .
(a) If is surjective, then must be surjective.
(b) If is surjective, then must be surjective.
(c) If is injective, then must be injective.
(d) If is injective and is total, then must be injective.
(e) If is injective and is total, then must be injective.
[Hints] The function is injective, or one-to-one, if each element of the codomain is mapped to by at most one element of the domain. A function is surjective (onto) if each element of the codomain is mapped to by at least one element of the domain. A function is total if it is defined for all possible input values.
登入後即可作答並保存紀錄。
(2-1)
命題與條件分析
設命題 : 「 是質數」,命題 : 「 是我最喜歡的數字」。
根據題意, 的真值為 真 (True),而 的真值 未知。
各選項分析
- (a) 錯誤:。當 為 True 且 未知時, 的真值取決於 ,故無法確定為真。
- (b) 正確:。因為結論 為 True,根據蘊涵式(Implication)的真值表,若結論為 True,則不論前提 為何, 恆為 真 (True)。
- (c) 正確:。因為前提 為 False,根據蘊涵式的性質,前提為假時,命題(Vacuously True)恆為 真 (True)。
- (d) 正確:。因為 為 True,由邏輯或(OR)的性質,只要其中一個命題為 True,整體即為 真 (True)。
- (e) 正確:。此為排中律(Law of Excluded Middle),恆為 重言式 (Tautology),真值必為 真 (True)。
【答案】(b)(c)(d)(e)
(2-2)
第 3. 題13 分
Take control of your own destiny! [13 points]
The house price is too high now in Taiwan. Therefore, Dr. X decides to play a game on TV. The TV show uses a round-robin tournament for the audition. Every two distinct players play against each other just once. For a round-robin tournament with no tied games, a record of who beat whom can be described with a tournament digraph, where the vertices correspond to players and there is an edge iff beat in their game. Moreover, a ranking is a path that includes all the players. In other words, in a ranking, each player won the game against the next lowest ranked player, but may very well have lost their games against much lower ranked players-whoever does the ranking may have a lot of room to play favorites.
(3-1) [4 points] Give an example of a tournament digraph with more than one ranking.
(3-2) [4 points] Try to prove that if a tournament digraph is a directed acyclic graph, then it has at most one ranking.
(3-3) [5 points] Prove that every finite tournament digraph has a ranking.
登入後即可作答並保存紀錄。
核心觀念
- 競賽圖(Tournament Digraph):設 為一有向圖。若對任意相異頂點對 ,恰有 或 其中一條有向邊存在,則稱 為競賽圖。即競賽圖是由完全圖(Complete Graph )將每條邊賦予方向後得到的有向圖。
- 排名(Ranking)與哈密頓路徑(Hamiltonian Path):題目定義 Ranking 為包含所有選手(頂點)的有向路徑(Directed Path)。在圖論中,經過圖中每一個頂點恰好一次的有向簡單路徑稱為哈密頓路徑。因此,尋找 Ranking 即為尋找競賽圖中的哈密頓路徑。
- 有向無環圖(Directed Acyclic Graph, DAG)與拓撲排序(Topological Sort):若有向圖中不包含任何有向迴圈(Directed Cycle),則稱為 DAG。每一個 DAG 都至少存在一組拓撲排序 ,使得若存在邊 ,則必有 。
- 雷代定理(Rédei's Theorem):圖論著名定理,指出「任何有限競賽圖皆至少包含一條哈密頓路徑(Ranking)」。
解題方法
針對題目三個子題的具體切入點與解題架構:
- (3-1):構造一個最小且包含有向迴圈的競賽圖。取 的有向 3-迴圈競賽圖,列出其包含的所有相異 Ranking。
- (3-2):利用 DAG 的拓撲排序性質與競賽圖的完全性(Completeness),導出 DAG 競賽圖的頂點順序完全由邊的方向唯一確定,進而證明 Ranking 至多只有一種。
- (3-3):採用**數學歸納法(Mathematical Induction)**對頂點數 進行歸納證明(即雷代定理 Rédei's Theorem 的標準證明),構造出將第 個頂點插入已知 個頂點 Ranking 中的明確方法。
子題詳細解答與證明
(3-1) 給出一具有超過一個 Ranking 的競賽圖範例
構造範例:
設頂點集合 ,邊集合 。
此有向圖 在任意兩點間均恰有一條有向邊,故為一競賽圖。
Ranking 驗證:
在此競賽圖中,包含所有頂點的有向路徑(Ranking)有以下三條:
- (選手排名為 )
- (選手排名為 )
- (選手排名為 )
因為找到了 3 條相異的 Ranking(),故此競賽圖滿足題意要求。
(3-2) 證明若競賽圖為 DAG,則其至多只有一個 Ranking
證明:
-
建立拓撲排序:
設 為一個包含 個頂點的 DAG 競賽圖。
因為 為有向無環圖(DAG),故 中存在頂點的拓撲排序(Topological Sort),記為 。
根據拓撲排序的定義,若存在有向邊 ,則必滿足 。 -
確定邊的方向唯一性:
對於任意一對頂點 與 (其中 ):
由於 是競賽圖,在 與 之間必存在邊 或 。
若存在邊 ,將與拓撲排序之性質(邊只能由小索引指向大索引)矛盾。
因此,對所有 ,在 中必有邊 。 -
分析 Ranking 的唯一性:
設 為 中的任一 Ranking(包含所有 個頂點的有向路徑)。
對於路徑上的每一條邊 (其中 ),在拓撲排序中, 的索引必須嚴格小於 的索引。
亦即,若設 為頂點 在拓撲排序中的位置( 到 的整數),則必有:
由於 且長度為 ,唯一的嚴格遞增正整數序列為 。
因此必有:
即唯一可能的 Ranking 必須嚴格為 。
故若競賽圖為 DAG,則其至多存在一個 Ranking(事實上恰有一個)。
(3-3) 證明任何有限競賽圖皆存在 Ranking(Rédei 定理)
證明(採用數學歸納法):
對競賽圖的頂點個數 進行數學歸納。
- 基礎步驟(Base Case):
- 當 時,單一頂點顯然構成一條長度為 0 的 Ranking。
- 當 時,設頂點為 。由競賽圖定義,必有 或 。無論何者,皆構成一條包含所有 2 個頂點的 Ranking。
基礎步驟成立。
第 4. 題13 分
Win a prize!! [13 points] After winning the audition, Dr. X finally gets the chance to win a house in the TV show.
The game in the TV show is similar to the famous game of Monty Hall's game (see the hint below). The player still picks one of three doors, with a prize of house randomly placed behind one door and goats behind the other two. However, instead of always opening a door to reveal a goat, the host now instructs Dr. YY to randomly open one of the two doors that the Dr. X has not picked. This means Dr. YY may reveal a goat, or Dr. YY may reveal the prize. If Dr. YY reveals the prize, then the entire game is restarted, that is, the prize is again randomly placed behind some door, the player again picks a door, and so on until Dr. YY finally picks a door with a goat behind it. Then the Dr. X can choose to stick with her original choice of door or switch to the other unopened door. Dr. X wins if the prize is behind the door she finally chooses. Should Dr. X change? Calculate the probability that changing the door will win the price to justify the answer.
[Hints] We describe the original Monty Hall's game here. Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a house; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?"
登入後即可作答並保存紀錄。
題目題目解析與定案解法
本題為經典「蒙提霍爾問題(Monty Hall Problem)」的變形問題。
1. 條件機率與賽制分析
每次遊戲進行時,房產隨機置於三扇門之一,機率各為 。玩家(Dr. X)先隨機選擇一扇門。
- 設 為「Dr. X 初次選擇的門後面是房產」的事件,。
- 設 為「Dr. X 初次選擇的門後面是山羊」的事件,。
Dr. YY 從剩下的兩扇門中隨機選擇一扇打開:
- 若 發生:剩下的兩扇門後面都是山羊,故 Dr. YY 開門必定揭露山羊。
- 若 發生:剩下的兩扇門中是一隻山羊與一份房產,故 Dr. YY 隨機開門揭露山羊的機率為 。
2. 重複賽制下的條件機率計算
題目規定:若 Dr. YY 開出房產則遊戲重新開始,直到 Dr. YY 開出山羊時才進入最終選擇(換門或不換門)。因此,本題討論的樣本空間已條件限制於「Dr. YY 開出山羊」的有效局。
由全機率公式,Dr. YY 揭露山羊的總機率為:
第 5. 題14 分
Dreams made into reality [14 points]
(5-1) [6 points] After winning the house, Dr. X puts her favorite unit square on the floor as shown in Table 1(a). It is easy to find that the length of the periphery of the square is 4, which is an even number. When she puts another square adjacent to the first as shown in Table 1(b). The length of the periphery of the two squares is now 6, which is also an even number. Use induction on the number of squares to prove that the length of the periphery is always even.
Table 1: An illustrative example for Latin square.
(a)
(b)
[Image: Table 1(a) shows a single square. Table 1(b) shows two squares placed adjacent to each other, sharing one side.]
(5-2) [8 points] Now Dr. X finds a geometric object known as the Koch snowflake to decorate the roof. Koch snowflake is defined by a sequence of polygons recursively. We start with , which is an equilateral triangle with unit sides. We then construct by removing the middle third of each edge of and replacing it with two line segments of the same length. Figure 1 illustrates the construction process.
[Image: Figure 1 shows the construction of a Koch snowflake. S0 is an equilateral triangle. S1 is formed by adding a smaller equilateral triangle pointing outwards on the middle third of each side of S0. S2 and S3 are further iterations.]
Let be the area of . For example, is just the area of the unit equilateral triangle which by elementary geometry is . Prove by induction that for , the area of the -th snowflake is given by
登入後即可作答並保存紀錄。
第 5 題 詳解
(5-1)
定理: 由 個單位正方形邊對邊拼接而成的連通圖形,其外圍周長必為偶數。
證明(數學歸納法):
-
基礎步驟 (Base Step):
當 時,單一單位正方形的外圍周長為 ,為偶數。成立。 -
歸納假設 (Induction Hypothesis):
假設當正方形個數為 () 時,其外圍周長 為偶數。 -
歸納步驟 (Induction Step):
考慮加入第 個單位正方形。新加入的正方形有 4 條邊,假設它與原先 個正方形形成的圖形共享 條邊 ():- 加入該正方形會覆蓋原有的 條外圍邊(周長減少 )。
- 該正方形剩餘的 條邊成為新的外圍邊(周長增加 )。
因此,新的周長為:
由於 根據歸納假設為偶數,且 亦為偶數,故兩偶數之和 必為偶數。
由數學歸納法得證,對所有正整數 ,周長皆為偶數。
【答案】得證
(5-2)
[!NOTE]
題目給定的通式 為題意印製錯誤(此通式為公比之誤用,科克雪花的極限面積應為 )。以下按標準科克雪花面積之正確推導過程給出嚴謹證明。
科克雪花面積遞迴分析:
-
邊數與新增三角形:
- 有 條邊,面積為 。
- 的邊數 。
- 從 到 ,每條邊上新增一個邊長為原本 的正三角形,其面積為 。
- 因此在第 步新增的總面積為:
-
面積通式正確值:
第 6. 題12 分
Finalize the decoration. [12 points] Dr. X now wants to paint something on the unit square. She finds an interesting pattern called Latin square, which is an n×n array whose entries are the number 1,..., n. These entries satisfy two constraints: every row contains all n integers in some order, and also every column contains all n integers in some order. For example, Table 2(a) is a 3×3 Latin square.
Table 2: An illustrative example for Latin square.
(a)
2 1 3
1 3 2
3 2 1
(b)
3 2 1 4 5
1 4 2 5 3
2 5 3 1 4
[Image: Table 2(a) is a 3x3 grid with numbers 1, 2, 3. Table 2(b) is a 5x5 grid, partially filled.]
(6-1) [2 points] Fill in the last two rows of Table 2(b) to extend this "Latin rectangle" to a complete Latin square.
(6-2) [3 points] Show that filling in a row of an n×n Latin rectangle is equivalent to finding a matching in some 2n-vertex bipartite graph.
(6-3) [7 points] Prove that a matching must exist in this bipartite graph and, consequently, a Latin rectangle can always be extended to a Latin square.
登入後即可作答並保存紀錄。
(6-1)
【詳解】
目前 Table 2(b) 為一個 的拉丁矩陣(Latin rectangle):
填入第 4 列與第 5 列,需滿足每列與每行皆恰好包含 各一次。
- 第 1 行已出現 ,剩餘數字為 。
- 第 2 行已出現 ,剩餘數字為 。
- 第 3 行已出現 ,剩餘數字為 。
- 第 4 行已出現 ,剩餘數字為 。
- 第 5 行已出現 ,剩餘數字為 。
選定第 4 列為:。
則第 5 列為:。
【答案】
第 4 列與第 5 列可填入如下(完整 拉丁方陣):
(6-2)
【詳解】
設目前為 拉丁矩陣()。若要填入第 列:
- 構建二分圖 :
- 左側頂點集 代表第 到第 行(Columns)。
- 右側頂點集 代表數字元素集合 。
- 邊集 :若數字 在第 行的前 列中尚未出現過,則在二分圖中連一條邊 。
- 匹配與第 列的等價性:
- 找到 中的一個完美匹配(Perfect Matching)。
- 這意味著將數字 填入第 列的第 行。
- 因為 為匹配:
第 7. 題7 分
Divide-and-conquer. [7 points] Prove or disprove that if is a prime greater than 3, then is divisible by 24.
登入後即可作答並保存紀錄。
核心觀念
本題考查數論(Number Theory)中的整除性(Divisibility)與質數性質(Properties of Primes)。核心定義與定理包含:
- 因式分解與連續整數性質:利用平方差公式將 分解為 ,轉化為分析連續偶數與連續三整數的整除特性。
- 質數的同餘性質:
- 若質數 ,則 必為奇數。
- 若質數 ,則 不可能被 3 整除,即 或 。
- 互質與乘法整除性質:若 且 ,且 ,則 。因為 ,證明 可拆解為分別證明 與 。
解題方法
本題命題為真(Prove)。以下為嚴謹的推導證明過程:
步驟一:因式分解
將 表示為兩個連續偶數的乘積:
步驟二:證明
因為 是大於 3 的質數,故 必為奇數。
設 (其中 為正整數),帶入可得:
乘積為:
由於 與 為兩個連續整數,其中必恰有一個為偶數,故 必能被 2 整除,即 ()。
代回得:
因此, 必能被 8 整除,即 。
步驟三:證明
考慮三個連續整數 。
在任意三個連續整數中,恰有一個數能被 3 整除。
因為 為大於 3 的質數,故 本身不能被 3 整除()。
第 8. 題10 分
Details are important, be observant. [10 points]
(a) [5 points] Define a function such that and NOT .
(b) [5 points] Define a function such that , , , and .
登入後即可作答並保存紀錄。
(a)
核心觀念
- :存在常數 及 ,使得對所有 ,。即當 時,。
- (漸近等價):。
解答
定義函數 (或 )。
檢驗:
- ,故 。
- 因為 ,故 。
【答案】
(b)
核心觀念
- :當 足夠大時, 上界受限於 。
- :不存在下界常數 使得 恆成立(或 無法與 同階)。
- :,即 成長速度並非嚴格小於 。