Compute Probability Vector for Huffman Function (N=4bits)

  • Thread starter Thread starter ppp
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on computing the probability vector for a Huffman function using a source defined by the exponential function exp(-x) for 4-bit symbols. The probability vector is derived from the frequency of occurrences of each symbol in a given dataset, where for 4-bit symbols, there are 16 possible combinations. An example provided illustrates how to calculate the probability vector based on the occurrences of specific symbols in a sample dataset, resulting in a column vector of probabilities.

PREREQUISITES
  • Understanding of Huffman coding and its applications
  • Familiarity with probability theory and frequency distribution
  • Basic knowledge of binary representation (4-bit symbols)
  • Experience with MATLAB or similar programming environments for implementing the Huffman function
NEXT STEPS
  • Research how to implement Huffman coding in MATLAB using the function Huffman(p)
  • Learn about calculating frequency distributions for datasets
  • Explore the concept of probability vectors in the context of data compression
  • Investigate other coding techniques that utilize probability vectors, such as Arithmetic coding
USEFUL FOR

This discussion is beneficial for data scientists, software engineers, and anyone involved in data compression techniques, particularly those working with Huffman coding and probability calculations in binary systems.

ppp
Messages
1
Reaction score
0
My source is exp(-x) and I would like to compute the probability vector so as to use in huffman function for (N=4 bits).

[code,len]=Huffman(p)

May someone help me ?
I don't know hot can I find the probability vercto.

Thanks
 
Technology news on Phys.org
Lets say that you have n different symbols making up m symbols worth of sample data. The probability for each symbol is the number of occurances of n divided by m. The probability vector is just a vector of all of these probabilities (one for each symbol).

For 4-bit symbols you have 2^4 = 16 symbols. Suppose that you have the following trivial example:

0001 0010 0011 1000 1001 0011 0001

then the probability vector would be (column vector)

2/7
1/7
2/7
0
0
0
0
1/7
1/7
0
0
0
0
0
0

Hope this helps.
 

Similar threads

  • · Replies 63 ·
3
Replies
63
Views
5K
Replies
9
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
1
Views
7K
  • · Replies 36 ·
2
Replies
36
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
53
Views
5K
  • · Replies 19 ·
Replies
19
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K