Reference no: EM13920349
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.
Determine variances in operations, quality improvement
: Benchmarking is the comparison of one's organization to another to determine variances in operations, quality improvement, and financial measurement. As a manager, how would we obtain such information from a competitor?
|
Shared responsibility for departmental success
: Furthermore, such working relationship should be constructed on a solid foundation of trust, common grounds, and with a shared responsibility for departmental success.
|
Cost of the merchandise sold
: Paid rent for May, $5,000. Purchased merchandise on account from Martin Co., terms 2/10, n/30, FOB shipping point, $36,000. Paid freight on purchase of May 3, $600. Sold merchandise on account to Karman Co., terms 2/10, n/30, FOB shipping point, $68,..
|
Analyse financial and strategic plans for small business
: Explain and suggest solutions to the kinds of problems encountered by small and medium entrepreneurial businesses and analyse and solve various business problems using case study approaches found in academic literature
|
Write pseudocode for a procedure random-search
: Write pseudocode for a procedure RANDOM-SEARCH to implement the strategy above. 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 termina..
|
Planning involves which of the following
: 1) Planning involves which of the following? 2) _______ is specifying the goals to be achieved and deciding in advance the appropriate actions needed to achieve those goals.
|
Global commerce and web development company
: This case study reviews ExtremeNet, which is a global -commerce and web development Company, and the questions surrounding employee versus company's rights.
|
Honor killings simply domestic violence
: After reading the articles, Are honor killings simply domestic violence? and ‘Honour' crimes are domestic abuse, plain and simple, please respond to each of the following questions:
|
Calculate the labour total variance and labour rate variance
: Calculate the following variances. The labour total variance, The labour rate variance, The idle time variance and The labour efficiency variance
|