Asymptotic Bounding 101: Big O, Big Omega, & Theta (Deeply Understanding Asymptotic Analysis)
Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Subscribe To Live Tech Offers: https://offerfeed.io
Join Our Coaching Service: https://backtobackswe.com/coaching
Great Resource: https://cathyatseneca.gitbooks.io/data-structures-and-algorithms/content/analysis/notations.html
Big O Cheat Sheet: http://bigocheatsheet.com
Today we will initiate a discussion on something that I have lied to you about for a very long time. This will be as simple as possible.
We will not only consider the informal definition but rather also look at the mathematical understandings behind why we call these asymptotic “bounds”.
Again, we care about this because the true colors of an algorithm can only be seen in the asymptotic nature of runtime and space.
So imagine this, we have these components:
A function T(n) which is the actual number of comparisons, swaps...just...resources an algorithm needs in terms of time or space. It is a function of n. When n changes, T(n) changes.
Our job is to classify behaviour.
A bound O( f(n) ) is the function that we choose to apply for the specific bounding.
The definitions, an example:
"T(n) is O(f(n))" iff for some constants c and n0, T(n) less than or equal to c * f(n) for all n greater than or equal to n0
In English...this means...we can say that f(n) is a fundamental function that can upper bound T(n)'s value for all n going on forever.
We have an infinite choice for what c is.
Our constant does not change behavior, it changes "steepness" of the graph.
We are saying that...if I declare f(n) as an upper bound, then I can find a constant c to multiply against f(n) to ALWAYS always always keep T(n) beneath my c * f(n)...T(n) will never beat c * f(n) for infinite n values...hence asymptotic bounding.
If we can't find this c then f(n) fails as an upper bound because it does not satisfy the asymptotic requirement.
So why are constants dropped?
Well...think about what we just did. The injection of the arbitrary c as a multiple onto a base function removes the need for a constant. It adds no meaning to a bound because it is conceptually already a part of the definition of what a bound is.
Big Bounds
Big O: Upper bound on an algorithm's runtime
Theta (Θ): This is a "tight" or "exact" bound. It is a combination of Big
For example:
An algorithm taking Ω(n log n) takes at least n log n time, but has no upper limit.
An algorithm taking Θ(n log n) is far preferential since it takes at least n log n (Ω(n log n)) and no more than n log n (O(n log n)).
Big Omega (Ω): Lower bound on an algorithm's runtime.
Little Bounds
Little o: Upper bound on an algorithm's runtime but the asymptotic runtime cannot equal the upper bound.
There is no little theta (θ).
Little Omega (ω): Lower bound on an algorithm's runtime but the asymptotic runtime cannot equal the lower bound.
If you can't get an exact upper bound, try lower bounding (although it is less useful to be honest).
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: https://www.youtube.com/channel/UCOf7UPMHBjAavgD0Qw5q5ww
Tuschar Roy: https://www.youtube.com/user/tusharroy2525
GeeksForGeeks: https://www.youtube.com/channel/UC0RhatS1pyxInC00YKjjBqQ
Jarvis Johnson: https://www.youtube.com/user/VSympathyV
Success In Tech: https://www.youtube.com/channel/UC-vYrOAmtrx9sBzJAf3x_xw
Видео Asymptotic Bounding 101: Big O, Big Omega, & Theta (Deeply Understanding Asymptotic Analysis) канала Back To Back SWE
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Subscribe To Live Tech Offers: https://offerfeed.io
Join Our Coaching Service: https://backtobackswe.com/coaching
Great Resource: https://cathyatseneca.gitbooks.io/data-structures-and-algorithms/content/analysis/notations.html
Big O Cheat Sheet: http://bigocheatsheet.com
Today we will initiate a discussion on something that I have lied to you about for a very long time. This will be as simple as possible.
We will not only consider the informal definition but rather also look at the mathematical understandings behind why we call these asymptotic “bounds”.
Again, we care about this because the true colors of an algorithm can only be seen in the asymptotic nature of runtime and space.
So imagine this, we have these components:
A function T(n) which is the actual number of comparisons, swaps...just...resources an algorithm needs in terms of time or space. It is a function of n. When n changes, T(n) changes.
Our job is to classify behaviour.
A bound O( f(n) ) is the function that we choose to apply for the specific bounding.
The definitions, an example:
"T(n) is O(f(n))" iff for some constants c and n0, T(n) less than or equal to c * f(n) for all n greater than or equal to n0
In English...this means...we can say that f(n) is a fundamental function that can upper bound T(n)'s value for all n going on forever.
We have an infinite choice for what c is.
Our constant does not change behavior, it changes "steepness" of the graph.
We are saying that...if I declare f(n) as an upper bound, then I can find a constant c to multiply against f(n) to ALWAYS always always keep T(n) beneath my c * f(n)...T(n) will never beat c * f(n) for infinite n values...hence asymptotic bounding.
If we can't find this c then f(n) fails as an upper bound because it does not satisfy the asymptotic requirement.
So why are constants dropped?
Well...think about what we just did. The injection of the arbitrary c as a multiple onto a base function removes the need for a constant. It adds no meaning to a bound because it is conceptually already a part of the definition of what a bound is.
Big Bounds
Big O: Upper bound on an algorithm's runtime
Theta (Θ): This is a "tight" or "exact" bound. It is a combination of Big
For example:
An algorithm taking Ω(n log n) takes at least n log n time, but has no upper limit.
An algorithm taking Θ(n log n) is far preferential since it takes at least n log n (Ω(n log n)) and no more than n log n (O(n log n)).
Big Omega (Ω): Lower bound on an algorithm's runtime.
Little Bounds
Little o: Upper bound on an algorithm's runtime but the asymptotic runtime cannot equal the upper bound.
There is no little theta (θ).
Little Omega (ω): Lower bound on an algorithm's runtime but the asymptotic runtime cannot equal the lower bound.
If you can't get an exact upper bound, try lower bounding (although it is less useful to be honest).
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: https://www.youtube.com/channel/UCOf7UPMHBjAavgD0Qw5q5ww
Tuschar Roy: https://www.youtube.com/user/tusharroy2525
GeeksForGeeks: https://www.youtube.com/channel/UC0RhatS1pyxInC00YKjjBqQ
Jarvis Johnson: https://www.youtube.com/user/VSympathyV
Success In Tech: https://www.youtube.com/channel/UC-vYrOAmtrx9sBzJAf3x_xw
Видео Asymptotic Bounding 101: Big O, Big Omega, & Theta (Deeply Understanding Asymptotic Analysis) канала Back To Back SWE
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
LECTURE 1 BIG OhWhat Is Asymptotic Analysis? And Why Does It Matter? A Deeper Understanding of Asymptotic Bounding.The Ultimate Big O Notation Tutorial (Time & Space Complexity For Algorithms)Deeply Understanding Logarithms In Time Complexities & Their Role In Computer ScienceWhat Is Big O Notation?1.8.1 Asymptotic Notations Big Oh - Omega - Theta #1Big O: How Code Slows as Data GrowsThe Quicksort Sorting Algorithm: Pick A Pivot, Partition, & RecurseWhy Is Merge Sort O(n * log(n))? The Really Really Long Answer.Introduction to Big O Notation and Time Complexity (Data Structures & Algorithms #7)Time Complexity and Big O Notation - Data Structures and AlgorithmsBig O NotationComplete Beginner's Guide to Big O NotationR1. Asymptotic Complexity, Peak FindingHow I Got An Internship @ TwitterInvestigating Heap Sort - Why Is Heap Sort Θ(n * log(n))? An Even Longer Really Long Answer.A Detailed Algorithmic Analysis of Insertion Sort. Best Case & Worst Case.1.8.2 Asymptotic Notations - Big Oh - Omega - Theta #2Algorithms: Big O Notation Example 1