上篇提到 Big O Notation
我們現在知道了 Big O 用來表示演算法的 upper bound / worst case scenario(上界限 / 最壞情況)
這篇介紹 Asymptotic Notations (漸進符號),也就是 Big O 其背後的基本概念
Asymptotic notation helps us describe the efficiency of an algorithm by focusing only on the most significiant factors that impact its performance. It ignores constant factors and lower-order terms, allowing us to concentrate on how the algorithm scales as the input size grows.
漸進符號的意思就是,只關注影響演算法效率中最重要的部分,忽略掉常數因子或低階數項
The Big Theta combination with Big O(upper bound) & Big Omega(lower bound)
Big Θ(Theta) 描述了由 Big O (upper bound)與 Big Ω (lower bound)組合而成的區間,表示該演算法最佳情況不會低於某值,但最糟情況也不會高於某值
This notation describes BOTH the upper and lower bound of a function and is often referred to as the average time complexity.
E.g
if an algorithm's time complexity is Θ(n), it means that
Describes the lower bound on the time complexity, or the best-case scenario.
若想知道此f(n)最少需耗費多少時間,用 Big Ω來取得此 f(n) 的 lower bound
Definition Big–O, O()): Let f(n) and g(n) be functions that map positive integers to positive real
numbers. We say that f(n) is O(g(n)) (or f(n) ∈ O(g(n))) if there exists a real constant c > 0 and there
exists an integer constant n0 ≥ 1 such that f(n) ≤ c ∗ g(n) for every integer n ≥ n0.
Definition (Big–Omega, Ω()): Let f(n) and g(n) be functions that map positive integers to positive
real numbers. We say that f(n) is Ω(g(n)) (or f(n) ∈ Ω(g(n))) if there exists a real constant c > 0 and
there exists an integer constant n0 ≥ 1 such that f(n) ≥ c · g(n) for every integer n ≥ n0.
Asymptotic Notations 101: Big O, Big Omega, & Theta (Asymptotic Analysis Bootcamp)
https://youtu.be/0oDAlMwTrLo?si=c_EKSIySGhJ37J68
Asymptotic notation
https://www.khanacademy.org/computing/computer-science/algorithms/asymptotic-notation/a/asymptotic-notation
Complexity:Asymptotic Notation(漸進符號)
https://alrightchiu.github.io/SecondRound/complexityasymptotic-notationjian-jin-fu-hao.html#an
Asymptotic notation
https://www.khanacademy.org/computing/computer-science/algorithms/asymptotic-notation/a/asymptotic-notation
A Guide to Understanding Big-O, Big-Ω and Big-ϴ Notation
https://medium.com/@alejandro.itoaramendia/a-guide-to-understanding-big-o-big-%CF%89-and-big-%CE%B8-notation-7c407a6824d9
https://csbabel.wordpress.com/2009/05/20/an-intro-to-big-o-omega-theta-notation-and-big-oo/