If you got a random value, and add a non-random value, is the subsequent value still random?

92 Views Asked by At

Was talking with some friends when this came out.

If given a true random value, say niojfewjoiregjifkpoj and you added a non-random value, say 1234, is the combined value, niojfewjoir1234egjifkpoj still considered random?

(Some button mashing included)

2

There are 2 best solutions below

0
On BEST ANSWER

Selecting/creating a "random" value only makes sense in reference to a set of possibilities for that value. In the example you gave, it seems like you gave a element selected randomly from the set of strings (of less than 20 characters, say). When you add some over value, as you added 1234, you simply change the set from which you drew the value (e.g. the set of strings of less than 24 characters containing 1234). But the added value does not change the randomness of the selection.

HOWEVER if the non-random value added is NOT constant, but instead relies on the original value selected, then the resulting value is NOT random.

For example, if I select a random integer $i$, and the value I add to it is $1-i$ then clearly the outcome is NOT random, but will always be $1$.

1
On

You need to work hard on the definition of random to make this a sensible question. Your "true random value" is all lower case Roman letters. If they are stored as 8 bit ASCII, you are only using $26$ of the possible $256$ bit patterns in each byte, so you are only using about $1/10$ of the possibilities per byte. This is why websites require you to use capitals/strange characters. How do you know $1234$ is not random? You could have asked for a random number between $1$ and $10000$ (or $1000000000000$) and gotten that. The obligatory xkcd is here.You can look at the Kolomorogov complexity of each string. I am sure the one having 1234 is higher, but it may be lower compared to the complexity of a random 24 character string than the other is compared to a 20 character string.