EXTRA BITS/TRITS - Huffman Trees - Computerphile

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
some of you on the comments on the previous video of Mentioned computer systems some experimental ones that were [once] built Working on a base three basics Roman base two sometimes a base three number either 0 1 or 2 Following on from bits is called tricks because the base 3 system some textbooks call it trinary some Textbooks call it Ternary, but it's the same thing. It's a base 3 system Now here's the magic thing With these things being exact negative powers of 3 I can confidently predict that if only we could calculate entropy in traits and [codings] Traits we could probably get a more efficient coding. Let's have a look we can do this probably quite quickly now But if you're doing it base 3 the rule now is you combine the three? Rightmost probabilities all in one go and the 3 right most things are 1/9 19.9 so I'm getting here a trinary or Ternary tree, not a binary one 190 190 1/9 combine them all into one third Till to those and then if you're combining in threes well, you put a third a third a third easy good good Good Probably see one point no good Now here's a clever thing What you now do in labeling your branches of course is if you go left Label at 0 we go down the middle label it 1 if you go to the right label it, too and then as you recursively descend down this you're on a 2 now if you then go to the left you append to 0 If you then go down, the middle [you] [append] a 1 and if you then go to the right again you end up with 2 those are codes that [have] been worked out in tricks. I can then tell you this 0 is for Cod They code one is for they Catch a bass Tuna Shark and Barracuda Effectively in sequence become 2 0 [2] 1 and 2 2 [in] [trick] codings [I] have now Calculated my entropy as being the sum over these five states Minus p. I log to the Base 3 of p I I worked out he lost the base 3 so the answer comes out in tricks and It's one point three three trips my average length is the sum from 1 to 5 of The length of code associated with the given catch or state times the probability of that catch So you're getting things like? You know a one trick code times the third plus a one trick code tons another third add them all together Amazing it comes to one point three three trips Because [of] the nature of these probabilities they map into being whole numbers of tricks needed The probably doing of this bits was that They don't map exactly [onto] logs the base 2 is clean whole numbers so you end up [having] to waste a bit and round up as it were Whereas [tritt] hits it right on the nail look at this efficiency Is [1.33] over one point three three hits? 100% however the word of warning, I think I ought to say is someone says hey look that's fantastic you've Got one point three three traits of entropy. You've got two point 1 1 3 bits of entropy over the same thing Why not use traits all the time you've lowered the entropy No, I haven't. It's just using different units and the way to think of this is something like the following The amount of information is constant that you can measure it in different units It's a bit like having a 1 kilogram bag of sugar the one kilogram bag of sugar is an amount of sugar If I choose to I could revert back to imperial units and say it's actually 2.2 pounds, and of course those of you in North America still use the imperial system. We'll say hey I'd like that in pounds and ounces so yes, it's [2/10] of 16 ounces which is 3.2 and yeah, so it's 2 pounds and 3.2 ounces so if you want it totally in ounces to 16 to 32 it's [35] point two ounces Worth of sugar, but it's still the same amount of sugar that [doesn't] [change] at all same thing here 1.3 three tricks of information is the same amount as [2.11] three bits, so you're not winning out in bt Entropy, but where you are winning out here is being able to get your average code length down That might matter to you quite a lot saying oh if only I'm allowed to use digits like zero one and two I can send fewer of them than if I have to be limited to zeros and ones
Info
Channel: Computerphile
Views: 55,625
Rating: undefined out of 5
Keywords: computers, computerphile, Huffman Coding (Algorithm), bits, trits
Id: DV8efuB3h2g
Channel Id: undefined
Length: 5min 37sec (337 seconds)
Published: Mon Oct 21 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.