PIXNET Logo登入

nix

跳到主文

Seize...

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 11月 03 週六 200723:11
  • Indroduction to Algorithms - 3. Growth of Functions


3.1 Asymptotic notation
Asymptotic efficiency of algorithms: how the running time of an algorithm increases with the size of the input in the limit.Usually, an algorithm that is asymptotically more efficient will be the best choice for all but very small inputs.Θ(g(n)) = {f(n): there exist positive constants c1, c2, and n0 such that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0}.    /* c1, c2, n0 > 0 */O(g(n)) = {f(n): there exist positive constants c and n0 such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0}.       /* upper bound */o(g(n)) = {f(n): for any positive constant c > 0, there exists a constant n0 > 0 such that 0 ≤ f(n) < cg(n) for all n ≥ n0}.          /* upper bound */Ω(g(n)) = {f(n): there exist positive constants c and n0 such that 0 ≤ cg(n) ≤ f(n) for all n ≥ n0}.       /* lower bound */ω(g(n)) = {f(n): for any positive constant c > 0, there exists a constant n0 > 0 such that 0 ≤ cg(n) < f(n) for all n ≥ n0}.          /* lower bound */Θ-notation: For all values of n to the right of n0, the value of f(n) lies above c1g(n) and below c2g(n). For all n ≥ n0, the function f(n) is equal to g(n) to within a constant factor. We say that g(n) is an asymptotically tight bound for f(n).The definition of Θ(g(n)) requires that every member f(n) є Θ(g(n)) be asymptotically positive.We use o-notation to denote an upper bound that is not asymptotically tight.f(n) = Θ(g(n)) implies f(n) = O(g(n)). Θ(g(n)) ⊆ O(g(n)).For any two functions f(n) and g(n), we have f(n) = Θ(g(n)) if and only if f(n) = O(g(n)) and f(n) = Ω(g(n)).Figure 3.1:Θ, O, and Ω notations
(繼續閱讀...)
文章標籤

nix 發表在 痞客邦 留言(0) 人氣(448)

  • 個人分類:Algorithms
▲top
  • 11月 01 週四 200717:22
  • Indroduction to Algorithms - 2. Getting Started


Pseudocode is not typically concerned with issues of software engineering.2.1 Insertion sort
An efficient algorithm for sorting a small number of elements, sorted in place.INSERTION-SORT(A) /* A[1 ‥ n], (c1n2) */
(繼續閱讀...)
文章標籤

nix 發表在 痞客邦 留言(0) 人氣(460)

  • 個人分類:Algorithms
▲top
  • 10月 17 週三 200718:13
  • Indroduction to Algorithms - 1. The Role of Algorithms in Computing


    開始念Algorithm了,依照慣例,為了要釐清自己的觀念和讓自己複習及查資料方便,還是在念書的時候盡量整理筆記。Algorithm也是一門非常耐人尋味的學問呢...

1.        The Role of Algorithms in Computing

(繼續閱讀...)
文章標籤

nix 發表在 痞客邦 留言(0) 人氣(530)

  • 個人分類:Algorithms
▲top
1

GNU

Firefox

Ubuntu

Free Software Foundation

Pentax 645D

我的地盤

nix
暱稱:
nix
分類:
數位生活
好友:
累積中
地區:

文章分類

  • Algorithms (3)
  • Compiler (5)
  • Computer Architecture (1)
  • Computer Language (1)
  • Funny Story (6)
  • GNU (2)
  • Life (112)
  • Linux (8)
  • make (4)
  • Operating System (16)
  • Reading (18)
  • Share (15)
  • Uboot (1)
  • VirtualBox 2.0.2 (1)
  • VMware Workstation 6 (4)
  • Memory Diary (0)
  • 未分類文章 (1)

近期文章

  • 20120226 - 古坑華山50公里超馬
  • 20120107 - 泰雅盃大腳丫森林馬拉松
  • 20111231 - 中潭公路馬拉松
  • 20111101 - 大阪馬拉松第4天
  • 20111030 - 大阪馬拉松第3天
  • 20111029 - 大阪馬拉松第2天
  • 20111028 - 大阪馬拉松第1天
  • 20111023 - Finger Lakes & Watkins Glen State Park
  • 20111022 - Letchworth State Park
  • 20111016 - Niagara Falls

最新迴響

  • [18/05/30] v489682 於文章「20120226 - 古坑華山50公里超...」留言:
    g54QIbPpd1jv3奢侈品仿牌,保固說到做到,誠信經營...
  • [17/04/11] richlifeily 於文章「OS - Ending...」發表了一則私密留言
  • [17/04/11] richlifeily 於文章「OS - Ending...」發表了一則私密留言
  • [17/01/11] 洪靖秦 於文章「OS - Ending...」發表了一則私密留言
  • [17/01/11] 洪靖秦 於文章「OS - Ending...」發表了一則私密留言
  • [16/02/22] Goh Jun Ling 於文章「考古驚現秦檜遺囑:忠良寧負奸佞名!?...」留言:
    刻意強調中國知識分子這種詞是潛意識把自己和中國脫離關係的幼稚...
  • [14/02/22] 阿信 於文章「徵求電子書 - Compiler相關...」留言:
    您好,請問版大在樓上提供的連結是 Crafting a C...
  • [14/02/15] Ida 於文章「20110226 - 東京馬拉松第1天...」留言:
    哈囉,,那我想詢問一下交通部份,從羽田機場至報到區是從哪裡開...
  • [13/10/12] Dale Lin 於文章「20111030 - 大阪馬拉松第3天...」發表了一則私密留言
  • [13/10/07] david 於文章「20110226 - 東京馬拉松第1天...」留言:
    所以大大的意思就是說可以放心的將錢和護照放在寄物袋,反正終點...

參觀人氣

  • 本日人氣:
  • 累積人氣:

文章彙整