Zech's logarithm
Zech logarithms are used to implement addition in finite fields when elements are represented as powers of a generator [math]\displaystyle{ \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]\displaystyle{ \alpha }[/math] of a finite field, the Zech logarithm relative to the base [math]\displaystyle{ \alpha }[/math] is defined by the equation
- [math]\displaystyle{ \alpha^{Z_\alpha(n)} = 1 + \alpha^n, }[/math]
which is often rewritten as
- [math]\displaystyle{ Z_\alpha(n) = \log_\alpha(1 + \alpha^n). }[/math]
The choice of base [math]\displaystyle{ \alpha }[/math] is usually dropped from the notation when it is clear from the context.
To be more precise, [math]\displaystyle{ Z_\alpha }[/math] is a function on the integers modulo the multiplicative order of [math]\displaystyle{ \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]\displaystyle{ -\infty }[/math], along with the definitions
- [math]\displaystyle{ \alpha^{-\infty} = 0 }[/math]
- [math]\displaystyle{ n + (-\infty) = -\infty }[/math]
- [math]\displaystyle{ Z_\alpha(-\infty) = 0 }[/math]
- [math]\displaystyle{ Z_\alpha(e) = -\infty }[/math]
where [math]\displaystyle{ e }[/math] is an integer satisfying [math]\displaystyle{ \alpha^e = -1 }[/math], that is [math]\displaystyle{ e=0 }[/math] for a field of characteristic 2, and [math]\displaystyle{ e = \frac{q-1}{2} }[/math] for a field of odd characteristic with [math]\displaystyle{ q }[/math] elements.
Using the Zech logarithm, finite field arithmetic can be done in the exponential representation:
- [math]\displaystyle{ \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]\displaystyle{ -\alpha^n = (-1) \cdot \alpha^n = \alpha^e \cdot \alpha^n = \alpha^{e+n} }[/math]
- [math]\displaystyle{ \alpha^m - \alpha^n = \alpha^m + (-\alpha^n) = \alpha^{m + Z(e+n-m)} }[/math]
- [math]\displaystyle{ \alpha^m \cdot \alpha^n = \alpha^{m+n} }[/math]
- [math]\displaystyle{ \left( \alpha^m \right)^{-1} = \alpha^{-m} }[/math]
- [math]\displaystyle{ \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]\displaystyle{ -\infty }[/math], with the caveat that subtraction of [math]\displaystyle{ -\infty }[/math] is undefined. In particular, the addition and subtraction formulas need to treat [math]\displaystyle{ m = -\infty }[/math] as a special case.
This can be extended to arithmetic of the projective line by introducing another symbol [math]\displaystyle{ +\infty }[/math] satisfying [math]\displaystyle{ \alpha^{+\infty} = \infty }[/math] and other rules as appropriate.
For fields of characteristic 2,
- [math]\displaystyle{ 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 α ∈ GF(23) be a root of the primitive polynomial x3 + x2 + 1. The traditional representation of elements of this field is as polynomials in α of degree 2 or less.
A table of Zech logarithms for this field are Z(−∞) = 0, Z(0) = −∞, Z(1) = 5, Z(2) = 3, Z(3) = 2, Z(4) = 6, Z(5) = 1, and Z(6) = 4. The multiplicative order of α is 7, so the exponential representation works with integers modulo 7.
Since α is a root of x3 + x2 + 1 then that means α3 + α2 + 1 = 0, or if we recall that since all coefficients are in GF(2), subtraction is the same as addition, we obtain α3 = α2 + 1.
The conversion from exponential to polynomial representations is given by
- [math]\displaystyle{ \alpha^3 = \alpha^2 + 1 }[/math] (as shown above)
- [math]\displaystyle{ \alpha^4 = \alpha^3 \alpha = (\alpha^2 + 1)\alpha = \alpha^3 + \alpha = \alpha^2 + \alpha + 1 }[/math]
- [math]\displaystyle{ \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]\displaystyle{ \alpha^6 = \alpha^5 \alpha = (\alpha + 1)\alpha = \alpha^2 + \alpha }[/math]
Using Zech logarithms to compute α 6 + α 3:
- [math]\displaystyle{ \alpha^6 + \alpha^3 = \alpha^{6 + Z(-3)} = \alpha^{6 + Z(4)} = \alpha^{6 + 6} = \alpha^{12} = \alpha^5, }[/math]
or, more efficiently,
- [math]\displaystyle{ \alpha^6 + \alpha^3 = \alpha^{3 + Z(3)} = \alpha^{3 + 2} = \alpha^5, }[/math]
and verifying it in the polynomial representation:
- [math]\displaystyle{ \alpha^6 + \alpha^3 = (\alpha^2 + \alpha) + (\alpha^2 + 1) = \alpha + 1 = \alpha^5. }[/math]
See also
- Gaussian logarithm
- Irish logarithm, a similar technique derived empirically by Percy Ludgate
- Finite field arithmetic
- Logarithm table
References
- ↑ (in German) Tafeln der Additions- und Subtractions-Logarithmen für sieben Stellen (Specially reprinted (from Vega–Hülße collection) 1st ed.). Leipzig: Weidmann'sche Buchhandlung. 1849. https://catalog.hathitrust.org/Record/000448557. Retrieved 2018-07-14. Also part of: (in German) Sammlung mathematischer Tafeln (Completely reworked ed.). Leipzig: Weidmann'sche Buchhandlung. 1849. Bibcode: 1849smt..book.....V. https://catalog.hathitrust.org/Record/000448019?type%5B%5D=author&lookfor%5B%5D=%22Zech%2C%20Julius%20August%20Christoph%2C%201821-1864.%22&ft=. Retrieved 2018-07-14.
- ↑ (in German) Tafeln der Additions- und Subtractions-Logarithmen für sieben Stellen (Specially reprinted (from Vega–Hülße collection) 2nd ed.). Berlin: Weidmann'sche Buchhandlung. 1863. https://catalog.hathitrust.org/Record/000448562. Retrieved 2018-07-13.
- ↑ (in German) Tafeln der Additions- und Subtractions-Logarithmen für sieben Stellen (Specially reprinted (from Vega–Hülße collection) 3rd ed.). Berlin: Weidmann'sche Buchhandlung. 1892. https://catalog.hathitrust.org/Record/012310509. Retrieved 2018-07-13.
- ↑ (in German) Tafeln der Additions- und Subtractions-Logarithmen für sieben Stellen (Specially reprinted (from Vega–Hülße collection) 4th ed.). Berlin: Weidmann'sche Buchhandlung. 1910. https://catalog.hathitrust.org/Record/000448565. Retrieved 2018-07-13.
- ↑ Finite Fields (2nd ed.). Cambridge University Press. 1997. ISBN 978-0-521-39231-0. https://archive.org/details/finitefields0000lidl_a8r3.
- ↑ "Über die Kreistheilung und ihre Anwendung auf die Zahlentheorie" (in German). Journal für die reine und angewandte Mathematik 1846 (30): 166–182. 1846. doi:10.1515/crll.1846.30.166. ISSN 0075-4102. http://eudml.org/doc/147283. (NB. Also part of "Gesammelte Werke", Volume 6, pages 254–274.)
Further reading
- An Index of Mathematical Tables (1 ed.). Blackwell Scientific Publications Ltd., Oxford / McGraw-Hill, New York. 1946.
- "A tabulation of some information concerning finite fields". Computers in Mathematical Research (Amsterdam: North-Holland Publishing Company): 37–50. 1968.
- "Algorithm 469: Arithmetic over a finite field [A1]". Communications of the ACM. Collected Algorithms of the ACM (CALGO) (Association for Computing Machinery (ACM)) 16 (11): 699. 1973-11-01. doi:10.1145/355611.362544. toms/469. ISSN 0001-0782. [1] [2] [3]
- "C. F. Gauß und die Logarithmen" (in German). Alling-Biburg, Germany. 2008. http://www.rechenschieber.org/Gauss.pdf.
Original source: https://en.wikipedia.org/wiki/Zech's logarithm.
Read more |