22 July, 2009

黎曼猜想 - Riemann Hypothesis

費馬最後定理 [1] (Fermat's Last Theorem) 及 龐加萊猜想[2] (Poincare Conjecture) 相繼被攻克之後, 黎曼猜想 (Riemann Hypothesis) 是一個數學家久攻不下的數學難題,底下簡介此猜想的內容及重要性。 Bernhard Riemann 在 32 歲 (1859 年) 時被柏林科學院 (Berlin Academy) 選為通信院士, 為了回報此一崇高榮譽,於是 Riemann 向柏林科學院提交一篇論文[3], 只有 6 頁,題目是「論小於給定數值的質數個數」 (On the number of primes less than a given quantity)

11 July, 2009

Python Idiom: Decorator II

之前的部落格 介紹了 decorator 的基本概念及用法,本篇介紹 decorator 的兩個應用。 第一個例子是 幫函式加上快取
def fibonacci(n):
   if n in (0, 1):
      return n
   return fibonacci(n-1) + fibonacci(n-2)