Anonymous user menu

Huffman's algorithm

We use Huffman's algorithm to obtain an encoding of alphabet {a, b, c} with frequencies fa, fb, fc. Which of the following codes cannot possibly be obtained (no matter what the frequencies are)
Code 1 = {0, 10, 11}
Code 2 = {0, 1, 00}
Code 3 = {10, 01, 00}

(A) Only code 2
(B) Only code 2 and code 3
(C) Only code 1 and code 3
(D) None


Discuss: Answer-B

ALOK GUPTA @galok1001
10 Jul 2018 11:35 pm
Ashish Kumar Goyal @dashish
17 Jul 2018 04:19 pm
Hi! Can u explain the solution?
sonam @sonamg1
20 Jul 2018 02:30 pm
yes option B
Ashish Kumar Goyal @dashish
20 Jul 2018 03:40 pm
Hi! Can u please explain why Code 3?
Adeema jain @adeema
17 Nov 2018 07:45 am
Why code 3 ?? it is not forming the prefix code. But the only issue i found is it will not be able to decode string like 1111001 as there is no letter for 11 but on the other hand i thought if 11 is not given to any character then there is no way that it can come in any encoding of file please reply @sumitverma.