YOUR SUBJECT CS502 Fundamentals of AlgorithmsChange subject ↗
PRACTICE AT YOUR OWN PACE

CS502 practice questions

Think through the options before revealing the answer. Use the term filter to focus your revision.

260 questions
CS502 · Final-term only#80

The difference between Prim s algorithm and Dijkstra s algorithm is that Dijkstra s algorithm uses a same key.

  1. A
    ? ?True
  2. B
    ? ?False
Show correct answer

Correct answer: B. ? ?False

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#79

In greedy algorithm, at each phase, you take the________ you can get right now, without regard for future
consequences.

  1. A
    ?Worst
  2. B
    ?Minimum
  3. C
    ?Good
  4. D
    ?Best
Show correct answer

Correct answer: D. ?Best

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#78

Fixed-length codes may not be efficient from the perspective of _______the total quantity of data.
Select correct option:

  1. A
    ?Minimizing (Page 99)
  2. B
    ?Averaging
  3. C
    ?Maximizing
  4. D
    ?Summing
Show correct answer

Correct answer: A. ?Minimizing (Page 99)

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#77

In the clique cover problem, for two vertices to be in the same group, they must be_______________each
other.

  1. A
    ? ?Apart from
  2. B
    ? ?Far from
  3. C
    ? ?Near to
  4. D
    ? ?Adjacent to
Show correct answer

Correct answer: B. ? ?Far from

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#76

The term coloring came from the original application which was in map drawing.

  1. A
    ? ?True (Page 176)
  2. B
    ? ?False
Show correct answer

Correct answer: A. ? ?True (Page 176)

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#75

Floyd-Warshall algorithm, as in the case with DP algorithms, we avoid recursive evaluation by generating a
table for

  1. A
    ? ?k
  2. B
    ? ?
    k
    ij d
    (Page 164)
  3. C
    ? ?True
  4. D
    ? ?Flase
Show correct answer

Correct answer: B. ? ?
k
ij d
(Page 164)

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#74

Floyd-Warshall algorithm is a dynamic programming algorithm; the genius of the algorithm is in the clever
recursive formulation of the shortest path problem.

  1. A
    ? ?True
  2. B
    ? ?Flase
Show correct answer

Correct answer: A. ? ?True

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#73

Dijkestra s single source shortest path algorithm works if all edges weights are negative and there are no
negative cost cycles.

  1. A
    ? ?True
  2. B
    ? ?False
Show correct answer

Correct answer: B. ? ?False

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#72

Dijkestra s single source shortest path algorithm works if all edges weights are non negative and there are no
negative cost cycles.

  1. A
    ? ?True
  2. B
    ? ?False
Show correct answer

Correct answer: A. ? ?True

Check community answers against your course notes.Question permalink ↗
CS502 · Final-term only#71

Depth first search is shortest path algorithm that works on un-weighted graphs.

  1. A
    ? ?True
  2. B
    ?False
Show correct answer

Correct answer: B. ?False

Check community answers against your course notes.Question permalink ↗