»
Las Vegas: These algorithms are notable for using random inputs or
resources to provide the correct problem answer every time. Obtaining a
result may take an uncertain amount of time because of its random proce-
dures. An example is the Quicksort algorithm.
»
Monte Carlo: Because of their use of randomness, Monte Carlo algorithms
may not provide a correct answer or even an answer at all, although these
outcomes seldom happen. Because the result is uncertain, a maximum
number of trials in their running time may bind them. Monte Carlo algorithms
demonstrate that algorithms do not necessarily always successfully solve
the problems they are supposed to. An example is the Solovay–Strassen
primality test.
Do'stlaringiz bilan baham: |