...
Question 14942 – DSSSB TGT 2017
February 8, 2024
NTA UGC NET Dec 2023 Paper-2
February 8, 2024
Question 14942 – DSSSB TGT 2017
February 8, 2024
NTA UGC NET Dec 2023 Paper-2
February 8, 2024

Computer-Networks

Question 24
Consider the string abbccddeee. Each letter in the string must be assigned a binary code satisfying the following properties:

  1. For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter.
  2. For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter.

Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?

A
21
B
30
C
23
D
25
Question 24 Explanation: 

Input String : abbccddeee

The character frequencies are

Character

a

b

c

d

e

Frequency

1

2

2

2

3

Binary Code

?

?

?

?

?


Correct Answer: C
Question 24 Explanation: 

Input String : abbccddeee

The character frequencies are

Character

a

b

c

d

e

Frequency

1

2

2

2

3

Binary Code

?

?

?

?

?


0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!