Analytic Method for Solving $8n^2 > 64nlog_2{n}$
up vote
1
down vote
favorite
I was reading a book which gave the running time of an algorithm $A$ to be $8n^2$ and another algorithm $B$ to be $64nlog_2{n}$ and asked what is the greatest input size $n$ where $n in mathbb{N}$ such that $A$ is faster than $B$ (It is earlier established that $B$ is faster for all values past a certain point $c$, finding that $c$ is the question.)
The problem can be mathematically formulated as solving the following inequality:
$$tag{1}quad 8n^2 < 64nlog_2{n}.$$
I did this easily enough by writing a quick program in C (The answer is for all input sizes less than 44), but I was displeased with that method; it just felt dirty, ya know? I'm looking for an analytic solution, should one exist. I've done the following work.
$$8n^2 < 64nlog_2{n}implies n < 8log_2{n}implies n < log_2{n^8}implies 2^{n} < n^8.$$
Anyone know how to analytically derive the result of $n<44?$
inequality alternative-proof
|
show 1 more comment
up vote
1
down vote
favorite
I was reading a book which gave the running time of an algorithm $A$ to be $8n^2$ and another algorithm $B$ to be $64nlog_2{n}$ and asked what is the greatest input size $n$ where $n in mathbb{N}$ such that $A$ is faster than $B$ (It is earlier established that $B$ is faster for all values past a certain point $c$, finding that $c$ is the question.)
The problem can be mathematically formulated as solving the following inequality:
$$tag{1}quad 8n^2 < 64nlog_2{n}.$$
I did this easily enough by writing a quick program in C (The answer is for all input sizes less than 44), but I was displeased with that method; it just felt dirty, ya know? I'm looking for an analytic solution, should one exist. I've done the following work.
$$8n^2 < 64nlog_2{n}implies n < 8log_2{n}implies n < log_2{n^8}implies 2^{n} < n^8.$$
Anyone know how to analytically derive the result of $n<44?$
inequality alternative-proof
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.
– achille hui
Nov 25 at 8:36
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I was reading a book which gave the running time of an algorithm $A$ to be $8n^2$ and another algorithm $B$ to be $64nlog_2{n}$ and asked what is the greatest input size $n$ where $n in mathbb{N}$ such that $A$ is faster than $B$ (It is earlier established that $B$ is faster for all values past a certain point $c$, finding that $c$ is the question.)
The problem can be mathematically formulated as solving the following inequality:
$$tag{1}quad 8n^2 < 64nlog_2{n}.$$
I did this easily enough by writing a quick program in C (The answer is for all input sizes less than 44), but I was displeased with that method; it just felt dirty, ya know? I'm looking for an analytic solution, should one exist. I've done the following work.
$$8n^2 < 64nlog_2{n}implies n < 8log_2{n}implies n < log_2{n^8}implies 2^{n} < n^8.$$
Anyone know how to analytically derive the result of $n<44?$
inequality alternative-proof
I was reading a book which gave the running time of an algorithm $A$ to be $8n^2$ and another algorithm $B$ to be $64nlog_2{n}$ and asked what is the greatest input size $n$ where $n in mathbb{N}$ such that $A$ is faster than $B$ (It is earlier established that $B$ is faster for all values past a certain point $c$, finding that $c$ is the question.)
The problem can be mathematically formulated as solving the following inequality:
$$tag{1}quad 8n^2 < 64nlog_2{n}.$$
I did this easily enough by writing a quick program in C (The answer is for all input sizes less than 44), but I was displeased with that method; it just felt dirty, ya know? I'm looking for an analytic solution, should one exist. I've done the following work.
$$8n^2 < 64nlog_2{n}implies n < 8log_2{n}implies n < log_2{n^8}implies 2^{n} < n^8.$$
Anyone know how to analytically derive the result of $n<44?$
inequality alternative-proof
inequality alternative-proof
edited Nov 25 at 5:14
Tianlalu
2,9361935
2,9361935
asked Nov 25 at 5:13
Dunka
1,42231943
1,42231943
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.
– achille hui
Nov 25 at 8:36
|
show 1 more comment
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.
– achille hui
Nov 25 at 8:36
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command
-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.– achille hui
Nov 25 at 8:36
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command
-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.– achille hui
Nov 25 at 8:36
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2fmath.stackexchange.com%2fquestions%2f3012463%2fanalytic-method-for-solving-8n2-64n-log-2n%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
I think these finite things are inherently dirty. I don't view anything that can be checked by a computer (in finite time) as clean
– mathworker21
Nov 25 at 5:17
@mathworker21 maybe clean was the wrong word to use, but I wonder if someone could work it out with pure reason rather than just testing cases with a computer like I did.
– Dunka
Nov 25 at 5:28
well, i don't know how $44$ is supposed to come out of pure reason. you're going to have to do some computation at some point. so why not just have a computer to all the computation. it's arbitrary...
– mathworker21
Nov 25 at 5:30
You're really looking for where they are equal, right? So $n=log_2n^8$. Try raisng e to both sides, so $e^n=n^8$?
– eSurfsnake
Nov 25 at 6:42
Notice $$8n^2 = 64nlog_2(n)iff e^{frac{log 2}{8} n} = n iff -frac{log 2}{8} = -frac{log 2}{8} n e^{-frac{log 2}{8} n}$$ The root for above equation can be expressed in terms of suitable choosen branch of Lambert W function $$n = -frac{8}{log 2} Wleft(-frac{log 2}{8}right)$$ The relevant branch seems to be the branch '-1', If one throw the command
-8/Log[2]*LambertW[-1,-Log[2]/8]
to WA, one get something reasonable $approx 43.55926$.– achille hui
Nov 25 at 8:36