lundi 5 janvier 2015

Big O of 2 interesting Algorithmic functions


This is my homework(I have attempted it, and there are no references for questions like these)


Determine whether or not these functions are polynomial run time and determine the constant c for O(n^c) based on these functions:



3^(log base2 (n))

(log base2 (n))!


My intuition tells me yes for both.


Case 1: The exponential will always dominate, regardless of what number is put as n. since its log base 2, it will grow "exponentially" as n is increased.. however I do not know how to prove it


Case 2: Using n! as a reference, since n! is equivalent 2^n, then (log base2 (n))! must be equivalent to 2^(log base 2 (n))





Aucun commentaire:

Enregistrer un commentaire