Question

In: Computer Science

Algorithm problem 6 [Problem3-3] a Rank the following functions by order of growth; that is,find an...

Algorithm problem

6 [Problem3-3]
a Rank the following functions by order of growth; that is,find an arrangement g1,g2,...,g30 of the functions satisfying g1 ∈ Ω(g2),g2 ∈ Ω(g3),...,g29 ∈ Ω(g30). Partition your list into equivalence classes such that ƒ(n) and g(n) are in the same class if and only if ƒ(n)∈Θ(g(n)).

- lg(lg∗ n)    - 2^(lg∗ n)    -( sqrt(2))^(lg n)    - n^2 - n!    - (lg n)! - (3/2)^n    - n^3    - lg^(2)*n    -    lg(n!)    - 2^2^n - n^(1/ lg n) - ln ln n    - lg∗ n - n*2^n - n ^(lg lg n) - ln n - 1 - 2^(lg n)    - (lg n)^(lg n)    - e^n - n    - 4^(lg n)    - (n+ 1)!    - (sqrt(lg n))    - lg ∗(lg n)    - 2(sqrt(2 lg n)) - n    - 2n    - n lg n    - 2^((2)^(n+1))

b. Give an example of a single nonnegative function ƒ(n) such that for all functions g(n) in part (a), ƒ(n) is neither in O(g(sub(i))(n)) nor in Ω(g(n)).

Solutions

Expert Solution

Answer a

There are few things which needs to be remembered.

1. Exponential growth is much faster than polynomial functions. For example - 2n will grow faster than n2

2. Base of log does not matter as such. But base of exponential and degree of polynomial matters.

So based on that,

Please note that

  • (lg n)lg n => nlg lg n as we know alogbc = clogba
  • lg*(lg n) = (lg*n)-1
  • 4log n = nlog 4 = n2

Answer b

(lg ng (lg n)!n 2gn (2gn 2gn n lg (lg n) > 1 22 22n(n1)!> n!> e" > n.2" > 2" > )" > ng lg n (lg n)!> n n 49 n>n lg n n In n> Vig n 1/lg n 77 = 3 > 77 lg' (lg n) lg In ln n > >

f(n) = (1 + sin n).22


Related Solutions

42. Describe the order of growth of each of the following functions using O notation. a....
42. Describe the order of growth of each of the following functions using O notation. a. N2+3N b. 3N2+N c. N5+100N3+245 d. 3NlogN+N2 2 e. 1+N+N2 +N3 +N4 f. (N * (N − 1)) / 2 Describe the order of growth of each of the following code sections, using O notation: count = 0; for (i = 1; i <= N; i++) count++; count=0; for (i = 1; i <= N; i++) for (j = 1; j <= N; j++)...
Rank the following structures in order of decreasing electrophile strength.
Rank the following structures in order of decreasing electrophile strength.
   rank (slowest to fastest)    the following compounds in order of reactivity with respect to...
   rank (slowest to fastest)    the following compounds in order of reactivity with respect to an SN2 reaction.    Explain your reasoning for the ranking you propose. The compounds are    1-bromo-3-methylbutane, 1-bromo-2,2-dimethylpropane and 2-bromo-2-methylbutane. Please provide clear explanations for your choices, thank you.
Rank the following in order of increasing polarity: CH3CI, CH3F, and CH3Br
Rank the following in order of increasing polarity: CH3CI, CH3F, and CH3Br (Please input answers with the following format: CH3CI) Least polar Most polar
Rank the following molecules or ions in order of decreasing bond length using their bond order...
Rank the following molecules or ions in order of decreasing bond length using their bond order to predict relative lengths. - oxygen difluoride (bond order = 1) - O2 (bond order = 2) - carbon monoxide (bond order = 3)
1) Understand the problem 2) Develop and Describe an Algorithm 3) Test Algorithm with Simple Inputs...
1) Understand the problem 2) Develop and Describe an Algorithm 3) Test Algorithm with Simple Inputs 4) Translate the Algorithm into Java 5) Compile and Test Your Program 1) Understand the problem A client (a person who wants a program developed) who owns a painting company has requested that you create a prototype program that calculates the cans of paint required to paint a wall based on surface area in square feet. Normally a staff member at the store interacts...
Rank the following atoms or ions in order of increasing radius: As^3-, Se^2-, Ge^4+, Rb^+, Br^-...
Rank the following atoms or ions in order of increasing radius: As^3-, Se^2-, Ge^4+, Rb^+, Br^- Ca, Ba, Sr, Be, Mg Al, Cl, P, Si, S Sb, As, F, S, Tl Name an element who have similar physical/and or chemical properties to the following elements: Al Ca O
I have to write an initial algorithm and a refined algorithm for the following problem: Display...
I have to write an initial algorithm and a refined algorithm for the following problem: Display the square of numbers from 0 to some user inputted value. For example if the user enters 3 then the program will need to display the square of 0, 1, 2 and 3. Must use a counter loop. Must use 2 methods. One method that gets the number from the user and returns it. A second method is passed that number as a parameter...
6)Consider the following voting problem: there are 3 alternatives A, B, and C. There are 3...
6)Consider the following voting problem: there are 3 alternatives A, B, and C. There are 3 voters whose preferences are as follows: Voter 1: A > B > C Voter 2: B > C > A Voter 3: C > A > B The voting procedure is as follows: first A competes with B and then the winner competes with C. If voters are strategic what is the voting outcome? Who will each voter vote for in the first stage?
Rank the following in order of importance and why . Income Statement, the Balance Sheet, and...
Rank the following in order of importance and why . Income Statement, the Balance Sheet, and the Statement of Cash Flows
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT