Zech's logarithm
Template:Short description Template:Use dmy dates Zech logarithms are used to implement addition in finite fields when elements are represented as powers of a generator <math>\alpha</math>.
Zech logarithms are named after Julius Zech,[1][2][3][4] and are also called Jacobi logarithms,[5] after Carl G. J. Jacobi who used them for number theoretic investigations.[6]
Definition
Given a primitive element <math>\alpha</math> of a finite field, the Zech logarithm relative to the base <math>\alpha</math> is defined by the equation <math display="block">\alpha^{Z_\alpha(n)} = 1 + \alpha^n,</math> which is often rewritten as <math display="block">Z_\alpha(n) = \log_\alpha(1 + \alpha^n).</math> The choice of base <math>\alpha</math> is usually dropped from the notation when it is clear from the context.
To be more precise, <math>Z_\alpha</math> is a function on the integers modulo the multiplicative order of <math>\alpha</math>, and takes values in the same set. In order to describe every element, it is convenient to formally add a new symbol <math>-\infty</math>, along with the definitions <math display="block">\alpha^{-\infty} = 0</math> <math display="block">n + (-\infty) = -\infty</math> <math display="block">Z_\alpha(-\infty) = 0</math> <math display="block">Z_\alpha(e) = -\infty</math> where <math>e</math> is an integer satisfying <math>\alpha^e = -1</math>, that is <math>e=0</math> for a field of characteristic 2, and <math>e = \frac{q-1}{2}</math> for a field of odd characteristic with <math>q</math> elements.
Using the Zech logarithm, finite field arithmetic can be done in the exponential representation: <math display="block">\alpha^m + \alpha^n = \alpha^m \cdot (1 + \alpha^{n-m}) = \alpha^m \cdot \alpha^{Z(n-m)} = \alpha^{m + Z(n-m)} </math> <math display="block">-\alpha^n = (-1) \cdot \alpha^n = \alpha^e \cdot \alpha^n = \alpha^{e+n}</math> <math display="block">\alpha^m - \alpha^n = \alpha^m + (-\alpha^n) = \alpha^{m + Z(e+n-m)} </math> <math display="block">\alpha^m \cdot \alpha^n = \alpha^{m+n}</math> <math display="block">\left( \alpha^m \right)^{-1} = \alpha^{-m}</math> <math display="block">\alpha^m / \alpha^n = \alpha^m \cdot \left( \alpha^n \right)^{-1} = \alpha^{m - n}</math> These formulas remain true with our conventions with the symbol <math>-\infty</math>, with the caveat that subtraction of <math>-\infty</math> is undefined. In particular, the addition and subtraction formulas need to treat <math>m = -\infty</math> as a special case.
This can be extended to arithmetic of the projective line by introducing another symbol <math>+\infty</math> satisfying <math>\alpha^{+\infty} = \infty</math> and other rules as appropriate.
For fields of characteristic 2, <math display="block">Z_\alpha(n) = m \iff Z_\alpha(m) = n.</math>
Uses
For sufficiently small finite fields, a table of Zech logarithms allows an especially efficient implementation of all finite field arithmetic in terms of a small number of integer addition/subtractions and table look-ups.
The utility of this method diminishes for large fields where one cannot efficiently store the table. This method is also inefficient when doing very few operations in the finite field, because one spends more time computing the table than one does in actual calculation.
Examples
Let <math>\alpha \in \mathrm{GF}(2^3)</math> be a root of the primitive polynomial <math>x^3 + x^2 + 1</math>. The traditional representation of elements of this field is as polynomials in <math>\alpha</math> of degree <math>2</math> or less.
Here is a table of Zech logarithms for this field.
<math display="block">Z_\alpha(-\infty) = 0</math> <math display="block">Z_\alpha(0) = -\infty</math> <math display="block">Z_\alpha(1) = 5</math> <math display="block">Z_\alpha(2) = 3</math> <math display="block">Z_\alpha(3) = 2</math> <math display="block">Z_\alpha(4) = 6</math> <math display="block">Z_\alpha(5) = 1</math> <math display="block">Z_\alpha(6) = 4</math>
The multiplicative order of <math>\alpha</math> is <math>7</math>, so the exponential representation works with integers modulo <math>7</math>.
Since <math>\alpha</math> is a root of <math>x^3 + x^2 + 1</math> then that means <math>\alpha^3 + \alpha^2 + 1 = 0</math>, or if we recall that since all coefficients are in <math>\mathrm{GF}(2)</math>, subtraction is the same as addition, we obtain <math>\alpha^3 = \alpha^2 + 1</math>.
The conversion from exponential to polynomial representations is given by <math display="block">\alpha^3 = \alpha^2 + 1</math> (as shown above) <math display="block">\alpha^4 = \alpha^3 \alpha = (\alpha^2 + 1)\alpha = \alpha^3 + \alpha = \alpha^2 + \alpha + 1</math> <math display="block">\alpha^5 = \alpha^4 \alpha = (\alpha^2 + \alpha + 1)\alpha = \alpha^3 + \alpha^2 + \alpha = \alpha^2 + 1 + \alpha^2 + \alpha = \alpha + 1</math> <math display="block">\alpha^6 = \alpha^5 \alpha = (\alpha + 1)\alpha = \alpha^2 + \alpha</math>
Using Zech logarithms to compute <math>\alpha^6 + \alpha^3</math>: <math display="block">\alpha^6 + \alpha^3 = \alpha^{6 + Z(-3)} = \alpha^{6 + Z(4)} = \alpha^{6 + 6} = \alpha^{12} = \alpha^5,</math> or, more efficiently, <math display="block">\alpha^6 + \alpha^3 = \alpha^{3 + Z(3)} = \alpha^{3 + 2} = \alpha^5,</math> and verifying it in the polynomial representation: <math display="block">\alpha^6 + \alpha^3 = (\alpha^2 + \alpha) + (\alpha^2 + 1) = \alpha + 1 = \alpha^5.</math>
Visualization
Given a prime power <math>q = p^n</math> and a primitive element <math>\alpha</math> of <math>\mathrm{GF}(q)</math>, one can visualize the Zech logarithm <math>Z_\alpha</math> by plotting all elements of <math>\mathrm{GF}(q)</math> in a directed graph, <math>G_\alpha(q)</math>:
- Place the element <math>0</math> at the center.
- Arrange the non-zero elements <math>\alpha, \alpha^2, \dots, \alpha^{q - 1} = 1</math> sequentially as equally spaced nodes around a circle, with <math>1</math> at the top.
- Draw a directed edge <math>x \to x + 1</math> for every <math>x</math> in <math>\mathrm{GF}(q)</math>.
The edges in <math>G_\alpha(q)</math> correspond to the mappings in the Zech logarithm function: since <math>\alpha^{Z(n)} = \alpha^n + 1</math>, an edge connecting node <math>\alpha^n</math> to <math>\alpha^n + 1</math> effectively connects the exponent <math>n</math> to the exponent <math>Z(n)</math>.
Here is <math>G_\alpha(8)</math>, where <math>\alpha</math> is a root of <math>x^3 + x^2 + 1 = 0</math>, and the powers of <math>\alpha</math> are placed in counterclockwise order:
If one draws an edge <math>x \to x + c</math> instead of <math>x \to x + 1</math> for every <math>x</math> in <math>\mathrm{GF}(q)</math>, where <math>c</math> is any fixed element, one obtains a graph <math>G_\alpha(q; c)</math>. The standard graph corresponds to <math>c=1</math>. The graph <math>G_\alpha(q; 0)</math> consists of <math>q</math> self-loops. For any <math>c \neq 0</math>, the graph <math>G_\alpha(q; c)</math> appears identical to <math>G_\alpha(q)</math>, except that all edges are rotated by <math>\frac{\log_\alpha(c)}{q-1} \times 360^\circ</math> around the center node.
Here is <math>G_\alpha(8; \alpha^2)</math>, which differs from <math>G_\alpha(8)</math> by a rotation of <math>\frac{2}{7} \times 360^\circ</math>:
Each graph <math>G_\alpha(q; c)</math> visualizes the permutation <math>\sigma_c(x) = x + c</math>. The set of these <math>q</math> permutations <math>\{\sigma_c \mid c \in \mathrm{GF}(q)\}</math> forms an Elementary abelian group of order <math>q</math> (isomorphic to the additive group of the field). The rotational symmetry of the graphs <math>G_\alpha(q; c)</math> for <math>c \neq 0</math> elegantly captures the algebraic indistinguishability of the non-zero elements in an elementary abelian group.
If <math>\alpha</math> and <math>\beta</math> are both primitive elements of <math>\mathrm{GF}(q)</math>, then the graphs <math>G_\alpha(q)</math> and <math>G_\beta(q)</math> are identical if and only if <math>\alpha</math> and <math>\beta</math> are roots of the same primitive polynomial in <math>\mathrm{GF}(p)[X]</math>. Therefore, the number of distinct graphs <math>G_\alpha(q)</math> equals <math>\frac{\phi(q - 1)}{n}</math>, where <math>\phi</math> is Euler's totient function. Equivalently, there exist <math>\frac{\phi(q - 1)}{n}</math> distinct Zech logarithm tables for a given field size.
If <math>\alpha</math> and <math>\beta</math> are multiplicative inverses of each other, then <math>G_\alpha(q)</math> and <math>G_\beta(q)</math> are reflections of each other.
When <math>q</math> is odd, <math>G_\alpha(q)</math> contains a "diagonal" edge that connects the node <math>-1/2</math> to <math>1/2</math> (where <math>2^{-1}</math> denotes the multiplicative inverse of <math>1+1</math>).
Here are the graphs <math>G_\alpha(q)</math> for all <math>q</math> such that the graph remains invariant (up to reflection) across all primitive elements <math>\alpha</math>:
See also
- Gaussian logarithm
- Irish logarithm, a similar technique derived empirically by Percy Ludgate
- Finite field arithmetic
- Logarithm table
References
Further reading
- Template:Cite book
- Template:Cite journal
- Template:Cite journal [1] [2] [3]
- {{#invoke:citation/CS1|citation
|CitationClass=web }}
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedZech_1849 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedZech_1863 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedZech_1892 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedZech_1910 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedLidl_1997 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedJacoby_1846