You are on page 1of 25

12/2/22, 2:23 PM ASSIGNMENT-1 (page 1 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 1

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

Which of the following standard algorithms is not a Greedy algorithm?

a. Prim's algorithm

b. Kruskal algorithm

eo c. Bellmen Ford Shortest path algorithm

d. Dijkstra's shortest path algorithm

Clear my choice

Question 3

Not yet answered

Marked out of 0.50

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

culms.cuidol.in/mod/q uiz/attempt. php?attempt= 113251 &cmid=21174 1/2


12/2/22, 2:23 PM ASSIGNMENT-1 (page 1 of 12)

Question 4

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

IT secsossseeenes input is a directed acyclic graph (DAG)G=(V,E).

e a. Topological sort problem

b. Strongly connected components problem

c. Euler path problem

d. Graph transpose problem

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/q uiz/attempt. php?attempt= 113251 &cmid=21174


12/2/22, 2:33 PM ASSIGNMENT-1 (page 2 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 6

Not yet answered

Marked out of 0.50

complexity of Floyd technique is:

a. O(VA2)

b. O(Elogv)

c. O(logv)

O 4.01)
Clear my choice

Question 7

Not yet answered

Marked out of 0.50

Greedy job scheduling with deadlines algorithms complexity is defined as

a. O(n42)

© ». 0(n)
c. O(log n)

d. O(n log n)

Clear my choice

Question 3

Not yet answered

Marked out of 0.50

Which is true statement in the following.

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.

b. 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

culms.cuidol.in/mod/quiz/attempt. php?atempt= 113251&cmid=21174&page=1 12


12/2/22, 2:33 PM ASSIGNMENT-1 (page 2 of 12)

Question 9

Not yet answered

Marked out of 0.50

complexity of Bellman ford is

oe a. O(ElogV)
b. O(nA2)

c. O(VlogV)

d. O(1)

Clear my choice

Question 10

Not yet answered

Marked out of 0.50

Which of the following is not a backtracking algorithm?

e a. Knight tour problem

b. Tower of hanoi

c. M coloring problem

d. N queen problem

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/quiz/attempt. php?atempt= 113251&cmid=21174&page=1


12/2/22, 2:37 PM ASSIGNMENT-1 (page 3 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 11

Not yet answered

Marked out of 0.50

Which is not a backtracking problem:

a, Assignment

b. Graph coloring

oe c. N Queen

d. Hamilton

Clear my choice

Question 12

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

activity selection problem is based on :

0 a. Greedy Method
b. Dynamic Programming
c. None of these

d. Divide & Conquer

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

Not yet answered

Marked out of 0.50

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.

6 a. Branch and bound


b. Dynamic programming

c. DFS

d. BFS

Clear my choice

Question 15

Not yet answered

Marked out of 0.50

The method will choosing when sub problems share sub problems?

6 a. Dynamic programming

b. Divide and conquer

c. Backtracking

d. Branch and bound

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)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 16

Not yet answered

Marked out of 0.50

The complexity of selection sort is:

a. O(1)

b. O(nlogn)

c. O(n)

O 4.0(n2)
Clear my choice

Question 17

Not yet answered

Marked out of 0.50

Quick sort running time depends on the selection of ------------------------

a. None of these

oO b. Pivot Element
c. Sequence of Values

d. Size of Array

Clear my choice

Question 18

Not yet answered

Marked out of 0.50

What is the type of the algorithm used in solving the 8 Queens problem?

a. Greedy

b. Branch and bound


0 c. Backtracking
d. Divide and conquer

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

Not yet answered

Marked out of 0.50

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

d. Minimum & Maximum Problem

Clear my choice

Question 20

Not yet answered

Marked out of 0.50

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)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 21

Not yet answered

Marked out of 0.50

Running merge sort on an array of size n which is already sorted is----

a. O(n)

b. O (log n)

oe c. O (n log n)

d. O (nA2)

Clear my choice

Question 22

Not yet answered

Marked out of 0.50

complexity of prim's algo

a. O(n)

b. O(nlogn)

c. O(1)
© 4. 0(n2)
Clear my choice

Question 23

Not yet answered

Marked out of 0.50

Which of the following is example of in-place algorithm?

a. Bubble Sort

oe b. Quick Sort

c. Merge Sort

d. Heap Sort

Clear my choice

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=4


12/2/22, 2:51 PM ASSIGNMENT-1 (page 5 of 12)
Question 24

Not yet answered

Marked out of 0.50

The time complexity of quick sort is ........

eo a. O (n log n)

b. O(n)

c. O (log n)

d. O (n42)

Clear my choice

Question 25

Not yet answered

Marked out of 0.50

Dynamic programming divides problems into a number of

e a. decision stages

b. policies

c. conflicting objective functions

d. unrelated constraints

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=4


12/2/22, 2:55 PM ASSIGNMENT-1 (page
6 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 26

Not yet answered

Marked out of 0.50

Optimal binary search technique is:

a, Heap sort

b. Dijkastra

c. Huffman

0 d. none

Clear my choice

Question 27

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

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

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=5 12


12/2/22, 2:55 PM ASSIGNMENT-1 (page 6 of 12)

Question 29

Not yet answered

Marked out of 0.50

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

d. The list must be sorted

Clear my choice

Question 30

Not yet answered

Marked out of 0.50

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

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=5


12/2/22, 3:02 PM ASSIGNMENT-1 (page 7 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 31

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

In the case of Fibnocci heap the running time of Prim's algorithm is

a. O{ logV)

b. O(E log E)

c. O(V log E)

© 4. 0 logw
Clear my choice

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=6 1/2


12/2/22, 3:02 PM ASSIGNMENT-1 (page 7 of 12)

Question 33

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

complexity of Kruskal's algo

a. O{logv)

b. O(n)

c. O(1)

©O 4. O(Elogy)
Clear my choice

Question 35

Not yet answered

Marked out of 0.50

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

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=6


12/2/22, 3:14 PM ASSIGNMENT-1 (page
8 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 36

Not yet answered

Marked out of 0.50

The main measure for efficiency of algorithm are

a, Complexity and Capacity

b. Data and Space

c. Processor and Memory


0 d. Time and Space

Clear my choice

Question 37

Not yet answered

Marked out of 0.50

The Worst case occur in linear search algorithm when:

6 a. Item is the last element in the array or is not there at all

b. Item is the last element in the array

c. Item is not in the Array at all

d. Item is somewhere in the middle of the array

Clear my choice

Question 38

Not yet answered

Marked out of 0.50

Which is not Dynamic approach:

a. Warshall's

b. Floyd's

c. Dijkastra

oO d. Multisatge graph

Clear my choice

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=7


12/2/22, 3:14 PM ASSIGNMENT-1 (page
8 of 12)
Question 39

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

The Huffman algorithm finds a (n) solution

a. Exponential

b. non optimal

6 c. optimal

d. Polynomial

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=7


12/2/22, 3:17 PM ASSIGNMENT-1 (page
9 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 41

Not yet answered

Marked out of 0.50

From the following algorithm design techniques which one is used to find all the pairs of shortest distances in a graph?

a. Branch and bound

oe b. Dynamic programming

c. Backtracking

d. Greedy

Clear my choice

Question 42

Not yet answered

Marked out of 0.50

Which of the following is not a stable sorting algorithm?

a. Insertion Sort

b. Bubble sort

eo c. Selection Sort

d. Merge Sort

Clear my choice

Question 43

Not yet answered

Marked out of 0.50

Complexity of merge sort in worst case is:

a. O(n42)

b. O(n)

c. O(nlogn)

oO d. O(logn)

Clear my choice

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=8


12/2/22, 3:17 PM ASSIGNMENT-1 (page 9 of 12)

Question 44

Not yet answered

Marked out of 0.50

Which of following is spanning tree technique?

a. none
0 b. Prim's and Kruskal's
c. Prim's

d. Kruskal's

Clear my choice

Question 45

Not yet answered

Marked out of 0.50

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

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=8


12/2/22, 3:20 PM ASSIGNMENT-1 (page 10of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 46

Not yet answered

Marked out of 0.50

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

d. Brach and bound

Clear my choice

Question 47

Not yet answered

Marked out of 0.50

An algorithm that calls itself directly or indirectly is known as---

a. Sub Algorithm

oO b. Recursion
c. Polish Notation

d. Traversal Algorithm

Clear my choice

Question 48

Not yet answered

Marked out of 0.50

Complexity of quick sort in worst case is:

a. O(logn)

© b. 0(n42)
c. O(n)

d. O(nlogn)

Clear my choice

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=9


12/2/22, 3:20 PM ASSIGNMENT-1 (page 10 of 12)

Question 49

Not yet answered

Marked out of 0.50

Placing n-queens so that no two queens attack each other is called:

eo a. N-queens problem

b. Subset sum problem

c. Hamiltonian circuit problem

d. 8-queens problem

Clear my choice

Question 50

Not yet answered

Marked out of 0.50

To delete an element from queue:

a. isEmpty

b. isfull

c. Enqueue

0 d. Dequeue
Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/q uiz/attempt.php?attempt= 113251&cmid=21174&pag e=9


12/2/22, 3:24 PM ASSIGNMENT-1 (page 11 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 51

Not yet answered

Marked out of 0.50

The upper bound of computing time of m coloring decision problem is

a. O{nn)

b. O(nmmn)

c. O(nm)

0 d. O(nmn)

Clear my choice

Question 52

Not yet answered

Marked out of 0.50

Merge sort uses

a. Greedy approach

b. Decrease and conquer

c. Backtracking

0 d. Divide and conquer


Clear my choice

Question 53

Not yet answered

Marked out of 0.50

How many nodes a binary tree can have?

a. no limit
b.2
0 c. at laest 2
d. at most 2

Clear my choice

culms.cuidol.in/mod/quiz/attempt php?attempt= 113251&cmid=21174&page=10


12/2/22, 3:24 PM ASSIGNMENT-1 (page 11 of 12)

Question 54

Not yet answered

Marked out of 0.50

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)

c. O(n log n), O(NA2)

d. O(n2 ), O(n log n)}

Clear my choice

Question 55

Not yet answered

Marked out of 0.50

Which is not greedy approach:

e a. Spanning tree

b. Heap sort

c. Huffman

d. Dijkastra

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/quiz/attempt php?attempt= 113251&cmid=21174&page=10


12/2/22, 3:27 PM ASSIGNMENT-1 (page 12 of 12)

DESIGN AND ANALYSIS OF ALGORITHMS


Home / My courses / DESIGN AND ANALYSIS OF ALGORITHMS L / Assignment And Assessment / ASSIGNMENT-1

Question 56

Not yet answered

Marked out of 0.50

Dijkstra algorithm is also called the .........seeee shortest path problem.

6 a. single source
b. One source

c. multiple source

d. one destination

Clear my choice

Question 57

Not yet answered

Marked out of 0.50

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

Not yet answered

Marked out of 0.50

For analyzing an algorithm, which is better computing time?

a. O (nA2)

b. O (n log n)

© <.0%(n)
d. O (log log n)

Clear my choice

culms.cuidol.in/mod/q uiz/attempt. php?attempt= 113251 &cmid=21174&page=11


12/2/22, 3:27 PM ASSIGNMENT-1 (page 12 of 12)
Question 59

Not yet answered

Marked out of 0.50

complexity of Huffman code is

a. O(n)

b. O(nA2)

oe c. O(nlogn)

d. O(1)

Clear my choice

Question 60

Not yet answered

Marked out of 0.50

The Average case occur in linear search algorithm

e a. When Item is somewhere in the middle of the array

b. When Item is the last element in the array or is not there at all

c. When Item is not in the array at all

d. When Item is the last element in the array

Clear my choice

Previous Activity

Next Activity

culms.cuidol.in/mod/q uiz/attempt. php?attempt= 113251 &cmid=21174&page=11


TTT mam TTe iit

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

day, 1 December 2022, 12:00 4M.

Finisheec!
Submitted Friday, 2 Oecember 2622. 2:27 PM

Highest grade: 24.00 / 30,00,

Re-atte mpt quiz

=i... _a G

You might also like