Programs Encoded as Prime Numbers...

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Einhander Sn0m4n
Insane Railgunner
Posts: 18630
Joined: 2002-10-01 05:51am
Location: Louisiana... or Dagobah. You know, where Yoda lives.

Programs Encoded as Prime Numbers...

Post by Einhander Sn0m4n »

This article on illegal prime numbers made me think.

Is it theoretically possible for any executable to be rendered as a bigass prime number?
Image Image
User avatar
Beowulf
The Patrician
Posts: 10619
Joined: 2002-07-04 01:18am
Location: 32ULV

Post by Beowulf »

If you use the GZip method, yes. If you want it to be directly executable, not really.
"preemptive killing of cops might not be such a bad idea from a personal saftey[sic] standpoint..." --Keevan Colton
"There's a word for bias you can't see: Yours." -- William Saletan
User avatar
Jaepheth
Jedi Master
Posts: 1055
Joined: 2004-03-18 02:13am
Location: between epsilon and zero

Post by Jaepheth »

{ 0 , 1 } represents all the information in the universe... depending on how you interpret it. (your algorithm for reading it)
Children of the Ancients
I'm sorry, but the number you have dialed is imaginary. Please rotate the phone by 90 degrees and try again.
User avatar
B5B7
Jedi Knight
Posts: 787
Joined: 2005-10-22 02:02am
Location: Perth Western Australia
Contact:

Post by B5B7 »

If it's an illegal number it should be arrested and charged. Of course murder is illegal but we don't arrest murder, we arrest the murderer.
:)
Answer 1 for yes to a question, 2 (or 0) for no.
Q: Did you do this murder? A: 1 - this means 1 is illegal.
TVWP: "Janeway says archly, "Sometimes it's the female of the species that initiates mating." Is the female of the species trying to initiate mating now? Janeway accepts Paris's apology and tells him she's putting him in for a commendation. The salamander sex was that good."
"Not bad - for a human"-Bishop to Ripley
GALACTIC DOMINATION Empire Board Game visit link below:
GALACTIC DOMINATION
User avatar
ThatGuyFromThatPlace
Jedi Knight
Posts: 691
Joined: 2006-08-21 12:52am

Post by ThatGuyFromThatPlace »

Wow, on some level I guess I knew the debate existed (being a cryptofreak and all) but I guess I hadn't looked into enough to realize they were debating whether the physical number representing the files/programs were 'illegal' thats just crazy awesome as a debate In practice I have to go with 'information wants to be free (except my information)'

and, to the OP:

Yes, any executable can be rendered as a prime number, its just a matter of applying a suitable algorithm.
[img=right]http://www.geocities.com/jamealbeluvien/revolution.jpg[/img]"Nothing here is what it seems. You are not the plucky hero, the Alliance is not an evil empire, and this is not the grand arena."
- The Operative, Serenity
"Everything they've ever "known" has been proven to be wrong. A thousand years ago everybody knew as a fact, that the earth was the center of the universe. Five hundred years ago, they knew it was flat. Fifteen minutes ago, you knew we humans were alone on it. Imagine what you'll know tomorrow."
-Agent Kay, Men In Black
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

Proving that this is possible would involve proving that there exists a one-to-one mapping between the set of all prime numbers and the set of all Turing machines. My first instinct would be to say "Yes", since neither the set of all primes nor the set of all Turing machines is uncountable.
Damien Sorresso

"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
User avatar
haard
Padawan Learner
Posts: 343
Joined: 2006-03-29 07:29am
Location: Center of my world

Re: Programs Encoded as Prime Numbers...

Post by haard »

Einhander Sn0m4n wrote:This article on illegal prime numbers made me think.

Is it theoretically possible for any executable to be rendered as a bigass prime number?

With the right algorithm, sure.


In fact, any program is an algorithm, and any algorithm can be represented by a (natural) number, so it's not just the primes that are in danger.
If at first you don't succeed, maybe failure is your style

Economic Left/Right: 0.25
Social Libertarian/Authoritarian: -5.03

Thus Aristotle laid it down that a heavy object falls faster then a light one does.
The important thing about this idea is not that he was wrong, but that it never occurred to Aristotle to check it.
- Albert Szent-Györgyi de Nagyrápolt
User avatar
Surlethe
HATES GRADING
Posts: 12267
Joined: 2004-12-29 03:41pm

Post by Surlethe »

Durandal wrote:Proving that this is possible would involve proving that there exists a one-to-one mapping between the set of all prime numbers and the set of all Turing machines. My first instinct would be to say "Yes", since neither the set of all primes nor the set of all Turing machines is uncountable.
Is existence enough? If there are a countably infinite number of Turing machines, then you can even show there exists a bijection between the primes and the Turing machines, but isn't saying that you can encode any Turing machine as a prime's binary representation a little stronger than simply saying you can map from the primes to the Turing machines and back?
A Government founded upon justice, and recognizing the equal rights of all men; claiming higher authority for existence, or sanction for its laws, that nature, reason, and the regularly ascertained will of the people; steadily refusing to put its sword and purse in the service of any religious creed or family is a standing offense to most of the Governments of the world, and to some narrow and bigoted people among ourselves.
F. Douglass
User avatar
ThatGuyFromThatPlace
Jedi Knight
Posts: 691
Joined: 2006-08-21 12:52am

Re: Programs Encoded as Prime Numbers...

Post by ThatGuyFromThatPlace »

haard wrote:
Einhander Sn0m4n wrote:This article on illegal prime numbers made me think.

Is it theoretically possible for any executable to be rendered as a bigass prime number?

With the right algorithm, sure.


In fact, any program is an algorithm, and any algorithm can be represented by a (natural) number, so it's not just the primes that are in danger.
Prime numbers are generally useful for encryption whereas other natural numbers are not so much.
[img=right]http://www.geocities.com/jamealbeluvien/revolution.jpg[/img]"Nothing here is what it seems. You are not the plucky hero, the Alliance is not an evil empire, and this is not the grand arena."
- The Operative, Serenity
"Everything they've ever "known" has been proven to be wrong. A thousand years ago everybody knew as a fact, that the earth was the center of the universe. Five hundred years ago, they knew it was flat. Fifteen minutes ago, you knew we humans were alone on it. Imagine what you'll know tomorrow."
-Agent Kay, Men In Black
User avatar
Kuroneko
Jedi Council Member
Posts: 2469
Joined: 2003-03-13 03:10am
Location: Fréchet space
Contact:

Post by Kuroneko »

Of course. Since every program can be interpreted as a unique natural number n, it can also be encoded as the nth prime p_n. However, it will be easier to simply pad the program with data that will never be executed so that the resulting number is a prime in the first place (especially on a computer, where any sequence of bits is naturally interpretable as a number).
"The fool saith in his heart that there is no empty set. But if that were so, then the set of all such sets would be empty, and hence it would be the empty set." -- Wesley Salmon
Post Reply