Skip to content

Algorithm Design and Analysis

SWE · Quiz · Spring 26

Paper 1 of 7By Shafiur Rahman Shafim (242) (1)Switch

Paper 1 of 7

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Software Engineering Faculty of Science & Information Technology ID & Section: Spring 2026; Course Code & Title: SE214, Algorithm Design & Analysis Time: 35 Minutes Marks: 15 1) A data-analytics company is developing a system that compresses user-activity logs before storing them in the cloud to reduce storage costs. One part of the log contains the following event codes, each represented by a single character: Event with their frequency is : A-45, B-9, C-6, D-13, E-12-, F- 5. ● Construct the Huffman Tree for the given frequencies. ● Determine the Huffman Code for each event (A, B, C, D, E). ● Calculate the total number of bits required to encode the logs using your Huffman codes. ● Compare it with a fixed-length encoding and compute how many bits are saved. 8 2) Given Capacity of the sack: 10 kg, Calculate the maximum profit with a greedy approach. 4 Object | 1 | 2 | 3 | 4 | 5 | 6 Profit | 5 | 10 | 15 | 7 | 8 | 9 Weight | 1 | 3 | 5 | 4 | 1 | 3 3) Total Amount =36, available denominator {1,5,10,20}, Find the minimum number of coins with greedy solution. 3