Exploring Large Numbers: Comparing f(n) and g(n) as n Increases

In summary, as n gets large, the function f(n) = 2^{2^{2^n}} will be greater than the function g(n) = 100^{100^n}. This can be shown by taking the logarithm of both functions and observing that the growth rate of 2^n is much larger than n for large n. It can also be seen by counting the number of digits, where taking the logarithm twice is equivalent to finding the logarithm of the number of digits.
  • #1
converting1
65
0
which is greater as n gets large, [itex] f(n) = 2^{2^{2^n}} [/itex] or [itex] g(n) = 100^{100^n} [/itex]

instinctively I'd go with f(n) but I have no idea of actually showing that f(n) would indeed get larger, obviously sticking in values of n doesn't particularly work. A method I was thinking was to show many digits would f(n) be when n=100, and same with g(n), I attempted this but to no avail,

any hints would be appreciated

thanks.
 
Physics news on Phys.org
  • #2
converting1 said:
which is greater as n gets large, [itex] f(n) = 2^{2^{2^n}} [/itex] or [itex] g(n) = 100^{100^n} [/itex]

instinctively I'd go with f(n) but I have no idea of actually showing that f(n) would indeed get larger, obviously sticking in values of n doesn't particularly work. A method I was thinking was to show many digits would f(n) be when n=100, and same with g(n), I attempted this but to no avail,

any hints would be appreciated

thanks.

Take the log of both functions. What do you think now? If you're not sure take the log again.
 
Last edited:
  • #3
Dick said:
Take the log of both functions. What do you think now? If you're not sure take the log again.

[tex]ln(2^{2^{2^n}}) = 2^{2^n}ln(2) [/tex]
[tex]ln(2^{2^n}ln(2)) = ln(2^{2^n}) + ln(ln(2)) = 2^nln(2) + ln(ln(2)) [/tex]

[tex]ln(100^{100^n}) = 100^nln100 [/tex]
[tex]ln(100^nln(100)) = ln(100^n) + ln(ln(100)) = nln(100) + ln(ln(100)) [/tex]

from this I'm sure that 2^n will indeed grow much larger as it's an exponential however I don't particularly know how to conclude.

Also, is there anyway I can do it by looking at the digits?
 
  • #4
converting1 said:
[tex]ln(2^{2^{2^n}}) = 2^{2^n}ln(2) [/tex]
[tex]ln(2^{2^n}ln(2)) = ln(2^{2^n}) + ln(ln(2)) = 2^nln(2) + ln(ln(2)) [/tex]

[tex]ln(100^{100^n}) = 100^nln100 [/tex]
[tex]ln(100^nln(100)) = ln(100^n) + ln(ln(100)) = nln(100) + ln(ln(100)) [/tex]

from this I'm sure that 2^n will indeed grow much larger as it's an exponential however I don't particularly know how to conclude.

Also, is there anyway I can do it by looking at the digits?

Sure. Now it's pretty obvious 2^n will be much larger than n for n large. If you want to be formal about it you could use l'Hopital's theorem on the ratio of the ln(ln)'s. But I don't think you have to. And this is really the same as counting digits. To find the number of digits you would look at log base 10 of each expression. When you take the second log you are basically looking at the log of the number of digits.
 
  • #5
Dick said:
Sure. Now it's pretty obvious 2^n will be much larger than n for n large. If you want to be formal about it you could use l'Hopital's theorem on the ratio of the ln(ln)'s. But I don't think you have to. And this is really the same as counting digits. To find the number of digits you would look at log base 10 of each expression. When you take the second log you are basically looking at the log of the number of digits.

Thanks for your help
 

1. What is the purpose of comparing f(n) and g(n) as n increases?

The purpose of this comparison is to understand how different functions behave as the input (n) increases in size. This can help us make predictions about the performance and efficiency of algorithms or systems that use these functions.

2. How do you determine the complexity of a function?

The complexity of a function can be determined by analyzing its behavior as the input (n) increases. This involves looking at the number of operations or steps required to complete the function, and how this changes as n increases. Generally, the higher the number of operations or steps, the more complex the function.

3. What are some common examples of f(n) and g(n) functions?

Some common examples of f(n) and g(n) functions include linear functions (f(n) = n and g(n) = 2n), quadratic functions (f(n) = n^2 and g(n) = 3n^2), and exponential functions (f(n) = 2^n and g(n) = 3^n). These functions represent different rates of growth as n increases.

4. How does the rate of growth of f(n) compare to g(n)?

The rate of growth of f(n) and g(n) can vary significantly depending on the specific functions being compared. In some cases, f(n) may have a higher rate of growth than g(n) (e.g. f(n) = n^2 and g(n) = n), while in others, g(n) may have a higher rate of growth (e.g. f(n) = n and g(n) = n^2). It is important to analyze the functions and their behavior as n increases to determine the rate of growth.

5. How can comparing f(n) and g(n) help in real-world applications?

Comparing f(n) and g(n) can be helpful in real-world applications such as designing algorithms or systems. By understanding how different functions behave as n increases, we can make informed decisions about which function to use in order to optimize performance and efficiency. It can also help in identifying potential bottlenecks and areas for improvement in existing systems.

Similar threads

  • Electrical Engineering
Replies
4
Views
781
  • Calculus and Beyond Homework Help
Replies
3
Views
537
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
Replies
2
Views
679
  • Special and General Relativity
Replies
23
Views
2K
  • Science Fiction and Fantasy Media
Replies
0
Views
949
  • Precalculus Mathematics Homework Help
Replies
15
Views
2K
  • Quantum Physics
Replies
9
Views
773
Back
Top