1

I got confused with deterministic and probabilistic algorithms. Am I right by assuming that algorithms are called probabilistic once they use some sort of randomness?

Initially, I thought only algorithms outputting random numbers are called probabilistic. They are obviously non-deterministic.

However, what about the following algorithm: Take BubbelSort and randomly decide whether to start sorting from left to right or from right to left. If you modify the sorting order, the algorithm is deterministic, because small values will always be on the left and great values on the right side (or vice versa). As there is some randomness in the algorithm, do we call this algorithm probabilistic?

In short: Any algorithm using some randomness is called probabilistic. Is that correct? However, this term has nothing to do with determinism and non-determinism. Is that correct?

null
  • 111
  • 2

1 Answers1

2

A probabilistic algorithm is one which has access to the output of a random source during its computation. It might be the case that although the algorithm uses randomness, the output is deterministic, i.e. for every possible random string obtained from the source the output is the same (you can always just ignore the source and act solely on the input).

Note that when you're dealing with probabilistic algorithms, your output becomes a random variable. The output can be deterministic in the sense that it is always the same, or can take some value with probability 1 (which is a weaker statement).

Ariel
  • 13,614
  • 1
  • 22
  • 39