Welcome to the most active Linux Forum on the web.
 LinuxQuestions.org huffman algorithm
 Programming This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game.

 03-11-2004, 12:37 PM #1 mcshen LQ Newbie   Registered: Dec 2003 Distribution: womandrake Posts: 28 Rep: huffman algorithm I am just wondering how one would find the priority(by the standard below) if he/she is given the frequency.. would priority = 1/frequency work? higher frequency 10,9,8,7,6,5,4,3,2,1 higher priority 0,1,2,3,4,5,6,7,8,9 basically, higher Frequency(the number is bigger) -> Higer priority(number is smaller), so a priority of 0 will mean frequency of 10
 03-11-2004, 12:45 PM #2 wapcaplet LQ Guru   Registered: Feb 2003 Location: Colorado Springs, CO Distribution: Gentoo Posts: 2,018 Rep: I'm not sure what you mean... priority and frequency of what? If you're saying that: frequency(10) = priority(0) frequency(9) = priority(1) ... then I guess subtract either one from 10 and you have the other.
 03-12-2004, 01:50 PM #3 mcshen LQ Newbie   Registered: Dec 2003 Distribution: womandrake Posts: 28 Original Poster Rep: yes. that's what i mean. I will try that. thanks
 03-12-2004, 02:00 PM #4 Mohsen Member   Registered: Feb 2003 Location: Iran Distribution: Solaris 10 Posts: 201 Rep: Instead of doing that it's better trying to make the Huffman tree. It's quite easy. And do not need to be careful about priorities and frequencies.

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Linux.tar.gz Linux - Security 19 05-02-2006 08:54 PM caicaicherry Programming 4 09-22-2005 03:36 AM gusx Linux - Networking 1 09-19-2005 09:25 PM nodger Programming 6 01-28-2005 06:13 PM inthefuture Linux - Security 1 08-26-2004 10:01 PM

LinuxQuestions.org

All times are GMT -5. The time now is 01:29 PM.

 Contact Us - Advertising Info - Rules - Privacy - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -