r/AskComputerScience • • May 21 '19

What theoretically is the fewest number of bytes required to represent something pornographic? *NSFW?* NSFW

It can't be a url or an address, that would be cheating. This data would actually have to be the content itself. I can't decide if a bitmap or a short series of words would qualify, and if so how few bytes could you really do it in?

This is supposed to be a fun question, feel free to go into as much or as little thought/detail as you want. It is also slightly philosophical in that in asks what in your estimation constitutes "pornographic".

37 Upvotes

35 comments sorted by

11

u/tcptomato May 22 '19

4

u/joe40001 May 22 '19

Wow, that's pretty impressive.

7

u/tcptomato May 22 '19

There are a few more

𓂸

ð“‚¹

𓂺

17

u/SteeleDynamics May 22 '19

1 bit ==> Boolean

7

u/OriginalName667 May 22 '19

Oh George Boole, paint me like one of your French girls!

0

u/[deleted] May 22 '19

I'm sorry can you explain this to me? Thanks!

4

u/SteeleDynamics May 22 '19

Whatever "something" is, all it needs is an additional bit of storage that indicates if it is NSFW.

0 ==> Safe For Work

1 ==> Not Safe For Work

1

u/[deleted] May 22 '19

Woah didn't think of this, thanks this is really a good solution haha.

30

u/MaShinKotoKai May 22 '19

69

8

u/[deleted] May 22 '19

Not my proudest fap, but at 2 bytes, I'll take it.

1

u/Phreakiture May 22 '19

You can do that in seven bits by encoding it as BCD (1011001).

1

u/[deleted] May 22 '19

True!

2

u/theguy2108 May 22 '19 edited May 22 '19

Okay, so lets start with an image, a x * y resolution image will take x * y * 3. 3 bytes for RGB color channel.

Assuming the resolution to be 1280 by 720, which I feel like is okayish quality these days, we get to 1280 * 720 * 3 = 2764800 bytes.

But I assume since you are talking about anything pornographic, we should instead use a greyscale image, the color channel variable 3 is changed to 1 byte and we come to the new value of 1280 * 720 = 921600 bytes.

I think we can go lower if we apply compression. Compression can be highly dependant on the example, but it's safe to assume it would reduce the image by 2.5 times. So we get to (1280 * 720)/2.5 = 368640 bytes

Or 360 kb

And we can go lower

I had previously taken 1 byte per pixel for grayscale. However, this is the more recent value. We can take half a byte per pixel like it used to be 10-20 years ago giving us the size of the image at 180 kb.

And we can go lower still.

The 1280 by 720 resolution might be high for some people and lets reduce that to 144p. The math becomes

256 * 144 * 0.5 * 1/2.5 = 7372.8 bytes or 7.2 KB.

And we can go lower still.

Lets say, we aren't happy with half byte for our color and decide for a black and white image completely. Which reduces thw color size to 1 bit and the final size is -

1843.2 bytes or 1.8 kb

We can probably go lower but i have to study

4

u/joe40001 May 22 '19

Is your studying really more important than this?

17

u/JudasRose May 21 '19

Im gunna go with as little thought as possible:

0-

2 bytes

5

u/slimjim_belushi May 22 '19

14 bits if using OG ASCII

4

u/cellsuicide May 22 '19 edited May 22 '19

I dunno...that leaves a little much to the imagination....

( . Y . ) Do spaces count? If so, 9. Or a little guy (2)? c3

0

u/JudasRose May 22 '19 edited Jun 11 '19

Talking computer science yes they count. But we’ve got a match for 2 then.

4

u/kristopolous May 22 '19

language and culture independent? Is there such a thing as culture free pornography?

10

u/[deleted] May 22 '19

A 1 looks like a penis.

0

u/[deleted] May 22 '19

[deleted]

5

u/bacondev May 22 '19

Depends on what font his penis uses

2

u/tehstone May 22 '19

True, he could be using Windongs.

3

u/l4adventure May 22 '19

Here's kanye west's album cover for MBDTF

That's 100 pixels. I just tested it and you can fap to it so it counts as pornographic.

If we use 8-bit color depth, and with the 3 channels of RGB for each pixel, it comes out to 256 bits per pixel, so 25,600 total bits. or 2.5 kB

3

u/fongaboo May 22 '19

how many bytes is this guy? a favorite of mine from the BBS days...

@:^D->-^-<

2

u/TonyTheEvil May 22 '19 edited May 22 '19

I'm choosing the shortest directly pornographic sequence of characters I can come up with, "cum". "69" doesn't count because I consider that as more of a joke. Assuming we have a 3 letter alphabet and don't just assign the word "cum" to 1, and thus only need 1 bit, we need a theoretical ciel(log(3)) == 2 bits of information to represent each character. So we could have [("00" : 'c'), ("01" : 'u'), ("10" : 'm')], giving us 000110 at 6 bits, 3/4 of a byte.

Edit: The word "tit" could bring us down to a theoretical 3 bits with [("1" : 't'), ("0" : 'i')] => 101, but the word "tit" isn't directly pornographic since there's the bird with the name "Tit".

5

u/Heavy_Weapons_Guy_ May 22 '19

Having other meanings doesn't make it not pornographic, and by that logic cum wouldn't be pornographic either because it also means with, e.g. cum laude.

1

u/bacondev May 22 '19

I think that it would be fair to suggest that there should be a stipulation such that only general purpose encodings may be permitted.

2

u/fongaboo May 22 '19

It's hard to say. You just know it when you hash it.

1

u/kevin33patrick May 22 '19

I think most of the suggestive emojis are 4, which is a pretty modern/common way

1

u/Bottled_Void May 22 '19

Well for words, you can have a 5-bit character set.

Bitmaps don't seem particularly well suited for images due to the poor compression.

Maybe you could have some sort of vector file format. Just a series of points to draw lines between. But maybe pornographic would be easier with arcs and circles.

So I suppose it all comes down to the philosophical part.

-2

u/slimjim_belushi May 22 '19

You can't just invent an arbitrary character set that doesn't exist though. Otherwise I could define '6'=0 and '9'=1 and say I have a 2 bit solution.

Or alternatively include the size of the character set definition as part of the answer.

1

u/Bottled_Void May 22 '19 edited May 22 '19

Of course you can. Besides, 5-bit character sets already exist. Google would tell you that in a few seconds. Baudot code has been around for a long long time.

The data containing the information can be different to the thing that reads it.

Besides, I don't consider the number 69 anything like pornographic, so I dismissed things like that as a possible solution.

-2

u/slimjim_belushi May 22 '19

Okay then my solution is 2 bits and better than yours, sorry.

-1

u/Rick-powerfu May 22 '19

'

The jizz on your chin