A uses 100nlog(n) operations while B uses n^(1.5) operations. Determine the value n0 such that A is better...
$begingroup$
I've tried a few different approaches but I'm not getting anywhere with this.
100log(n) = n^(0.5) ==> log(n) = n/100 ==> n = 2^(n/100) Stuck at this dead end.
100log(n) = n^(0.5) ==> log(n^(100)) = n ==> n^(100) = 2^(n) Stuck again.
I also looked at this post: $4log_2(n)=n$ How to Solve for $n$?. However, none of the answers there helped me out much. The first answer suggests using, "the Lambert W-function, which can't be solved with elementary functions (but can be expressed as an infinite sum using the Lagrange inversion forumula)." But then it continues to say, "However just by trying random powers of 2 you can get an integer solution of n=16, probably the easiest way." Trying random powers of 2 won't work in this case unless I have a lot of time to spare and I've never heard of the Lambert W-function or Lagrange inversion formula. Has anybody had success with the Lambert W-function or Lagrange inversion formula in this case? Open to any other suggestions as well.
In the same post I tried playing around with the 3rd answer from the top but that didn't help me out either.
Any help with this would be greatly appreciated.
algorithms logarithms exponential-function computer-science
$endgroup$
add a comment |
$begingroup$
I've tried a few different approaches but I'm not getting anywhere with this.
100log(n) = n^(0.5) ==> log(n) = n/100 ==> n = 2^(n/100) Stuck at this dead end.
100log(n) = n^(0.5) ==> log(n^(100)) = n ==> n^(100) = 2^(n) Stuck again.
I also looked at this post: $4log_2(n)=n$ How to Solve for $n$?. However, none of the answers there helped me out much. The first answer suggests using, "the Lambert W-function, which can't be solved with elementary functions (but can be expressed as an infinite sum using the Lagrange inversion forumula)." But then it continues to say, "However just by trying random powers of 2 you can get an integer solution of n=16, probably the easiest way." Trying random powers of 2 won't work in this case unless I have a lot of time to spare and I've never heard of the Lambert W-function or Lagrange inversion formula. Has anybody had success with the Lambert W-function or Lagrange inversion formula in this case? Open to any other suggestions as well.
In the same post I tried playing around with the 3rd answer from the top but that didn't help me out either.
Any help with this would be greatly appreciated.
algorithms logarithms exponential-function computer-science
$endgroup$
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18
add a comment |
$begingroup$
I've tried a few different approaches but I'm not getting anywhere with this.
100log(n) = n^(0.5) ==> log(n) = n/100 ==> n = 2^(n/100) Stuck at this dead end.
100log(n) = n^(0.5) ==> log(n^(100)) = n ==> n^(100) = 2^(n) Stuck again.
I also looked at this post: $4log_2(n)=n$ How to Solve for $n$?. However, none of the answers there helped me out much. The first answer suggests using, "the Lambert W-function, which can't be solved with elementary functions (but can be expressed as an infinite sum using the Lagrange inversion forumula)." But then it continues to say, "However just by trying random powers of 2 you can get an integer solution of n=16, probably the easiest way." Trying random powers of 2 won't work in this case unless I have a lot of time to spare and I've never heard of the Lambert W-function or Lagrange inversion formula. Has anybody had success with the Lambert W-function or Lagrange inversion formula in this case? Open to any other suggestions as well.
In the same post I tried playing around with the 3rd answer from the top but that didn't help me out either.
Any help with this would be greatly appreciated.
algorithms logarithms exponential-function computer-science
$endgroup$
I've tried a few different approaches but I'm not getting anywhere with this.
100log(n) = n^(0.5) ==> log(n) = n/100 ==> n = 2^(n/100) Stuck at this dead end.
100log(n) = n^(0.5) ==> log(n^(100)) = n ==> n^(100) = 2^(n) Stuck again.
I also looked at this post: $4log_2(n)=n$ How to Solve for $n$?. However, none of the answers there helped me out much. The first answer suggests using, "the Lambert W-function, which can't be solved with elementary functions (but can be expressed as an infinite sum using the Lagrange inversion forumula)." But then it continues to say, "However just by trying random powers of 2 you can get an integer solution of n=16, probably the easiest way." Trying random powers of 2 won't work in this case unless I have a lot of time to spare and I've never heard of the Lambert W-function or Lagrange inversion formula. Has anybody had success with the Lambert W-function or Lagrange inversion formula in this case? Open to any other suggestions as well.
In the same post I tried playing around with the 3rd answer from the top but that didn't help me out either.
Any help with this would be greatly appreciated.
algorithms logarithms exponential-function computer-science
algorithms logarithms exponential-function computer-science
asked Jan 31 at 19:43


HR 8938 CepheiHR 8938 Cephei
114
114
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18
add a comment |
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (log(n))^2$$
Now guess a value for $n$, plug it in on the right, get a value on the left and iterate to convergence. I find $n approx 4,945,093$ I picked this version because the log varies so slowly. Starting with $100$ it was quite close in seven iterations.
$endgroup$
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
add a comment |
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
});
}
});
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%2f3095359%2fa-uses-100nlogn-operations-while-b-uses-n1-5-operations-determine-the-valu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (log(n))^2$$
Now guess a value for $n$, plug it in on the right, get a value on the left and iterate to convergence. I find $n approx 4,945,093$ I picked this version because the log varies so slowly. Starting with $100$ it was quite close in seven iterations.
$endgroup$
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
add a comment |
$begingroup$
I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (log(n))^2$$
Now guess a value for $n$, plug it in on the right, get a value on the left and iterate to convergence. I find $n approx 4,945,093$ I picked this version because the log varies so slowly. Starting with $100$ it was quite close in seven iterations.
$endgroup$
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
add a comment |
$begingroup$
I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (log(n))^2$$
Now guess a value for $n$, plug it in on the right, get a value on the left and iterate to convergence. I find $n approx 4,945,093$ I picked this version because the log varies so slowly. Starting with $100$ it was quite close in seven iterations.
$endgroup$
I would just solve it numerically. I like fixed point iteration, so would write your equation as $$n=10,000 (log(n))^2$$
Now guess a value for $n$, plug it in on the right, get a value on the left and iterate to convergence. I find $n approx 4,945,093$ I picked this version because the log varies so slowly. Starting with $100$ it was quite close in seven iterations.
answered Jan 31 at 20:24


Ross MillikanRoss Millikan
301k24200375
301k24200375
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
add a comment |
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Would you mind explaining what you did a little more or would you just suggest looking up how to do fixed point iteration?
$endgroup$
– HR 8938 Cephei
Jan 31 at 21:42
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Fixed point iteration is a numeric approximation technique. You write your formula as $x=f(x)$ as I did. There are often a number of choices for $f(x)$ and it takes some playing to get the right one. Then you guess a starting value $x_0$ and iterate $x_{i+11}=f(x_i)$ to convergence. When you are close to the solution the error will be multiplied by about $f'(x)$ at each step. If this is less than $1$ in absolute value and you start close enough you will converge properly. I find this easier to set up than other 1D root finders.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Having a log function as $f$ is nice because it changes so slowly.
$endgroup$
– Ross Millikan
Jan 31 at 22:00
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
$begingroup$
Alright that kinda made sense but I'm still pretty lost without learning fixed point iteration in detail. Do you know another way that may be easier for someone who has taken up to calc 3, and one class of discrete math and linear algebra?
$endgroup$
– HR 8938 Cephei
Jan 31 at 22:29
add a comment |
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.
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%2f3095359%2fa-uses-100nlogn-operations-while-b-uses-n1-5-operations-determine-the-valu%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
$begingroup$
In your first line it should be $log n=frac {sqrt n}{100}$ but that is no easier to solve
$endgroup$
– Ross Millikan
Jan 31 at 20:18