Quantcast
Channel: Probability algorithm on strings - Cross Validated
Viewing all articles
Browse latest Browse all 2

Answer by Thomas Lumley for Probability algorithm on strings

$
0
0

Ok, so you have strings $Z_n$ that are exactly half 0s and half 1s and you have $X_n$ that have exactly one more 1.

One way to generate these sorts of strings is to generate a $Z_n$ uniformly at random and then pick one 0 in it at random to change to a 1. The $\oplus$ symbol is presumably a bitwise OR, which satisfies $0\oplus 0=0$ and $1\oplus 0=1$, so it leaves the first input unchanged when the second input is 0. When the second input is 1 the output is always 1. The result is a string with one more 1 in it, and we call that $X_n$. So for any string $y$, $y\oplus 0^{i-1}10^{n-i}$ is just a complicated way to say change the value at $i$ to 1

Now we have a particular choice of $X_n$s and $Z_n$s that satisfy the definition in a nice way. A probabilist would call this a coupling of $X_n$ and $Z_n$: the distribution of each string on its own is specified by the assumptions, but the joint distribution is specially chosen so that the two strings only differ at one position.

Suppose we have an algorithm A that looks at only $q$ locations in the string. If we give it $Z_n$ and then $X_n$ generated according to this construction, it will return the same answer for both strings unless it queries a location where they are different (because it's an algorithm). There's only one location where they are different (by construction), and this location is randomly chosen, so the probability that Algorithm A queries that location is $q/n$, and otherwise it gives the same answers on the two strings.

In particular this means that an algorithm for recognising MAJ on random strings can't guarantee better than $q/n$ worst-case accuracy if it queries $q$ locations. If you want perfect accuracy you need to look at the whole string; if you need 2/3 accuracy you need to look at 2/3 of the string; if you want $>50$% accuracy you need to look at more than half the string. The coupled distributions of strings $X_n$ and $Z_n$ serve as evidence that you can't do better than this; it's still conceivable that you can't do even this well.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>