David Huffman is Dead 93
etphone writes "One of the Gods of information theory, David Huffman, has passed on:
here's the official the press release. Damn, he was a good professor too..."
"An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup." - H.L. Mencken
Re:About that little "term paper" he wrote (Score:2)
A few more details...
Nobody in the class but Huffman chose the term paper because they new it was a trap. The professors assigned Huffman a problem that many people believed was unproveable, though it could not be proved unproveable. It was a problem that they had worked on very hard and not been able to solve.
The assignment was to find a way to generate minimum spanning trees, given an arbitrary set of bytes. Now, humans could do this with brute force and then checking their results to test if the spanning tree was actually the minimum spanning tree, but it wasn't a very scientific process.
As the due date for the term paper came, Huffman still couldn't figure it out. He gave up, decided to bite the bullet and try his luck at the test he hadn't studied for. He told his wife to throw his papers away. She did, and as he was leaving he looked in the trash and saw his notes and drawings of minimum spanning trees **upside down**... and the rest is the history.
I heard somewhere that he got his Masters and PhD at the same time because of this, but I'm not sure about that one.
Taking a class from Huffman (Score:2)
First of all, every class he ever tought was at 8:00am in the morning. For a Santa Cruzian, that's the equivalent of 4:00am since we normally don't wake up till 12
For the first two weeks of class, he was an absolute teddy bear. That was good, since the class was open to all majors (Modern Feminism and History of Conciousness included). Two weeks into the class, someone fell asleep in the front row. He wasn't a teddy bear anymore. From that point on, the entire class was in fear for their life whenever he turned around quickly.
The class was very hard. Homework was due every single class and there was a quiz almost every single class. Every class introduced brand new material. Miss a single class and you're totally screwed. Of course, after that class, most other CS theory courses were review
The class wasn't easy, but man could he teach.
Arithmetic coding versus Huffman coding (Score:1)
Arithmetic coding achieves the equivalent of allocating fractions of bits and truely achieves the optimal compression in cases where the distribution of each symbol is not correlated to previous symbols.
In most cases, though, the difference between Huffman and Arithmetic coding are negligible.
Re:Feeling sad (Score:1)
Believe me (to the original poster), wishing I had been able to talk to him one last time may sound selfish, but learning that he had passed hit me like a ton of bricks. Many others who knew him no doubt feel the same way.
Ouch. (Score:1)
I took two classes from him. Barely passed one, failed the other --- his classes were incredibly difficult, but I learned more from them than from just about any other computer-related classes I took in school. For all that his classes were
hard, he was a great guy, too: i remember
getting a ride to class from him (until he
had a flat), and the class buying pizza and
delivering it to a study session, to his surprise,
the night before the final.
I'll miss him. More than I would have expected.
Re:I'm not too familiar with compression but.. (Score:1)
The LZH algorithm (Lempil-Ziv-Huffman) basically does this, though. The LZ77 part compresses by creating "tokens" which point back into a window of recently seen symbols, which is kind of like RLE except the "run" can be a mixture of symbols. These "tokens" then have a non-uniform distribution, which can be further compressed by Huffman codes (ie, give the more common tokens a shorter codelength). So the basic idea (tacking a Huffman (or arithmetic) coding step onto a front end pattern matching compressor), is a sound one.
Actually, I think this is the technique that gzip and PKZip use as well (Maybe LZH is slightly different) Anyone?
Missed but not forgotten (Score:1)
It is sad that those that built the swings and see-saws in our playground are leaving us.
David you will be missed, but never forgotten.
mitd
"Just an old-fart coder"
Re:Taking a class from Huffman (Score:1)
Re:Proof that it's optimal? I don't believe that. (Score:1)
It is optimal for so-called instantaneous coding (where you know a symbol has been output as soon as you see its last bit).
Interesting thing is that previous attempts at solving this problem relied on trying at each stage to seperate the characters into two sets of equal probability, then seperating these sets in two and so-on. Not so easy. It takes a long time and still doesn't produce very good results. Huffman's insight (obvious in hindsight) was to do it bottom-up. Start with the least frequent characters, unify them into a new character and repeat.
Ah, the world needs more "lazy" folks like this.
Re:Proof that it's optimal? I don't believe that. (Score:1)
I know. Nevertheless, I thought I had a rather trivial counter-example. Fortunately, Gargle show my mistaken assumption.
---
huffing and puffing (Score:1)
Just a "me to". (Score:1)
But this guy is one of the brightest in all the fields I've studied. This is a day to grieve for a great mind.
Elivs
modirators feel free to lower this comment.
Re:Sad times... (Score:2)
ms
Re:About that little "term paper" he wrote (Score:1)
As I read throught the bulk of the users' comments, it strikes me that only one made a mention of feeling sorry or bad that he died (and that was only for selfish reasons).
One of the greatest men in the CS field died and all you guys can talk about is optimality of Huffman encoding.
Ask yourself these questions... A) What did I ever make in grad-school that is still being used today B) Why should I care that he died?
His death represents a signifigant turning point in the CS field; in some ways, it's starting the second generation..
Any CS person from now on won't be able to say that they were alive at the same time Dr. Huffman was.
And that makes me sad.
Re:A former student's thoughts... (Score:1)
You could you tell a bit about this one? I can only imagine flat surfaces here, but that wouldn't be worth mentioning, or?
Re:Ah, I remember .LZH compressed files... (Score:1)
I remember being introduced to Huffman compression in CS classes in Edinburgh...
Can't claim to have known the guy, but may he RIP, and condolances to those who did know him.
~Tim
Re:Feeling sad (Score:1)
Re:WinZip (Score:1)
Huffman... he will be missed. (Score:1)
Last night in a crash course for an exam I came accross Huffman encoding. Needless to say it was much more interesting then what I was supposed to be studying
Seems like another legend has passed on and I won't be able to hear some great stories...
rip Huffman, and thanks. This is why I read
Re:Sad times... (Score:1)
True, he hasn't done much as far as technicall innovation (at least as far as I know), but his work was certainly a catalyst for bringing powerful, unix-style computing to the desktop, which has spawned numerous advances in computer science and education.
And of course, let's not forget RMS. A lot of people don't agree with his views, but you can't deny that the FSF has greatly bettered the world of computing... remember, you likely wouldn't have Linux without GNU.
------
Re:Who's Huffman? (Score:1)
I'm explaining badly here, so I'll bow out.
Affiliations, politics, etc can darken a man/woman's vision. Huffman's vision at one early point in his life was extremely pure.
That should be celebrated.
BTW I'm 45 and my hair raises at the very mention of his name.
Fare Well, old friend...
Pete.
Re:Who's Huffman? (Score:1)
Huffman inventing data compression (Score:1)
Please correct me if I'm wrong.
--
That is a suprise (Score:1)
Re:An Example of Huffman coding in JavaScript (Score:1)
Who Huffman was. (Score:2)
From it:
Huffman is probably best known for the development of the Huffman Coding Procedure, the result of a term paper he wrote while a graduate student at the Massachusetts Institute of Technology (MIT). "Huffman Codes" are used in nearly every application that involves the compression and transmission of digital data, such as fax machines, modems, computer networks, and high-definition television.
------
Re:Who's Huffman? (Score:1)
No (Score:3)
You're thinking of Phil Katz, although he himself stood on the shoulders of giants.
Huffman code goes back to the 50s or 60s. Put very simply it's a way of representing information where the length of the code is short for more frequently occuring elements, and long for infrequently occuring elements.
Nobody uses Huffman compression alone these days, but it is still very popular as a back end after a dictionary compressor. Such an approach is used by Zip's deflation, LZH (where the "H" is you-know-who), etc.
---
About that little "term paper" he wrote (Score:5)
Anyway, just thought I'd share my memories about them man.
Huffman and a few others were taking a graduate course from a professor who gave them a choice about how to be assessed. Either they could sit an end-of-term exam (there may have been some assignments involved throughout the semester as well), or they could write a term paper. Each student could make their own choice.
Most of the class members chose the end-of-term exam, but Huffman (he admitted later) was a slightly lazy student and so decided on the term paper, thinking he could knock it off in a couple of weeks and get an easy credit. Unfortunately (for him, luckily for computer science) he kept putting off the work and suddenly realised he was running out of time to write the paper and couldn't even think of a topic. To make matters worse, he had missed (or not concentrated in) so many of the lectures that the option of renegging and doing the exam was no longer really open to him.
In desperation, he asked the professor for a suggested topic. The professor (I wish I knew his name - he deserves a place in history as well!) posed a problem about compressing data. Huffman struggled with the topic for quite a while but eventually (quite close to the deadline, IIRC) came across a very elegant solution that worked beautifully. He was even able to prove that his solution was optimal, in the sense that no better byte-by-byte compression method was possible (this doesn't include things like LZW, etc, which use run-length compression techniques).
The rest, as they say, is history. As an aside, Huffman passed the course with top marks, since the professor had neglected to inform Huffman that he (the professor) and a colleague had already put extensive work into the problem and failed to solve it satisfactorily.
Just goes to show, sometimes the best work *is* done under pressure.
(OK, let the error-pointer-outers go to work. Where did I mess up?)
Didn't he invent ZIP file compression or something (Score:1)
Some recent photos (Score:3)
Dr. Huffman was another modest genius whose work doesn't fit in the hoary pigeonholes of Nobel candidates but is as ubiquitous as the DSP. It's no surprise he seems anonymous; these are the sort of stories that make me so often grateful for
Thanks David.
I could be wrong, but... (Score:1)
Re:Who's Huffman? (Score:1)
Patrick Barrett
Yebyen@adelphia.net
Re:I could be wrong, but... (Score:1)
Re:Who's Huffman? (Score:2)
Sad times... (Score:2)
It does make you wounder, who will be the "heros" of tomorrow?
B. Johannessen
Re:Didn't he invent ZIP file compression or someth (Score:1)
Patrick Barrett
Yebyen@adelphia.net
Proof that it's optimal? I don't believe that. (Score:2)
I'm skeptical about the "proof" part of the story, since Huffman coding is really just a quick-n-dirty (but much easier to implement) approximation of arithmetic coding. Arithmetic coding will match or beat Huffman every single time, if compression ratio is all you care about. I'm not saying Huffman coding isn't extremely cool, but it's certainly not optimal. It sure is elegant, though.
---
Re:Proof that it's optimal? I don't believe that. (Score:1)
You are, but it's no biggie. ;-) (Score:2)
If, say, your father had died, would you let some hack reporter write his obituary if you could do it yourself?
Re:I think that might be a CS urban legend (Score:1)
Re: Being Sad (Score:2)
For me it's the same as erecting a monument.
At least these comments weren't about PKzip 8(.
Re:About that little "term paper" he wrote (Score:1)
Not quite. The Huffman algorithm has been proven to produce optimal prefix code, which are codes such that no codeword is also a prefix of another codeword. According to my algorithms book, Huffman compression saves 20% to 90%.
Re:A former student's thoughts... (Score:2)
Compression / coding (Score:1)
Re:I'm not too familiar with compression but.. (Score:2)
And yeah, DH has the advantage where the tree starts out with all leaves being at the lowest level (basically being binary code, heh)... I guess a priority heap would be a good implementation to use, yeah... I just figured one would rebuild the tree after each character. It doesn't take *that* long. :) (Of course, for a large file that'd be real painful.) By removing the initial tree, however, you do lose the implicit encryption in the general case, but there's no reason you couldn't have a different starting tree, and then you could also use trees tuned for different applications and get a bit more compression anyway. Even with non-optimized initial trees (i.e. all characters at the bottom), you have about 8.578E506 initial trees to choose from, though admittedly that would start out with just your basic one-to-one replacement thing, and if anyone wanted to crack the code it'd be easy to just assume the trivial, ordered tree, decompress to trivially-compressed plaintext, and then work out the substitutions later. Ohwell.
---
"'Is not a quine' is not a quine" is a quine.
Re:Sad times... (Score:1)
Re:Some recent photos (Score:2)
These aren't simple, obvious equations or paper folding for a hobby, these are the elegant works of beautiful mathematics that only a genius like Huffman could come up with. Huffman will be missed at Santa Cruz, and by the rest of the pepole in the world that will now never get to know him.
Link to a huffman encoding web site (Score:2)
Joe
Re:A former student's thoughts... (Score:1)
Nevertheless, he'll be missed.
Re:Who's Huffman? (Score:1)
If you'd attempt a true (even spam-camouflaged) e-mail, we'd discuss it, but since you won't, I can't illuminate you further. You lose.
Re:Feeling sad. not really. (Score:1)
First midterm of my first class of college, I was asked to pick up my midterm from his office. Strange, but I didn't know any better. I was asked to think about what I did during the test very carefully. Even stranger. I told him to the best of my ability. "Came in, took test, handed test to you, left." I was then accused of lying and that it would go easier on me if I named accomplices. After several iterations of this, I was finally accused of cheating. He displayed the evidence. Two tests with my name on it. Similar printing styles. I was able to identify which one was mine. Neither one was a stellar performance of scoring. High 70's and low 80's. More accusations and since I had no clue on how this happened, he figured I was protecting someone. He sent me out, saying he was going to get me thrown out of college. It's a good thing I ran into a TA who mentioned seeing duplicate homeworks. She suggested checking the registration office. The next morning I find out I have a name in common with someone else at UCSC. He happens to be auditing CIS 10. I go to Huffman and explain my find. I was grudgingly allowed back into class while he checked this out.
So that's my memory of Huffman. He nearly turned me complety off computer science. Hopefully, my story wasn't common to most students.
Here's the algorithm in Perl . . . (Score:2)
Didn't know he did that sort of thing... (Score:1)
Re:About that little "term paper" he wrote (Score:1)
i.e. if you've symbols A & B, you can code it as AA,AB,BA,BB. By coding more and more symbols at a time, you can eventually reach the limit determined by the entropy of your signal source.
Re:Proof that it's optimal? I don't believe that. (Score:2)
Hmm.. I haven't seen the proof, but I can show you a very simple counter-example to right here. Got a minute?
Suppose we have an alphabet of only 3 characters, and each character occurs with equal frequency. This is a nasty example, since neither arithmetic or Huffman are going to compress it well.
Look what happens when you assign the Huffman codes: you're going to have one 1-bit code, and two 2-bit codes. On average, characters are going to be represented by 5/3 bits (about 1.666 bits).
With arithmetic compression, characters are going to be represented by log2(3) bits (about 1.584 bits). log2(3) is less than 5/3. QED.
---
Ok, Gargle just explained it. :-) (Score:1)
Ah, Gargle's note below shows me my mistake. I ass/u/me'd a situation where you only encode one character per symbol. By encoding larger chunks, Huffman can approach the log2(3) case. Ok, you got me. I was wrong. :-)
---
That's cool (Score:1)
Re:Sad times... (Score:1)
Why... Rob Malda, of course. ;)
On another note, Bill Gates has become a sort of "nerd hero" to those who don't know any better. Anyone who isn't a real techie would consider Bill Gates to be the quintessence of "geek" and "nerd".
And, of course, Linus, RMS, etc.
Those will be the best known, of course. The rest, like in every other major area, will rarely be remembered.
--
here's a link (Score:1)
Re:Advanced theory (Score:1)
1. Tastless
2. Incorrect, space "savings" must be less than 100%, otherwise you have nothing left.
-----
I'm not too familiar with compression but.. (Score:2)
Is it appropriate (or has this been done) to combine Huffman and run length encoding?
Like reserve a huffman symbol for specifying that "the next symbol" will repeat for a specified amount of time. You'd prolly reuse all the symbols that you've already generated for all 256 bytes to specify the length of the "run".
So if you encounter the RLE symbol (say "11") you'd know the next symbol after that specifies run length, and the one after that is the symbol that is running that length. It would be pretty efficient especially if the document didn't have too many characters that repeated over 256 times. Maybe a header to specify how many symbols represent a length for files that repeat too much (might be overkill)..
Am I stating the obvious? Cause I really think it would be pretty cool
Huffman encoding is darn elegant.
Re:Who's Huffman? (Score:1)
-----
Re:Proof that it's optimal? I don't believe that. (Score:1)
Remember, a proof in computer science is like a proof in math.
If you are just complaining that Huffman coding is not always the best compression method, well, nobody ever claimed it was.
What it is, is a greedy algorithm which constructs a provably optimal "prefix code". Furthermore, it is possible to show that the optimal compression achievable by a character code can always be achieved with a prefix code.
A character code is one in which each byte (or other symbol) of the input is translated to a single symbol of output. The compression achieved in Huffman coding is optimal for character codes.
LZW, arithmetic coding, and other compression algorithms are not character codes.
Torrey Hoffman (Azog)
Your reasons sound just as selfish, if not more (Score:1)
You should not tell us that we should feel sad.
That is not your place or right to command.
The greatest eulogy is that we are discussing his life and work. A remarkable man has passed and now we discuss his accomplishments on an Internet bulletin board something that did not exist or was even considered a possibility when Huffman was born.
Huffman's passing does not represent anything in the CS field; it is his LIFE which does!
I am not sad he is dead.
I am happy that he once lived!
An Explanation of Huffman Coding (Score:4)
First, definitions:
A character code is a code in which each symbol of input is translated to one symbol of output. (Compression is achieved in character codes by using variable length codes. Short code symbols are used for frequently occuring inputs.)
A prefix code is a code in which no symbol is a prefix of another symbol. For example, if you have "10" as a symbol, then you can't have "101" as a symbol in a prefix code. Prefix codes are nice because they greatly simplify encoding and decoding.
It is possible to prove that the optimal data compression achievable by a character code can always be achieved with a prefix code. Furthermore, it is possible to represent codes as a binary tree, in which a symbol "1" represents the left branch, and "0" the right branch. So "101" would be left, right, left.
It is easy to prove that an optimal code for any particular file is represented by a full binary tree, i.e. one in which each node has two leaves. (This is the first exercise of the chapter).
Now, Huffman coding is a greedy algorithm that constructs an optimal prefix code. The algorithm builds the tree T corresonding to the optimal code in a bottom-up manner.
Pseudocode:
Assume C is a set of n characters, and each c in C is an object with a frequency f(c). A priority queue Q, keyed on f, is used to identify the two least-frequent objects to merge together. The result of the merger of two objects is a new object whose frequency is the sum of the frequencies of the two objects that were merged:
And that's it!
To prove this is correct, prove that the problem of determining an optimal prefix code: (a) exhibits the greedy-choice property, and (b) exhibits the optimal substructure property
From these two lemmas, the theorem
"Huffman coding produces es an optimal prefix code" is trivial to prove. The corollary is that Huffman encoding produces an optimal character code.
Torrey Hoffman (Azog)
Re:A former student's thoughts... (Score:1)
Re:A former student's thoughts... (Score:2)
I do believe he was generally a bit annoyed by the many students who were unprepared to take his classes (in his mind). He was demanding, to be sure (I generally spent ~ 15 hours each week on his homework alone; but I was woefully unprepared
BTW. I'm class of '93; when were you there?
Re:Proof that it's optimal? I don't believe that. (Score:2)
An example:
Symbols A, B. P(A)=0.8, P(B)=0.2
Code A=0, Code B=1, Expected length=1
Code 2 symbols at a time:
P(AA)=0.64, P(AB)=0.16, P(BA)=0.16, P(BB)=0.04
Code AA=0, AB=10, BA=110, BB=111
Expected length=0.78
Code more symbols at a time if you want (but returns are diminishing)
The shortest possible expected length is given by the entropy which is equal to -P(A)logP(A)-P(B)logP(B) =0.72
I'm not sure how arithmetic coding works, but I highly doubt that it gives you the theoretically optimal coding just like that.
Re:I'm not too familiar with compression but.. (Score:2)
---
"'Is not a quine' is not a quine" is a quine.
A former student's thoughts... (Score:5)
In any case, the story above seems mostly accurate; Huffman's teacher was in fact Richard Fano, who along with Claude Shannon, was one of the early architects of "information theory". Every aspect of our modern life, from our use of CD players, to wireless phones (to name but a few) came as a result of these ideas. In fact, Shannon-Fano compression coding is a related form that was developed before Hufmann's technique. However, since Shannon and Fano knew it wasn't "optimal" (a much abused word), and spent much time trying to come up with an optimal algorithm, they thought it was impossible. So, by giving the assignment to Huffman as a project, he hoped to show him how such as easy sounding question was in fact quite difficult (or impossible).
Well, Professor Huffman was brilliant at boiling problems down to their most basic nature, but after about a week of thinking about it on and off, he realized that he probably wouldn't be able to figure it out, and that it was a much harder problem than it at first seemed. So he crumbled up all his notes and began to prepare for the final, but as he tossed his notes into the garbage can, he says he had a moment of clarity, and suddenly realized the process was actually quite simple.
So when the time came to present his "project", Professor Fano called on David to discuss his method of producing minimum redundancy codes, assuming of course that David would have come up with a non-optimal method, or have to admit that it seemed very hard or impossible. Instead, Huffman went to the chalkboard and gave a quick explanation of how to produce what we now call "Huffman codes", then sat down. Fano apparently slapped his forehead in amazement and said (in French) something like, "It CAN'T be that easy!". But it was, and Huffman, never having been told that this problem was "impossible", dutifully solved it.
Huffman's achievements go well beyond his coding technique, and are well worth looking up (among other things, he produced some novelty papers about optical illusions that have become very useful in machine vision circles). I can tell you, as a former student, that he was both loved and loathed, but as someone who was willing to put in the work, his classes were incredibly enlightening.
Re:Proof that it's optimal? I don't believe that. (Score:2)
It can be shown to be "theoretically optimal" in this sense as well. I believe Glen Langdon has shown that both techniques are eqipotent, in that, given sufficiently powerful modelling techniques, neither can outdo the other as a coding method (ie. they both can approach the entropy limits). However, as a practical method of coding, they each have their different strengths and weaknesses, and their different applications.
Ah, I remember .LZH compressed files... (Score:1)
I had some demonstration C-source code for various compression methods once, but I never could really understand it at the time (probably because I was 12 then).
Although as I understand it other people's work was used as well, the work done by these compression pioneers was cruical to the rapid flow of information we have today.
Re:I'm not too familiar with compression but.. (Score:1)
Is that what you were thinking - or does the second tree do something else?
Like you say, this run length thing would put an additional entry on the tree
Dynamic Huffman would actually be good for large files since you wouldn't have to parse the whole file first
Huffman... sigh too bad. (Score:2)
I just want to say that we all need to spend time studying the likes of Huffman, Greenspun, and Minsky, Mandelbrot, so that good ideas can stay alive.
Thanks.
David