How randomness can improve algorithms
quantamagazine.org
quantamagazine.org
Are there problems in BPP that can defend against "helping" PRNGs by diagonalizing against them somehow?
If the PRNG can take a seed of length log(n) and generate a random string from it, then you might try to take a BBP algorithm and reduce the length of the random input to log(n) using the PRNG. We assume that the PRNG being good enough means that this new algorithm still has the usual BBP guarantee that it gives the correct answer for at least 2/3 of the seeds.
However, now the derandomization of running it on every possible seed just gives a slowdown of 2^log(n) = n, which means that the running time stays polynomial.
The definition of a PRNG in complexity theory (for the purposes of this topic) is that no polynomial-time algorithm can look at its output and distinguish it from real randomness (with high confidence etc etc).
Now imagine you have a PRNG whose seed size is logarithmic in the output size. You can compose it with our BPP algorithm and iterate over all the possible seeds in polynomial time (because the seed is logarithmic), and take the majority result. You built a polynomial time algorithm that, if it gave incorrect results, could distinguish the PRNG from real randomness. So it must be correct.
It's unknown whether ZPP = P (but it almost certainly does). It is known that ZPP is the base of the random hierarchy... ZPP = RP u co-RP, where RP is the class of languages that are accepted with bounded error.
Any good complexity textbook beyond Sipser will discuss the randomized complexity classes at extreme detail, since they are crucial for constructing all the other interesting complexity classes (notably IP and MIP).
> In 1994, the computer scientists Noam Nisan and Avi Wigderson helped resolve this confusion by demonstrating that randomness, though useful, probably isn’t necessary. They proved that one of two things must be true: Either all problems that can be efficiently solved using randomness also have fast deterministic algorithms, or many notoriously difficult problems are secretly easy. Computer scientists consider the second possibility very unlikely.
Reminds me of the popular hacker koan:
> In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6. "What are you doing?" asked Minsky. "I am training a randomly wired neural net to play tic-tac-toe," Sussman replied. "Why is the net wired randomly?" asked Minsky. Sussman replied, "I do not want it to have any preconceptions of how to play." Minsky then shut his eyes. "Why do you close your eyes?" Sussman asked his teacher. "So that the room will be empty," replied Minsky. At that moment, Sussman was enlightened.
https://treymanuszak.eth.limo/blog/power-of-randomness https://treymanuszak.eth.limo/blog/yao-minimax
There are also problems in online algorithms where randomization provably changes what is possible, for example the "cup game problem." (https://arxiv.org/abs/1904.02861)
Finally, although randomized primality testing (1970s) is often credited as the start of randomized algorithms as a field, it's worth noting that hash tables (1954) and quick sort (1961) were much earlier.
A good book on the topic is The Probabilistic Method by Alon and Spencer.
To give you some hint of what randomness can get you, look at the most typical random graph model, which for a probability p selects an edge uniformly and independently with that prob. With overwhelming probability, this graph is extremely uniform, meaning that in every set you look (other than then very tiny ones) the density of edges is very close to p. Actually constructing such a graph, either symbolically or by an algorithm is a very hard problem and even the best known results don't get us close to the real random model.
For some of you information theory buffs out there, is it fair to say that a probabilistic algorithm is a heuristic? Is the inverse true, are all heuristics some type of probabilistic algorithm when simplified and generalized?
If a randomness extractor can deliver uniformly random output from a weakly random entropy source, is there some function by which a signal or pattern can be extracted from a weakly random source?