Menu

Objective Type Questions & Answers


Design and Analysis of Algorithms MCQs - Unit-2



1. What operation in the disjoint set data structure is used to merge two disjoint sets?

A . Merge

B . Find

C . Union

D . Connect

Answer



2. Which operation in the disjoint set data structure determines the representative element of a set?

A . Find

B . Merge

C . Connect

D . Union

Answer



3. Which of the following is true about the time complexity of the Find operation in a disjoint set data structure with path compression?

A . O(n)

B . O(log n)

C . O(n log n)

D . O(1)

Answer



4. In a disjoint set data structure, what does the "path compression" technique aim to reduce?

A . Number of sets

B . Depth of trees

C . Number of elements

D . Number of operations

Answer



5. When performing the Union operation in a disjoint set data structure, which set typically becomes the parent of the other?

A . The node with more descendants

B . The node with less descendants

C . The set with the smaller representative element

D . The set with the larger representative element

Answer



6. In a disjoint set data structure, what does the "union by size" heuristic aim to optimize?

A . Number of sets

B . Depth of trees

C . Number of elements

D . Number of operations

Answer



7. What is the primary purpose of the Collapsing Find technique in union-find algorithms?

A . To ensure that the tree height is minimized.

B . To optimize the path compression during the find operation.

C . To assign weights to the nodes in the tree.

D . To balance the trees in the union-find data structure.

Answer



8. How does Weighted Union help in improving the efficiency of union-find operations?

A . By collapsing the paths during the find operation.

B . By ensuring that the tree height is minimized.

C . By assigning weights to the nodes in the tree.

D . By balancing the trees in the union-find data structure.

Answer



9. Backtracking algorithm is implemented by constructing a tree of choices called as?

A . State-space tree

B . State-chart tree

C . Node tree

D . Backtracking tree

Answer



10. In what manner is a state-space tree for a backtracking algorithm constructed?

A . Depth-first search

B . Breadth-first search

C . Twice around the tree

D . Nearest neighbour first

Answer



11. In how many directions do queens attack each other?

A . 1

B . 2

C . 3

D . 4

Answer



12. How many possible solutions exist for an 8-queen problem?

A . 100

B . 98

C . 92

D . 88

Answer



13. The following given options, which one of the following is a correct option that provides an optimal solution for 4-queens problem?

A . (3,1,4,2)

B . (2,3,1,4)

C . (4,3,2,1)

D . (4,2,3,1)

Answer



14. What is the condition for proper coloring of a graph?

A . two vertices having a common edge should not have same color

B . two vertices having a common edge should always have same color

C . all vertices should have a different color

D . all vertices should have same color

Answer



15. What is a chromatic number?

A . The maximum number of colors required for proper edge coloring of graph

B . The maximum number of colors required for proper vertex coloring of graph

C . The minimum number of colors required for proper vertex coloring of graph

D . The minimum number of colors required for proper edge coloring of graph

Answer



16. What will be the chromatic number for an empty graph having n vertices?

A . 0

B . 1

C . 2

D . n

Answer



17. What will be the chromatic number for a complete graph having n vertices?

A . 0

B . 1

C . n

D . n!

Answer





Relevant Materials :

Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]


Similar Materials :

R - Programming MCQs - Unit-1 - [ R-Programming ]

R - Programming MCQs - Unit-2 - [ R-Programming ]

R - Programming MCQs - Unit-3 - [ R-Programming ]

R - Programming MCQs - Unit-4 - [ R-Programming ]

R - Programming MCQs - Unit-5 - [ R-Programming ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]

PPS MCQs - Unit-1 - [ PPS ]

PPS MCQs - Unit-2 - [ PPS ]

PPS MCQs - Unit-3 - [ PPS ]

PPS MCQs - Unit-4 - [ PPS ]

PPS MCQs - Unit-5 - [ PPS ]

Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]

Software Engineering MCQs - Unit-1 - [ SE ]

Software Engineering MCQs - Unit-2 - [ SE ]

Software Engineering MCQs - Unit-3 - [ SE ]

Software Engineering MCQs - Unit-4 - [ SE ]

Software Engineering MCQs - Unit-5 - [ SE ]

Data Mining MCQs - Unit-1 - [ DM ]

Data Mining MCQs - Unit-2 - [ DM ]

Data Mining MCQs - Unit-3 - [ DM ]

Data Mining MCQs - Unit-4 - [ DM ]

Data Mining MCQs - Unit-5 - [ DM ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]

Data Structures Objective Type Question Bank-Unit-1 - [ DS ]

Data Structures Objective Type Question Bank-Unit-2 - [ DS ]

Data Structures Objective Type Question Bank-Unit-3 - [ DS ]

Data Structures Objective Type Question Bank-Unit-4 - [ DS ]

Data Structures Objective Type Question Bank-Unit-5 - [ DS ]

Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]

Cyber Forensics Objective Type Question Bank-Part-2 - [ Cyber Forensics ]

Cyber Forensics Objective Type Question Bank-Part-1 - [ Cyber Forensics ]

Java Programming Objective Type Question Bank - [ Java Programming ]

Java Programming Objective Type Questions-Part-1 - [ Java Programming ]

Java Programming Objective Type Questions-Part-2 - [ Java Programming ]