lecture6 - university of california, irvinekeldefra/teaching/fall...lecture6 groups, rings, fields...

29
1 Lecture 6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS

Upload: others

Post on 26-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

1

Lecture 6Groups,Rings,FieldsandSome

BasicNumberTheory

Read:Chapter7and8inKPS

Page 2: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

2

FiniteAlgebraicStructures• Groups• Abelian• Cyclic• Generator• GroupOrder

• Rings• Fields• Subgroups• EuclidianAlgorithm• CRT(ChineseRemainderTheorem)

Page 3: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

3

GROUPsDEFINITION:AnonemptysetGand operator@,(G,@), isagroup if:

• CLOSURE:forallx,yinG:

• (x@y)isalsoinG

• ASSOCIATIVITY:forallx,y,zinG:

• (x@y)@z=x@(y@z)

• IDENTITY:thereexistsidentityelement IinG,suchthat,forallxinG:

• I@x=xandx@I=x

• INVERSE:forallxinG,thereexistinverseelement x-1 inG,suchthat:

• x-1@x=I=x@x-1

DEFINITION: Agroup(G,@)isABELIANif:

• COMMUTATIVITY:forallx,yinG:

• x@y=y@x

Page 4: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

4

Groups(contd)DEFINITION:Anelementgin Gisagroupgenerator ofgroup(G,@)if:forallx inG,thereexistsi ≥0, suchthat:

x=gi =g@g@g@…@g(i times)Thismeanseveryelementofthegroupcanbegeneratedbygusing@.Inotherwords,G=<g>

DEFINITION: Agroup(G,@)iscyclic ifagroupgeneratorexists!

DEFINITION: Grouporder ofagroup(G,@)isthesizeofsetG,i.e.,|G|or#{G}orord(G)

DEFINITION: Group(G,@)isfinite iford(G)isfinite.

Page 5: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

5

RingsandFieldsDEFINITION:Astructure(R,+,*)isaRing if(R,+)isanAbeliangroup(usuallywith

identityelementdenotedby0)andthefollowingpropertieshold:• CLOSURE:forallx,yinR,(x*y)inR• ASSOCIATIVITY:forallx,y,zinR,(x*y)*z=x*(y*z)• IDENTITY:thereexists1≠0inR,s.t.,forallxinR,1*x=x• DISTRIBUTION:forallx,y,zinR,(x+y)*z=x*z+y*z

Inotherwords(R,+)isanAbeliangroupwithidentityelement0and(R,*)isaMonoidwithidentityelement1≠0.AMonoid isasetwithasingleassociativebinaryoperationandanidentityelement.

TheRingiscommutativeRing if

• COMMUTATIVITY:forallx,yinR,x*y=y*x

Page 6: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

6

RingsandFields

DEFINITION: Astructure(F,+,*)isaField if(F,+,*)isacommutativeRingand:

• INVERSE: allnon-zero xinR,havemultiplicativeinverse.i.e.,thereexistsan inverseelementx-1 inR,suchthat:x*x-1 =1.

Page 7: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

7

Example:IntegersUnderAddition

G=Z=integers={…-3,-2,-1,0,1,2…}

thegroupoperatoris“+”,ordinaryaddition

• integersareclosedunderaddition• identityelementwithrespecttoadditionis0(x+0=x)• inverseofxis-x(becausex+(-x)=0)• additionofintegersisassociative• additionofintegersiscommutative(thegroupisAbelian)

Page 8: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

8

Non-ZeroRationalsunderMultiplication

G=Q- {0}={a/b}wherea,binZ*

thegroupoperatoris“*”,ordinarymultiplication

• ifa/b,c/dinQ-{0},then:a/b*c/d=(ac/bd)inQ-{0}• theidentityelementis1• theinverseofa/bisb/a• multiplicationofrationalsisassociative• multiplicationofrationalsiscommutative(thegroupisAbelian)

Page 9: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

9

Non-ZeroRealsunderMultiplication

G=R- {0}thegroupoperatoris“*”,ordinarymultiplication

• ifa,binR- {0},thena*binR-{0}• theidentityis1• theinverseofais1/a• multiplicationofrealsisassociative• multiplicationofrealsiscommutative(thegroupisAbelian)

Remember:

Page 10: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

10

IntegersmodNUnderAddition

G=Z+N =integersmodN={0…N-1}thegroupoperatoris“+”,modularaddition

• integersmoduloNareclosedunderaddition• identityis0• inverseofxis-x(=N-x)• additionofintegersmoduloNisassociative• additionintegersmoduloNiscommutative(thegroupisAbelian)

Page 11: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

11

Integersmod(p)(wherepisPrime)underMultiplication

G=Z*p non-zerointegersmodp={1…p-1}

thegroupoperatoris“*”,modularmultiplication

• integersmodpareclosedunder“*”(whereGCD=GreatestCommonDivisor):becauseifGCD(x,p)=1andGCD(y,p)=1thenGCD(xy,p)=1(NotethatxisinZ*PiffGCD(x,p)=1)

• theidentityis1• theinverseofxisus.t.ux(modp)=1

• ucanbefoundeitherbyExtendedEuclidianAlgorithmux+vp=1=GCD(x,p)

• OrusingFermat’slittletheoremxp-1=1(modp),u=x-1 =xp-2

• “*”isassociative• “*”iscommutative(sothegroupisAbelian)

Page 12: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

12

PositiveIntegersunderExponentiation?

G={0,1,2,3…}thegroupoperatoris“^”,exponentiation

• closedunderexponentiation• the(one-sided?)identityis1,x^1=x• the(right-sideonly)inverseofxisalways0,x^0=1• exponentiationofintegersisNOTcommutative,x^y≠y^x(non-Abelian)• exponentiationofintegersisNOTassociative,(x^y)^z≠x^(y^z)

Page 13: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

13

Z*N :PositiveIntegersmod(N)RelativelyPrimetoN

• Groupoperatoris“*”,modularmultiplication• Grouporderord(Z*N)=numberofintegersrelativelyprime toNdenotedby

phi(N)

• integersmodNareclosedundermultiplication:ifGCD(x,N)=1andGCD(y,N)=1,GCD(x*y,N)=1

• identityis1• inverseofxisfromEuclid’salgorithm:ux+vN=1(modN)=GCD(x,N)so,x-1 =u(=xphi(N)-1)• multiplicationisassociative• multiplicationiscommutative(sothegroupisAbelian)

G =Z*Nnon-zerointegersmodN={1…,x,…n-1}suchthatGCD(x,N)=1

Page 14: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

14

Non-AbelianGroupExample:2x2Non-SingularRealMatricesunder

MatrixMultiplication

• if A and B are non-singular, so is AB• the identity is I = [ ]• Inverse:

= / (ad-bc)

• matrix multiplication is associative• matrix multiplication is not commutative

GL(2) ={[ ], ad-bc = 0}a bc d

1 00 1

[ ]a bc d

-1 [ ]d -b-c a

Recall: a square matrixis non-singular if itsdeterminant is non-zero. A non-singularmatrix has an inverse.

Page 15: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

15

Non-AbelianGroups(contd)

[ ]2 510 30

-1 [ ]3 -0.5 -1 0.2 =

[ ]2 510 30 [ ]3 5

1 2 [ ]11 2060 110 =

[ ]3 51 2 [ ]2 5

10 30 [ ]56 16522 65 =

Page 16: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

16

Subgroups

DEFINITION:(H,@)isasubgroup of(G,@)if:

• HisasubsetofG

• (H,@)isagroup

Page 17: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

17

SubgroupExample

Let(G,*),G=Z*7 ={1,2,3,4,5,6}LetH={1,2,4}(mod7)

Notethat:• Hisclosedundermultiplicationmod7• 1isstilltheidentity• 1is1’sinverse,2and4areinversesofeachother• Associativityholds• Commutativityholds(HisAbelian)

Page 18: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

18

Let(G,*),G=R-{0}=non-zerorealsLet(H,*),Q-{0}=non-zerorationals

HisasubsetofGandbothGandHaregroupsintheirownright

SubgroupExample

Page 19: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

19

OrderofaGroupElement

Letx beanelementofa(multiplicative)finiteintegergroupG.Theorder ofx isthesmallestpositivenumberk suchthatxk=1

Notation:ord(x)

Page 20: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

20

Example:Z*7:multiplicativegroupmod7

Notethat:Z*7=Z7

ord(1)=1because11 =1ord(2)=3because23 =8=1ord(3)=6because36 =93 =23 =1ord(4)=3because43 =64=1ord(5)=6because56 =253 =43 =1ord(6)=2because62 =36=1

OrderofanElement

Page 21: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

21

Theorem(Lagrange)

Theorem (Lagrange): Let G be a multiplicative group of order n. For any g in G, ord(g) divides ord(G).

element!any of order largestn *

nG oforder - )(Φ

n modg

m

m 1

such that integer smallest :g oforder

11 :thus

//)ord)(

)ord :because

mod1

:1 COROLLARY

/1/)(

*)(

===

Φ==

∈∀≡

ΦΦ

Φ

kk(n)n

*n

*n

nn

bb

k(n)k(Zbord

(Z(n)

Zb n b

Page 22: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

22

Example:inZ*13primitiveelementsare:

{2,6,7,11}

element primitive

)( )2

)1

then prime is p if:2 COROLLARY

*

−=∍∈∃

∈∀

a

1p aord Z a and

p mod bb

Zb

p

p

p

Page 23: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

23

EuclidianAlgorithmPurpose: compute GCD(x,y)

GCD = Greatest Common Divisor

1),gcd(

mod1*

, of

1

1

1

=⇔∃Ζ∈∀

nbb b nbb

bsetive invermultiplicab

n

Recall that:

11),( −∃⇒= bbn Euclidian

Page 24: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

24

EuclidianAlgorithm(contd)

init : r0 = x r1 = y

q1 = r0 / r1⎢⎣ ⎥⎦ r2 = r0 mod r1

...= ...qi = ri−1 / ri⎢⎣ ⎥⎦ ri+1 = ri−1mod ri

...= ...qm−1 = rm−2 / rm−1

⎢⎣ ⎥⎦ rm = rm−2mod rm−1

(rm == 0)?OUTPUT rm−1

Example:x=24,y=15

1. 192. 163. 134. 20

Example:x=23,y=14

1. 192. 153. 144. 115. 40

Page 25: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

25

ExtendedEuclidianAlgorithmPurpose: computeGCD(x,y)andinverseofy(ifitexists)

init : r0 = x r1 = y t0 = 0 t1 =1

q1 = r0 / r1⎢⎣ ⎥⎦ r2 = r0 mod r1 t1 =1

...= ...qi = ri−1 / ri

⎢⎣ ⎥⎦ ri+1 = ri−1mod ri ti = ti−2 − qi−1ti−1 mod r0

...= ...qm−1 = rm−2 / rm−1

⎢⎣ ⎥⎦ rm = rm−2mod rm−1 tm = tm−2 − qm−1tm−1 mod r0

if (rm =1) OUTPUT tm else if (rm = 0) OUTPUT "no inverse"

Page 26: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

26

ExtendedEuclidianAlgorithm(contd)

Theorem: )1(1 >= i rtr ii rtm 11 =

I R T Q

0 87 0 --

1 11 1 7

2 10 80 1

3 1 8 --

Example: x=87 y=11

! " r mod tqtt r modrr rrq 0iiiiii1iiii 11211 / −−−−+− −===

Page 27: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

27

I R T Q__

0 93 0 --

1 87 1 1

2 6 92 14

3 3 15 2

4 0 62 --

Example: x=93 y=87

ExtendedEuclidianAlgorithm(contd)

! " r mod tqtt r modrr rrq 0iiiiii1iiii 11211 / −−−−+− −===

Page 28: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

28

ChineseRemainderTheorem(CRT)

The following system of n modular equations (congruences)

nn

1

m mod ax

m mod ax

≡...

1

Has a unique solution:

ii

i

n1

n

ii

ii

m mod mM

y

mm M

Mmod ymM

ax

1

1

*...*:where

=

""#

$%%&

'=

=

""#

$%%&

'=∑

(all mi-s relatively prime).

Page 29: Lecture6 - University of California, Irvinekeldefra/teaching/fall...Lecture6 Groups, Rings, Fields and Some Basic Number Theory Read: Chapter 7 and 8 in KPS. 2 Finite Algebraic Structures

29

CRTExample

!!"

#$$%

&

11375 mod x mod x

4777 modx mod y

7 mod mod y

mMmM M

MmodymMymMx

=+=

==

===

=

=

=

+=

−−

)8*7*32*11*5(8117

24711

7/11/

77])/(3)/(5[

12

111

2

1

2211