Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^4: Data compression by 50% + : is it possible?by roboticus (Chancellor) |
on May 12, 2019 at 13:07 UTC ( [id://1233642]=note: print w/replies, xml ) | Need Help?? |
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:
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.
In Section
Seekers of Perl Wisdom
|
|