Formulating the master theorem with Little-O- and Little-Omega notationSolving $T(n)= 3T(fracn4) + ncdot lg(n)$ using the master theoremWhy is there the regularity condition in the master theorem?How to the examples for using the master theorem in Cormen work?Cases of Master TheoremApplying the Master Theorem on Merge sortFinding any $epsilon$ vs finding minimal $epsilon$ for case 3 of Master theoremDoes the master theorem apply to $T(n) = 3T(n/3) + nlogn?Intuition behind the Master TheoremRegularity condition in the master Theorem in the presence of Landau notation for fMissing part of the proof of Master Theorem's case 2 (with ceilings and floors) in CLRS?
"He just borrows them, not steal(s)" -- Coordination of a negated verb in ellipsis
Way of refund if scammed?
Why we don't use cyclotron for ion thrusters?
What are the domains of the multiplication and unit morphisms of a monoid object?
Expand a hexagon
Why was Harry at the Weasley's at the beginning of Goblet of Fire but at the Dursleys' after?
Does a windmilling propeller create more drag than a stopped propeller in an engine out scenario?
Old robot movie with robots in cages being hurt at a carnival show
Why use nominative in Coniugatio periphrastica passiva?
What city and town structures are important in a low fantasy medieval world?
Simple Arithmetic Puzzle 7. Or is it?
Good examples of "two is easy, three is hard" in computational sciences
How can I get from LYS airport to the city center of Lyon?
How to convince boss to spend notice period on documentation instead of new projects
Parse a C++14 integer literal
Was murdering a slave illegal in American slavery, and if so, what punishments were given for it?
" Logic does not allow you to say this": is this assertion outdated?
Warped chessboard
Is being an extrovert a necessary condition to be a manager?
Cycling to work - 30 mile return
Mark’s father’s name
Strange usage of the 'ing' with the want verb
How to use Screen Sharing if I don't know the remote Mac's IP address
Have I found a major security issue with login
Formulating the master theorem with Little-O- and Little-Omega notation
Solving $T(n)= 3T(fracn4) + ncdot lg(n)$ using the master theoremWhy is there the regularity condition in the master theorem?How to the examples for using the master theorem in Cormen work?Cases of Master TheoremApplying the Master Theorem on Merge sortFinding any $epsilon$ vs finding minimal $epsilon$ for case 3 of Master theoremDoes the master theorem apply to $T(n) = 3T(n/3) + nlogn?Intuition behind the Master TheoremRegularity condition in the master Theorem in the presence of Landau notation for fMissing part of the proof of Master Theorem's case 2 (with ceilings and floors) in CLRS?
$begingroup$
In a lecture of Algorithms of Data Structures (based on Cormen et al.), we defined the master theorem like this:
Let $a geq 1$ and $b gt 1$ be constants, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = aT(fracnb) + f(n)$, then
$ \ Tinleft{beginmatrix
Theta(n^log_ba), & text if f in O(n^log_ba-epsilon) text for some epsilon > 0. \
Theta(n^log_ba logn), & text if f in Theta(n^log_ba). \
Theta(f), & text if f in Omega(n^log_ba+epsilon) text for some epsilon > 0 \
& text and if the regularity condition holds.
endmatrixright.$
When I first had to study this theorem, I found that for me personally, the meaning of $epsilon$ was somewhat difficult to understand and memorise. I believe to have found a simpler way to write this theorem, and I am wondering if it can be used equivalently, or if there is a flaw in my reasoning.
Let's look at the first case in particular, $f in O(n^log_ba-epsilon)$. For simplicitly, let's assume $log_b(a) = 2$. If we choose an infinitesimally small value for $epsilon$, then this case basically expresses that $f$ must be asymptotically less than or equal to $n^1.999 ldots$. In other words, $f$ must be asymptotically strictly less than $n^2$. I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the (IMO) more convoluted alternative?
algorithms time-complexity asymptotics master-theorem
$endgroup$
add a comment |
$begingroup$
In a lecture of Algorithms of Data Structures (based on Cormen et al.), we defined the master theorem like this:
Let $a geq 1$ and $b gt 1$ be constants, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = aT(fracnb) + f(n)$, then
$ \ Tinleft{beginmatrix
Theta(n^log_ba), & text if f in O(n^log_ba-epsilon) text for some epsilon > 0. \
Theta(n^log_ba logn), & text if f in Theta(n^log_ba). \
Theta(f), & text if f in Omega(n^log_ba+epsilon) text for some epsilon > 0 \
& text and if the regularity condition holds.
endmatrixright.$
When I first had to study this theorem, I found that for me personally, the meaning of $epsilon$ was somewhat difficult to understand and memorise. I believe to have found a simpler way to write this theorem, and I am wondering if it can be used equivalently, or if there is a flaw in my reasoning.
Let's look at the first case in particular, $f in O(n^log_ba-epsilon)$. For simplicitly, let's assume $log_b(a) = 2$. If we choose an infinitesimally small value for $epsilon$, then this case basically expresses that $f$ must be asymptotically less than or equal to $n^1.999 ldots$. In other words, $f$ must be asymptotically strictly less than $n^2$. I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the (IMO) more convoluted alternative?
algorithms time-complexity asymptotics master-theorem
$endgroup$
add a comment |
$begingroup$
In a lecture of Algorithms of Data Structures (based on Cormen et al.), we defined the master theorem like this:
Let $a geq 1$ and $b gt 1$ be constants, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = aT(fracnb) + f(n)$, then
$ \ Tinleft{beginmatrix
Theta(n^log_ba), & text if f in O(n^log_ba-epsilon) text for some epsilon > 0. \
Theta(n^log_ba logn), & text if f in Theta(n^log_ba). \
Theta(f), & text if f in Omega(n^log_ba+epsilon) text for some epsilon > 0 \
& text and if the regularity condition holds.
endmatrixright.$
When I first had to study this theorem, I found that for me personally, the meaning of $epsilon$ was somewhat difficult to understand and memorise. I believe to have found a simpler way to write this theorem, and I am wondering if it can be used equivalently, or if there is a flaw in my reasoning.
Let's look at the first case in particular, $f in O(n^log_ba-epsilon)$. For simplicitly, let's assume $log_b(a) = 2$. If we choose an infinitesimally small value for $epsilon$, then this case basically expresses that $f$ must be asymptotically less than or equal to $n^1.999 ldots$. In other words, $f$ must be asymptotically strictly less than $n^2$. I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the (IMO) more convoluted alternative?
algorithms time-complexity asymptotics master-theorem
$endgroup$
In a lecture of Algorithms of Data Structures (based on Cormen et al.), we defined the master theorem like this:
Let $a geq 1$ and $b gt 1$ be constants, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = aT(fracnb) + f(n)$, then
$ \ Tinleft{beginmatrix
Theta(n^log_ba), & text if f in O(n^log_ba-epsilon) text for some epsilon > 0. \
Theta(n^log_ba logn), & text if f in Theta(n^log_ba). \
Theta(f), & text if f in Omega(n^log_ba+epsilon) text for some epsilon > 0 \
& text and if the regularity condition holds.
endmatrixright.$
When I first had to study this theorem, I found that for me personally, the meaning of $epsilon$ was somewhat difficult to understand and memorise. I believe to have found a simpler way to write this theorem, and I am wondering if it can be used equivalently, or if there is a flaw in my reasoning.
Let's look at the first case in particular, $f in O(n^log_ba-epsilon)$. For simplicitly, let's assume $log_b(a) = 2$. If we choose an infinitesimally small value for $epsilon$, then this case basically expresses that $f$ must be asymptotically less than or equal to $n^1.999 ldots$. In other words, $f$ must be asymptotically strictly less than $n^2$. I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the (IMO) more convoluted alternative?
algorithms time-complexity asymptotics master-theorem
algorithms time-complexity asymptotics master-theorem
edited May 7 at 11:48
Lignum
asked May 7 at 11:28
LignumLignum
1112
1112
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
No, that would be incorrect.
Perhaps it is the condition $varepsilon > 0$ which is the root of your confusion. It is supposed to mean that $varepsilon$ is a real positive number and constant (with respect to $n$). If we allow $f in omega(n^log_b a)$, for instance, then for $a = b = 2$ we would have $f(n) = n log n in Theta(n)$ as a consequence of the theorem, which is false.
On a side note, you write "$f$ must be asymptotically less than or equal to $n^1.999ldots$". This does mean that $f$ must be bounded by $n^2$, though I believe not for the reasons you think it does. Recall that $1.999ldots = 2$, so that statement is rather trivial...
$endgroup$
add a comment |
$begingroup$
I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the more convoluted alternative?
That is indeed a natural attempt to understand that "convoluted" condition in simple terms. Unfortunately, it is not correct.
Here is a simple counterexample. Let $a=1$ and $b=2$, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = T(fracn2) + f(n)$ and $T(1)=0$, where $f(n)=frac1ln n=o(1)=o(n^log_21)$.
If the first case of master theorem still holds, we should have $T(n)=Theta(n^log_21)=Theta(1)$. However,
$$T(2^m)=T(2^m-1)+frac1m=T(2^m-2)+frac1m+frac1m-1=cdots=frac1m+frac1m-1+cdots+1.$$
Letting $m$ goes to infinity, we see that $T(n)$ is not bounded because the harmonic series diverges.
For the same or a variety of other reasons, the usage of an arbitrarily small positive constant, which is usually denoted by $epsilon$ pops up constantly in different places, especially in asymptotic estimate and complexity analysis. You may want to get used to it or even get addicted to it.
Exercise 1. Verify that for any $epsilon>0$, it is not true that $frac1ln nin o(n^-epsilon)$ although $frac1ln nin o(n^0).$
Exercise 2. Construct a counterexample for the master theorem where $a=4$, $b=2$ for
- the first case where $f in o(n^log_ba)$ instead of $ f in O(n^log_ba-epsilon)$ for some $epsilon > 0$ and
- the third case where $f in omega(n^log_ba)$ instead of $f in Omega(n^log_ba+epsilon)$ for some $epsilon > 0$
respectively.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "419"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109061%2fformulating-the-master-theorem-with-little-o-and-little-omega-notation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
No, that would be incorrect.
Perhaps it is the condition $varepsilon > 0$ which is the root of your confusion. It is supposed to mean that $varepsilon$ is a real positive number and constant (with respect to $n$). If we allow $f in omega(n^log_b a)$, for instance, then for $a = b = 2$ we would have $f(n) = n log n in Theta(n)$ as a consequence of the theorem, which is false.
On a side note, you write "$f$ must be asymptotically less than or equal to $n^1.999ldots$". This does mean that $f$ must be bounded by $n^2$, though I believe not for the reasons you think it does. Recall that $1.999ldots = 2$, so that statement is rather trivial...
$endgroup$
add a comment |
$begingroup$
No, that would be incorrect.
Perhaps it is the condition $varepsilon > 0$ which is the root of your confusion. It is supposed to mean that $varepsilon$ is a real positive number and constant (with respect to $n$). If we allow $f in omega(n^log_b a)$, for instance, then for $a = b = 2$ we would have $f(n) = n log n in Theta(n)$ as a consequence of the theorem, which is false.
On a side note, you write "$f$ must be asymptotically less than or equal to $n^1.999ldots$". This does mean that $f$ must be bounded by $n^2$, though I believe not for the reasons you think it does. Recall that $1.999ldots = 2$, so that statement is rather trivial...
$endgroup$
add a comment |
$begingroup$
No, that would be incorrect.
Perhaps it is the condition $varepsilon > 0$ which is the root of your confusion. It is supposed to mean that $varepsilon$ is a real positive number and constant (with respect to $n$). If we allow $f in omega(n^log_b a)$, for instance, then for $a = b = 2$ we would have $f(n) = n log n in Theta(n)$ as a consequence of the theorem, which is false.
On a side note, you write "$f$ must be asymptotically less than or equal to $n^1.999ldots$". This does mean that $f$ must be bounded by $n^2$, though I believe not for the reasons you think it does. Recall that $1.999ldots = 2$, so that statement is rather trivial...
$endgroup$
No, that would be incorrect.
Perhaps it is the condition $varepsilon > 0$ which is the root of your confusion. It is supposed to mean that $varepsilon$ is a real positive number and constant (with respect to $n$). If we allow $f in omega(n^log_b a)$, for instance, then for $a = b = 2$ we would have $f(n) = n log n in Theta(n)$ as a consequence of the theorem, which is false.
On a side note, you write "$f$ must be asymptotically less than or equal to $n^1.999ldots$". This does mean that $f$ must be bounded by $n^2$, though I believe not for the reasons you think it does. Recall that $1.999ldots = 2$, so that statement is rather trivial...
edited May 7 at 14:55
answered May 7 at 11:52
dkaeaedkaeae
2,88611124
2,88611124
add a comment |
add a comment |
$begingroup$
I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the more convoluted alternative?
That is indeed a natural attempt to understand that "convoluted" condition in simple terms. Unfortunately, it is not correct.
Here is a simple counterexample. Let $a=1$ and $b=2$, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = T(fracn2) + f(n)$ and $T(1)=0$, where $f(n)=frac1ln n=o(1)=o(n^log_21)$.
If the first case of master theorem still holds, we should have $T(n)=Theta(n^log_21)=Theta(1)$. However,
$$T(2^m)=T(2^m-1)+frac1m=T(2^m-2)+frac1m+frac1m-1=cdots=frac1m+frac1m-1+cdots+1.$$
Letting $m$ goes to infinity, we see that $T(n)$ is not bounded because the harmonic series diverges.
For the same or a variety of other reasons, the usage of an arbitrarily small positive constant, which is usually denoted by $epsilon$ pops up constantly in different places, especially in asymptotic estimate and complexity analysis. You may want to get used to it or even get addicted to it.
Exercise 1. Verify that for any $epsilon>0$, it is not true that $frac1ln nin o(n^-epsilon)$ although $frac1ln nin o(n^0).$
Exercise 2. Construct a counterexample for the master theorem where $a=4$, $b=2$ for
- the first case where $f in o(n^log_ba)$ instead of $ f in O(n^log_ba-epsilon)$ for some $epsilon > 0$ and
- the third case where $f in omega(n^log_ba)$ instead of $f in Omega(n^log_ba+epsilon)$ for some $epsilon > 0$
respectively.
$endgroup$
add a comment |
$begingroup$
I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the more convoluted alternative?
That is indeed a natural attempt to understand that "convoluted" condition in simple terms. Unfortunately, it is not correct.
Here is a simple counterexample. Let $a=1$ and $b=2$, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = T(fracn2) + f(n)$ and $T(1)=0$, where $f(n)=frac1ln n=o(1)=o(n^log_21)$.
If the first case of master theorem still holds, we should have $T(n)=Theta(n^log_21)=Theta(1)$. However,
$$T(2^m)=T(2^m-1)+frac1m=T(2^m-2)+frac1m+frac1m-1=cdots=frac1m+frac1m-1+cdots+1.$$
Letting $m$ goes to infinity, we see that $T(n)$ is not bounded because the harmonic series diverges.
For the same or a variety of other reasons, the usage of an arbitrarily small positive constant, which is usually denoted by $epsilon$ pops up constantly in different places, especially in asymptotic estimate and complexity analysis. You may want to get used to it or even get addicted to it.
Exercise 1. Verify that for any $epsilon>0$, it is not true that $frac1ln nin o(n^-epsilon)$ although $frac1ln nin o(n^0).$
Exercise 2. Construct a counterexample for the master theorem where $a=4$, $b=2$ for
- the first case where $f in o(n^log_ba)$ instead of $ f in O(n^log_ba-epsilon)$ for some $epsilon > 0$ and
- the third case where $f in omega(n^log_ba)$ instead of $f in Omega(n^log_ba+epsilon)$ for some $epsilon > 0$
respectively.
$endgroup$
add a comment |
$begingroup$
I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the more convoluted alternative?
That is indeed a natural attempt to understand that "convoluted" condition in simple terms. Unfortunately, it is not correct.
Here is a simple counterexample. Let $a=1$ and $b=2$, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = T(fracn2) + f(n)$ and $T(1)=0$, where $f(n)=frac1ln n=o(1)=o(n^log_21)$.
If the first case of master theorem still holds, we should have $T(n)=Theta(n^log_21)=Theta(1)$. However,
$$T(2^m)=T(2^m-1)+frac1m=T(2^m-2)+frac1m+frac1m-1=cdots=frac1m+frac1m-1+cdots+1.$$
Letting $m$ goes to infinity, we see that $T(n)$ is not bounded because the harmonic series diverges.
For the same or a variety of other reasons, the usage of an arbitrarily small positive constant, which is usually denoted by $epsilon$ pops up constantly in different places, especially in asymptotic estimate and complexity analysis. You may want to get used to it or even get addicted to it.
Exercise 1. Verify that for any $epsilon>0$, it is not true that $frac1ln nin o(n^-epsilon)$ although $frac1ln nin o(n^0).$
Exercise 2. Construct a counterexample for the master theorem where $a=4$, $b=2$ for
- the first case where $f in o(n^log_ba)$ instead of $ f in O(n^log_ba-epsilon)$ for some $epsilon > 0$ and
- the third case where $f in omega(n^log_ba)$ instead of $f in Omega(n^log_ba+epsilon)$ for some $epsilon > 0$
respectively.
$endgroup$
I am wondering if this means that we can write this first case of the theorem as $f in o(n^log_ba)$ (and following the same logic, $f in omega(n^log_ba)$ for the third case), rather than the more convoluted alternative?
That is indeed a natural attempt to understand that "convoluted" condition in simple terms. Unfortunately, it is not correct.
Here is a simple counterexample. Let $a=1$ and $b=2$, and let $T : mathbbN rightarrow mathbbR$ where $T(n) = T(fracn2) + f(n)$ and $T(1)=0$, where $f(n)=frac1ln n=o(1)=o(n^log_21)$.
If the first case of master theorem still holds, we should have $T(n)=Theta(n^log_21)=Theta(1)$. However,
$$T(2^m)=T(2^m-1)+frac1m=T(2^m-2)+frac1m+frac1m-1=cdots=frac1m+frac1m-1+cdots+1.$$
Letting $m$ goes to infinity, we see that $T(n)$ is not bounded because the harmonic series diverges.
For the same or a variety of other reasons, the usage of an arbitrarily small positive constant, which is usually denoted by $epsilon$ pops up constantly in different places, especially in asymptotic estimate and complexity analysis. You may want to get used to it or even get addicted to it.
Exercise 1. Verify that for any $epsilon>0$, it is not true that $frac1ln nin o(n^-epsilon)$ although $frac1ln nin o(n^0).$
Exercise 2. Construct a counterexample for the master theorem where $a=4$, $b=2$ for
- the first case where $f in o(n^log_ba)$ instead of $ f in O(n^log_ba-epsilon)$ for some $epsilon > 0$ and
- the third case where $f in omega(n^log_ba)$ instead of $f in Omega(n^log_ba+epsilon)$ for some $epsilon > 0$
respectively.
edited May 7 at 15:42
answered May 7 at 14:32
Apass.JackApass.Jack
15.9k11144
15.9k11144
add a comment |
add a comment |
Thanks for contributing an answer to Computer Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f109061%2fformulating-the-master-theorem-with-little-o-and-little-omega-notation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown