0 votes
Given a set of symbols and their frequency of usage, find a binary code for each symbol, such that:

a. Binary code for any symbol is not the prefix of the binary code of another symbol.

b. The weighted length of codes for all the symbols (weighted by the usage frequency) is minimized
in Greedy Algorithms by AlgoMeister (684 points)

3 Answers

0 votes
Huffman Tree is what you are looking for.
by Active (304 points)
0 votes
Huffman and the greedy method.
by AlgoMeister (964 points)
0 votes
Huffman tree is what you describe.
by (212 points)

Related questions

0 votes
4 answers
asked Mar 3, 2018 in Greedy Algorithms by jmlitfi AlgoMeister (684 points)
+1 vote
2 answers
asked Mar 3, 2018 in Greedy Algorithms by jmlitfi AlgoMeister (684 points)
+1 vote
2 answers
asked Mar 3, 2018 in Greedy Algorithms by jmlitfi AlgoMeister (684 points)
0 votes
2 answers
asked Mar 3, 2018 in Greedy Algorithms by jmlitfi AlgoMeister (684 points)
+1 vote
2 answers
asked Mar 3, 2018 in Greedy Algorithms by jmlitfi AlgoMeister (684 points)
The Book: Analysis and Design of Algorithms | Presentations on Slideshare | Lecture Notes, etc
...