News for hackers. Stuff that matters.
Re:Illegal prime by k4st on Monday January 11, 2010 @10:34AM (#1045236)
A more relevant example, as mentioned in a linked article, is that the binary data of images such as child pornography and state secrets are also numbers and as such may be considered illegal.
Re:Illegal prime by Rod on Monday January 11, 2010 @10:44AM (#1045258)
How can an image be a number? This is an honest question.

Isn't an image a list of numbers? These numbers could the RGB of each pixel, or the N higher Fourier coefficients, etc. From these numbers, one can compute a single number, sure. Nonetheless, the idea that an image is a number and, hence, can be made illegal, looks utterly ludicrous to me due to the fact that the image -> number mapping is certainly not injective.

Re:Illegal prime by almost on Monday January 11, 2010 @10:50AM (#1045279)
Nope, that's just one interpretation and it's not more valid then any other. Your argument is equivalent to saying something like this "129 isn't a single number, it's actually 110^2+210^1+9*10^0 (aka 100 + 20 + 9)".

Anything that can be represented on a computer can be seen as a number, rather large numbers sometimes but still definitely numbers.

Re:Illegal prime by Rod on Monday January 11, 2010 @11:01AM (#1045307)
You are totally missing the point. The 3-tuple (1,2,9) may represent number 129 if you use the decimal expansion. What if you use a base-16 expansion, or a base-8 expansion? You can even choose the base so that the tuple -> number mapping is not injective (and, thus, not invertible).

So, you give me a number, and I can give you infinitely many n-tuples that can be transformed into that number. Unless you know the mapping, and unless the mapping is injective, a single number is useless. It could represent infinitely many images.

So, I ask again, how can an image be a number?

Re:Illegal prime by axod on Monday January 11, 2010 @11:51AM (#1045419)
The simplest, and most common representation would be for a file to simply be a string of binary bits representing a large number.

eg:

   big_number = 0;

   while(!feof(file)) {
      big_number = (big_number<<8) | file.readByte();
   }
Re:Illegal prime by Rod on Monday January 11, 2010 @12:11PM (#1045470)
I am pointing at the forest, and you're looking at the trees. We're not even talking about the same thing. I am taking a very high-level, abstract view of the problem. You're thinking of implementation.
Re:Illegal prime by axod on Monday January 11, 2010 @12:27PM (#1045505)
Right. You're just saying there are an infinite number of ways you could convert a string of binary digits into a 'number'.

Well sure :/ Of course there are.

At the simplest form you could swap things around, represent a fractional part of a number etc, at the more complex side you just have encryption.

But those are different things to your question "So, I ask again, how can an image be a number?"

Re:Illegal prime by Rod on Monday January 11, 2010 @01:15PM (#1045593)
For an image to be a number, I demand a one-to-one correspondence between images and numbers. Lacking that, I merely say that an image can be represented by a number, but this is trivial. Hence, I repeat: we're not even discussing the same thing.
Re:Illegal prime by axod on Monday January 11, 2010 @01:49PM (#1045679)
>> "So, I ask again, how can an image be a number?

>> "Lacking that, I merely say that an image can be represented by a number, but this is trivial"

I think you're arguing with yourself at this point.

Re:Illegal prime by Rod on Monday January 11, 2010 @02:29PM (#1045780)
Note that: "is" and "is represented by" are not the same on my book (which is obvious from the previous comments). If you want to counter-argument, try harder.
Re:Illegal prime by barrkel on Monday January 11, 2010 @04:13PM (#1046015)
I wonder what you mean by "is". Nothing really "is" anything but itself. The only other "is", the one that real people actually use, is "is represented by" or "is a representation of", or "is an instance of", etc.

For example, this --> A <-- looks like the letter A. But it isn't the letter A. It "is" only a representation, a bit-pattern with decimal notation 65, a glyph drawn from a font, a set of pixel elements on a graphics surface, a pattern of light on a display, a bunch of photons traveling through space, a group of excited photoreceptor cells, a set of signals traveling through neurons, etc. And it is none of these things, because none of them capture the essence of the pattern, repeated over human experiences.

So it seems to me that if you're trying to win an argument by drawing a distinction between "is" and "is represented by", you are not going to convince anyone who's put much thought into it. "Ceci n'est pas une pipe"; but a representation of a pipe is a (more or less faithful) representation of a pipe, whether you are blind or not, and so a number is a digital image, and vice versa.

Re:Illegal prime by KonaB on Monday January 11, 2010 @05:24PM (#1046188)
I think one must draw a distinction between the physical world and the metaphysical one. For a platonist, numbers do exist outside of any physical reality and, therefore, a number and its representation are not the same thing.

I am not a mathematician, but to me this discussion reminds me of a vector having different coordinates, depending on what coordinate system we choose. Those are all different representations of the same thing. Likewise, a number can be represented in many different ways (binary, oct, hex, etc), but they all represent the same number. Is the vector its representation? If so, then the vector is many things, which is a funny definition of "to be". If the vector is itself, then it cannot be equal to any of its representations, it's something beyond its representation.

Re:Illegal prime by joeyo on Tuesday January 12, 2010 @05:08AM (#1047224)
I don't think it's at all a given that Hylaean Theoric Worlds exist independently the Arbran Causal Domain.
Re:Illegal prime by KonaB on Monday January 11, 2010 @05:09PM (#1046147)
I think that the main reason you are being downvoted is not so much that you are technically wrong, but rather because you are being pedantic ad nauseum.

This is a programmers' forum, not a philosophers' forum. We should not be discussing the meaning of "is". That's too low-level and fundamental for our purposes. This does not imply it's not an interesting question, it's just not appropriate.

Re:Illegal prime by barrkel on Monday January 11, 2010 @04:15PM (#1046022)
There is a one-to-one correspondence between numbers and their doubles, {0..n} and {0..2n}. Does that mean that numbers are their doubles?
Re:Illegal prime by jerf on Monday January 11, 2010 @11:38AM (#1045389)
It is more proper to talk about the number + a decoding scheme. For given triple (image, image data, encoding scheme) any one can be held constant and the other two will have an infinite number of possibilities. In particular, any image can be represented as any set of data, plus an encoding scheme for that data. Trivial (but relevant) proof: The encoding scheme can simply hard code the image in question and trigger returning that image when it sees the held-constant image data.

You could choose to represent an image as image data + decoding scheme, using an agreed representation of the decoding scheme such as a computer program. Mathematically we get nowhere because we are simply moving the encoding scheme around, but in practice, since we possess concrete encoding schemes it means we can practically discuss the situation better.

This is a long-winded away of agreeing with you, BTW.

Re:Illegal prime by Rod on Monday January 11, 2010 @11:52AM (#1045424)
Thanks for wording it more precisely than I did. Most people are assuming that the mapping tuple -> number is known, while I am not. I could come up with my own invertible mapping. The cool thing would be this:

- I carry a large number y with me

- the police demands that I disclose y, and I do; they apply inverse mapping f^{-1} and obtain x = f^{-1}(y) which is a porn image

- then I show the police that applying inverse mapping g^{-1}, one obtains a totally legit image z = g^{-1}(y)

Of course, finding such a mapping g could be extremely difficult, but if the same number can be obtained from two different images, how would the police be able to accuse me of anything?

Re:Illegal prime by Blasa on Monday January 11, 2010 @12:06PM (#1045463)
It is fairly easy to find such mappings. Call the carried data the key. XOR the key data with any other image to get the encrypted file. Simply XOR the encrypted file with the key file to get the desired image.

Finding small mappings is another matter.

Re:Illegal prime by almost on Monday January 11, 2010 @12:41PM (#1045532)
But the same argument applies to the original "illegal prime" under discussion. Your original comment indicated that you considered the case of an image to be different and you asked how a prime could represent an image.

In fact, I'd go as far as saying that you could apply your argument to any data stored on a computer. But someone I don't think a judge would be impressed by "there re infinity many things the data in this file could represent and only under one mapping is it an indecent image".

Re:Illegal prime by fizx on Monday January 11, 2010 @03:18PM (#1045898)
Think about Gödel numbering or Cantor diagonalization.

Let's assume discrete, rectangular representations of images (width, height in pixels and colorspace of #000000-#FFFFFF). Here's an injective mapping from natural numbers (the indices of the vector of images) to actual images:

    # In a C-like language where ** is 
    # the exponentiation operator, and 
    # ints are unbounded.
    int colors = 0xFFFFFF + 1;
    int i = 0;
    vector images = new vector();
    while(i++) {
      for(int width = 1; width < i; width++) {
        int height = i - width;
        int area = width * height;
        int pixels[area];
        int combinations = colors ** area;
        for(int c = 0; c < combinations; c++) {
          for(int p = 0; p < area; p++) {
            pixels[p] = c % (colors ** (p + 1));
          }
          images.append(new image(width, height, pixels));
        }
      }
    }
Re:Illegal prime by jsolson on Monday January 11, 2010 @10:53AM (#1045290)
You could view it as a list of numbers, yes.

Alternatively, we all know that the file representing the image is nothing more than a collection of bytes. Bytes are nothing more than 8-element bit vectors. What if instead of treating the file as a collection of $n$ 8-element bit vectors we instead treated it as a single $n*8$-element bit vector. What we now have is a single (potentially VERY large) binary number.

To make any sense out of this number we'd have to pull out individual collections of bits, but this is no more complicated than doing a bitwise AND and bit shift.

Put another way: you can think of an IP-address as 4 sets of numbers between 0 and 255. For example, 192.168.1.1. You can view that same IP-address as the hexidecimal number 0xC0A80101. The hex representation is convenient, as it makes elements in the dotted quad apparent. 0xc0 = 192, 0xa8 = 168, 0x01 = 1, 0x01 = 1.

Hope that helps.

Re:Illegal prime by Rod on Monday January 11, 2010 @11:13AM (#1045341)
That's not what I meant at all. Of course you can transform a list of bytes into a number. But can you transform a number into a list of bytes? That is the problem. If you know the "encoding" algorithm, then you can. If you do not, then you simply can't.

The point I was trying to make is that a number, itself, is nothing unless there's knowledge of the encoding algorithm. A CD-reader can make sense of the bits stored on the disk because it knows the encoding algorithm. If the CD-burner and CD-reader did not "talk the same language", it would be impossible to make sense of all those bits stored on the disk. Without knowing what interleaving and channel code was used, the CD-reader can't do its job.

Re:Illegal prime by ramanujan on Monday January 11, 2010 @10:48AM (#1045269)
An image is ultimately represented on disk as a binary string. Hence it is a number.
Re:Illegal prime by Rod on Monday January 11, 2010 @11:05AM (#1045314)
OK, Mr. "Ramanujan", let's play a game: I give you a binary string, and you tell me what image corresponds to it. Are you game?

I won't tell you how the bitstring was computed from the image. I don't tell you how many pixels the image has. I don't tell you anything. I only give you the bits. Wanna play for money?

Re:Illegal prime by loumf on Monday January 11, 2010 @11:21AM (#1045361)
Given that definition, you can't encode anything as a number. I think someone pointed out above it's the number + the decoding method that is needed for it to be useful and that applies to images or even the gzip and ELF examples in the article. If I give you the number, but don't tell you it's a gzip of a C program, you probably won't be able to decode it easily.
Re:Illegal prime by Rod on Monday January 11, 2010 @01:26PM (#1045619)
Not quite. One can encode anything into a number. Decoding is what it's hard, especially so if one does not know what the encoding scheme was. I suppose this is one of the reasons why NSA needs astronomical amounts of computational power.
Re:Illegal prime by ErrantX on Monday January 11, 2010 @11:18AM (#1045351)
I think his point is... the image is stored on disk in a binary form. Which can also be represented as a number (Decimal).
Re:Illegal prime by Rod on Monday January 11, 2010 @11:26AM (#1045369)
Geees, is this HN??? Am I the one who's too stupid to explain things properly, or is everyone under the weather because it's Monday morning?

An image is a 2-dimensional array. Say it's a M x N array. Suppose we use RGB so that each pixel is represented by 3 bytes. Then you have an M x N x 3 array of bytes. There are infinitely many mappings from the space of all M x N x 3 arrays of bytes into the reals. Of course you can transform the array into a number. But you can do it in many, many ways. If you know what mapping was used, and if the mapping is invertible, then you can obtain the M x N x 3 array of bytes from the number. If you don't know what mapping was used, or if the mapping is non-invertible, then you can't obtain the M x N x 3 array from the number.

So, I claim that an image is NOT a number. I claim that an image is a pair (y,f), where y is a number, and f is an invertible mapping from the space of M x N x 3 arrays into the reals. You guys are looking at y, and forgetting f. That's why an image is not a number, the image is x = f^{-1} (y). In short, one must know f, and f^{-1} must exist.

Re:Illegal prime by AndrewDucker on Monday January 11, 2010 @11:51AM (#1045421)
You're merely arguing there that a number is not necessarily an image, because it cannot be converted into one without knowing how. And you'd be right. But the image is still a number, because it's stored as a series of bits, and any series of bits is interpretable as a number.
Re:Illegal prime by Rod on Monday January 11, 2010 @12:27PM (#1045503)
I asked: "How can an image be a number?", when I should have asked instead: "How can a number be an image?"

To use the verb to be in this scenario, I demand a one-to-one correspondence between numbers and images. If a number y can represent two distinct images x1 and x2, then we can't use "is", we can only use "can be".

Re:Illegal prime by joeyo on Tuesday January 12, 2010 @05:14AM (#1047229)
Such a strict definition prevents you for using "is" for anything at all! Is that your intention?
Re:Illegal prime by scott_s on Monday January 11, 2010 @11:58AM (#1045440)
To quote a former President, it depends on what your definition of "is" is.

I think everyone here understands that we require information beyond the number itself to get the image. I agree that a more accurate (pedantic) verb is that a number can store or represent an image. That implies that the number alone is not sufficient to get the image.

The thing is that while f can be in theory anything, it will be one of few things in practice. We can say what f is very simply. While knowing f is important, it's also easy to the point of trivial, so some people here are comfortable being less accurate and just saying "a number can be an image."

This reminds me of philosophy of identity discussion me and a friend used to go through. He thought he could fit a Miata in his old-school Suburban - but maybe he'd have to take off the side mirrors. But if he's allowing the side mirrors to be taken off, then how much is too much before it's no longer a Miata?

Re:Illegal prime by ErrantX on Monday January 11, 2010 @12:05PM (#1045459)
Indeed often info on which f you need is stored within y. which makes it even easier
Re:Illegal prime by Rod on Monday January 11, 2010 @12:17PM (#1045480)
Indeed. It seems that for most people here is means can be, while I demand a bit more. Yes, in practice, f will be one of a few mappings, but that does not change the fact that knowledge of f is required. In practice, one merely tries all possible mappings f until one works.

Such lack of precision is only tolerated because computation is fast and cheap. I would love to see people trying all f mappings with the help of an abacus! Let's be thankful that we live in this golden age.

Re:Illegal prime by scott_s on Monday January 11, 2010 @12:26PM (#1045500)
We can go further, actually. We could argue even that (y, f) is not, actually, an image and that's it's just a number and a function. Rather, the image is what's on the screen and only exists when it's displayed.

I'm not trying to continue an argument, but rather just point out that the philosophy of identity can be an elusive thing.

Re:Illegal prime by Rod on Monday January 11, 2010 @12:31PM (#1045509)
To make things even more fun:

Take an image x, decimate it, and obtain a lower-resolution version of it, which we call z. Are x and z the same image?

Mathematically, no. But when displayed on the screen, then most people would say they are the same. Of course, it depends on the definition of is, but such discussion would be utterly pointless. If we use the same definition, then there's no ambiguity.

Re:Illegal prime by lmkg on Monday January 11, 2010 @12:41PM (#1045530)
But, f is fairly standardized (or rather, there's a short list of standard f's), and bitmaps aren't even hard to understand. Since the isomorphism is both natural and conventional, I would say that in practice it is not accurate to hold f to the same standards as y.
Re:Illegal prime by amalcon on Monday January 11, 2010 @10:50AM (#1045276)
A list of numbers is a number, in the same way that a string of digits is a number.
Re:Illegal prime by Rod on Monday January 11, 2010 @11:02AM (#1045308)
Technically, a string of digits is only a representation of a number. And such representation may not even be unique.