How can I find the n,that satisfies this condition?

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Condition
In summary, the conversation discusses an exercise involving an algorithm with a cost of $f(n) \ \mu sec (10^{-6} sec)$ and finding the value of $n$ for a specified cost. The equation $n \log{n}=10^6$ is discussed and an approximation of $x \sim 87847.5$ is suggested. The conversation also mentions using binary search for finding an approximation and the use of big-O notation in computer science. The conversation ends with a thank you.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I am looking at the following exercise:

Suppose that we have an algorithm,which cost is $f(n) \ \mu sec (10^{-6} sec)$.

If $f(n)=n \log{n}$,to what should $n$ be equal,so that the cost is $10^6 \ \mu sec$?

So,it must be:

$$n \log{n}=10^6 \Rightarrow n^n=10^{10^6}$$

But how can I find the $n$,that satisfies this condition? (Thinking)

Also,how can I find the $n$,such that $f(n)=n!=10^6 \mu sec$? (Thinking)
 
Last edited:
Technology news on Phys.org
  • #2
evinda said:
Hello! (Wave)

I am looking at the following exercise:

Suppose that we have an algorithm,which cost is $f(n) \ \mu sec (10^{-6} sec)$.

If $f(n)=n \log{n}$,to what should $n$ be equal,so that the cost is $10^6 \ \mu sec$?

So,it must be:

$$n \log{n}=10^6 \Rightarrow n^n=10^{10^6}$$

But how can I find the $n$,that satisfies this condition? (Thinking)

Also,how can I find the $n$,such that $f(n)=n!=10^6 \mu sec$? (Thinking)

The equation $\displaystyle x\ \ln x = 10^{6}$ has solution $x \sim 87847.5$...

Kind regards

$\chi$ $\sigma$
 
  • #3
chisigma said:
The equation $\displaystyle x\ \ln x = 10^{6}$ has solution $x \sim 87847.5$...

Kind regards

$\chi$ $\sigma$

So,can we just find an approximation? (Thinking)
 
  • #4
According to WolframAlpha, the equation $x\log(x)=a$ does not have a solution in elementary functions when $a\ne0$. So yes, you should find an approximation, for example, using binary search (establishing an interval that contains a solution and dividing it in half repeatedly). It seems that this problem comes from computer science, where complexity of algorithms is measured not even up to the order of magnitude, but up to a multiplicative constant (big-O notation). So it may be sufficient to say that if the logarithm is to the base 2, then $n\log n<10^6$ for $n=10^4$, but $n\log n>10^6$ for $n=10^5$.
 
  • #5
Evgeny.Makarov said:
According to WolframAlpha, the equation $x\log(x)=a$ does not have a solution in elementary functions when $a\ne0$. So yes, you should find an approximation, for example, using binary search (establishing an interval that contains a solution and dividing it in half repeatedly). It seems that this problem comes from computer science, where complexity of algorithms is measured not even up to the order of magnitude, but up to a multiplicative constant (big-O notation). So it may be sufficient to say that if the logarithm is to the base 2, then $n\log n<10^6$ for $n=10^4$, but $n\log n>10^6$ for $n=10^5$.

Nice,I understand..thank you very much! (Smile)
 

FAQ: How can I find the n,that satisfies this condition?

What is the meaning of "n" in this context?

In this context, "n" represents a variable or unknown number that needs to be determined in order to satisfy a given condition.

How do I know if I have found the correct value for "n"?

The correct value for "n" will satisfy the given condition and will not result in any contradictions or inconsistencies. It may also be helpful to check your solution by substituting the value of "n" into the original equation or problem.

Can I use any method to find the value of "n"?

There are various methods that can be used to find the value of "n", such as algebraic manipulation, trial and error, or using mathematical formulas. The most appropriate method will depend on the specific problem and your mathematical abilities.

Is there only one possible value for "n" that satisfies the condition?

Not necessarily. In some cases, there may be multiple values of "n" that satisfy the condition. It is important to thoroughly check your work and consider all possible solutions.

What happens if I cannot find a value for "n" that satisfies the condition?

If you are unable to find a value for "n" that satisfies the condition, it is possible that the given condition is not solvable or that there is a mistake in your calculations. Double check your work and consider seeking help from a teacher or tutor.

Similar threads

Replies
17
Views
1K
Replies
24
Views
4K
Replies
1
Views
1K
Replies
19
Views
2K
Replies
4
Views
1K
Replies
3
Views
3K
Replies
36
Views
6K
Replies
1
Views
1K
Back
Top