1.10.1 Comparison of Functions #1

1.10.1 Comparison of Functions #1

Comparison of Mathematical Functions

Introduction to Function Comparison

  • The discussion begins with the concept of comparing mathematical functions, specifically focusing on time and space functions.
  • An example is provided using n^2 and n^3 to illustrate how to determine which function is greater or smaller by sampling values.

Sampling Values for Comparison

  • By testing specific values (e.g., n = 2, 3, 4 ), it becomes evident that n^2 is consistently less than n^3 , establishing a clear upper and lower bound.
  • This method allows for quick verification without extensive calculations, demonstrating an effective way to compare two functions.

Applying Logarithmic Functions

  • A second method involves applying logarithms to both sides of the equations. For instance, taking logs of n^2 and n^3 .
  • Key logarithmic properties are introduced:
  • log(a cdot b) = log a + log b
  • logleft(a/bright) = log a - log b

Comparing Complex Functions

  • The objective shifts towards comparing more complex functions using logarithmic transformations.
  • Two specific functions are analyzed:
  • Function 1: f(n) = n^2log(n)
  • Function 2: g(n) = n^10

Detailed Logarithmic Analysis

  • The logarithm of each function is calculated:
  • For function one: results in terms involving multiple log components.
  • For function two: simplifies down similarly but reveals different growth rates.
  • Ultimately, it’s determined that the term from function one grows faster than that from function two due to its coefficients.

Final Comparisons and Conclusions

  • Further examples are explored where additional comparisons between roots and powers are made.
  • It concludes with an analysis showing asymptotic equivalence between certain forms despite differing coefficients.

This structured approach provides clarity on how mathematical functions can be compared through sampling values and applying logarithmic principles effectively.

Playlists: Algorithms
Video description

Comparing Complex Functions Two functions can be compared by 1.Substitution 2. Applying Log Courses on Udemy ================ Java Programming https://www.udemy.com/course/java-se-programming/?referralCode=C71BADEAA4E7332D62B6 Data Structures using C and C++ https://www.udemy.com/course/datastructurescncpp/?referralCode=BD2EF8E61A98AB5E011D C++ Programming https://www.udemy.com/course/cpp-deep-dive/?referralCode=E4246A516919D7E84225