Monday, November 26, 2018

[llsnfuxb] Example finite fields

Here are the multiplication, reciprocal, and exponentiation tables for a few small finite fields (Galois fields) of composite order (size).  A composite order necessarily means a prime raised to a power two or greater.  We don't give addition tables because they are not very interesting, just modular addition digit by digit without carry.

We follow the format of a similar presentation of a finite field of size 13.

Computations were done with Pari/GP whose Mod() notation can do finite field arithmetic reducing by a polynomial.  Source code.  The ffinit() function finds an irreducible polynomial (one of many possible irreducible polynomials) for a finite field of given size.  The values are given as the coefficients to the polynomial representation of elements, in big-endian order:

mffdisp(x,digits)=for(j=1,digits,i=digits-j;print1(lift(polcoeff(lift(x),i))));

In the multiplication table, we highlight in bold instances where the product is one, the multiplicative identity: these mark reciprocals.

In the exponentiation table, we again highlight outputs which are one.  Rows which have the minimal number of ones are primitive polynomials, generators of the multiplicative group.  In rows which aren't generators, the ones occur periodically, so the pattern depends on the factorization of (order-1).  We observe a phenomenon similar to Fermat's Little Theorem: the penultimate column is always one.  0^0 is undefined, so we mark it with a question mark.

Here is another example multiplication table for GF(3^2), though using a different reduction polynomial than below.

Future task: create an images of GF(p^3) tables, mapping each 3-component element to an RGB color.  This could be done for lower powers, too.

GF(2^2)

Order: 4
Reduction polynomial: Mod(1, 2)*x^2 + Mod(1, 2)*x + Mod(1, 2)

Multiplication

*00011011
0000000000
0100011011
1000101101
1100110110

Multiplicative inverse (reciprocal)

x011011
x^-1011110

Raising to a power (exponentiation)

^01234
00?00000000
010101010101
100110110110
110111100111


GF(2^3)

Order: 8
Reduction polynomial: Mod(1, 2)*x^3 + Mod(1, 2)*x^2 + Mod(1, 2)

Multiplication

*000001010011100101110111
000000000000000000000000000
001000001010011100101110111
010000010100110101111001011
011000011110101001010111100
100000100101001111011010110
101000101111010011110100001
110000110001111010100011101
111000111011100110001101010

Multiplicative inverse (reciprocal)

x001010011100101110111
x^-1001110100011111010101

Raising to a power (exponentiation)

^012345678
000?000000000000000000000000
001001001001001001001001001001
010001010100101111011110001010
011001011101010110111100001011
100001100111110010101011001100
101001101110100011010111001101
110001110011111101100010001110
111001111010011100110101001111


GF(2^4)

Order: 16
Reduction polynomial: Mod(1, 2)*x^4 + Mod(1, 2)*x^3 + Mod(1, 2)*x^2 + Mod(1, 2)*x + Mod(1, 2)

Multiplication

*0000000100100011010001010110011110001001101010111100110111101111
00000000000000000000000000000000000000000000000000000000000000000000
00010000000100100011010001010110011110001001101010111100110111101111
00100000001001000110100010101100111011111101101110010111010100110001
00110000001101100101110011111010100101110100000100101011100011011110
01000000010010001100111110110111001100010101100111011110101001100010
01010000010110101111101111100001010010011100001101100010011110001101
01100000011011001010011100011011110111101000001001001001111101010011
01110000011111101001001101001101101001100001100011110101001010111100
10000000100011110111000110011110011000101010110101010011101111000100
10010000100111010100010111001000000110100011011111101111011000101011
10100000101010110001100100110010100011010111011011000100111011110101
10110000101110010010110101100100111101011110110001111000001100011010
11000000110001111011111000101001010100111111010010001101000110100110
11010000110101011000101001111111001010110110111000110001110001001001
11100000111000111101011010000101101111000010111100011010010010010111
11110000111100011110001011010011110001001011010110100110100101111000

Multiplicative inverse (reciprocal)

x000100100011010001010110011110001001101010111100110111101111
x^-1000111111010100001100101100101000111001111101101110010110010

Raising to a power (exponentiation)

^012345678910111213141516
0000?0000000000000000000000000000000000000000000000000000000000000000
000100010001000100010001000100010001000100010001000100010001000100010001
001000010010010010001111000100100100100011110001001001001000111100010010
001100010011010111111110110110000111100101001100101100100110101000010011
010000010100111100101000000101001111001010000001010011110010100000010100
010100010101111010001001110000101010001111111101011101001011011000010101
011000010110101101000111110111110011101000101100100110001110010100010110
011100010111101010000110110100101110101111111100010101000011100100010111
100000011000001011110100000110000010111101000001100000101111010000011000
100100011001001101000101110011111011111000101101011010001010011100011001
101000011010011000101011110001001001011110001101111011110101001100011010
101100011011011111111010110010000101011001001101001100101001111000011011
110000011100110100011100110100011100110100011100110100011100110100011100
110100011101110000011101110000011101110000011101110000011101110000011101
111000011110100100100011110101000110010110001100101011110111101100011110
111100011111100001000010000111111000010000100001111110000100001000011111


GF(3^2)

Order: 9
Reduction polynomial: Mod(1, 3)*x^2 + Mod(1, 3)*x + Mod(2, 3)

Multiplication

*000102101112202122
00000000000000000000
01000102101112202122
02000201202221101211
10001020210111122202
11001122011220021021
12001221112002220110
20002010120222211101
21002112221001110220
22002211022110012012

Multiplicative inverse (reciprocal)

x0102101112202122
x^-10102111021221220

Raising to a power (exponentiation)

^0123456789
00?000000000000000000
0101010101010101010101
0201020102010201020102
1001102122022012110110
1101111220022221100111
1201120221011202210112
2001202111021012220120
2101210212012102120121
2201221210021121200122


GF(3^3)

Order: 27
Reduction polynomial: Mod(1, 3)*x^3 + Mod(1, 3)*x^2 + Mod(1, 3)*x + Mod(2, 3)

Multiplication

*000001002010011012020021022100101102110111112120121122200201202210211212220221222
000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000001002010011012020021022100101102110111112120121122200201202210211212220221222
002000002001020022021010012011200202201220222221210212211100102101120122121110112111
010000010020100110120200210220221201211021001011121101111112122102212222202012022002
011000011022110121102220201212021002010101112120211222200012020001122100111202210221
012000012021120102111210222201121100112211220202001010022212221200002011020122101110
020000020010200220210100120110112102122012002022212202222221211201121111101021011001
021000021012210201222120111102212200221122110101002020011121112100001022010211202220
022000022011220212201110102121012001020202221210122111100021010002211200222101120112
100000100200221021121112212012022122222210010110101201001011111211202002102120220020
101000101202201002100102200001122220021020121222221022120211012110112210011010111212
102000102201211010112122221020222021120100202001011110212111210012022121220200002101
110000110220021101211012122202210020100201011121222002112120200010111221001102212022
111000111222001112220002110221010121202011122200012120201020101212021102210022100211
112000112221011120202022101210110222001121200012102211020220002111201010122212021100
120000120210121211001212002122101221011222012102010100220202022112020110200111201021
121000121212101222010202020111201022110002120211100221012102220011200021112001122210
122000122211111200022222011100001120212112201020220012101002121210110202021221010102
200000200100112012212221121021011211111120020220202102002022222122101001201210110010
201000201102122020221211112010111012210200101002022220121222120021011212110100001202
202000202101102001200201100002211110012010212111112011210122021220221120022020222121
210000210120212122002121001211202112022111021201020200110101011221010220100222102012
211000211122222100011111022200002210121221102010110021202001212120220101012112020201
212000212121202111020101010222102011220001210122200112021201110022100012221002211120
220000220110012202122021211101120010200102022212111001221210100020222112002201121011
221000221112022210101011202120220111002212100021201122010110001222102020211121012200
222000222111002221110001220112020212101022211100021210102010202121012201120011200122

Multiplicative inverse (reciprocal)

x001002010011012020021022100101102110111112120121122200201202210211212220221222
x^-1001002111202120222210101122022112212010102012220100211221011021200110121201020

Raising to a power (exponentiation)

^0123456789101112131415161718192021222324252627
000?000000000000000000000000000000000000000000000000000000000000000000000000000000000
001001001001001001001001001001001001001001001001001001001001001001001001001001001001001
002001002001002001002001002001002001002001002001002001002001002001002001002001002001002
010001010100221022220012120121101201122111001010100221022220012120121101201122111001010
011001011121222221210122200012102010110101002022212111112120211100021201020220202001011
012001012111220122022201221101100121010120001012111220122022201221101100121010120001012
020001020100112022110012210121202201211111002010200221011220021120212101102122222001020
021001021111110122011201112101200121020120002012222220211022102221202100212010210001021
022001022121111221120122100012201010220101001022121111221120122100012201010220101001022
100001100022012121201111010221220120101122001100022012121201111010221220120101122001100
101001101220010201012100122120221111121022001101220010201012100122120221111121022001101
102001102120011010211121110100222101021221002201210022020122212220200111202012112001102
110001110201200120222022202010021122112121002220102100210111011101020012211221212001110
111001111122201101121120012220022221100010001111122201101121120012220022221100010001111
112001112012202111200220212122020022210201002221021101222100110121211010011120102001112
120001120010121100101221201022122220111012001120010121100101221201022122220111012001120
121001121221122012010101022111120100201220001121221122012010101022111120100201220001121
122001122101120220221010111201121012022100001122101120220221010111201121012022100001122
200001200022021121102111020221110120202122002100011012212201222010112220210101211001200
201001201120022010122121220100111101012221001201120022010122121220100111101012221001201
202001202220020201021100211120112111212022002101110010102012200122210221222121011001202
210001210010212100202221102022211220222012002120020121200101112201011122110111021001210
211001211101210220112010222201212012011100002122202120110221020111102121021022200001211
212001212221211012020101011111210100102220002121112122021010202022222120200201110001212
220001220201100120111022101010012122221121001220201100120111022101010012122221121001220
221001221012101111100220121122010022120201001221012101111100220121122010022120201001221
222001222122102101212120021220011221200010002111211201202121210012110022112100020001222


GF(5^2)

Order: 25
Reduction polynomial: Mod(1, 5)*x^2 + Mod(1, 5)*x + Mod(1, 5)

Multiplication

*00010203041011121314202122232430313233344041424344
0000000000000000000000000000000000000000000000000000
0100010203041011121314202122232430313233344041424344
0200020401032022242123404244414310121411133032343133
0300030104023033313432101311141240434144422023212422
0400040302014044434241303433323120242322211014131211
1000102030404404142434334303132322324202121121314101
1100112233440410213243031420314202132430410112233440
1200122431431421334002233042041132440113204103102234
1300132134422432400311430114223012203341043144021023
1400142332413443021120132231400442011024332130440312
2000204010303303234313113101214144143404242242123202
2100214213344314300122310223441024401132031233042041
2200224411330320421431012340123404214310320224411330
2300234114321331042240214412300334022043114210330124
2400244312312342113004411034032214330221403201204413
3000301040202202321242442404341411412101313313432303
3100311243243213442001144021023341220334102304301142
3200321441234224013310341143200221033012441340220431
3300331144220230134124043210432101341240230331144220
3400341342211241200433240332114031104423024322013014
4000403020101101413121221202423233231303434434241404
4100413223142112034430423324100113044031223420110243
4200423421133123100244120441332043302214012411034032
4300433124124134221003322013014423110442301402403321
4400443322110140342312024130241303423120140443322110

Multiplicative inverse (reciprocal)

x010203041011121314202122232430313233344041424344
x^-1010302044440322131221320434133141230421124342310

Raising to a power (exponentiation)

^012345678910111213141516171819202122232425
00?00000000000000000000000000000000000000000000000000
010101010101010101010101010101010101010101010101010101
020102040301020403010204030102040301020403010204030102
030103040201030402010304020103040201030402010304020103
040104010401040104010401040104010401040104010401040104
100110440110440110440110440110440110440110440110440110
110111100444400111100444400111100444400111100444400111
120112331340410331443420230443224210140224112130320112
130113033404420221011303340442022101130334044202210113
140114201311430332103433240441304244120223402122310114
200120110310330430440240220120110310330430440240220120
210121024204340313012102420434031301210242043403130121
220122400244300433100311200122400244300433100311200122
230123303411310241101322120432202144240314404233430123
240124223440320243441330140431332110230312114220410124
300130110210220420440340330130110210220420440340330130
310131222140230212444230410424333410320343111320140131
320132302111240214104222430423203444310341401333120132
330133400344200422100211300133400344200422100211300133
340134021304210342013402130421034201340213042103420134
400140440410110140440410110140440410110140440410110140
410141204211120323102133310414301344430232403422240141
420142032104130234014203210413023401420321041302340142
430143334240140324442120320412221310410231113430230143
440144100144100144100144100144100144100144100144100144

No comments :