in reply to Re^3: Data compression by 50% + : is it possible?
in thread Data compression by 50% + : is it possible?
There are remarkably fewer combinations than it would appear at first glance. The OP creates a vector of four random digits (0..9), but then enforces a few rules:
As a result of those rules, none of the output groups will contain 0 or 1. So with the OPs script, you should never see the characters:
$ perl -e 'print join(" ", map { chr(33+$_), chr(33+$_+1) } map {10*$_ +} 0 .. 8)' ! " + , 5 6 ? @ I J S T ] ^ g h q r
That removes 18 of the 90 values, greatly reducing the number of possible records generated. Additionally, the remaining digits aren't equally distributed: 2 appears about half as often as 3 and about a third as often as 9.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Data compression by 50% + : is it possible?
by BrowserUk (Patriarch) on May 12, 2019 at 23:33 UTC | |
by baxy77bax (Deacon) on May 13, 2019 at 08:53 UTC |