Subset Relationships: Constant, Logarithmic, and Polynomial in Big-O Notation

  • Thread starter Thread starter Cyborg31
  • Start date Start date
  • Tags Tags
    Notation
Click For Summary
SUMMARY

The forum discussion focuses on proving subset relationships in Big-O notation, specifically: Constant (O(1)) is a subset of Logarithmic (O(log n)), Logarithmic (O(log n)) is a subset of Linear (O(n)), and n log n (O(n log n)) is a subset of Polynomial (O(n^m), m > 1). The proofs involve finding constants C and k that satisfy the inequalities for each relationship. Key methods include limits as n approaches infinity and graphical analysis to demonstrate the relationships definitively.

PREREQUISITES
  • Understanding of Big-O notation and its significance in algorithm analysis.
  • Familiarity with limits and their application in mathematical proofs.
  • Basic knowledge of functions and their growth rates, particularly logarithmic and polynomial functions.
  • Experience with mathematical induction as a proof technique.
NEXT STEPS
  • Study the properties of logarithmic functions and their growth relative to linear functions.
  • Learn about mathematical induction and its application in proving inequalities.
  • Explore the concept of limits in calculus, particularly in the context of asymptotic analysis.
  • Investigate the implications of polynomial time complexity in algorithm design and analysis.
USEFUL FOR

Students studying algorithms, computer science educators, and anyone interested in understanding the foundational concepts of algorithm complexity and Big-O notation.

Cyborg31
Messages
36
Reaction score
0

Homework Statement



1. Prove the following subset relationships:
a. [tex]Constant \subseteq Logarithmic[/tex]
b. [tex]Logarithmic \subseteq Linear[/tex]
c. [tex]n log n \subseteq Polynomial[/tex]

Homework Equations



O(1) Constant
O(log n) Logarithmic
O(n) Linear
O(n log n) n log n
O(n^m), m > 1 Polynomial of order m

The Attempt at a Solution


a. There exists an c, k element of Z where f(n) =< C * 1, f(n) =< C log n for all n => k.

So to show that Constant is a subset of Log, I need to show 1 =< C log n, And I find a C and k that satisfies that condition right? C = 1 k = 2

b. C = 1 k = 1 then log n =< Cn = log 1 =< 1 * 1

c. C = 1 k = 1 then n log n =< n^2 = 1 log 1 =< 1^2
 
Last edited:
Physics news on Phys.org
I'm not sure I can help but here goes.. for a, you want to show that after a while,
f(x) = c <= log n.

Well easiest way is imo to do lim n->\infty C/Log N = 0. Not sure if that is a proof, so you might consider:

Log n = C -> 10^c = n -> for n >= 10^c, log n > c. // as log is an increasing function

for b, you can look at lim n->\infty Log N / N = 0. (or opposite = infitity) but proof wise consider you want to prove log n <= n for all n > some number.

If you look at the graph, this is true for all of them, maybe use induction?
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
2K
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K