1 Qs · 2021 · 2 marks · 0.1 marks/paperStandard yield
In this topic, GATE tests Greedy Algorithms specifically through optimal prefix-free coding (Huffman coding concepts) under specific structural and ordering constraints. Questions… Guide
Topic guide
In this topic, GATE tests Greedy Algorithms specifically through optimal prefix-free coding (Huffman coding concepts) under specific structural and ordering constraints. Questions evaluate the candidate's ability to extract character frequencies from a given sequence, construct an optimal prefix tree (or binary encoding tree), and compute the minimum total encoded length while strictly respecting tie-breaking and length-monotonicity conditions.
Constrained Optimal Prefix-Free Encoding Length
rare · MCQ · 2 marks · 2021
Given an input string or set of symbol frequencies along with prefix-free and lexicographic/ordering constraints on code lengths, determine the minimum total length (in bits) of the encoded output.
Total Encoded Length
Used to compute the total bit-length of the encoded string given the frequency and assigned codeword length of each distinct character .
Kraft-McMillan Inequality for Binary Prefix Trees
Used to verify whether a set of assigned codeword lengths corresponds to a valid binary prefix-free code tree.
Questions add explicit secondary constraints (such as tie-breaking rules based on alphabetical order) onto classic greedy Huffman coding to test deep structural understanding of binary prefix trees beyond standard textbook execution.
2021
Medium questions require candidates to balance optimal weighted tree construction with side constraints (e.g., tie-breaking order among equal-frequency characters) rather than blindly applying the greedy tree-merge step.