Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Deterministic and non
1.
2.
3.
4.
5. WHAT IS NON-DETERMINISIC ?
Phase1(el, A)
{
return i
}
A nondeterministic algorithm for a problem A is a two-stage procedure. In
the first phase, a procedure makes a guess about the possible solution for A.
In the second phase, a procedure checks if the guessed solution is indeed a
solution for A
i random(1..N)
Phase2(i,el, A)
{
return
}
A[i] == el
Note: the actual solution must be included among the possible
guesses of phase 1
6. EMAMPLE-
PRIMALITY TESTING
A primality test is a test to determine whether or not
a given number is prime as opposed to actually
decomposing the number into its constituent prime
factors(which is known as prime factorization).
7. Varieties of primality tests:-
primality tests come in two verieties.
Primality
tests
deterministic probabilistic
8. Deterministic tests determine with absolute
certainity whether a number is prime.
Example of determinestic test include the
lucas lehmer test and elliptical curve
primality proving.
A. DETERMINISTIC TEST
9. a. Pobabilistic tests can potentially (although with very small
probability) falsely identify a composite number as
prime.However they are in general much faster than
deterministic tests. Numbers that have passed a probability
prime test are therefore property referred to as probable
primes until their primality can be demonstrated
deterministically.
b. A number that passes a probabilistic test but is in fact
composite is know as pseudoprime.
B. PROBABILISTIC TEST