Data Structures and Algorithms MCQ - Graph Algorithm

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.
Share this question
Share:

d(r, v) and d(r, v) will be equal when u and v are at same level, otherwise d (r, v) will be less than d(r, v)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

Applying BFS Algorithms
Starting from Q
Queue Q
Making Q’s child’s status 1.
Queue
Q| M| N| P
Making M’s child 1 (which are not 1)
Status
QMNOPR
211 1 
221 11
222111
Q| M| N| P| R
Making N’s Child 1
Q| M| N| P| R| O
(other are already 1)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.

Maximum possible value of n for which we have complete tree and our 't' node is the last leaf node at height 4.
So, the maximum possible value of n
= 1 + 2 + 4 + 8 + 16
= 31
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption B
Rate difficulty Rate difficulty:
Choose a difficulty.

Suppose G = (v, E) and G1 = (v, E1) such that E1 ≤ E and v1 ≤ v
Consider an example

Consider the w(e) = 1 of e ∉ E1 it means the cost of v1 to v4 is only 1 other edges having cost 0. It is noted that G1 is connected (As shown in example).
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
Found this useful?
Follow:

for i = 1 ton
for j = 1 ton
for K = 1 ton
A[j, K] = max (j, K], A[j, i) + a(i, K)]
Anxn Matrix and A[j, K] = 1 if (j, K) ∈ E
so there exist a path from J to K and must contain A[j, K] edges
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Why Practice with Avatto?
High Quality MCQsExam-focused questions with accurate answers
Detailed ExplanationsStep-by-step explanations to enhance learning
Latest Exam PatternBased on updated syllabus and pattern
Performance AnalyticsTrack performance and improve weak areas
100% Free PracticePractice unlimited questions for free