How would you prove that constant is a subset of logarithmic?

  • Context: Undergrad 
  • Thread starter Thread starter aaa59
  • Start date Start date
  • Tags Tags
    Constant Logarithmic
Click For Summary

Discussion Overview

The discussion revolves around proving that the set of constant functions is a subset of logarithmic functions within the context of Big-Oh notation. Participants explore various definitions and relationships between different complexity classes, including constant, logarithmic, linear, polynomial, exponential, and factorial functions.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants define O(1) as constant and O(log2(n)) as logarithmic, seeking to establish a proof that O(1) is a subset of O(log2(n)).
  • One participant suggests that O(1) can be equated to O(log2(1)), which equals O(0), implying a relationship between constant and logarithmic functions.
  • Another participant outlines several Big-Oh sets and proposes proving that constant is a subset of logarithmic, logarithmic is a subset of linear, n log n is a subset of polynomial, and exponential is a subset of factorial.
  • A later reply provides a reasoning approach, stating that for a function f in O(1), it can be shown that f is also in O(log_n(n)) based on the definition of Big-Oh and properties of logarithmic functions.
  • Participants are encouraged to clarify specific problems if they encounter difficulties with the proof steps.

Areas of Agreement / Disagreement

There is no consensus on the proof itself, as participants present differing views on the relationships between the complexity classes and the validity of the proposed subset claims.

Contextual Notes

Limitations include potential misunderstandings of the definitions of Big-Oh notation and the assumptions regarding the behavior of logarithmic functions compared to constant functions.

aaa59
Messages
8
Reaction score
0
O(1) is constant
O(log n to the base 2) is logarithmic
O(n) linear

how would you prove that constant is a subset of logartihmic?
 
Physics news on Phys.org
O(1) = O(log_2 1) = O(0)
 
I should have been clearer.

given "Big-Oh" sets
O(1): constant
O(log2(n)): logarithmic
O(n): linear
O(nlog2(n)): n log n
O(n^2): quadratic
O(n^3): cubic
O(n^m), m>1: polynomial of order m
O(c^n), c>1: exponential
O(n!): factorial

Prove
Constant is a subset of logarithmic
logarithmic is a subset of linear
n log n is a subset of polynomial
exponential is a subset of factorial

Thank you
 
aaa59 said:
I should have been clearer.

given "Big-Oh" sets
O(1): constant
O(log2(n)): logarithmic
O(n): linear
O(nlog2(n)): n log n
O(n^2): quadratic
O(n^3): cubic
O(n^m), m>1: polynomial of order m
O(c^n), c>1: exponential
O(n!): factorial

Prove
Constant is a subset of logarithmic
logarithmic is a subset of linear
n log n is a subset of polynomial
exponential is a subset of factorial

Thank you
Most follow fairly easily from the definition of Big-Oh. For instance let f be an arbitrary function in O(1). We now wish to show that f is in [tex]O(\log_n(n))[/tex]. Because of the definition of O(1) there exist some [tex]x_0[/tex] and M such that [tex]f(x) \leq M[/tex] for all [tex]x > x_0[/tex]. Now let [tex]x_1 = \max(x_0,n)[/tex] then [tex]f(x) \leq M \leq M\log_n(x)[/tex] for all [tex]x > x_1[/tex] so [tex]f(x) = O(\log_n(n))[/tex]. Here we took advantage of the fact that the logarithm is increasing and [tex]\log_n(x) \geq 1[/tex] when [tex]x \geq n[/tex].

If you have problems with any specific steps you should post the specific problem you're having.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
16K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K