Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

22/07/2020 Fundamental Algorithms: Design and Analysis - - Unit 2 - Week 1

reviewer2@nptel.iitm.ac.in ▼

Courses » Fundamental Algorithms: Design and Analysis

Announcements Course Ask a Question Progress

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

Lecture 05: Θ(n)


Heap Sort
Θ(n2)
Assignment 1 - Θ(nlgn)
Solutions
Θ(n2lgn)
Quiz :
Assignment 1 No, the answer is incorrect.
Score: 0
Week 2
Accepted Answers:
Θ(n)
Week 3
3) The solution of the recurrence T(n) = √(n)T(√n) + 100n by given-notation bound 1 point
Week 4
Θ(nlgn)
Θ(nlg(lgn))
Θ(n)
Θ(n2lgn)

No, the answer is incorrect.


Score: 0
Accepted Answers:
Θ(nlg(lgn))

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)

No, the answer is incorrect.


Score: 0
Accepted Answers:
Θ(nlgn)

5) The recurrence that describes the worst-case running time of Insertion sort algorithm is 1 point

T(n) = 2T(n/2) + Θ(nlgn)


T(n) = 2T(n/2) + Θ(n)
T(n) = T(n-1) + Θ(n)
T(n) = 2T(n-1) + Θ(n)

No, the answer is incorrect.


Score: 0
Accepted Answers:
T(n) = T(n-1) + Θ(n)

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)

No, the answer is incorrect.


Score: 0
Accepted Answers:
O(nlgn)

7) The worst case time complexity of heap sort is: 1 point

O(lgn)
O(n)
O(nlgn)
O(n2)

No, the answer is incorrect.


Score: 0
Accepted Answers:
O(nlgn)

8) Sort the functions in increasing order of asymptotic(big-O) complexity: 1 point


F1(n) = n√n
F2(n) = 2n
F3(n) = 2n/2 • n10

1,2,3
3,2,1
1,3,2
3,1,2

No, the answer is incorrect.


Score: 0
Accepted Answers:
1,3,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

No, the answer is incorrect.


Score: 0
Accepted Answers:
(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

No, the answer is incorrect.


Score: 0
Accepted Answers:
0

Previous Page End

© 2014 NPTEL - Privacy & Terms - Honor Code - FAQs -


A project of In association with

Funded by

Powered by

https://onlinecourses-archive.nptel.ac.in/noc16_cs24/unit?unit=6&assessment=20 3/3

You might also like