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#40

Bellman-Ford allows negative weights edges and 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#39

Dijkestra’s single source shortest path algorithm works if all edges weights are non-negative and there are
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#38

Shortest path problems can be solved efficiently by modeling the road map as a graph.

  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#37

Huffman algorithm uses a greedy approach to generate a postfix code T that minimizes the expected length B
(T) of the encoded string.

  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#36

The codeword assigned to characters by the Huffman algorithm have the property that no codeword is the
postfix of any other.

  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#35

The greedy part of the Huffman encoding algorithm is to first find two nodes with larger frequency.

  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#34

The Huffman algorithm finds a polynomial solution

  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#33

The Huffman algorithm finds an exponential solution

  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#32

The Huffman algorithm finds a (n) _____________ solution.

  1. A
    ? Optimal
  2. B
    ? Exponential
  3. C
    ? Polynomial
  4. D
    ? Non-optimal
Show correct answer

Correct answer: A. ? Optimal

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

Maximum number of vertices in a Directed Graph may be |V2
|

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

Correct answer: B. ? False

Check community answers against your course notes.Question permalink ↗