in reply to Re^4: Dynamically Updating Frequency Analysis
in thread Dynamically Updating Frequency Analysis
Does this make sense?
Yes, (sort of :), but I still think that you are on a hiding to nothing with it. The problem is that each time you change things, everything changes and must be recalculated.
But worse, you may well find yourself in an infinite loop. That is, you make a change, that pushes one thing out in favour of another; but when you recalculate the numbers flip the other way and favour bringing back the one you just kicked out in place of the one you just added.
That would be relatively easy to detect if the periodicity is 2 or 3; but with 32 slots to fill, the periodicity could theoretically 31!
You mention a time limit; but what would you set it to? Too short and you'll leave most of your 32 slots unfilled a lot of the time; too long and your burning cpu for no benefit.
The beauty of LZW is that it processes the input as a stream; never going back to try and apply the latest changes to the earlier part of the data. Whilst that has the disadvantage that the early part of the stream may not be as compressed as it might be; it has the major advantage of being a time-efficient, deterministic process.
Going back to a recent discussion regarding P v NP; it is 'good enough' when seeking perfection might never complete.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Dynamically Updating Frequency Analysis
by Limbic~Region (Chancellor) on May 09, 2013 at 18:13 UTC |