Question: ( 2 points ) Modified Exercise 2 . 1 . 8 For each of the following functions, indicate how much the function's value will change

(2 points) Modified Exercise 2.1.8 For each of the following functions, indicate how much the function's value will change if its argument is increased fourfold.
a.log2n
d.n2
e.n3
f.2n
(2 points) Modified Exercise 2.1.9 Indicate whether the first function of each of the following pairs has a smaller, same, or larger order of growth (to within a constant multiple) than the second function.
a.n(n+1) and 2000n2
b.100n2 and 0.01n3
d.(log2n)2 and log2n2
f.(n-1)! and n!
(2 points) Modified Exercise 2.2.2 Use the informal definitions of O,, to determine whether the following assertions are true or false
a.n(n+1)2inO(n3)
b.n(n+1)2inO(n2)
c.n(n+1)2in(n3)
d.n(n+1)2in(n)
(2 points) Exercise 2.2.3(a-d). For each of the following functions, indicate the class (g(n)) the function belongs to.(Use the simplest g(n) possible in your answer. Prove your assertion. (informal proofs are ok)
a.(n2+1)10
b.10n2+7n+32
c.2nlog(n+2)2+(n+2)2log(n2)
d.2n+1+3n-1
(2 points) Exercise 2.2.6
a. Prove that every polynomial of degree k,p(n)=aknk+ak-1nk-1+cdots+a0, belongs to (nk)
b. Prove that exponential functions an have different orders of growth for different values of a>0.
(6 points) Modified 1.4.10 Anagram checking
a. Design an algorithm for checking whether two given words are anagrams, i.e., whether one word can be obtained by permuting the letters of the other. (For example, the words tea and eat are
anagrams.) Write the pseudocode for the algorithm.
b. What is the time efficiency of the algorithm (worst case and average case if different)? Justify your answer. Clearly indicate the input size parameter and the algorithms basic operation.
c. Implement your algorithm in C++ using the function prototype below. (Submit separately as a text file).
bool isAnagram(string, string);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!