Is a there a defintion for distance in variable length codes?
1
01
001
0001
Clearly Hamming distance doesn't apply here. We can think of distance
as the number of bits needed to change one code to another. For VLCs
no amount of bit changes can turn one code into another. However, a
bit flip may violate the prefix condition. Coiuld this be used as a
basis for defining distance?
|
|
0
|
|
|
|
Reply
|
mobasser
|
1/7/2004 5:09:07 AM |
|
On Wed, 6 Jan 2004, Bijan wrote:
> Is a there a defintion for distance in variable length codes?
For what ? How about telling us your real problem ?
If you just want metric for variable length bitstrings, you
could take the hamming weight of the first min(x.length, y.length)
bits of two bitstrings x and y and add abs(x.length-y.length).
For example:
1011001
100101000
have dinstance 5
Ghis!
Sebastian
|
|
0
|
|
|
|
Reply
|
Sebastian
|
1/7/2004 12:10:25 PM
|
|