12.07.2015 Views

Lecture 4 數論(Number Theory)

Lecture 4 數論(Number Theory)

Lecture 4 數論(Number Theory)

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Department of Applied Mathematics I-Shou University數 字 之 謎March 19, 2013<strong>Lecture</strong> 4數 論 (<strong>Number</strong> <strong>Theory</strong>)


Department of Applied Mathematics I-Shou University數 論<strong>Number</strong> <strong>Theory</strong>◮ 數 論 是 ㆒ 個 數 ㈻ 的 領 域 , 主 要 是 在 研 究 整 數 。◮ 整 數 就 是 0, 1, 2, 3, ... 這 些 正 的 整 數 , 再 加 ㆖ 負 的 整 數◮ 也 許 你 會 懷 疑 , 這 些 數 字 ㈲ 什 麼 可 以 研 究 的 ?◮ 難 道 ㈲ 哪 ㆒ 個 數 字 是 我 們 不 認 識 的 嗎 ?


Department of Applied Mathematics I-Shou UniversityExample 4.1㆒ 些 數 字 的 規 律讓 我 們 先 從 ㆒ 些 簡 單 的 例 子 說 起 ...首 先 , 我 們 會 討 論 ㆒ 些 跟 數 字 , 尤 其 是 跟 整 數 相 關 的 問 題 。我 們 先 來 觀 察 ㆒ 些 數 字 的 規 律◮ ㉂ 然 數 的 和1 = 1 × 221 + 2 = 2 × 321 + 2 + 3 = 3 × 421 + 2 + 3 + 4 = 4 × 52


Department of Applied Mathematics I-Shou UniversityExample 4.2㆒ 些 數 字 的 規 律◮ 奇 數 的 和1 = 1 21 + 3 = 2 21 + 3 + 5 = 3 21 + 3 + 5 + 7 = 4 21 + 3 + 5 + 7 + 9 = 5 2這 些 規 律 似 乎 都 可 以 不 斷 的 写㆘ 去 , 我 們 暫 時 不 會 去 證 明但 是 , 想 想 看 我 們 之 前 講 的 歸 納 與 演 繹 所 扮 演 的 角 色 ...


Department of Applied Mathematics I-Shou UniversityExample 4.3㆒ 些 數 字 的 規 律◮ 奇 數 的 和1 = 1 33 + 5 = 2 37 + 9 + 11 = 3 3◮ 和 的 平 方1 = 1 3(1 + 2) 2 = 1 3 + 2 3(1 + 2 + 3) 2 = 1 3 + 2 3 + 3 3


Department of Applied Mathematics I-Shou UniversityGame 4.4Kaprekar operation找 ㆒ 個 3 個 位 數 不 完 全 ㆒ 樣 的 3 位 數◮ 先 把 這 3 個 位 數 由 大 排 到 小 ( 這 樣 就 得 到 了 另 ㆒ 個 3 位 數 )◮ 再 把 那 3 個 位 數 由 小 排 到 大 ( 又 得 到 了 另 ㆒ 個 3 位 數 )◮ 然 後 把 新 得 到 的 這 兩 個 3 位 數 相 減 ( 大 的 減 小 的 )◮ 減 完 也 是 個 3 位 數 ( 如 果 只 是 ㆓ 位 數 , 在 前 面 補 零 )◮ 繼 續 重 複 之 前 的 步 驟 ...◮ 會 發 生 什 麼 事 ?


Department of Applied Mathematics I-Shou UniversityStory 4.5first 10-digit prime in consecutive digits of e2004 年 7 ㈪, 在 美 國 加 州 舊 ㈮ 山 灣 區 附 近 的 101 高 速 公 路 旁 ㈲㆒ 個 大 型 廣 告 , ㆖ 面 写 著{first 10-digit prime found in consecutive digits of e}.com這 看 起 來 是 個 internet ㆖ 的 網 址 !!


Department of Applied Mathematics I-Shou UniversityStory 4.5e? What is e?以 數 ㈻ 的 定 義 來 看 , e 可 以 被 定 義 為 ㆘ 列 這 個 極 限 值 :limx→∞ (1 + 1 x )x可 能 你 比 較 熟 悉 的 e 是 這 個 : e 是 ㉂ 然 對 數 的 底 !! 總 之 , e, 跟 π㆒ 樣 , 是 ㆒ 個 我 們 常 碰 到 的 常 數 。 事 實 ㆖, e =2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274274663919320030599218174135966290435729003342952605956307381323286279434907632338298807531952510190115738341879307021540891499348841675092447614606680822648001684774118537423454424371075390777449920695517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416928368190255151086574637721112523897844250569536967707854499699679468644549059879316368892300987931277361782154249992295763514822082698...


Story 4.5Job opportunity at Google{first 10-digit prime found in consecutive digits of e}.com這 是 個 internet ㆖ 的 網 址 , 但 是 , 首 先 得 檢 查 在 e 當 ㆗, 連 續 10個 數 字 是 否 為 質 數 , 最 先 出 現 的 那 ㆒ 組 連 續 10 個 數 字 且 為 質 數的 就 是 答 案 !事 實 ㆖, 這 個 網 址 是 7427466391.com ( 這 個 網 址 的 內 容 現 在 已 經移 走 了 ), 在 2004 年 當 時 , 如 果 進 入 這 個 網 頁 後 會 看 到 另 ㆒ 個 題目f(1) = 7182818284f(2) = 8182845904f(3) = 8747135266f(4) = 7427466391f(5) =你 找 的 到 答 案 嗎 ? 找 到 答 案 可 再 連 到 ㆒ 個 網 頁 , 那 是 2004 年Google 的 徵 ㆟ 啟 事 的 網 頁 !!Department of Applied Mathematics I-Shou University


Department of Applied Mathematics I-Shou University<strong>Theory</strong> 4.6因 數◮ 讓 我 們 稍 微 正 式 ㆒ 點 的 來 討 論 數 字◮ 先 從 ㆒ 個 基 本 的 定 義 講 起◮ 我 們 說 a 整 除 b 如 果 存 在 ㆒ 個 整 數 k 使 得 a × k = b, 符 號㆖ 記 作 a|b,◮ 例 如 : 7|42 因 為 7 × 6 = 42◮ 所 以 , 每 ㆒ 個 整 數 a 都 整 除 0, 因 為 a × 0 = 0◮ 如 果 a 整 除 b, 我 們 也 說 a 是 b 的 因 數 、 b 是 a 的 倍 數


Department of Applied Mathematics I-Shou UniversityExample 4.7完 美 數因 數 這 個 定 義 看 起 來 很 簡 單 , 但 是 讓 我 們 來 看 看 另 ㆒ 個 問 題 : 完美 數 (Perfect <strong>Number</strong>)◮ The Pythagoreans( 畢 達 哥 拉 斯 ㈻ 派 ) 在 2300 多 年 前 稱 ㆒ 個整 數 是 完 美 的 整 數 , 如 果 它 剛 好 等 於 所 ㈲ 不 等 於 它 本 身 的 正因 數 的 和◮ 例 如 6 = 1 + 2 + 3; 28 = 1 + 2 + 4 + 7 + 14 就 是 完 美 數◮ 而 8 ≠ 1 + 2 + 4; 10 ≠ 1 + 2 + 5 就 不 是 完 美 數◮ 歐 幾 里 得 在 西 元 前 300 年 提 出 了 這 個 公 式If, for some k > 1, 2 k − 1 is prime, then 2 k−1 (2 k − 1) is aperfect number.只 ㈲ 在 k 是 質 數 時 , 2 k − 1 才 可 能 是 質 數 ( 為 什 麼 ?), 但 是2 k − 1 不 ㆒ 定 是 質 數其 實 , 也 只 ㈲ 極 少 數 的 2 k − 1 會 是 質 數 , 這 種 質 數 ㈲ 個 ㈵ 殊㈴ 稱 : Mersenne Prime ( 梅 森 質 數 ), 我 們 之 後 會 再 提 到 這 種質 數 。


Department of Applied Mathematics I-Shou University<strong>Theory</strong> 4.8質 數◮ 質 數 : ㆒ 個 大 於 1 的 ㉂ 然 數 , 如 果 只 ㈲ 它 本 身 跟 1 這 兩 個 因數 , 就 稱 為 質 數 。◮ 而 ㆒ 個 不 是 質 數 的 大 於 1 的 ㉂ 然 數 稱 為 合 成 數 。◮ 算 術 基 本 定 理 (The Fundamental Theorem of Arithmetic) :每 個 ㉂ 然 數 都 可 以 写 成 某 些 質 數 的 乘 積 , 而 且 如 果 不 看 次 序的 話 , 這 個 質 數 的 乘 積 的 写 法 是 唯 ㆒ 的 。 我 們 把 這 個 質 數 的乘 積 稱 為 該 ㉂ 然 數 的 質 ( 因 ) 數 分 解 。之 後 我 們 會 回 來 討 論 質 數 的 ㆒ 些 問 題 !!


Story 4.9In the movie Die Hard 3Bruce Willis( 布 魯 斯 威 利 ) 、Samuel Jackson( 山 繆 傑 克 森 ) 主 演Die Hard 3 ( 終 極 警 探 3) :Simon: On the fountain, there should be 2 jugs, do you seethem? A 5-gallon and a 3-gallon. Fill one of the jugswith exactly 4 gallons of water and place it on thescale and the timer will stop. You must be precise;one ounce more or less will result in detonation. Ifyou’re still alive in 5 minutes, we’ll speak.Bruce: Wait, wait a second. I don’t get it. Do you get it?Samuel: No.Bruce: Get the jugs. Obviously, we can’t fill the 3-gallon jugwith 4 gallons of water.Samuel: Obviously.Bruce: All right. I know, here we go. We fill the 3-gallon jugexactly to the top, right?Samuel: Uh-huh.Department of Applied Mathematics I-Shou University


Department of Applied Mathematics I-Shou UniversityBruce: Okay, now we pour this 3 gallons into the 5-gallonjug, giving us exactly 3 gallons in the 5-gallon jug,right?Samuel: Right, then what?Bruce: All right. We take the 3-gallon jug and fill it a thirdof the way...Samuel: No! He said, ”Be precise.” Exactly 4 gallons.Bruce: Sh– Every cop within 50 miles is running his a– offand I’m out here playing kids games in the park.Samuel: Hey, you want to focus on the problem at hand?


Department of Applied Mathematics I-Shou UniversityStory 4.9Die Hard 3可 以 這 麼 做 :3, 5(0, 0)↓(3, 0)↓(0, 3)↓(3, 3)↓(1, 5)↓(1, 0)↓(0, 1)↓(3, 1)↓(0, 4)Got it!!


Department of Applied Mathematics I-Shou UniversityStory 4.9Die Hard ...但 是 , 在 接 ㆘ 來 的 續 集 ㆗ ( 如 果 ㈲ 的 話 ) :◮ Bruce must make 3 gallons using 5 and 9 gallon jugs.◮ Making 2 gallons with 367 and 653 gallon jugs.◮ Bruce has to make 4 gallons using 3 and 6-gallon jugs.如 何 解 決 這 些 問 題 ? 以 數 ㈻ 的 語 言 來 說 就 是 如 何 從 a 跟 b 容 量 的㈬ 瓶 得 到 剛 好 是 c 的 ㈬, 規 則 是◮ 把 ㆒ 個 ㈬ 瓶 裝 滿◮ 把 ㆒ 個 ㈬ 瓶 的 ㈬ 倒 光◮ 把 ㆒ 個 ㈬ 瓶 的 ㈬ 全 部 倒 到 另 ㆒ 瓶 ( 可 以 的 話 )◮ 把 ㆒ 個 ㈬ 瓶 的 ㈬ 倒 到 另 ㆒ 瓶 直 到 滿 為 止 ( 可 以 的 話 )


Department of Applied Mathematics I-Shou University<strong>Theory</strong> 4.10數 字 的 線 性 組 合其 實 在 倒 的 過 程 當 ㆗, 兩 個 瓶 子 ㆗ 的 ㈬ 都 是 這 個 形 式s × 3 + t × 5, s, t ∈ Z, 稱 為 3 跟 5 的 線 性 組 合 (LinearCombination), 在 我 們 說 明 為 什 麼 之 前 , 先 驗 證 ㆒㆘ 剛 剛 的 例 子 :3, 5 3, 5(0, 0) (0, 0)↓ ↓↓ ↓(1, 0) (2×3-5, 0)(3, 0) (3, 0)↓ ↓↓ ↓(0, 1) (0, 2×3-5)(0, 3) (0, 3)↓ ↓↓ ↓(3, 1) (3, 2×3-5)(3, 3) (3, 3)↓ ↓↓ ↓(0, 4) (0, 3×3-5)(1, 5) (2×3-5, 5)


Department of Applied Mathematics I-Shou University<strong>Theory</strong> 4.10數 字 的 線 性 組 合定 理 : 假 設 ㈲ 兩 個 ㈬ 瓶 , 容 量 分 別 為 a (gallon 或 其 他 單 位 ) 跟 b,那 在 我 們 以 ㆖ 述 倒 ㈬ 的 方 法 過 程 ㆗, 任 ㆒㈬ 瓶 ㆗ 的 ㈬ 量 都 是 a跟 b 的 線 性 組 合證 明 : 嚴 格 的 證 明 會 用 到 數 ㈻ 歸 納 法 ( 之 後 我 們 會 講 到 ), 今 ㆝ 我們 先 簡 單 的 說 明 ㆒㆘1. ㆒ 開 始 , 兩 個 ㈬ 瓶 的 容 量 都 是 a 跟 b 的 線 性 組 合2. 我 們 想 確 定 的 是 , 在 倒 ㈬ 的 過 程 ㆗, 兩 個 ㈬ 瓶 的 容 量 可 以 ㆒直 保 持 a 跟 b 的 線 性 組 合3. 所 以 只 要 我 們 可 以 証 明 ㆘ 面 這 件 事 :假 設 現 在 兩 個 ㈬ 瓶 的 容 量 都 是 a 跟 b 的 線 性 組 合 , 而 且 倒完 後 仍 然 保 持 a 跟 b 的 線 性 組 合4. 定 理 就 可 以 得 証


<strong>Theory</strong> 4.10數 字 的 線 性 組 合所 以 假 設 現 在 兩 個 ㈬ 瓶 的 容 量 都 是 a 跟 b 的 線 性 組 合 , 分 別 是j 1 = s 1 × a + t 1 × bj 2 = s 2 × a + t 2 × b每 ㆒ 次 的 倒 ㈬ 可 能 是 ㆕ 種 情 況 之 ㆒1. 把 某 ㆒㈬ 瓶 裝 滿 ( 結 果 兩 個 ㈬ 瓶 的 容 量 仍 然 是 a 跟 b 的 線 性組 合 )2. 把 某 ㆒㈬ 瓶 倒 光 ( 結 果 兩 個 ㈬ 瓶 的 容 量 仍 然 是 a 跟 b 的 線 性組 合 )3. 把 ㆒ 個 ㈬ 瓶 的 ㈬ 全 部 倒 到 另 ㆒ 瓶 , 那 ㆒ 瓶 剩 0, ㆒ 瓶 ㈲j 1 + j 24. 把 ㆒ 個 ㈬ 瓶 的 ㈬ 倒 到 另 ㆒ 瓶 直 到 滿 為 止 ( 沒 全 倒 過 去 , 另 ㆒瓶 就 滿 了 ) , 如 果 是 第 ㆒ 瓶 倒 到 第 ㆓ 瓶 , 那 第 ㆓ 瓶 ㈲ b, 第㆒ 瓶 剩 j 1 + j 2 − b ( 如 果 是 第 ㆓ 瓶 倒 到 第 ㆒ 瓶 , 那 第 ㆒ 瓶 ㈲a, 第 ㆓ 瓶 剩 j 1 + j 2 − a)所 以 , 這 ㆕ 種 情 況 ㆘, 到 完 ㈬ 後 的 ㈬ 瓶 容 量 都 是 a 跟 b 的 線 性組 合 !Department of Applied Mathematics I-Shou University


Department of Applied Mathematics I-Shou UniversityStory 4.9Die Hard ...回 到 Die Hard 的 問 題 :◮ 如 果 Bruce 必 須 用 3 跟 6 gallons 的 ㈬ 瓶 來 倒 出 4 gallon 的㈬ 的 話 , 那 是 不 可 能 的 , 因 為 根 據 ㆖ 面 的 定 理 4.10,3 跟 6gallons 的 ㈬ 瓶 只 能 倒 出 容 量 是 3 跟 6 的 線 性 組 合 的 ㈬, 而3 跟 6 的 線 性 組 合 s × 3 + t × 6 會 是 3 的 倍 數 , 而 4 不 是 !!◮ 所 以 , 定 理 4.10 幫 我 們 解 答 了 甚 麼 ?如 果 想 從 容 量 是 a 跟 b 的 ㈬ 瓶 倒 出 c 的 ㈬, 那 c ㆒ 定 得 是a 跟 b 的 線 性 組 合 !!◮ 但 是 , 定 理 4.10 沒 ㈲ 告 訴 我 們 , 是 否 ㆒ 定 倒 的 出 來 ?如 果 c 是 a 跟 b 的 線 性 組 合 , 就 ㆒ 定 可 從 a 跟 b 的 ㈬ 瓶 倒出 c 的 ㈬ 來 嗎 ?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!