Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^5: Dynamically Updating Frequency Analysis

by Voronich (Hermit)
on May 08, 2013 at 16:26 UTC ( #1032632=note: print w/replies, xml ) Need Help??

in reply to Re^4: Dynamically Updating Frequency Analysis
in thread Dynamically Updating Frequency Analysis

AH! Yes. I see what you mean now. That's actually a fun problem.

My first "real world" answer would be to accept the inefficiency of the degrading accuracy of the table. But that's no fun.

If you did a true multi pass you'd run in to the problem of your universe of 8-bit symbols jumping by virtue of the previous encoding pass. So that's no fun either.

It looks to me like "given lock in to the initial approach" you'd have to take the optimum compression candidate, decrement the individual cases of its components from the frequency distribution table, including bounding characters (the spaces in the 2-grams of ' here ', for instance) for each substitution instance of 'here'. That would leave you with an accurate frequency distribution, having pulled the 40 instances of 'he', 'er', 're', ' h' and 'e ' (with the foolish assumption that 'here' always occurs in the middle of a sentence.) So the table is accurate again.

  • Comment on Re^5: Dynamically Updating Frequency Analysis

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032632]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2017-04-23 18:55 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.