Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find optimal Huffman code words given a list of probabilities
ResourceFunction["HuffmanCodeWords"][list] gives optimal binary Huffman code words corresponding to probabilities in list. |
Generate a list of code words:
In[1]:= | ![]() |
Out[1]= | ![]() |
Get code words from a Wikipedia article for letter frequency of the whole alphabet:
In[2]:= | ![]() |
Out[2]= | ![]() |
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License