UGC NET Paper 2 (Computer Science)Very hard
For symbol frequencies 5, 9, 12, 13, 16, 45 a Huffman code has a total weighted path length (encoded bits) of:
- A. 224
- B. 210
- C. 235
- D. 200
Correct answer: A. 224
Merges cost 14 + 25 + 30 + 55 + 100 = 224; code lengths are 1 for 45, 3 for 12, 13, 16 and 4 for 5 and 9.
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- A full binary tree (each node has 0 or 2 children) has 25 leaves. The total number of nodes is:
- The maximum number of edges in a simple planar graph with 10 vertices is:
- The number of generators of the cyclic group Z12 is:
- The minimum number of states of a DFA over {a, b} accepting strings with the number of a's divisible by 3 and the number of b's divisible…
- Assertion (A): Whether a given Turing machine accepts at least one string is undecidable. Reason (R): By Rice's theorem every non-trivial…
- For the same grammar, an LALR(1) parser has the same number of states as: