115 年 國立中山大學電機工程學系碩士班丙組《離散數學》
第 1 題10 分
- What is the probability that, among all possible topological sort starting from node A, node F is visited before node E while nodes F and E 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. (10pt)
🖼️【此處有附圖,請對照原卷】
登入後即可作答並保存紀錄。
核心觀念
拓樸排序是將有向無環圖的頂點排成線性次序,且每條有向邊的起點都必須排在終點之前。題目要計算符合指定條件的拓樸排序數,占全部拓樸排序數的比例。
解題方法
由圖可讀出限制:、、、,以及 。因此 必定最先, 次之, 必定最後。只需排列中間的 ,並遵守:
- 都在 之前;
- 在 之前。
符合這些限制的中間排列共有五種:
第 2 題20 分
- Select any 2 digits from 1,3,5,7, and 9. Then, select any 2 digits from 0,2,4, and 6. How many distinct four-digit numbers can be formed using these digits without repetition? 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. (20pt)
登入後即可作答並保存紀錄。
核心觀念
本題屬於組合計數與排列(Combinatorics and Permutations)的綜合應用題,核心觀念包含以下三項:
- 組合公式(Combinations):從 個相異元素中取出 個元素(不考慮順序)的方法數為:
- 排列公式(Permutations)與限制條件:將選出的元素進行相異位置填入。對於形成的「四位數(Four-digit number)」,其最高位(千位數)不得為 。
- 加法原理與乘法原理(Addition and Multiplication Principles):
- 乘法原理:完成一個動作若需分階段進行,總方法數為各階段方法數相乘。
- 加法原理:若解法劃分為若干互斥情況(Mutually Exclusive Cases),總方法數為各情況方法數相加。
解題方法
本題目標為從奇數集合 選取 個數字,從偶數集合 選取 個數字,並組成數字不重複的有效四位數。
步驟一:計算選取數字組合的可能數
- 奇數選取:從 個奇數中任意選取 個,組合數為:
- 偶數選取:從 個偶數中任意選取 個,組合數為:
步驟二:考慮數字 對四位數首位的限制,劃分情況討論
由於選出的偶數中可能包含 ,而 不能放在四位數的千位(最高位),因此將排列情況依「是否選到數字 」分為兩類:
情況一:選取的 個偶數中「不包含」數字
- 選數方式:
- 奇數:從 選 個,共 種。
- 偶數:從非零偶數 中選 個,共 種。
- 選數組合總數: 種。
- 排列方式:
- 由於選出的 個數字皆非 ,任意排列皆可形成有效的四位數。
- 個相異數字的全排列數為 種。
- 情況一方法數:
情況二:選取的 個偶數中「包含」數字
- 選數方式:
- 奇數:從 選 個,共 種。
- 偶數:固定包含 ,另一個偶數從 選 個,共 種。
- 選數組合總數: 種。
- 排列方式:
第 3 題20 分
- Given x = 19, 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. (20pt)
登入後即可作答並保存紀錄。
已知 ,求 。
【核心觀念:費馬小定理 (Fermat's Little Theorem)】
若 為質數且 ,則 。
【推導過程】
第 4 題20 分
- Let R be a ring. If there exists a positive integer n such that na = 0 for all a ∈ R, then the smallest positive integer n is called the characteristic of R. If no such positive integer exists, R has characteristic zero. The characteristic of R is denoted by C(R). Let R be a commutative ring with identity, and let C(R) = 3. Compute and simplify (a+b)³, b ∈ R. 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. (20pt)
登入後即可作答並保存紀錄。
因為 為含單位元(identity)之可交換環(commutative ring with identity),且其特徵值(characteristic)為 ,故對任意 ,皆滿足 。
根據二次項定理(Binomial Theorem),在可交換環中,兩元素和的高次方可依二項式係數展開:
第 5 題10 分
- Compute if , where denotes the binomial coefficient . 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. (10pt)
登入後即可作答並保存紀錄。
首先分析題目給定條件:
已知的條件式為 。
當 時,同除以 會得到 (不成立)。
因此唯一成立的條件為 ,亦即組合數 或者題目中將不存在的項取其倒數為 0,但在二項式係數標準定義下,欲求之五項總和可利用**曲棍球棒恆等式(Hockey-stick identity)**進行化簡:
在組合學的推導與化簡中:
根據二項式係數恆等式(Hockey-stick Identity):
將 代入求和式:
若從二項式遞迴關係式 逐項展開:
第 6 題10 分
- Find all the solutions in positive integer of the equation , where n > 1. 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. (10pt)
登入後即可作答並保存紀錄。
Ans:
核心觀念
本題考查:
-
費馬最後定理:當整數 時,方程
沒有正整數解。 -
畢氏三元組的參數表示:當 時,方程為
所有正整數解可由歐幾里得公式表示。
因此,本題必須分成 與 兩種情形討論。
解題方法
情形一:
方程變為
先考慮互質的原始畢氏三元組,即
在原始畢氏三元組中, 一奇一偶。令偶數者為 ,則由歐幾里得參數公式可得:
其中
且 一奇一偶。
若三元組不是原始的,令其最大公因數為 ,則
其中 是原始畢氏三元組。因此所有正整數解皆為
或交換 的位置,其中
且 一奇一偶。
驗算如下:
例如取 ,可得
第 7 題10 分
- Find all the solutions in prime of the equation , 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. (10pt)
登入後即可作答並保存紀錄。
核心觀念
- 同餘與奇偶性分析(Modulo Arithmetic & Parity):
整數平方後模 的餘數必為 (偶數平方)或 (奇數平方)。利用此性質可快速推斷方程式兩邊變數的同餘約束。 - 質數與平方和定理(Sum of Two Squares Theorem for Primes):
若 為形如 的質數(即 ),且 整除兩數平方和 ,則 必同時整除 與 (即 且 )。此結論可由勒讓德符號(Legendre Symbol)與二次剩餘(Quadratic Residue)性質證明:若 ,則可推得 為模 的二次剩餘,但對 而言,,產生矛盾。 - 質數的整除定義:
若質數 整除質數 ,由於質數的正因數僅有 與自身,且 ,因此必有 。
解題方法
將原式 移項改寫為:
步驟一:討論質數 的奇偶性
-
若 :
代入左式得 。
因 皆為質數,最小質數為 ,故右式最小值為 ,故 無解。 -
若 ( 為奇質數):
因 為奇數,故 為偶數,推得左式 為偶數。
因此右式 亦必須為偶數,這代表 與 的奇偶性相同(同為偶質數或同為奇質數)。
步驟二:討論 的奇偶性
-
若 皆為偶質數:
唯一偶質數為 ,即 。
代入右式得 。
方程式變為 。當 時,,無解。 -
若 皆為奇質數:
任何奇質數平方模 皆同餘 ,即 且 。
故右式 。檢視左式 模 的同餘情況:
- 若 ,則 ,故 ,與右式模 同餘 矛盾。
- 若 ,則 ,故 ,符合右式條件。
因此,任何可能的奇質數解 必須滿足 。
步驟三:利用二次剩餘性質確定變數關係
由方程式 可知,。