CS502 Fundamentals of Algorithms
CS502 Fundamentals of Algorithms
Fundamentals of
Algorithms Final
Term Solved
MCQs
Question No:
Question No: 1 ( Marks: 1 ) - Please choose one
An optimization problem is one in which you want to find,
► Not a solution
► An algorithm
► Good solution
► The best solution
3
Question No: 21 ( Marks: 1 ) - Please choose one
We do sorting to,
► keep elements in random positions
► keep the algorithm run in linear order
► keep the algorithm run in (log n) order
► keep elements in increasing or decreasing order
4
Question No: 13 ( Marks: 1 )
- Please choose one
Shortest path problems can be solved efficiently by modeling the road map as a graph.
► True
► False
5
Question No: 26 ( Marks: 1 ) - Please choose one
A p × q matrix A can be multiplied with a q × r matrix B. The result will be a p × r matrix C. There are (p . r)
total entries in C and each takes _________ to compute.
► O (q)
► O (1)
► O (n2)
► O (n3)
► notation
► notation
► Flowchart
► Asymptotic notation
►Lower bounds
►Upper bounds
►Both upper and lower bound
►Medium bounds
6
Question No: 16 ( Marks: 1 )
- Please choose one
The term “coloring” came form the original application which was in architectural design.
► True
► False
7
Question No: 4 ( Marks: 1 ) - Please choose one
Who invented Quick sort procedure?
►Hoare
►Sedgewick
►Mellroy
►Coreman
8
Question No: 17 ( Marks: 1 ) - Please
choose one
In the clique cover problem, for two vertices to be in the same group, they must be adjacent to
each other. ► True
► False
9
- Please choose one
10
- Please choose one
►O(k)
►O(kN)
►O(2k)
►O(N)
►80
►160
►320
►100
►True
►False
11
- Please choose one
12
- Please choose one
13
- Please choose one
14
- Please choose one
►True
►Flase
►True
►False
15
- Please choose one
16
- Please choose one
►Worst
►Minimum
►Good
►Best
► True
► False
►2
►n
►2^n
►3^n
►4
►6
►8
►10
►0
►1
►0/1
►Fractional
10
In Knapsack Problem, value and weight both are to be under consideration.
►True
►False
►log n
►n
►n2
►n3
►Subjective
►Inductive
►Brute force
►Combination
Question No: ( Marks: 1 ) - Please choose one
►True
►False
►Printing
►Incrementing
►Counting
►Deleting
Question No: ( Marks: 1 ) - Please choose one
16 ( Marks: 1 )
The Huffman codes provide a method of _________ data efficiently.
►Reading
►Encoding
►Decoding
►Printing
►Brute force
►Dynamic programming
►Algorithm
►Solution
►Heuristic
►Result
►Greedy Technique
►Divide-and-Conquer Technique
►Dynamic Programming Technique
►The algorithm combines more than one of the above techniques
\
Question No: ( Marks: 1 ) - Please choose one
What is the time complexity to extract a vertex from the priority queue in Prim’s algorithm?
►O (log E)
► (V)
► (V+E)
►O (log V)
► (V + E)
► (V E)
► (V)
► (V^2)
►O(n^2)
►O(nlogn)
►O(n+k)
►O(n^3)
►Large
►Medium
►Not known
►Small