卷別
資料結構與演算法
選擇國立臺灣大學 2026 · 考試 · 第 18 題
考科演算法
(4 points) Which of the following properties is true for some optimal prefix-free binary code and directly justifies the greedy choice made in the Huffman algorithm?
- (A)The two symbols with the lowest frequencies must appear at the same depth in the code tree.
- (B)The symbol with the lowest frequency must be assigned the longest codeword, but the symbol with the second lowest frequency need not.
- (C)All leaves at the maximum depth must correspond to symbols with the lowest frequency.
- (D)The two symbols with the lowest frequencies must have equal-length codewords but they need not share the same parent.
- (E)The two symbols with the lowest frequencies must be siblings at the maximum depth of the code tree.