C - What are the Asymptotic Notations?
D - What are the algorithm characteristics?
C)Asymptotic notations specifies upper/lower bound to the
complexity/runtime of an algorithm, by using them we can get an
idea how an algorithm performs on a given input size n,
we can use these notations to analyze and compare different
algorithms
D)Every algorithm must have these characteristics:
Finiteness:algorithm must finish in finite number of steps
Definiteness:every step must be un ambiguous in algorithm
Effectiveness:only essential steps are included
input&output: it must have 0 or more inputs and at least one
output
C - What are the Asymptotic Notations? D - What are the algorithm characteristics?
II. ALGORITHM COMPLEXITY AND ASYMPTOTIC ANALYSIS The below visual representations of iterative looping structures are provided for Question 3 through Question 20. Algorithm 1 Algorithm 2 log.n 256 Algorithm 3 Algorithm 4 n (10) Match one of our algorithms to the below code snippet. for (int i = 0; i <n; i++) { for(int j = 0; j<n; j++) { for (int k = 0; k<n; k++) { nop++; nop++; nop++; } } } for (int i = 0; i...
What are the characteristics of k-NN algorithm? (2 correct answers) A. It requires statistical models B. Data-driven, not model-driven C. Applicable under certain assumptions D. Makes no assumptions about the data
What is the worst-case asymptotic time complexity of the following divide-andconquer algorithm (give a Θ-bound). The input is an array A of size n. You may assume that n is a power of 2. (NOTE: It doesn’t matter what the algorithm does, just analyze its complexity). Assume that the non-recursive function call, bar(A1,A2,A3,n) has cost 3n. Show your work! Next to each statement show its cost when the algorithm is executed on an imput of size n abd give the...
What is the worst-case asymptotic time complexity of the following divide-andconquer algorithm (give a Θ-bound). The input is an array A of size n. You may assume that n is a power of 2. (NOTE: It doesn’t matter what the algorithm does, just analyze its complexity). Assume that the non-recursive function call, bar(A1,A2,A3,n) has cost 3n. Show your work! Next to each statement show its cost when the algorithm is executed on an imput of size n abd give the...
Let
R= [a,b] x [c,d]. Explain the difference between these two
notations for a double integral.
0 AJ eU
What is the tightest asymptotic growth rate of each of
the following:
Q1) What is the tightest asymptotic growth rate of each of the following (each one 0.25pt.) a) nº log nº + 100 nở b) 524 c) 2n3+ 2n4 + 2n + n10 d) n log(2n) e) 30 n + 100 n log n + 10
Computer Algorithm question
8) Give an algorithm for building a heap in O(n)
9) Prove the algorithm given in 8) runs in O(n) time.
10) What is the asymptotic runtime of an algorithm represented
by the following recurrence equation?
11) Suppose you have the following priority queue implemented as a (max) heap. What will the heap look like when the max node is removed and the heap is readjusted? Assume on each heapify operation the largest child node is selected...
I. In the diagram showing the unit cell, notations for writing a direction vector. vectors for , what are the vectors for points A, B, and C. Note: use the correct
I. In the diagram showing the unit cell, notations for writing a direction vector. vectors for , what are the vectors for points A, B, and C. Note: use the correct
Exercise 7.3.5: Worst-case time complexity - mystery algorithm. The algorithm below makes some changes to an input sequence of numbers. MysteryAlgorithm Input: a1, a2....,an n, the length of the sequence. p, a number Output: ?? i != 1 j:=n While (i < j) While (i <j and a < p) i:= i + 1 End-while While (i <j and a 2 p) j:=j-1 End-while If (i < j), swap a, and a End-while Return( aj, a2,...,an) (a) Describe in English...
3. Determine the asymptotic complexity of the function defined by the recurrence relation. Justify your solution using expansion/substitution and upper and/or lower bounds, when necessary. You may not use the Master Theorem as justification of your answer. Simplify and express your answer as O(n*) or O(nk log2 n) whenever possible. If the algorithm is exponential just give exponential lower bounds c) T(n) T(n-4) cn, T(0) c' d) T(n) 3T(n/3) c, T() c' e) T(n) T(n-1)T(n-4)clog2n, T(0) c'
3. Determine the...