- Type
- Quiz
- Course
- CS502 Fundamentals of Algorithms
- Size
- PDF 504 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 16. Download the file for all 16 pages.
CS502 – Fundamental of Algorithms Quiz # 1 January 2021
If found any error please correct it accordingly
Q1. DFS or BFS yields a ________ of the graph.
Correct answer: Spanning tree page 125
Q2. In Knapsack Problem, the goal is to put items in the knapsack such that the value of the items is _________ subject to weight limit of knapsack.
Correct answer: Maximized
Q3. Using ASCII code, each character is represented by a fixed-length code of _________ bits per character.
Correct answer: 8 page 99
Q4. Which type of algorithm is harder to prove the correctness?
b. Brute Force c. Dynamic Programming d. Divide and Conquer
Q5. Consider the string "abcdaacac". if the string is coded with ASCII codes, the message length would be ____________________.
Correct answer: 75 bits
8*9=72 bits is the right answer
Q6. In _________ algorithm, you hope that by choosing a local optimum at each step, you will end up at a global optimum.
Correct answer: Greedy page 97
Q7. For a digraph G = (V, E), Sum of in-degree(v) ________________
Correct answer: = Sum of out-degree(v) page 115
Q8. In inductive approach of knapsack problem, we consider 2 cases, _______ Or _______.
Correct answer: Leave object, Take object page 93
Q9. A/an _________ is one in which you want to find, not just a solution, but the best solution.
Correct answer: Optimization Problem page 97
Q10. If the graph is represented using an adjacency matrix, then Breadth-first search takes ________ time.
Correct answer: O(V^2) page 125
Q11. If the graph is represented using an adjacency list, then Breadth-first search takes ________ time.
Correct answer: O(V + E)
d. O(E + 1)
Q12. A graph is ________ if every vertex can reach every other vertex
Correct answer: Connected page 116
Q13. The number of edges that come out of a vertex is called the ________ of that vertex in a digraph.
Correct answer: out-degree page 114
Q14. Huffman algorithm produces the _________ prefix code tree
Correct answer: Optimal page 105
Q15. A graph is said to be acyclic if it contains _____________
Correct answer: no cycles page 116
Q16. Fractional Knapsack is founded on __________ method.
Correct answer: Dynamic Programming
google and page 93
d. Divide and Conquer
Q17. If Matrix-A has dimensions "3x2" and Matrix-B has dimensions "2x3", then multiplication of Matrix-A and Matrix-B will result a new Matrix-C having dimensions
Correct answer: 3x3
Q18. Some places a person wants to visit Starting from a vertex, he wants to visit every place linked to this vertex, and so on. What algorithm does he need to use?
Correct answer: Breadth First Search
Q19. A Greedy algorithm can NOT be used to solve all the _______ problems.
b. Memorization programming c. Edit distance programming d. Storing value programing
Q20. In Huffman encoding, the _____ is the number of occurrences of a character divided by the total characters in the message.
Correct answer: Relative Probability page 100
Related CS502 files
All CS502 files →- CS502 Highlighted Handouts Set 2 Highlighted PDF 1.7 MB
- CS502 Midterm Solved File 3 by Team Hadi Midterm PDF 6.6 MB
- CS502 Quiz by S Khan Academy Quiz PDF 1.8 MB
- CS502 Solved Quiz 3 by Waqar Siddhu Quiz PDF 1.1 MB
- CS502 Quiz 3 Set 3 by VU Topper RM Quiz PDF 744 KB
- CS502 Solved Quiz 1 Complete by Maham Shah Zill Quiz PDF 603 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.