114 年 國立中山大學電機工程學系碩士班丙組《離散數學》
第 1 題5 分
Assume that is a discrete number. Find the solution to . Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
核心觀念
- 離散數(Discrete Number)的集域定義:在離散數學的範疇中,「離散數」指屬於離散集合(Discrete set)的數值,即整數集 (或自然數集 )。本題環境下,變數 與平方根式 的目標值均限定在整數域 。
- 算術平方根的非負性:對於任意實數 ,算術平方根 的結果必為非負數()。
- 丟番圖方程式(Diophantine Equation)與質數因子分解:形如 的不定方程式可透過平方差公式分解為 。若常數 為質數(Prime number),則其在整數集內的因數分解組合必有限且可完全列舉。
解題方法
步驟一:設定整數變數與限制條件
設 ,其中 為離散數(即正整數 ), 為整數()。
由於 ,可得 ,故 ,代表 為大於等於 的正整數。
步驟二:代數變換與平方差分解
將等式兩邊平方:
移項整理成平方差形式:
步驟三:列舉質數 的所有整數因數對
因為 為質數,且 ,故 與 必然為 的整數因數。 在整數範圍內的因數分解對 僅有以下四種組合:
- 狀況一:
兩式相加得 。
將 代回第 2 式可得 。
此時 ,符合算術平方根之要求。
第 2 題15 分
Solve the following recurrence relations:
with initial conditions .
Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
本題為聯立遞迴關係式(System of Recurrence Relations),可利用矩陣特徵值法或生成函數法求解。以下採用矩陣特徵值法進行求解與證明。
將原聯立遞迴關係式改寫為矩陣形式:
設矩陣 ,則對任意 有:
1. 求矩陣 之特徵值(Eigenvalues)與特徵向量(Eigenvectors):
特徵方程式為:
解得特徵值為 。
- 當 時:
第 3 題15 分
A basket contains four apples, oranges, and melons. Two items are randomly selected from the basket. Let represent the number of apples picked. The probability of selecting two apples is , and the probability of selecting one apple and one orange is . Assume that the expected value of is . Then, what is ? Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
核心觀念
本題屬於離散數學與機率論中的古典機率(Classical Probability)與超幾何分布(Hypergeometric Distribution)期望值之綜合計算題。主要涉及以下核心觀念:
- 組合數(Combination):從 個相異物中不放回取 個的方法數為 。
- 古典機率定義:事件 發生的機率 ,其中 為樣本空間總數, 為事件 的可能結果數。
- 超幾何分布與期望值(Expected Value):
- 若自總數 個物品(其中包含 個目標物)中,不放回隨機抽取 個物品,設抽中目標物的數量為隨機變數 ,則 服從超幾何分布 。
- 離散型隨機變數的期望值定義為 。
- 超幾何分布的期望值公式為 。
解題方法
Step 1:求水果總數
設籃子內的水果總數為 。
從 個水果中隨機不放回取出 2 個水果,樣本空間的總組合數為 。
已知取出 2 個皆為蘋果()的機率為 :
整理上式可得:
因為水果數量 必為正整數,故取 。
由此可知 。
Step 2:求橘子數量 與哈密瓜數量
已知取出 1 個蘋果與 1 個橘子的機率為 :
從 4 個蘋果中取 1 個蘋果有 種取法;從 個橘子中取 1 個橘子有 種取法。
樣本空間總組合數為 。
解得橘子數量:
再由 ,可得哈密瓜數量:
Step 3:計算蘋果數量的期望值
隨機變數 表示取出的蘋果個數,其可能取值為 。
第 4 題15 分
Arrange the letters into a grid (3 rows and 2 columns) such that:
Each row contains two different letters.
Each column contains three different letters.
How many distinct arrangements are there? Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
【題目觀念】
排列組合(Counting & Combinations)、矩陣填字受限問題(Restricted Arrangements in Grid)。
【詳細解析】
- 題目條件分析:
欲將字母集合 填入 網格(3 列 2 行):- 列條件(Row condition):每列包含 2 個不同字母。即每列恰由 中的一種組合構成。
- 行條件(Column condition):每行包含 3 個不同字母。因為全域字母集只有 各 2 個且每列 2 格,故兩行各自必須恰好為全排列 。
第 5 題10 分
What is the probability that, among all possible Depth-First Search (DFS) traversals starting from node A, node F is visited before node B while nodes F and B are not visited consecutively? Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
🖼️【此處有附圖,請對照原卷】
登入後即可作答並保存紀錄。
核心觀念
DFS(深度優先搜尋)的訪問順序會受每個節點鄰接點的選擇順序影響。依圖中連線,邊為 。題目所說的「不連續」是指 與 在訪問順序中不相鄰。
解題方法
從 開始後, 是葉節點;其餘節點 形成一個連通部分。DFS 一旦從 進入這個連通部分,就會先將其中節點全部走訪完,才回到 訪問 。因此, 只會在整個訪問順序的最前端(緊接 之後)或最後端。
先列出 部分的所有可能 DFS 訪問順序:
第 6 題20 分
Transform into its principal conjunctive normal form. Ensure the following:
The elements and are ordered alphabetically.
Within each parenthesis, terms with more negation signs are placed at the end.
Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
題意解析與說明
本題要求將命題公式 化簡為主合取範式 (Principal Conjunctive Normal Form, PCNF / Maxterm Canonical Form),即由極大項(Maxterm)構成的合取(AND, )型態。
解題步驟
-
利用邏輯等價律化簡原式為 CNF:
由蘊涵律 :
原式可化為:
根據德摩根律(De Morgan's Laws)與雙重否定律:
因此:
根據分配律(Distributive Laws):
由於 (恆真律),可刪去該項:
第 7 題20 分
A task requires selecting two people from A, B, C, and D to complete it. Based on the following conditions, determine the number of valid assignments and list all possible combinations:
- If A is selected, then either C or D must also be selected.
- B and C cannot both be selected.
- If C is selected, then D must not be selected.
Please justify your answer to receive full credit. Failure to provide justification will result in 0 points. Additionally, write your final answer at the leftmost part of the answer paper using "Ans:" on a new separate line. Failure to follow this instruction will result in a penalty of -5 points.
登入後即可作答並保存紀錄。
核心觀念
本題考查離散數學中的命題邏輯(Propositional Logic)與組合計數(Combinatorial Enumeration)。
-
組合數(Combinations):
從 個相異元素中無順序地取出 個元素,總組合數公式為:
本題自 4 人 中選取 2 人完成任務,未加入限制條件前的樣本空間總組合數為 種。 -
蘊涵式(Implication)的邏輯語意:
邏輯命題 (若 則 )等價於 。- 當前件 為假(False)時,整個蘊涵命題自動為真(虛真,Vacuously True)。
- 當前件 為真(True)時,後件 必須為真(True),該命題才為真。
解題方法
採用窮舉法(Exhaustive Enumeration)搭配邏輯條件篩選進行推導:
步驟一:列出所有未受限的 2 人組合
由集合 取 2 人的所有可能組合共 種:
步驟二:建構題目限制條件之邏輯表示式
設 分別表示該成員被選中的布林變數(1 表示選中,0 表示未選中):
- 條件 1:「若選 A,則必選 C 或 D」
即:若選取了 A,則組合中不得同時缺少 C 與 D。 - 條件 2:「B 與 C 不能同時被選」
即:組合中不可同時包含 。 - 條件 3:「若選 C,則必不選 D」
即:組合中不可同時包含 。
步驟三:條件篩選與驗證
- 由條件 2 排除組合 。
- 由條件 3 排除組合 。
- 針對剩餘組合驗證條件 1:
- :選取了 ,但 與 均未被選取,違反條件 1,排除。