Compression using Prime Numbers

5 views
Skip to first unread message

Ali Adams

unread,
Sep 1, 2015, 7:09:18 PM9/1/15
to Abdulsalam Al-Mayahi, Hatim Zaghloul, Haifeng, Waleed M., Çhadi metab, Maher Amin, United-quran
RE: Base prime number system possible?
Consider a language consisting of the words "tom" "likes" "hates" "anne".
If we number these words as 1, 2, 3 and 4, then "tom likes anne" is encoded as 2 x 3x3 x 7x7x7x7. The list of primes is 2,3,5,7... and they correspond to the word ordering. So 2 is the first word, and 2 occurs once (1), so the first word is "tom". the next word is represented by 3 which occurs twice (2) so is "likes" and the third word is represented by 7, which occurs 4 times so is "anne".

"anne hates tom" would be 2x2x2x2 x 3x3x3 x 5.

if you think about it, this is pretty neat. given a number you can find factors and work out what the sentence is - even though the whole thing is squashed into a single number.
 
 
image
 
 
 
 
 
Base prime number system possible?
I read The Curious Incident of the Bear in the Night-Time and one of the bits of cleverness is using primes to number the chapters. This got me thinking, is it poss...
Preview by Yahoo
 

Ali
Reply all
Reply to author
Forward
0 new messages