NPTEL Design and Analysis of Algorithm
NPTEL Design and Analysis of Algorithm
reviewer3@nptel.iitm.ac.in ▼
Unit 5 - Week
1 Quiz
Course
outline
Week 1 Quiz
The due date for submitting this assignment has passed.
How to access As per our records you have not submitted this Due on 2018-09-12, 23:59 IST.
the portal assignment.
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
Week 1: 1) In the code fragment below, start and end are integer values and gcd(x,y) is a 2 points
Analysis of function that computes the greatest common divisor of x and y.
algorithms
Week 1 Quiz i := 0; j := 0; k := 0;
for (m := start; m <= end; m := m+1){
Quiz : Week 1 if (gcd(m,9381) > 2){
Quiz
i := i + m;
Week 2: k := k + m;
Searching and }else{
sorting j := j + m;
k := k + m;
Week 2 Quiz }
}
Week 2
Programming At the end of the loop which of the following expresses a valid relation between i, j and k?
Assignment
k == i - j
Week 3: Graphs
k == j - i
Week 3 Quiz
k == i + j
Funded by
Week 5 Quiz
Week 6: Data
Structures: No, the answer is incorrect.
Search Trees Score: 0
Feedback:
Week 6: Greedy Repeatedly subtracting n is the same as dividing by n, so the number of iterations is equal to the quotient of
Algorithms
m/n (i.e. the integer part of m/n).
5) A new algorithm MaxPack for optimally packing furniture in a transportation container 2 points
claims to have worst case complexity O(n2 log n), where n is the number of items to be packed.
From this, we can conclude that:
For every sufficiently large n, for every input of size n, MaxPack requires time proportional to
n2 log n.
For some n, for every input of size n, MaxPack requires time proportional to n2 log n.
For every sufficiently large n, every input of size n can be solved by MaxPack within time
proportional to n2 log n.
For every sufficiently large n, there is an input of size n for which MaxPack requires time
proportional to n2 log n.
End
reviewer1@nptel.iitm.ac.in ▼
Unit 6 - Week 2
Quiz
Course
outline Week 2 Quiz
The due date for submitting this assignment has passed. Due on 2018-02-21, 23:59 IST.
How to access
the portal Submitted assignment
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
1) An array A contains N integers arranged in a random sequence. We want to check if any 2 points
Week 1: Analysis
of algorithms value is duplicated in the sequence. Which of the following would be the most efficient algorithm,
asymptotically.
Week 1 Quiz
For each pair of positions i and j, check if A[i] is equal to A[j].
Week 2: Sort the array using insertion sort. When inserting each element into the sorted prefix, check if
Searching and there is already a value equal to it in the prefix.
sorting Sort the array using merge sort. Scan the sorted array from beginning to end looking for
adjacent equal elements.
Week 2 Quiz
Sort the array using quick sort. Use binary search on the sorted array to find duplicated values.
Quiz : Week 2 No, the answer is incorrect.
Quiz
Score: 0
Week 2 Quiz Feedback:
Solution
Sorting in O(n log n) and doing a linear scan is asymptotically O(n log n). Comparing all pairs of indices is
Week 2 O(n2), as is using insertion sort to do the identification or using quicksort. Also, for the last option it is not
Programming clear why binary search is useful.
Assignment
Accepted Answers:
Week 3: Graphs Sort the array using merge sort. Scan the sorted array from beginning to end looking for adjacent equal
elements.
Week 3 Quiz 2) A CPU can perform 108 operations a second. You are implementing an O(n2 log n) 2 points
2
Week 3 algorithm to solve a problem. You want to demonstrate the algorithm to your boss, and ensure that the
Programming program runs within 1 second on all the demos. Among the following values of n, which is the largest
Assignment safe value for the demo?
Week 4: n = 7500
Weighted graphs n = 5000
n = 2000
Week 4 Quiz
n = 1000
Week 4 No, the answer is incorrect.
Programming
Score: 0
Assignment
Feedback:
Week 5: Data 50002 is 2.5×107 and log 5000 is between 12 and 13, so worst case for n = 5000 can cross 3×108.
Structures:
Union-Find and Accepted Answers:
Heaps n = 2000
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=123&assessment=124 1/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 6 - Week 2 Quiz
3) Assume that a CPU can process 108 operations per second. Suppose you have to sort an 0 points
Week 5: Divide
and Conquer array with 106 elements. Which of the following is true?
Selection sort will always take more than 2.5 hours while merge sort will always take less than 1
Week 5 Quiz
second.
Week 6: Data Insertion sort will always take more than 2.5 hours while quicksort will always take less than 1
Structures: second
Search Trees Insertion sort could take more than 2.5 hours while merge sort will always take less than 1
second.
Week 6: Greedy
Algorithms Selection sort could take more than 2.5 hours while quicksort will always take less than 1
second.
Week 6 Quiz No, the answer is incorrect.
Score: 0
Week 6
Programming Feedback:
Assignment Selection sort, insertion sort and quick sort all have worst case complexity O(n2). Only merge sort has
complexity O(n log n). Algorithms with worst case O(n2) could take more than 2.5 hours, but will not alway
Week 7: Dynamic
Programming do so. Worst case O(n log n) will always take less than 1 second. So the correct answer is that insertion
sort may take over 2.5 hours, while merge sort will not take more than 1 second.
Week 7 Quiz Accepted Answers:
Insertion sort could take more than 2.5 hours while merge sort will always take less than 1 second.
Week 7
Programming 4) Suppose our aim is to sort an array in ascending order. Which of the following statements is 2 points
Assignment true?
Week 8: Linear Input in ascending order is worst case for both selection sort and insertion sort.
Programming Input in descending order is worst case for both selection sort and insertion sort.
and Network
Input in ascending order is worst case for insertion sort but not for selection sort.
Flows
Input in descending order is worst case for selection sort but not for insertion sort.
Week 8:
No, the answer is incorrect.
Intractability
Score: 0
Week 8 Quiz Feedback:
Input in descending order and ascending order are both worst case for selection sort. Input in descending
Download order is worst case for insertion sort.
Accepted Answers:
TEXT Input in descending order is worst case for both selection sort and insertion sort.
TRANSLATION
5) We have a list of pairs [("Tariq",71),("Brinda",85),("Shweta",71),("Sunita",85),("Salma",72), 2 points
("Uday",60)], where each pair consists of a student's name and his/her marks in a course. We sort these
pairs in ascending order of marks. Which of the folllowing corresponds to a stable sort of this input?
[("Uday",60),("Tariq",71),("Shweta",71),("Salma",72),("Brinda",85),("Sunita",85)]
[("Brinda",85),("Salma",72),("Shweta",71),("Sunita",85)("Tariq",71),("Uday",60)]
[("Uday",60),("Shweta",71),("Tariq",71),("Salma",72),("Brinda",85),("Sunita",85)]
[("Uday",60),("Tariq",71),("Shweta",71),("Salma",72),("Sunita",85),("Brinda",85)]
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=123&assessment=124 2/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 6 - Week 2 Quiz
Funded by
Powered by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=123&assessment=124 3/3
Design and analysis of algorithms - - Unit 10 - ... https://onlinecourses.nptel.ac.in/noc18_cs37/uni...
reviewer3@nptel.iitm.ac.in ▼
Unit 10 - Week
3 Quiz
Course
outline
Week 3 Quiz
The due date for submitting this assignment has passed.
How to access As per our records you have not submitted this Due on 2018-09-19, 23:59 IST.
the portal assignment.
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
Week 1: 1) Which of the following statements is not true about breadth-first search (BFS) in an 2 points
Analysis of undirected graph starting at a vertex v?
algorithms
BFS identifies all vertices reachable from v.
Week 1 Quiz
Using an adjacency list instead of an adjacency matrix can improves the worst case
Week 2: complexity to O(n + m).
Searching and BFS cannot be used to check for cycles in the graph.
sorting
BFS can be used to identify the furthest vertex from v in any graph, in terms of number of
Week 2 Quiz edges.
2) An airline serves 200 cities and runs 1100 direct flights each day between these cities. 2 points
Quiz : Week 3
Quiz Which of the following is a good data structure to represent the collection of flights?
Week 3 A 200 × 200 array A, where A[i][j] = 1 if there is a direct flight from city i to city j and 0
Programming otherwise.
Assignment
A stack containing values (i, j) for each pair of cities i, j for which there is a direct flight from
Week 4: city i to city j.
Weighted graphs
A queue containing values (i,j) for each pair of cities i, j for which there is a direct flight from
Week 4 Quiz city i to city j.
Funded by
Week 5 Quiz
Week 6: Data
Structures:
Search Trees
Week 6: Greedy 4
Algorithms
12
Week 6 Quiz 18
24
Week 7:
Dynamic
No, the answer is incorrect.
Programming
Score: 0
Week 8: Linear 4) Applying for permits to put up a factory is an 11 step process. Some steps depend on 2 points
Programming others, as described below.
and Network
Flows Step 1 must be completed before steps 3 and 4 start.
Step 2 must be completed before steps 3, 6 and 7 start.
Week 8: Step 3 must be completed before step 7 starts.
Intractability
Step 4 must be completed before step 5 starts.
Step 5 must be completed before step 7 starts.
Week 8 Quiz
Step 7 must be completed before steps 8 and 9 start.
Step 9 must be completed before steps 10 and 11 start.
TEXT
TRANSLATION Each step takes a week to complete. What is the minimum number of weeks required to get all the
permits in place?
5) An undirected graph G has 300 nodes and the minimum degree of any vertex is 3. Which 2 points
of the following is the most precise statement we can make about m, the number of edges in G?
m is at least 900.
m is at least 450.
m is at least 300.
m is at least 100.
End
reviewer1@nptel.iitm.ac.in ▼
Unit 12 - Week 4
Quiz
Course
outline Week 4 Quiz
The due date for submitting this assignment has passed. Due on 2018-03-07, 23:59 IST.
How to access
the portal Submitted assignment
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
1) We are given a directed graph, using an adjacency list representation. The graph has no 2 points
Week 1: Analysis
of algorithms isolated vertices, so every vertex is connected to at least one other vertex. We want to construct an
adjacency list representation of the graph with all edges reversed. That is, the new graph will have an
Week 1 Quiz edge (v, u) whenever the original graph has an edge (u, v). Which of the following is the most accurate
description of the complexity of this computation. (Recall that n is the number of vertices and m is the
Week 2: number of edges.)
Searching and
sorting O(n)
O(nm)
Week 2 Quiz O(n2)
O(m)
Week 2
Programming No, the answer is incorrect.
Assignment
Score: 0
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=139&assessment=140 1/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 12 - Week 4 Quiz
The surcharge increases the cost of every path uniformly by 17%, so there is no change in the relative
Week 5: Divide
and Conquer order of paths in terms of cost.
Accepted Answers:
Week 5 Quiz There is no impact. Cheapest routes between all pairs of cities remains unchanged.
3) An airline charges a different price for each direct flight, depending on the sector. For each 2 points
Week 6: Data
Structures: sequence of hopping flights, the ticket price is the sum of the fares of the individual sectors. TripGuru
Search Trees has precalculated the cheapest routes between all pairs of cities so that it can offer an optimum choice
instantly to customers visiting its website. Overnight, the government has fixed an airport landing fee that
Week 6: Greedy has to be added to the cost of each individual flight. Which of the following most accurately describes the
Algorithms impact of this surcharge on TripGuru's computation?
Week 6 Quiz There is no impact. Cheapest routes between all pairs of cities remains unchanged.
The precomputed cheapest route may not longer be optimal where there is a shorter route in
Week 6 terms of number of flights.
Programming
Assignment The precomputed cheapest route may not longer be optimal where there is a longer route in
terms of number of flights.
Week 7: Dynamic The impact is unpredictable.
Programming
No, the answer is incorrect.
Week 7 Quiz Score: 0
Feedback:
Week 7 The landing fee adds up across sectors, so the impact on the overall cost of route depends on the numbe
Programming of sectors. The surcharge favours hopping flights with fewer sectors.
Assignment
Accepted Answers:
Week 8: Linear The precomputed cheapest route may not longer be optimal where there is a shorter route in terms of
Programming number of flights.
and Network
Flows 4) The Bellman-Ford algorithm cannot be used if a graph has negative cycles. This is 2 points
because:
Week 8:
Intractability The algorithm only runs for n iterations, where n is the number of vertices.
Dealing with negative cycles requires examining all paths exhaustively, which takes esponential
Week 8 Quiz time.
The notion of a shortest path is not well-defined if there are negative cycles.
Download To handle negative cycles, we need to compute all-pairs shortest paths.
5) Suppose we run Prim’s algorithm and Kruskal’s algorithm on a graph G and the two 2 points
algorithms produce minimum-cost spanning trees TP and TK, respectively, and TP is different from TK.
Which of the following must be true?
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=139&assessment=140 2/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 12 - Week 4 Quiz
End
Funded by
Powered by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=139&assessment=140 3/3
Design and analysis of algorithms - - Unit 17 - ... https://onlinecourses.nptel.ac.in/noc18_cs37/uni...
reviewer3@nptel.iitm.ac.in ▼
Unit 17 - Week
5 Quiz
Course
outline
Week 5 Quiz
The due date for submitting this assignment has passed.
How to access As per our records you have not submitted this Due on 2018-10-03, 23:59 IST.
the portal assignment.
Week 1: All questions carry equal weightage. You may submit as many times as you like within the
Introduction deadline. Your final submission will be graded.
Week 1: 1) Suppose we want to extend the union-find data structure to support the operation 2 points
Analysis of Reset(c), which takes as input the name of a component c and then breaks up c into singleton
algorithms components, like MakeUnionFind(). For instance if c = 3 and c currently consists of {1,3,7}, then
Reset(c) will produce three components called 1, 3 and 7 consisting of {1}, {3} and {7}, respectively.
Week 1 Quiz
Which of the following is correct about the cost of adding Reset(c) to the array and pointer
implementations of union-find discussed in the lecture?
Week 2:
Searching and
sorting Array representation: O(size(c)), Pointer representation: O(size(c))
2) In the algorithm presented for the closest pair of points problem, we have assumed that no 2 points
Week 4 Quiz two points have the same x or y coordinate. Which of the following steps would become more
complicated to justify without this assumption.
Week 4
Funded by
Week 7: Strategy 1 takes time O(n) and Strategy 2 takes time O(log n)
Dynamic
Programming Strategy 1 takes time O(log n) and Strategy 2 takes time O(n)
Strategy 1 takes time O(n) and Strategy 2 takes time O(n log n)
Week 7 Quiz
Strategy 1 takes time O(n log n) and Strategy 2 takes time O(n)
Week 7
Programming No, the answer is incorrect.
Assignment Score: 0
Feedback:
Week 8: Linear
Compressing the array and heapify both take time O(n), so Strategy 1 takes time O(n). Look up the max
Programming
and Network value in a heap takes time O(1). Updating the node takes time O(log n), and so does delete_max(). So the
Flows second strategy takes time O(log n).
Accepted Answers:
Week 8: Strategy 1 takes time O(n) and Strategy 2 takes time O(log n)
Intractability
4) Suppose we want to support the operations predecessor and successor in a heap. Given 2 points
Week 8 Quiz a value v in the heap, pred(v) tells us the next smaller value currently in the heap and succ(v) tells us
the next larger value currently in the heap.
TEXT
TRANSLATION In both min heaps and max heaps, both operations take time O(n).
In both min heaps and max heaps, both operations take time O(log n).
In a min heap, pred(v) takes time O(log n) and succ(v) takes O(n) whereas in a max heap
pred(v) takes time O(n) and succ(v) takes O(log n).
In a min heap, pred(v) takes time O(n) and succ(v) takes O(log n) whereas in a max heap
pred(v) takes time O(log n) and succ(v) takes O(n).
5) Suppose we do merge sort with a five-way split: divide the array into 5 equal parts, sort 2 points
each part and do a 5 way merge. What would the worst-case complexity of this version be?
O(n2)
O(n2 log5n)
O(n log2n)
O(n (log2n)2)
End
reviewer1@nptel.iitm.ac.in ▼
Unit 19 - Week 6
Quiz
Course
outline Week 6 Quiz
The due date for submitting this assignment has passed. Due on 2018-03-21, 23:59 IST.
How to access
the portal Submitted assignment
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
1) Suppose we do not have a parent pointer in the nodes of a search tree, only left-child and 2 points
Week 1: Analysis
of algorithms right-child. Which of the following operations can be computed in time O(log n) for a balanced search
tree?
Week 1 Quiz
All of find, insert, delete, min, max, pred, succ
Week 2: find, insert, delete, min, max, but not pred, succ
Searching and find, insert, delete, but not min, max, pred, succ
sorting find, insert, delete, pred, succ but not min, max
2) Postorder traversal prints a tree by recursively listing the values of the left and right 2 points
Week 3
Programming subtrees and then listing the value at the root.
Assignment
function postOrder(t)
Week 4: if (t != NIL)
Weighted graphs postOrder(t.left)
postOrder(t.right)
Week 4 Quiz print(t.value)
Week 4 What is the complexity of postorder traversal for a binary search tree with n nodes?
Programming
Assignment O(log n) if the tree is balanced, O(n) otherwise.
O(n) if the tree is balanced, O(n log n) otherwise.
Week 5: Data O(n) whether the tree is balanced or unbalanced.
Structures:
O(log n) whether the tree is balanced or unbalanced.
Union-Find and
Heaps No, the answer is incorrect.
Score: 0
Week 5: Divide
and Conquer Feedback:
Postorder traversal visits and lists each element once, so it is O(n).
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=147&assessment=148 1/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 19 - Week 6 Quiz
Accepted Answers:
Week 5 Quiz
O(n) whether the tree is balanced or unbalanced.
Week 6: Data 3) Consider the following algorithm to build a balanced search tree from a sorted sequence. 2 points
Structures:
Search Trees Make the mid-point of the sequence the root of the tree
Recursively construct balanced search trees from elements to the left and right of the midpoint
Week 6: Greedy and make these the left and right subtrees of the root.
Algorithms
What is the complexity of this procedure where the sorted sequence is a sorted array?
Week 6 Quiz
Depends on the contents of the original sequence
Quiz : Week 6 O(n)
Quiz
O(n log n)
Week 6 O(n2)
Programming
Assignment No, the answer is incorrect.
Score: 0
Week 7: Dynamic Feedback:
Programming The recursive construction has the recurrence T(n) = 2T(n/2) + O(1) since we can find the midpoint of an
array in constant time.
Week 7 Quiz
Accepted Answers:
Week 7 O(n)
Programming
4) Consider the following algorithm to build a balanced search tree from a sorted sequence. 2 points
Assignment
Make the mid-point of the sequence the root of the tree
Week 8: Linear Recursively construct balanced search trees from elements to the left and right of the midpoint
Programming
and make these the left and right subtrees of the root.
and Network
Flows What is the complexity of this procedure where the sorted sequence is a sorted list?
End
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=147&assessment=148 2/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 19 - Week 6 Quiz
Funded by
Powered by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=147&assessment=148 3/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 22 - Week 7 Quiz
reviewer1@nptel.iitm.ac.in ▼
Unit 22 - Week 7
Quiz
Course
outline Week 7 Quiz
The due date for submitting this assignment has passed. Due on 2018-03-28, 23:59 IST.
How to access
the portal Submitted assignment
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
Week 1: Analysis Your final exams are over and you are catching up on sports on TV. You have a schedule of
of algorithms interesting matches from all over the world during the next week. You hate to start or stop watching a
match midway, so your aim is to watch as many complete matches as possible during the week.
Week 1 Quiz Suppose there are n such matches {M1,M2,…,Mn} available during the coming week. The matches
are ordered by starting time, so for each i ∈ {1, 2, …, n−1}, Mi starts before Mi+1. However, match Mi
Week 2:
Searching and may not end before Mi+1 starts, so for each i ∈ {1,2,…,n−1}, Next[i] is the smallest j > i such that Mj
sorting starts after Mi finishes.
Week 2 Quiz Given the sequence {M1, M2, … , Mn} and the values Next[i] for each i ∈ {1, 2, …, n−1}, your aim is
to compute the maximum number of complete matches that can be watched.
Week 2
Programming 1) Let Watch[i] denote the maximum number of complete matches that can be watched among 2 points
Assignment {Mi, Mi+1, …, Mn}. Which of the following is a correct recursive formulation of Watch[i]?
Week 3: Graphs
Watch[n] = 1
Week 3 Quiz Watch[i] = max(Watch[N ext[i]], 1 + Watch[i + 1]), i ∈ {1, 2, …, n−1}
Week 3
Programming Watch[1] = 1
Assignment Watch[i] = max(Watch[i − 1], 1 + Watch[Next[i − 1]]), i ∈ {2, 3, …, n}
Week 4:
Watch[n] = 1
Weighted graphs
Watch[i] = max(1 + Watch[Next[i]], Watch[i + 1]), i ∈ {1, 2, …, n−1}
Week 4 Quiz
Watch[1] = 1
Week 4 Watch[i] = max(Watch[i − 1] + 1, Watch[Next[i − 1]]), i ∈ {2, 3, …, n}
Programming
Assignment No, the answer is incorrect.
Score: 0
Week 5: Data
Structures: Feedback:
Union-Find and Either watch match i and continue from Next[i] or skip match i and continue from match i+1.
Heaps
Accepted Answers:
Watch[n] = 1
Week 5: Divide
and Conquer Watch[i] = max(1 + Watch[Next[i]], Watch[i + 1]), i ∈ {1, 2, …, n−1}
2) What is the size of the memo table for this problem? 2 points
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=153&assessment=154 1/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 22 - Week 7 Quiz
Week 8: O(n3)
Intractability O(n2)
O(n log n)
Week 8 Quiz
O(n)
Download No, the answer is incorrect.
Score: 0
TEXT
TRANSLATION Feedback:
The table is of size n and can be filled in a single pass. Each entry Watch[i] requires checking two values,
Watch[i+1] and Watch[Next[i]], so the time taken is O(n).
Accepted Answers:
O(n)
[(11,55),(22,31),(33,45),(44,52),(56,62),(57,58),(59,63),(64,70),(71,80)]
where each match Mi is represented by a pair (Si,Ti) indicated its starting time and ending time.
To be able to watch both Mi and Mj, for j > i, it must be the case that Sj > Ti.
What is the maximum number of matches you can watch in this case?
4
5
6
7
[6, 6, 5, 5, 4, 4, 3, 2, 1]
Accepted Answers:
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=153&assessment=154 2/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 22 - Week 7 Quiz
6
End
Funded by
Powered by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=153&assessment=154 3/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 26 - Week 8 Quiz
reviewer1@nptel.iitm.ac.in ▼
Unit 26 - Week 8
Quiz
Course
outline Week 8 Quiz
The due date for submitting this assignment has passed. Due on 2018-04-04, 23:59 IST.
How to access
the portal Submitted assignment
Week 1: All questions carry equal weightage. You may submit as many times as you like within the deadline.
Introduction Your final submission will be graded.
1) When we model a graph problem using LP, mapping each path to a variable is not a good 2 points
Week 1: Analysis
of algorithms strategy because:
Week 3 Quiz
5y + 3x2 ≥ 33
17x + 3xz ≤ 4
Week 3
Programming 7x ≤ 3xy + 14z - 12
Assignment 3x ≥ 14y + 2z + 13
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=158&assessment=159 1/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 26 - Week 8 Quiz
No, the answer is incorrect.
Week 5 Quiz
Score: 0
5) We have constructed a polynomial time reduction from problem A to problem B. Which of 2 points
Week 8: Linear the following is a valid inference?
Programming
and Network If we have a polynomial time algorithm for A, we must also have a polynomial time algorithm for
Flows
B.
Week 8: If we don’t know whether there is a polynomial time algorithm for B, there cannot be a
Intractability polynomial time algorithm for A.
If the best algorithm for A takes exponential time, there is no polynomial time algorithm for B.
Week 8 Quiz If the best algorithm for B takes exponential time, there is no polynomial time algorithm for A.
Quiz : Week 8 No, the answer is incorrect.
Quiz
Score: 0
Download Feedback:
If we have a polynomial time solution for B, the reduction gives us a polynomial time solution for A.
TEXT Accepted Answers:
TRANSLATION
If the best algorithm for A takes exponential time, there is no polynomial time algorithm for B.
End
Funded by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=158&assessment=159 2/3
18/07/2018 Design And Analysis Of Algorithms - - Unit 26 - Week 8 Quiz
Powered by
https://onlinecourses.nptel.ac.in/noc18_cs20/unit?unit=158&assessment=159 3/3