Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 4 General Forum
Date: Thu Oct 4 2001 10:06 pm
Author: Bortz, Andrew S. <abortz@andrew.cmu.edu>
Subject: Re: modifying FileBitReader/FileBitWriter

This discussion really belongs in the other forum now, but anyway...

Whatever gave you the idea that you had to store the "actual" character frequencies? What about storing approximations that give you the same tree? You can also skip storing the character itself since you are storing an array. There are several other optimizations I can think of that would get it very close to the 10 bits per character that recursively storing it does, if not below. Also, think about the true entropy in the trees we have - a complete binary tree is very constrained in its structure. If we know how many nodes it has total, or how many leafs it has total, how many more bits do we need to store to be able to reconstruct it? Since ultimately we can do some tinkering with the tree before we finalize it in compress(), what could we do to it to make it easier to store? Without changing its optimality (sp?) we could easily swap children in a single node... There are a lot of questions we need to answer before we know whether the recursive solution is best. I suspect if it isn't, it's close enough to not matter much.

I did, however, do it the same way you did, mainly because at the time the elegance of the solution rather than the compression it gets was my primary concern.
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
modifying FileBitReader/FileBitWriter      Cipriani, Jason A.      Thu Oct 4 2001 12:09 am       
Re: modifying FileBitReader/FileBit...      Detwiler, Jay T.      Thu Oct 4 2001 9:32 am       
Re: modifying FileBitReader/File...      Cipriani, Jason A.      Thu Oct 4 2001 10:24 am       
Re: modifying FileBitReader/F...      Lee, Peter      Thu Oct 4 2001 1:48 pm       
Re: modifying FileBitReade...      Cipriani, Jason A.      Thu Oct 4 2001 3:51 pm       
Re: modifying FileBitRe...      Liu, Limin Angela      Thu Oct 4 2001 4:13 pm       
Re: modifying FileBi...      Cipriani, Jason A.      Thu Oct 4 2001 6:28 pm       
Re: modifying Fil...      Bortz, Andrew S.      Thu Oct 4 2001 8:06 pm       
Re: modifying ...      Cipriani, Jason A.      Thu Oct 4 2001 9:31 pm       
Re: modifyi...      Bortz, Andrew S.      Thu Oct 4 2001 10:06 pm       
Re: modify...      Cipriani, Jason A.      Fri Oct 5 2001 10:12 am       
Re: modify...      Cipriani, Jason A.      Fri Oct 5 2001 10:44 am       
Re: modify...      Cipriani, Jason A.      Fri Oct 5 2001 10:45 am       
Re: modifying FileBitReader/FileBit...      Maxim, Michael G.      Fri Oct 5 2001 6:12 pm       
Re: modifying FileBitReader/File...      Cipriani, Jason A.      Sat Oct 6 2001 10:28 am       
Re: modifying FileBitReader/F...      Bortz, Andrew S.      Sat Oct 6 2001 3:49 pm       

Back to previous screen