I just ran across the videos about Superpermutations and was very
interested in the concept and started to think if there were any
practical applications. I was about to come up with but one idea I'm
hoping maybe someone here can provide assistance on if it is feasible
and or as practical as it may seam. I would love to hear about other
possible practical uses, but below is my thought.
Data set storage.
Assume
I have a item that is customizable. Perhaps an item in a popular video
game. Now the item has 6 parts and each part can be used in any order.
Storing these items and who has them has several routes;
In
one traditional method we have a database table "ITEM" and it has
columns Player, Item_Type,Part_1,Part_2,Part_3.... This method works
mostly fine but if we have 15 million players and each player has 10 of
the items we have a database with 150 Million rows. While this works
fine I feel it has substantial overhead in the database.
An
alternative would be to "code" the item and make an ID that described
it. Such as represent each "part" as a number 0-6 and put them together
as a string. So one item is represented as "123645" and with this our
table could just be Player, Item_Code. This begins to streamline things a
bit but the "item code" alone for 150 million lines is close to a gig
of data. But it is the method I would have chosen previously however
with the idea of superpermutations I wonder if the next idea is
feasible.
Start with superpermutation for N=6 and save all 872 digits of the string.
"12345612345162345126345123645132645136245136425136452136451234651234156234152634..."
then
when you generate the item code you simply look for its location in the
string so the example of "123645" shows up 22 digits in so we can store
that item as item "22" instead of "123645". This saves us a minimum of 3
bytes per line which at least cuts the data storage in half.
Tho
I do wonder when you start getting larger N values how long before your
starting string is too large to deal with in itself. If I understand
correctly N=16 would have over a trillion digits and would need 1.3 gigs
to store, but even here the idea shows its value in some cases such as
when almost every person has at least one version of "0123456789ABCDEF"
and that is stored in this method as a simple 1 instead of all 16
digits.
can anyone shed more light on this concept and or provide other practical usages?