2082 1

CSC325 · 2082 · 10 marks

How do you define optimal solution? Does greedy algorithm always guarantee optimal solution? Given the string "SUPER DUPER CSIT", use a Greedy algorithm to build a Huffman tree.

How do you define optimal solution? Does greedy algorithm always guarantee optimal solution? Given the string "SUPER DUPER CSIT", use a Greedy algorithm to build a Huffman tree.[10]

Design and Analysis of AlgorithmsChapter 4: Greedy AlgorithmsHuffman CodingNumerical: Huffman coding

An optimal solution is the best possible feasible solution to a problem: the one that maximizes or minimizes the objective function (maximum profit, minimum cost, shortest path, etc.) while satisfying all constraints. Among all feasible solutions, the optimal one gives the most efficient/best obj...