Analytic Method for Solving $8n^2 > 64nlog_2{n}$












1












$begingroup$


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?$










share|cite|improve this question











$endgroup$












  • $begingroup$
    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
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:17










  • $begingroup$
    @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.
    $endgroup$
    – Dunka
    Nov 25 '18 at 5:28










  • $begingroup$
    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...
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:30












  • $begingroup$
    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$?
    $endgroup$
    – eSurfsnake
    Nov 25 '18 at 6:42












  • $begingroup$
    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$.
    $endgroup$
    – achille hui
    Nov 25 '18 at 8:36
















1












$begingroup$


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?$










share|cite|improve this question











$endgroup$












  • $begingroup$
    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
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:17










  • $begingroup$
    @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.
    $endgroup$
    – Dunka
    Nov 25 '18 at 5:28










  • $begingroup$
    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...
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:30












  • $begingroup$
    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$?
    $endgroup$
    – eSurfsnake
    Nov 25 '18 at 6:42












  • $begingroup$
    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$.
    $endgroup$
    – achille hui
    Nov 25 '18 at 8:36














1












1








1





$begingroup$


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?$










share|cite|improve this question











$endgroup$




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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 25 '18 at 5:14









Tianlalu

3,08121038




3,08121038










asked Nov 25 '18 at 5:13









DunkaDunka

1,43732044




1,43732044












  • $begingroup$
    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
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:17










  • $begingroup$
    @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.
    $endgroup$
    – Dunka
    Nov 25 '18 at 5:28










  • $begingroup$
    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...
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:30












  • $begingroup$
    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$?
    $endgroup$
    – eSurfsnake
    Nov 25 '18 at 6:42












  • $begingroup$
    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$.
    $endgroup$
    – achille hui
    Nov 25 '18 at 8:36


















  • $begingroup$
    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
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:17










  • $begingroup$
    @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.
    $endgroup$
    – Dunka
    Nov 25 '18 at 5:28










  • $begingroup$
    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...
    $endgroup$
    – mathworker21
    Nov 25 '18 at 5:30












  • $begingroup$
    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$?
    $endgroup$
    – eSurfsnake
    Nov 25 '18 at 6:42












  • $begingroup$
    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$.
    $endgroup$
    – achille hui
    Nov 25 '18 at 8:36
















$begingroup$
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
$endgroup$
– mathworker21
Nov 25 '18 at 5:17




$begingroup$
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
$endgroup$
– mathworker21
Nov 25 '18 at 5:17












$begingroup$
@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.
$endgroup$
– Dunka
Nov 25 '18 at 5:28




$begingroup$
@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.
$endgroup$
– Dunka
Nov 25 '18 at 5:28












$begingroup$
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...
$endgroup$
– mathworker21
Nov 25 '18 at 5:30






$begingroup$
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...
$endgroup$
– mathworker21
Nov 25 '18 at 5:30














$begingroup$
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$?
$endgroup$
– eSurfsnake
Nov 25 '18 at 6:42






$begingroup$
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$?
$endgroup$
– eSurfsnake
Nov 25 '18 at 6:42














$begingroup$
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$.
$endgroup$
– achille hui
Nov 25 '18 at 8:36




$begingroup$
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$.
$endgroup$
– achille hui
Nov 25 '18 at 8:36










0






active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents