Professional Documents
Culture Documents
Question 1
The worst case time complexity of the nondeterministic dynamic knapsack algorithm is
a, O(log n)
b. O(n log n)
oe c. O(n)
d. O(n42)
Clear my choice
Question 2
a. Prim's algorithm
b. Kruskal algorithm
Clear my choice
Question 3
The optimal solution to a problem is a combination of optimal solutions to its sub-problems. This is known as
a. Principle of Feasibility
b. Principle of Dynamicity
e c. Principle of Optimality
d. Principle of Duality
Clear my choice
Question 4
Which data structure is used for implementing a FIFO branch and bound strategy?
a. Array
b. Stack
c. Linked list
6 d. Queue
Clear my choice
Question 5
Clear my choice
Previous Activity
Next Activity
Question 6
a. O(VA2)
b. O(Elogv)
c. O(logv)
O 4.01)
Clear my choice
Question 7
a. O(n42)
© ». 0(n)
c. O(log n)
d. O(n log n)
Clear my choice
Question 3
0 a. Kruskal's algorithm is used to find minimum spanning tree ofa graph, time complexity of this algorithm is O(EV) And Kruskal
algorithm is multiple source technique for finding MST.
c. Kruskal's algorithm is used to find minimum spanning tree of a graph, time complexity of this algorithm is O(EV)
d. None of these
Clear my choice
Question 9
oe a. O(ElogV)
b. O(nA2)
c. O(VlogV)
d. O(1)
Clear my choice
Question 10
b. Tower of hanoi
c. M coloring problem
d. N queen problem
Clear my choice
Previous Activity
Next Activity
Question 11
a, Assignment
b. Graph coloring
oe c. N Queen
d. Hamilton
Clear my choice
Question 12
Which data structure is used in breadth first search ofa graph to hold nodes?
a. Arrays
b. Stacks
c. Linked List
0 d. Queues
Clear my choice
Question 13
0 a. Greedy Method
b. Dynamic Programming
c. None of these
Clear my choice
culms.cuidol.in/mod/q uiz/attempt.php?attempt=
113251 &cmid=21174&pag e=2
12/2/22, 2:37 PM ASSIGNMENT-1 (page 3 of 12)
Question 14
The term refers to all state space search methods in which all children of the nodes are generated before any other live
node can become the E-node.
c. DFS
d. BFS
Clear my choice
Question 15
The method will choosing when sub problems share sub problems?
6 a. Dynamic programming
c. Backtracking
Clear my choice
Previous Activity
Next Activity
culms.cuidol.in/mod/q uiz/attempt.php?attempt=
113251 &cmid=21174&pag e=2
12/2/22, 2:42 PM ASSIGNMENT-1 (page
4 of 12)
Question 16
a. O(1)
b. O(nlogn)
c. O(n)
O 4.0(n2)
Clear my choice
Question 17
a. None of these
oO b. Pivot Element
c. Sequence of Values
d. Size of Array
Clear my choice
Question 18
What is the type of the algorithm used in solving the 8 Queens problem?
a. Greedy
Clear my choice
culms.cuidol.in/mod/q uiz/attempt.php?attempt=
113251 &cmid=21174&pag e=3 1/2
12/2/22, 2:42 PM ASSIGNMENT-1 (page 4 of 12)
Question 19
From the following choose the one which belongs to the algorithm paradigm other than to which others from the following
DeIONZS tO cece
a. Merge Sort
6 b. Knapsack Problem
c. Selection Problem
Clear my choice
Question 20
For 0/1 KNAPSACK problem, the algorithm takes amount of time for memory table, and
time to determine the optimal load, for N objects and W as the capacity of KNAPSACK.
a. O(N+W), O(NW)
b. O(NW), O(N)
c. O(N), O(NW)
© a. o(nw, O(n)
Clear my choice
Previous Activity
Next Activity
culms.cuidol.in/mod/q uiz/attempt.php?attempt=
113251 &cmid=21174&pag e=3
12/2/22, 2:51 PM ASSIGNMENT-1 (page 5 of 12)
Question 21
a. O(n)
b. O (log n)
oe c. O (n log n)
d. O (nA2)
Clear my choice
Question 22
a. O(n)
b. O(nlogn)
c. O(1)
© 4. 0(n2)
Clear my choice
Question 23
a. Bubble Sort
oe b. Quick Sort
c. Merge Sort
d. Heap Sort
Clear my choice
eo a. O (n log n)
b. O(n)
c. O (log n)
d. O (n42)
Clear my choice
Question 25
e a. decision stages
b. policies
d. unrelated constraints
Clear my choice
Previous Activity
Next Activity
Question 26
a, Heap sort
b. Dijkastra
c. Huffman
0 d. none
Clear my choice
Question 27
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
a. Quick Sort
b. Insertion Sort
eo c. Merge Sort
d. Heap Sort
Clear my choice
Question 28
Which of the following sorting algorithms has the lowest worst-case complexity?
0 a. Merge Sort
b. Insertion Sort
c. Bubble Sort
d. Quick Sort
Clear my choice
Question 29
Which of the following is not the required condition for binary search algorithm?
a. None of these
0 b. There must be mechanism to delete and/or insert elements in list
c. there should be the direct access to the middle element in any sublist
Clear my choice
Question 30
The elements of an array are stored successively in memory cells because ......
e a. by this way computer can keep track only the address of the first element and the addresses of other elements can be
calculated
b. None of these
c. by this way computer can keep track only the address of the first element and the addresses of other elements can be
calculated and the architecture of computer memory does not allow arrays to store other than serially
d. the architecture of computer memory does not allow arrays to store other than serially
Clear my choice
Previous Activity
Next Activity
Question 31
which is optimal value in the case of fractional knapsack problem, capacity of knapsack is 20
item: 123
profit
: 25 2415
weight
: 18 15 10
a. 497
b, 496
© «.498
d. 499
Clear my choice
Question 32
a. O{ logV)
b. O(E log E)
c. O(V log E)
© 4. 0 logw
Clear my choice
Question 33
Which data structure is used for implementing a LIFO branch and bound strategy?
a. Queue
b. Array
oe c. Stack
d. Linked list
Clear my choice
Question 34
a. O{logv)
b. O(n)
c. O(1)
©O 4. O(Elogy)
Clear my choice
Question 35
Which of these is the Worst-case time complexity of Quick Sort - and cannot be expressed in lower order terms ?
a. O (log n)
b. O (n log n)
© <.0(n2)
d. O(n)
Clear my choice
Previous Activity
Next Activity
Question 36
Clear my choice
Question 37
Clear my choice
Question 38
a. Warshall's
b. Floyd's
c. Dijkastra
oO d. Multisatge graph
Clear my choice
Indicate the runtime of Dijkstra's algorithm when the implementation is based on a binary heap. (E = edges; V = vertices)
a. O (VA2)
© b. 0 logy
c. O (E + V log V)
d.O(E+V)
Clear my choice
Question 40
a. Exponential
b. non optimal
6 c. optimal
d. Polynomial
Clear my choice
Previous Activity
Next Activity
Question 41
From the following algorithm design techniques which one is used to find all the pairs of shortest distances in a graph?
oe b. Dynamic programming
c. Backtracking
d. Greedy
Clear my choice
Question 42
a. Insertion Sort
b. Bubble sort
eo c. Selection Sort
d. Merge Sort
Clear my choice
Question 43
a. O(n42)
b. O(n)
c. O(nlogn)
oO d. O(logn)
Clear my choice
Question 44
a. none
0 b. Prim's and Kruskal's
c. Prim's
d. Kruskal's
Clear my choice
Question 45
Suppose we run Dijkstra’s single source shortest-path algorithm on the following edge weighted directed graph with vertex P as
the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?
a.P,Q,R, U,T,S
b.P,Q,R,5,7,U
O ..PQRUST
d.P,Q,T,RU,S
Clear my choice
Previous Activity
Next Activity
Question 46
From the following algorithm design techniques which one is used to find all the pairs of shortest distances in a graph?
a. Backtracking
b. Greedy
oe c. Dynamic programming
Clear my choice
Question 47
a. Sub Algorithm
oO b. Recursion
c. Polish Notation
d. Traversal Algorithm
Clear my choice
Question 48
a. O(logn)
© b. 0(n42)
c. O(n)
d. O(nlogn)
Clear my choice
Question 49
eo a. N-queens problem
d. 8-queens problem
Clear my choice
Question 50
a. isEmpty
b. isfull
c. Enqueue
0 d. Dequeue
Clear my choice
Previous Activity
Next Activity
Question 51
a. O{nn)
b. O(nmmn)
c. O(nm)
0 d. O(nmn)
Clear my choice
Question 52
a. Greedy approach
c. Backtracking
Question 53
a. no limit
b.2
0 c. at laest 2
d. at most 2
Clear my choice
Question 54
The time complexity of the normal quick sort, randomized quick sort algorithms in the worst case is .........0.008
O a.01n’2), 0172)
b. O(n log n)}, O(n log n)
Clear my choice
Question 55
e a. Spanning tree
b. Heap sort
c. Huffman
d. Dijkastra
Clear my choice
Previous Activity
Next Activity
Question 56
6 a. single source
b. One source
c. multiple source
d. one destination
Clear my choice
Question 57
If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance?
a. Quick Sort
b. Merge Sort
eo c. Insertion Sort
d. Selection Sort
Clear my choice
Question 58
a. O (nA2)
b. O (n log n)
© <.0%(n)
d. O (log log n)
Clear my choice
a. O(n)
b. O(nA2)
oe c. O(nlogn)
d. O(1)
Clear my choice
Question 60
b. When Item is the last element in the array or is not there at all
Clear my choice
Previous Activity
Next Activity
BB ORSON AND ANAL... BM) DISCRETE MATHEM.,. J ADVANCED OaMs |} AbveNceD COMP
\NALYSIS OF ALGORITHMS
| AND ANALYSIS OF ALGORITHMS L) Assignmert And Assessment © ASSIGNMENT-1
_ ASSIGNMENT-1
Attempts allowed: 2
Finisheec!
Submitted Friday, 2 Oecember 2622. 2:27 PM
=i... _a G