Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

1. Sort the following functions by increasing order of complexity; if applicable, you need to prove stronger results that involve "small-o" or "small-ω" notations. Also, show your work with detailed explanation, just writing the order will not provide you any credit.

n!, 2n, nlgn, n Ig n, n√n

2. Prove the followings:               

a) k=2Σn-1 k lg k ≤ ½ n2lgn - n2/4

b) k=0Σn(nk)2 = (2nn)

3. Prove that in the array Pin procedure PERMUTE-BY-SORTING, the probability that all elements are unique is at least 1 - 1/n. (hint: we are not looking for the exact probability, rather we are looking for a lower bound, so you can simplify your probability expression by choosing a suitable lower bound, the inequality (1 - x)n ≥ 1- nx can be useful)

4. Consider the following randomized algorithm for searching for a value x in an unsorted array A consisting of n elements; pick a random index i into A; if A[i] = x, then we terminate; otherwise, we continue the search by picking a new random index into A. This process continues until we find an index j such that A[j] = x or until we have checked every element of A. Note that, we pick from the whole set of indices each time, so that we may examine a given element more than one. Now, answer the following questions:

a) Write pseudocode for a procedure RANDOM-SEARCH to implement the strategy above.

b) Suppose that there is exactly one index i such that A[i] = x. What is the expected number of indices into A that we must pick before we find x and RANDOM-SEARCH terminates?

c) Generalize your solution for the above part, for the cases when there are k ≥ 1 indices i such that A[i] = x.

d) Now, find the expected number of indices into A that we pick for the case when there are no indices such that A[i]= x.               

5. For the following recurrences, find a good asymptotic upper bound using recursion tree method

a) T(n) = 4T(n/2) + n

b) T(n) = 2T(n/2) + n lg n

6. For the following recurrences, find a good asymptotic upper bound using Master method (if applies) and substitution method

a) T(n) = 4T(n/2) + n2√n

b) T(n) = 4T(n/3) + n lg n

c) T(n) = 2T(n/2) + n lg n

d) T(n) = 2T(n/4) +√n

7: Proof the correctness of BubbleSort. For an array of size ri, what is the expected number of exchanges the BubbleSort algorithm performs considering a uniform random permutation.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91593245
  • Price:- $140

Guranteed 48 Hours Delivery, In Price:- $140

Have any Question?


Related Questions in Computer Engineering

Question 1 explain the various types of green architecture

Question: 1. Explain the various types of Green architecture within the enterprise, such as information architecture and solutions architecture. 2. Explain how a Green systems architecture evolves from a basic to a linea ...

Question hypothetically speaking you are assigned to a

Question: Hypothetically speaking, you are assigned to a committee of three to decide on a dress code for Campbellsville University Staff and Faculty. Only two of the three votes are required to pass this policy. In this ...

Doolittle co is expected to pay a dividend of 23 next year

Doolittle Co. is expected to pay a dividend of $2.3 next year. Doolittle is expected to pay 20% of its earnings as dividends and will have an ROE of 9% until the fourth year. After that, its ROE is expected to decrease t ...

Suppose that alices rsa parameters are ma91 ea7 and da31

Suppose that Alice's RSA parameters are m_A=91, e_A=7, and d_A=31. And suppose that Bob's RSA modulus is m_B=187. a)If Bob's public exponent is e_B=13 and Alice wants to encrypt the message signature pair (x, delta)=(70, ...

What is the binary representation of the decimal number

What is the binary representation of the decimal number 4.875 assuming the IEE 754 single precision format? Can I get a detailed explanation as well. Thank you

Question suppose you were looking at network traffic and

Question : Suppose you were looking at network traffic and saw one computer transmit: Who has 192.168.1.1 And saw the reply 192.168.1.1 is at 00:cc:11:8b:73:22. What process would you be looking at? Why is this process n ...

A video movie store owner finds that 30 of the customers

A video movie store owner finds that 30% of the customers entering the store ask an assistant for help and that 20% of the customers make a purchase before leaving. It is also found that 15% of all customers both ask for ...

A static reference has the following two components in the

A static reference has the following two components in the JVM: The type of the reference; The fully qualified name of the reference, including its host class. From a security perspective for the JVM, investigate why sta ...

Suppose users share a 2 mbps link also suppose each user

Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. When a circuit switching is used, how many users can be s ...

The of the steering wheel is used to create a parallel

The _____ of the steering wheel is used to create a parallel plane in the Synchronous Part environment. The _____ option is used to apply the crown by defining its radius and take-off angle. 1-In the Ordered Part environ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As