You get a bonus - 1 coin for daily activity. Now you have 1 coin

Numerical Algorithms: Key Theorems, Definitions, and Classification

Lecture



Classification of Numerical Algorithms

Numerical Algorithms: Key Theorems, Definitions, and Classification

Before we begin, we need to formalize the notion of algorithm complexity – a certain countable sequence of
actions. We will measure the complexity of an algorithm by a certain value that allows us to characterize the algorithm from the standpoint of its practical applicability. The smaller this value, the greater the feasibility of using the given algorithm.

Numerical Algorithms: Key Theorems, Definitions, and Classification


Definition 1. By the complexity of an algorithm we mean the number of operations performed on elements of some finite set in the course of the algorithm. As a synonym for the complexity of an algorithm, we will also use the term algorithmic effort.
It follows immediately from our definition that the notion of complexity is not unambiguous and depends on the choice of the finite set over which the computations are performed. There are two approaches to choosing the set of operands — the first is based on fixing some mathematical object, for example, a group or a ring. The second approach is based on fixing the register length of the computing device that will implement the given algorithm. The first approach is simpler, more universal, and adopted in mathematical research; the second approach is tied to the computing device, more precise, and allows one to estimate
the complexity of the algorithm in clock cycles of the computing device. We will use the first approach, leaving the detailed analysis to software developers.

In both cases, some parameter n is considered, characterizing the set whose elements the algorithm operates on. The complexity of the algorithm is represented as a function of n.


Let n > 0 be an arbitrary integer or real variable.
Recall that the symbol O (f(n)) denotes a function such that
Numerical Algorithms: Key Theorems, Definitions, and Classification
where c > 0 is some constant. Consider the function
Numerical Algorithms: Key Theorems, Definitions, and Classification
of real variables Numerical Algorithms: Key Theorems, Definitions, and Classification an integer or real variable.


Definition 2. Let f(n) — be a function specifying the complexity of an algorithm, the function L(x, z, n) defined by equality (1), the values x, z
fixed and Numerical Algorithms: Key Theorems, Definitions, and Classification. We will use the following terminology.


1. The function f(n) is called polynomial if

Numerical Algorithms: Key Theorems, Definitions, and Classification
2. The function f(n) is called exponential if

Numerical Algorithms: Key Theorems, Definitions, and Classification
3. The function f(n) is called subexponential if

Numerical Algorithms: Key Theorems, Definitions, and Classification


Let us also consider special cases.
4. If f(n) = O (1), or equivalently, z = 0 for any value of x, then f(n) is called a constant.
5. If f(n) = O (n) is exponential at z = 1, then f(n) is called the complexity of total (exhaustive) search.


As can be seen from this definition, a subexponential function occupies an intermediate position between polynomial and exponential functions. Indeed, for fixed values of z and n > 1 we obtain
Numerical Algorithms: Key Theorems, Definitions, and Classification
.
Here we implicitly use the fact that for fixed values of z, n the function L(x, z, n) is a monotonically non-decreasing function.
Let us note one feature that arises when solving cryptographic problems. All the problems we consider necessarily have a
solution whose search can be reduced to enumerating all elements of some finite set characterized by an integer parameter n. Consequently, the maximum complexity of solving such a problem is determined by the complexity of total search, that is O (n).


However, in practical applications the value of the parameter n is so large that using total search does not allow
finding a solution in a reasonable time, even using the most productive computing resources available. In this regard, our
task reduces to finding algorithms whose complexity is less than that of total search.
Let us note that the existence of a polynomial, that is, fast algorithm for solving the problems we consider is, rather, a pleasant exception than the rule. Problems that have polynomial algorithms for their solution are extremely few; we list most of them below:

  • • computing the greatest common divisor;
  • • raising a group element to an integer power;
  • • finding a root of a polynomial modulo a prime number;
  • • proving the primality of an integer;
  • • constructing a prime number.

For the remaining problems we consider, the achievable minimum complexity is the existence of a subexponential algorithm.


Now let us consider yet another way of classifying algorithms. It is traditionally customary to divide all algorithms into deterministic
and probabilistic ones. For a deterministic algorithm, the complexity estimate is computed unambiguously, whereas for a probabilistic algorithm the complexity estimate is computed under certain assumptions, which can substantially affect the results obtained. Let us give some examples and explain the above.


Definition 3. An algorithm is called deterministic if, after a fixed number of steps (operations on elements of a finite set), the result of this algorithm's operation is always a solution to the stated problem. Note that the word «always» in this definition is
essentially important.


Definition 4. We will call an algorithm probabilistic if one of the following statements holds

  • • the result of the algorithm's operation is a solution to the stated problem with some probability,
  • • the estimate of the number of steps of the algorithm is a random variable; if a mathematical expectation can be defined for this variable, then it is precisely this that is called the complexity estimate of the algorithm,
  • • the algorithm terminates its operation with some probability.


In fact, one and the same algorithm can be regarded both as deterministic and as probabilistic, depending on our interpretation of this term, or on an attempt to minimize its complexity.
Let us consider the following example. Suppose we have an urn containing n balls – one red and n − 1 black balls. We can
draw balls from the urn without returning them. Our task is to draw the red ball.
If we draw all n balls from the urn one after another, then a red ball will necessarily be among them, hence we obtain a deterministic algorithm. The complexity of this algorithm equals n draws of a ball from the urn.
Now let us describe a variant of solving the same problem using a probabilistic algorithm satisfying the first statement of our
definition.


Let us fix the number of attempts to draw a ball from the urn and denote it by the symbol k. In this case, the probability of a successful termination of the algorithm, in other words, the probability that we will not draw k black balls in a row, will be equal to Numerical Algorithms: Key Theorems, Definitions, and Classification for small values of k.
Thus, if we want to have a polynomial algorithm, we choose Numerical Algorithms: Key Theorems, Definitions, and Classification, in which case the probability of its successful termination is small and equal to
lNumerical Algorithms: Key Theorems, Definitions, and Classification. It is obvious that when k = n we obtain the deterministic algorithm described earlier, since the probability of its successful termination equals one.
Let us fix the probability of successful termination of the algorithm and denote it by the symbol p, Numerical Algorithms: Key Theorems, Definitions, and Classification, then the average number of steps required for the algorithm to terminate successfully equals pn. Thus, fixing the success probability leads to a definition of the algorithm's complexity. If we set the probability equal to one, we obviously obtain that the average number of steps of the algorithm (draws of a ball from the urn) equals n. This is the second variant of a probabilistic algorithm in our definition.
A third variant of the algorithm in our definition can be obtained if we return the drawn black balls back to the urn. In this case there is a probability that we will never draw a red ball, that is, never complete execution of the algorithm.
Summarizing the above, note that we could initially define the notion of algorithm complexity as a function of two arguments —
the number of steps it performed and the probability of the algorithm's successful termination. However, such an approach to studying computational effort is not
generally accepted. Further on, unless stated otherwise,
we will estimate the complexity of probabilistic algorithms under the assumption that the probability of their successful termination is at least 1/2

.Elementary Divisibility Theory

We will begin the exposition with the simplest questions and consider the set of integers .

Numerical Algorithms: Key Theorems, Definitions, and Classification
The set of integers forms a ring with respect to the operations of addition and multiplication. Let us introduce the operation of division on this set.
Definition 1.1. Let a, b be integers. We say that a divides b and write a|b if there exists an integer d such that ad = b.
It is well known that the division operation cannot be defined for two arbitrary integers a, b. It is easy to give an example, for instance, the number 3 does not divide the number 7, because it is impossible to find an integer d such that 3d = 7.
On the other hand, we can introduce another operation — the operation of division with remainder, which is defined for any pair of integers
a, b. We will need the following lemma.
Lemma 1.1. Let a, b be integers, then there exist unique integers q, r such that
Numerical Algorithms: Key Theorems, Definitions, and Classification
Proof. Without loss of generality, assume that a > 0. Then there exists a largest integer q such that aq 6 b and b < a(q+1).
Denoting r = b − aq, we obtain the inequality 0 6 r < a and the representation (1.1). Suppose the representation (1.1) is not unique. Then there exist integers q1, r1 such that the equalities b = aq1 + r1 and aq + r = aq1 + r1 hold.
From the last equality it follows that a|(r1 − r). From the definition of the numbers r, r1 it follows that |r1 − r| < a. Thus, r1 − r = 0 and r1 = r, q1 = q. The lemma is proved.


Definition 1.2. Let a, b be integers. We will call the integer r Numerical Algorithms: Key Theorems, Definitions, and Classification the remainder of dividing b by a, if
the representation (1.1) holds, or, equivalently, a|(b − r).

Algorithms:

  • Division operation, division with remainder -
  • Greatest common divisor, its properties -
  • Euclidean algorithm -
  • Lame's theorem -
  • Binary Euclidean algorithm -
  • Prime numbers -
  • Fundamental theorem of arithmetic.

Congruences

Let us introduce one of the fundamental concepts in algebra and number theory,
namely, the concept of a residue modulo an integer.
Definition 2.1. Let a, b be integers, and m > 0 a natural number. We say that the numbers a and b are congruent modulo m and write Numerical Algorithms: Key Theorems, Definitions, and Classification , if m|(a − b) or, equivalently, a = b + km for some integer value k.
From Definition 2.1 it follows that the solutions of the congruence Numerical Algorithms: Key Theorems, Definitions, and Classification are all integers of the form b + km, where k is some integer.
These numbers form a class of numbers modulo m.


Definition 2.2. Any number from the class Numerical Algorithms: Key Theorems, Definitions, and Classification will be called a residue modulo m. A residue x satisfying
the inequality Numerical Algorithms: Key Theorems, Definitions, and Classification will be called the least non-negative residue. Let us take one representative from each class modulo m – the least non-negative residue. It is easy to see that there are exactly m such residues in total, and they are all distinct.


Definition 2.3. We will call a complete system of residues the set of all least non-negative residues modulo m.
Further on we will also need another way of defining representatives of residue classes, based on the absolute value
of the representative.


Definition 2.4. We will call x the absolutely least residue modulo m if it satisfies the inequality
1. Numerical Algorithms: Key Theorems, Definitions, and Classification for even m;

2. Numerical Algorithms: Key Theorems, Definitions, and Classificationfor odd m.
Definition 2.5. Similarly to Definition 2.3, we will call a complete system of absolutely least residues – the set of all absolutely least residues modulo m.

Algorithms:

  • Residues modulo integers -
  • Theorem on the number of solutions of a first-degree congruence -
  • Bezout's lemma -
  • Extended Euclidean algorithm -
  • Chinese remainder theorem -
  • Garner's algorithm -
  • Euler's function -
  • Euler's and Fermat's theorems -
  • Primitive roots -
  • Theorems on the existence of primitive roots modulo a prime and a composite modulus.

Polynomials

Definition of elementary operations -

Let us formalize our knowledge of polynomials: we will introduce the formal notion of a polynomial in one variable, define for polynomials the operations of addition, multiplication, and division with remainder, and show that for polynomials one can also prove the theorem on unique factorization.

We will denote by the symbol Numerical Algorithms: Key Theorems, Definitions, and Classification an arbitrary commutative ring with unity. As examples of such rings, we can consider the ring of integers Numerical Algorithms: Key Theorems, Definitions, and Classification, the ring Numerical Algorithms: Key Theorems, Definitions, and Classification of residues modulo an integer m. Since fields are also rings, as the ring Numerical Algorithms: Key Theorems, Definitions, and Classification we will consider the field of rational numbers Numerical Algorithms: Key Theorems, Definitions, and Classification the field of real numbers Numerical Algorithms: Key Theorems, Definitions, and Classification as well as the finite field Numerical Algorithms: Key Theorems, Definitions, and Classification
Numerical Algorithms: Key Theorems, Definitions, and Classificationwhich forms a complete system of residues modulo a prime number p.

The proof of the fact that the set Numerical Algorithms: Key Theorems, Definitions, and Classification indeed forms a field consists in verifying all the axioms and follows from the results of
the previous chapter.


Definition 3.1. Let U be an arbitrary commutative ring with unity, and let a, b be nonzero elements of the ring U. We shall say that a divides b and use the notation a|b or b ≡ 0 (mod a) if there exists an element d in the ring U such that ad = b. We shall call the element a a divisor of the number b.
It is obvious that for the ring of integers Z this definition coincides with the previously introduced Definition 1.1.

Definition 3.2. We shall call an element ε of the ring U invertible if it is a divisor of unity, that is, if there exists some element ε
−1 of the same ring such that Numerical Algorithms: Key Theorems, Definitions, and Classification. To denote the inverse element we shall also use the notation 1 /ε.
With respect to the operation of multiplication, the invertible elements form a group. Indeed, if a, b are two invertible elements of the ring U, then
there exist elements Numerical Algorithms: Key Theorems, Definitions, and Classificationsuch that Numerical Algorithms: Key Theorems, Definitions, and Classification. Then, by virtue of the commutativity of the ring U, we obtain the equality
Numerical Algorithms: Key Theorems, Definitions, and Classification
from which it follows that the element ab is also invertible. In the ring of integers Z there exist exactly two invertible elements, 1 and −1, which are also contained in any other ring. Arbitrary rings may contain more than two invertible elements; for example, in a field all elements other than zero are invertible. An invertible element ε divides any element of the ring U. Indeed, for any element a the equality holds Numerical Algorithms: Key Theorems, Definitions, and Classification
.
Example 3.1. Consider the ring of residues Numerical Algorithms: Key Theorems, Definitions, and Classification. Then the group of its invertible elements consists of the following residues Z
Numerical Algorithms: Key Theorems, Definitions, and Classification
From Bezout's lemma, see Lemma 2.2, it follows that the invertible elements are precisely the residues coprime with the modulus. The number of
such numbers is determined by the value of Euler's function Numerical Algorithms: Key Theorems, Definitions, and Classification and, according to Theorem 2.5, equals 8.


Let us give several important definitions and introduce the concept of the ring of polynomials in one variable U[x], which we shall use repeatedly in what follows.


Definition 3.3. Let U be an arbitrary commutative ring with unity and Numerical Algorithms: Key Theorems, Definitions, and Classification an integer. We shall call a polynomial a(x) in one variable x the sum Numerical Algorithms: Key Theorems, Definitions, and Classification

We shall call the quantities Numerical Algorithms: Key Theorems, Definitions, and Classification the coefficients of the polynomial, and the coefficient an the leading coefficient.
For some fixed value x ∈ U, we shall call the value of expression (3.1), belonging to the ring U, the value of the polynomial a(x).
We shall call the integer n the degree of the polynomial and denote it by the symbol deg a(x) = n. Polynomials of degree one shall be called linear.
As follows from the definition we have given, all elements of the ring U can be regarded as polynomials of degree zero. This statement is false only for zero, since for it we always have an = 0. Therefore
we shall additionally assume that deg 0 = −1.
Definition 3.4. A polynomial Numerical Algorithms: Key Theorems, Definitions, and Classification, whose leading coefficient equals unity, is called monic1
.
Further, we shall denote by the symbol U[x] the set of polynomials in one variable x with coefficients from the ring U. Let
Numerical Algorithms: Key Theorems, Definitions, and Classification
be two arbitrary polynomials. Without loss of generality, we shall assume that Numerical Algorithms: Key Theorems, Definitions, and Classification. We define their sum by the equality
Numerical Algorithms: Key Theorems, Definitions, and Classification
where the coefficients an+1, . . . , am are taken equal to zero. It is easy to see that Numerical Algorithms: Key Theorems, Definitions, and Classification The «less than» sign arises in the case when the sum of the leading coefficients equals zero.
We define the product of polynomials by the equality
Numerical Algorithms: Key Theorems, Definitions, and Classification
the equality also holds Numerical Algorithms: Key Theorems, Definitions, and Classification

In Russian-language publications there is no established name for this polynomial. In the literature on number theory, the concept of a primitive polynomial is traditionally used, while in textbooks on algebra, the concepts of a monic, normalized, or reduced polynomial are used.

The operations we have introduced allow us to define on the set U[x] the structure of a commutative ring, whose unity and zero coincide
with the unity and zero of the ring U. The proof of this statement is carried out by verifying all the properties that a ring must satisfy.
We shall say that the polynomial
Numerical Algorithms: Key Theorems, Definitions, and Classification
divides the polynomial b(x) if for some polynomial u(x) ∈ U[x] the equality a(x)u(x) = b(x) holds. Based on the definition of the operation of
multiplying polynomials, we immediately conclude that deg a(x) 6 deg b(x).
Note that if the leading coefficient an of the polynomial a(x) is invertible, then we can write the polynomial a(x) in the form
Numerical Algorithms: Key Theorems, Definitions, and Classification
where Numerical Algorithms: Key Theorems, Definitions, and Classification is a monic polynomial whose coefficients are defined by the equalities Numerical Algorithms: Key Theorems, Definitions, and Classification for k = 0, . . . , n.
Thus, a polynomial a(x) ∈ U[x] with an invertible leading coefficient can be represented as the product of a polynomial of degree zero and a monic polynomial of degree equal to the degree of the polynomial a(x). It is obvious that if the ring U is a field, then this holds
for any polynomial of positive degree.


Definition 3.5. A polynomial a(x) ∈ U[x] is called irreducible if the equality a(x) = u(x)v(x), where u(x), v(x) ∈ U[x], is possible only in the case when one of the polynomials u(x), v(x) has degree zero and, thus, is an element of the ring U. Solving the problem of checking whether a given polynomial is irreducible depends substantially on the ring over which the polynomial is considered. As is well known from a course in algebra, any polynomial
with coefficients from the field of complex numbers is reducible, since it factors into linear factors, see [5, ch.6, § 3]. For an arbitrary ring this is, of course, not true. However, we can prove a theorem on the factorization of polynomials analogous to the fundamental theorem of arithmetic for integers.

Let a(x) and b(x) be two polynomials from the ring U[x], where the leading coefficient of the polynomial a(x) is invertible; in particular, a(x)
may be a monic polynomial. Analogously to the ring of integers Z, we introduce the operation of division of polynomials with remainder and define two polynomials q(x), r(x) of the ring U[x] satisfying the equality b(x) = a(x)q(x) + r(x), deg r(x) < deg a(x). (3.2)
We shall call the polynomial q(x) the quotient of the division, and the polynomial r(x) – the remainder of the division of the polynomials. We give the definition of the operation of division with remainder by means of the following algorithm, often called the «school algorithm for polynomial division».

Algorithms:

  • Algorithms for multiplying polynomials -
  • Division with remainder -
  • Euclid's algorithm -
  • Bezout's lemma -
  • The fundamental theorem of arithmetic for polynomials -
  • Theorem on the number of roots of polynomials -
  • Differentiation of polynomials -
  • Polynomial congruences modulo a composite number -
  • Theorems on lifting solutions.

Congruences of Higher Degrees

  • Definition of a quadratic residue -
  • The Legendre symbol -
  • Theorem on the number of solutions -
  • Properties of the Legendre symbol -
  • Definition of the Jacobi symbol and its properties -
  • Algorithm for computing the Jacobi symbol -
  • Computing a square root: special cases -
  • The Tonelli–Shanks algorithm -
  • The general quadratic equation -
  • A probabilistic algorithm for computing the roots of a polynomial

Continued Fractions

Let us consider continued fractions of real numbers.
Definition 5.1. Let α be a real number. We will call the integer part of α, which we denote by the symbol Numerical Algorithms: Key Theorems, Definitions, and Classification, the largest integer less than or equal to α. In the particular case, the integer part of an integer coincides with the integer itself.
Note that α can be either negative or positive.

For example Numerical Algorithms: Key Theorems, Definitions, and Classification, while Numerical Algorithms: Key Theorems, Definitions, and ClassificationNumerical Algorithms: Key Theorems, Definitions, and Classification

In any case, the inequality Numerical Algorithms: Key Theorems, Definitions, and Classification holds
Let α0 be a real number and Numerical Algorithms: Key Theorems, Definitions, and Classification. Let us define a sequence of real numbers α1, α2, . . . by the following recurrence relation
Numerical Algorithms: Key Theorems, Definitions, and Classification
If αn turns out to be an integer, that is, the equality an = αn holds, we will consider that the sequence (5.1) terminates.
Writing equality (5.1) in the form Numerical Algorithms: Key Theorems, Definitions, and Classification, we can express the number α0 as
Numerical Algorithms: Key Theorems, Definitions, and Classification
or, in general form,
Numerical Algorithms: Key Theorems, Definitions, and Classification
for an arbitrary index n.
To simplify the writing of equality (5.2) we will use the notation Numerical Algorithms: Key Theorems, Definitions, and Classification

Definition 5.2. Let Numerical Algorithms: Key Theorems, Definitions, and Classification be a real number. We will call representation (5.2)
Numerical Algorithms: Key Theorems, Definitions, and Classification
n = 1, 2, . . . the continued or chain fraction of the number α0. The elements of the sequence a0, a1, . . . we will call partial quotients,
and the elements of the sequence α1, α2, . . . complete quotients.
Note that from relation (5.1) and the inequality Numerical Algorithms: Key Theorems, Definitions, and Classification it follows that the following inequalities hold
Numerical Algorithms: Key Theorems, Definitions, and Classification

Algorithms:

  • Definition of a continued fraction -
  • The concept of a convergent -
  • Theorem on the best approximation -
  • Quadratic irrationalities and their properties -
  • Convergents and best approximations.

Prime numbers

In cryptographic applications, prime numbers play an important
role, being long-term parameters of cryptographic schemes
and being subject to attacks by adversaries in the first place. The lifetime of
public parameters is limited, which forces the developers of cryptographic schemes to generate, quite often, new prime numbers not previously used.
When generating prime numbers, additional conditions are usually imposed on them. As an example: according to the first edition of the Russian Federation standard for the digital signature GOST R 34.10-94, it is necessary to construct two prime numbers p, q
satisfying the conditions
Numerical Algorithms: Key Theorems, Definitions, and Classification
The next edition of the standard imposes somewhat different conditions on the prime numbers p, q:
Numerical Algorithms: Key Theorems, Definitions, and Classification
for some integer t satisfying the inequality Numerical Algorithms: Key Theorems, Definitions, and Classification. When generating prime numbers, two questions typically arise.
1. How to construct a prime number with given constraints on the size of the number?
2. How to determine whether a given integer m is prime or composite?
These two questions are closely related: as soon as we have a criterion for testing primality, we can immediately propose an algorithm for constructing a prime number based on that criterion.
Moreover, the problem of testing primality of a number is related to the problem of factorization. The simplest way to check whether a number m is composite or not is to check the statement of Lemma 1.6, that is, to find out whether m has a prime divisor not exceeding Numerical Algorithms: Key Theorems, Definitions, and Classification. If there is no such divisor, then the number m is prime. To enumerate all possible divisors we would need to perform about Numerical Algorithms: Key Theorems, Definitions, and Classification trial-division operations on the number m. For large values of m this procedure becomes impractical.
At the same time, trial division is often used to check whether a number has small divisors.
Let us give an algorithm for constructing a table of all prime numbers bounded above by some value b. Such tables will be used by us both for implementing the trial-division method and in some algorithms for factoring integers.

Algorithms:

  • Constructing a table of prime numbers -
  • Probabilistic primality testing algorithms -
  • Solovay–Strassen test -
  • Miller–Rabin test -
  • Pocklington's theorem and its extensions -
  • Algorithms for constructing prime numbers -
  • Lucas recurrence sequences -
  • Morrison's theorem -
  • Recursive algorithm for constructing a prime number with known factorization of p−1 -
  • Algorithm for constructing a strong prime number

Factorization of integers

Let us consider elementary methods for factoring a composite number m. These methods are fairly simple to describe, but have high computational cost, which prevents their use for factoring numbers used in practice. Nevertheless, the algorithms described can be used as components in more complex algorithms.
Throughout the chapter we will assume that m > 0 is an odd composite number. The question of how to determine whether the number m
is composite or prime was considered in the previous chapter.
Recall that by the problem of factorization we mean finding such prime numbers Numerical Algorithms: Key Theorems, Definitions, and Classification that the number m can be uniquely represented as the product
Numerical Algorithms: Key Theorems, Definitions, and Classification
where αi are natural numbers. Such a representation, by virtue of the fundamental theorem of arithmetic, see Theorem 1.4, exists and is unique.
To find all prime divisors of the number m, we need to find two divisors of m, not necessarily prime ones, and then apply
the divisor-search procedure to each of the divisors found. Further on we will describe algorithms assuming that it is enough for us to find
two arbitrary divisors of the number m.

Algorithms:

  • Trial division method -
  • Fermat's method -
  • Lehman's method -
  • Pollard's method -
  • Brent's method -
  • Pollard's p−1 method -
  • Williams' p+1 method -
  • Optimization of the Pollard and Williams methods -
  • Zheng's method -
  • McKee's method.
  • Basic lemma on factorization-
  • Kraitchik's sieve -
  • Continued fraction method -
  • Morrison–Brillhart method -
  • Schroeppel's linear sieve -
  • The quadratic sieve method and its modifications.

Discrete logarithm

Let us consider methods for solving the discrete logarithm problem
in the multiplicative group of the finite field Fp.
Definition 9.1. Let a prime number p and a residue a be given, whose order modulo p is equal to m, that is, Numerical Algorithms: Key Theorems, Definitions, and Classification
Let a residue b be given, satisfying the congruence
Numerical Algorithms: Key Theorems, Definitions, and Classification
The problem of determining the residue x (mod m) is called the problem of computing the index of the element b to the base a. In the cryptographic literature
the problem of computing the index has received the synonymous name: «the discrete logarithm problem».
For the residue x satisfying congruence (9.1), it is customary to use the notation

Numerical Algorithms: Key Theorems, Definitions, and Classification
and call it the index, or discrete logarithm, of b to the base a.
From the definition given above and the statement of Lemma 2.3, it follows that the congruence (9.1) is solvable only when the residue b belongs to the set
Numerical Algorithms: Key Theorems, Definitions, and Classification
that is, it is an element of the cyclic group generated by the element a. In this case, we will also say that the residue b belongs to the
set of possible powers of the residue a modulo p.
Before describing methods for solving the discrete logarithm problem, we shall describe the basic properties of indices.
Lemma 9.1. Let a prime number p and a residue a be given, whose exponent modulo p equals m, that is Numerical Algorithms: Key Theorems, Definitions, and Classification. Let a residue
b be given, belonging to the set of possible powers of the residue a modulo p. Then the following statements hold.

1. The congruence loga a ≡ 1 (mod m) holds.
2. Suppose that for the residue b the equality
Numerical Algorithms: Key Theorems, Definitions, and Classification
holds, where α1, . . . , αn are arbitrary natural numbers, and the residues b1, . . .,
bn belong to the set A of possible powers of the residue a.
Then
Numerical Algorithms: Key Theorems, Definitions, and Classification
3. The congruence Numerical Algorithms: Key Theorems, Definitions, and Classification holds
4. Let for the residues Numerical Algorithms: Key Theorems, Definitions, and Classification the following hold Numerical Algorithms: Key Theorems, Definitions, and Classification
Numerical Algorithms: Key Theorems, Definitions, and Classification
Proof. The first statement of the lemma holds by definition. To prove the second statement, consider the case where Numerical Algorithms: Key Theorems, Definitions, and Classification Since the residues b1 and b2 belong to the set of possible powers of the residue a, there exist residues x, y such that
Numerical Algorithms: Key Theorems, Definitions, and Classification
Multiplying the residues b1 and b2, we obtain Numerical Algorithms: Key Theorems, Definitions, and Classification(mod p).

Consequently, the congruence
Numerical Algorithms: Key Theorems, Definitions, and Classification
holds. Generalizing this congruence to the case Numerical Algorithms: Key Theorems, Definitions, and Classification, we obtain
the second statement of the lemma. It is easy to see that the third and fourth statements of the lemma are consequences of the second statement.
Example 9.1. It is particularly worth noting that the condition of
Lemma 9.1 requires that the residues b1, . . . , bn belong to the cyclic
subgroup generated by the residue a. Let us give an example in which violating this condition leads to a refutation of the lemma's statement.
Consider the equation
Numerical Algorithms: Key Theorems, Definitions, and Classification

and note that Numerical Algorithms: Key Theorems, Definitions, and Classification, that is, the residue 27 is not a primitive root and generates the multiplicative group
Numerical Algorithms: Key Theorems, Definitions, and Classification
consisting of 14 elements. It is easy to see that a solution to our equation exists, and x = 8.
On the other hand, the equality Numerical Algorithms: Key Theorems, Definitions, and Classification holds. Applying
the statement of Lemma 9.1 to find the unknown x, we must write the congruence
Numerical Algorithms: Key Theorems, Definitions, and Classification
Since the residues 2, 5, and 13 do not belong to the group A, the indices Numerical Algorithms: Key Theorems, Definitions, and Classification Numerical Algorithms: Key Theorems, Definitions, and Classification and Numerical Algorithms: Key Theorems, Definitions, and Classification do not exist, and therefore the right-hand side of the congruence
(9.3) does not exist. Thus, we obtain a contradiction with the second statement of Lemma 9.1

Algorithms:

  • Basic properties of indices -
  • the matching method -
  • logarithms in a group of composite order -
  • the Pohlig–Hellman method -
  • Pollard's method -
  • Gosper's method -
  • the subexponential logarithm method -
  • solving systems of linear congruences -
  • derivation of the asymptotic complexity estimate.

See also

  • Pollard's «kangaroo» algorithm
  • Adleman's algorithm
  • Berlekamp–Rabin algorithm
  • Wiedemann's algorithm
  • Gauss's algorithm for computing the date of Easter
  • Gelfond–Shanks algorithm
  • Euclidean algorithm
  • Index calculus algorithm
  • Karatsuba algorithm
  • Cornacchia's algorithm
  • Lenstra–Lenstra–Lovász algorithm
  • Montgomery algorithm
  • Lehmer's GCD algorithm
  • Integer relation detection algorithm
  • Pocklington's algorithm
  • Pohlig–Hellman algorithm
  • Tonelli–Shanks algorithm
  • Fürer's algorithm
  • Harvey–van der Hoeven algorithm
  • Cipolla's algorithm
  • Schönhage–Strassen algorithm
  • Schoof's algorithm
  • COS algorithm
  • Fast exponentiation algorithms
  • Fast modular exponentiation algorithms
  • Binary GCD algorithm
  • Fast multipole method
  • Modular exponentiation
  • The «chakravala» method
  • Shanks's quadratic form method
  • Lehman's method
  • Frobenius primality method
  • Euler's factorization method
  • Fermat's factorization method
  • Trapdoor one-way function
  • Divisibility rules
  • Rational sieve
  • Sieve of Atkin
  • Function field sieve
  • Sieve of Sundaram
  • Sieve of Eratosthenes
  • Pollard's rho algorithm
  • Pollard's rho method for discrete logarithms
  • Primality certificate
  • Agrawal–Kayal–Saxena test
  • Baillie–PSW test
  • Lucas–Lehmer test
  • Miller–Rabin test
  • Miller's test (number theory)
  • Pépin's test
  • Primality test
  • Lucas primality test
  • Solovay–Strassen test
  • Fermat's test
  • Frobenius test
  • Elliptic curve factorization
  • Integer square root

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Algorithms"

Terms: Algorithms