Professional Documents
Culture Documents
Noc16-Cs24 Week 01 Assignment 01
Noc16-Cs24 Week 01 Assignment 01
reviewer2@nptel.iitm.ac.in ▼
Unit 2 - Week 1
Course
outline Assignment 1
The due date for submitting this assignment has passed. Due on 2016-09-18, 05:30 IST.
How to access As per our records you have not submitted this assignment.
the portal ?
Week 1
1) The solution of the recurrence: T(n) = 2T(n/3) + nlgn by given Θ - notation bound is 1 point
Lecture 01 :
Insertion Sort
Θ(nlgn)
and Asymptotic Θ(n2)
Analysis
Θ(n)
Lecture 02: Θ(n2lgn)
Solving
Recurrences No, the answer is incorrect.
Lecture 03: Score: 0
Divide and Accepted Answers:
Conquer
Θ(nlgn)
Paradigm
2) The solution of the recurrence: T(n) = T(n/2) + T(n/4) + T(n/8) + n by given Θ-notation bound 1 point
Lecture 04 :
Quick Sort is
4) The solution of the recurrence: T(n) = T(n-2) + lgn by given Θ-notation bound is 1 point
Θ(n)
Θ(n2)
Θ(nlgn)
https://onlinecourses-archive.nptel.ac.in/noc16_cs24/unit?unit=6&assessment=20 1/3
22/07/2020 Fundamental Algorithms: Design and Analysis - - Unit 2 - Week 1
Θ(2n)
5) The recurrence that describes the worst-case running time of Insertion sort algorithm is 1 point
6) Running merge sort on an array of size n which is already sorted is: 1 point
O(n)
O(nlgn)
O(n2)
O(1)
O(lgn)
O(n)
O(nlgn)
O(n2)
1,2,3
3,2,1
1,3,2
3,1,2
9) In an array A[1..n] of n distinct elements, if i < j and A[i] > A[j], then the pair (i,j) is called an 1 point
inversion of A.
How many inversions are there in the array A = {n,n-1,n-2,...,3,2,1}?
n(n+1)/2
n2
https://onlinecourses-archive.nptel.ac.in/noc16_cs24/unit?unit=6&assessment=20 2/3
22/07/2020 Fundamental Algorithms: Design and Analysis - - Unit 2 - Week 1
n
(n)(n-1)/2
10)In an array A[1..n] of n distinct elements, if i < j and A[i] > A[j], then the pair (i,j) is called an 1 point
inversion of A.
How many inversions are there in the array A = {1,2,3,4...,n}?
0
n(n+1)/2
n
(n-1)n/2
Funded by
Powered by
https://onlinecourses-archive.nptel.ac.in/noc16_cs24/unit?unit=6&assessment=20 3/3