Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views

Module 4 (Modular Arithmetic)

Uploaded by

shrishailgali4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Module 4 (Modular Arithmetic)

Uploaded by

shrishailgali4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Jnteduicn te (cnqute ’) 8 47 -3 (45t2)

a, b, meZ m 0
should be tivisible by S
ue tay that a ds (ongrunt
to b modulo m. < m taling valuu fo =I,23,
divides (a-b) and thu dae find has when =5

iS Jymbolically witen ! 15 4x 80 u divsded by S


a=b(mod m) Thu - 5
That is mlea-)
as bCngd m) < () 8- (143) = (86-x)
should be divisible by 4.
) 18 = 3 (mod 5) By taking 2,
Sinu 6 dirices 8-8 =15 S4 /s divisible by. 4
() -31 4(mod ) Thus =2
-351
Sinu 4 divi deu -3|-4 =
ftnd any tou yalel
NOTE!- 4 a b(mod m) fullewis
and C d(mod m) thn Cngent, idaditei
= (bt d) mod m.
(at) ) =n(mod 8) ))=3(mod u)
)a=nlmod )
O Find the ut peitive C4-)=k
value ef Such Jhd. the =) 1= 4- k
triruing omnquini dderit thu by taking k-o,,2,3,
sati<ud
78t7 = 3(mod s) = 4, -4, -\2, -20
(7)
= (119) (mod 4)
6) 99
Thus ) tol
sclution.
hau no
E)
divisi SinuSumaindau -divi Sboo valus
Thus4he 1= Thus
4 g8-
4 evty (4z-5)=12k
2=
ble
as6-9 ded 956 2= values 12k45
=
that 3 koy
Juquud
by
a=9,thu kez, k+3 l4,
,

by 4 4S
4 talking
13 = 256 mod 4= J5,26
+I|k
N=3
a47 i3 Thu x
thre
hal are
gives when 3),4oilion k=
U find no 5(mod 0
,2,3,-.
a 2)
Thus
mul
135x44
135 .040
tip135lying
X7L
’ (()
) feltrung
() (9)
6 +he
S 135XIu6 I15XI|9 135 Find
x44x x 1)74(10
equürd
aindai 48= x48 06
42 135 )185
6365
ty x
yamandei he
48=XuxG x43 53 (set.
x
(14 8
= 4
8 2(mod 1.
by whun
6(mod (mod whun by
: by
1whn
7.
(rmod
)
) 4). divided ddevicled diidd
in
) hart e
thu
-Thuw 145
>lt5
|15 mutiply -3
J
the x3 x ’ )3(ro145=l0
x 113 S3= 55
SAqued I|3 ")210(2y
Xs30 22
44I13=,3
)53(4 3

x53 4 x53 4
4 (mod (mod
(mo
=.6(mod 10x3
Jumaindu ) d
(mod ) u)O n)
q(mod
u) )
is6 1)
>135x 1351 () ,
135\46 135mutipy
.04 o We
thu 0
know
\6X13 A
) 1461
l46 36
(5
1) x 43 A(26 4)
146=
tu
x73E.I 3S 13£er=0(mod)
13= 3(10
006 |40
37-4= + g1
3 >
asquind (mod G\mod 135 =
3G
(mod 2x63(mod = S(mod
(mod 4) 20(od
) (mod
)
gumainá 4) a) a) 3)
) -0
nst,s
(i) ’) A
2=
(mod
44).2 3 22= D () i)elloung()
16=18
(mod44) 2 6' ,SD imod= a) (a)
(a)' ffnd
43 62128=3
°=
= =
4 9*
44| 256 = 4)= 1)
44 32(mod = l6
i
Cnod (2)' 4 i6 32 vidddivided
di didvedi h
Cmod = (mod (mod (mod =
emnand
(mod2(mod (tnod
4
44) (rnod 44) 4) )=a(mod 4) (by by by
HW 4) 4+) 4)) 23 41 Ro
44)
he
a)
(0 Thus ()4= thuul he uo
(4)=8)
(modto) (31S3)
?s
4.
q2 Hhine n=1 NOTE (mod
()=
numbrs
tolownq-the
4he
124 1" the 3= to) o) 10)
1(mod3=
3348IEL(Mod
=
2
I(n od
= last (mod xa 24
4q
numbeY
last q dilagt (mod 10)1 =4
(mod Cmod 1 digt (o) =
diqit (mod q
then (modo)(mod
0) (o (unit
n.
Pn io) E l0)
digi) s Io)
. (nod I 4.
44
whuforrg inca
()31-4()+ *
Congrusnces EXAMPL ES
tollouinq
Solvethe
n2(modp)
$r)=o congune. bea
duqu n
ax- a
polynomial 1)=o net to be
bea
has aqr An het
conqruen
The.teanqe's polynomla divida(mod 0
31 POk)sotution
o the
a nteqed (mo polynomial
diqzue
+I s 1)
most'n heorem (modro) d an =
=0 congruence m) wi) Q,
=
o t
then
(mods) (mod 3) daqTee
k
ls Ps a,+
soluions. :
called
Said. a,14
°4 n

know e)
to
Soluion
213+|=0(nod 6)
5)
C2)= ’()
fC)= ++)=648f()=
ts 4 soutons Now Hente p)= at
=; -2 Co) 3ince
+4)= 4() 0=fo)-4= SoluttSine
=|# LEl+3 1?+ 9r
o lie Solutiony 1- (modX=
) on
4 6=
(rmód=o
3) 31- 4t
m=
3.
31 =S
lies
Cmod s). (mod (mod
Cmods)
(mod s) in gìren (rROd
#o(rmod 3) -4modm)
h(
= mod
2+S
s) 3
EB the (rmod 0 fo
the 0(rnod )
s) S) (ongune 2
3)
Set 3) o.tI
(mod ce set
)
3)
(ood
(2
(3 ro) 13) )
(rood ro)
-6 mod rmod13) Cmod -3=0=o(od
c=2,
6,
a=s.b= rmod 101=6
13) g)(rnod
l01 -4
=o (
(ue-d 27
4q-q
Cy-b)(mod Solution's
+2 = 21=l0,
b
4ác
b'-
d= y= 13+ 6
Considu
S1G+y2at =4 |2,
Consideu = W-
. NetQan [01
thus, e AnsT=
H
) m=j
so(pod vo) )(2(rnod
2L
) when E4)
lnaaA mod l) )I(mod )Cmod
(mod
1'7tto r+4
b
y=Qa14 Cmod So
tahe
(mod
y9
m). t) 1Cmod
o the -b) tonguences.
= dmod q
10
dui
considaty, -4
consi
We
Solve 14414 =
duConsi aar =ai
y de a Thu
Solutions 1! 0 fs
whre
tengnuencuSoFyAMP[ES d
4 do form Lin
(i) ())
315(mod 1amfnu ak be
thuan (alle ad a
I01 ) aiE
c67 121 tind ak-b.m/ a
atCcnqvunes
a
= b(modSeluiom
I5 s =1 possis
heethei rtiqu Inear (modb(mod
m)o
(mod (mod (mod m) ,
number a th )
3s) 8) 2) k
onquna
solution,tellcwi ?4 Ps
Saud
ng
(iv) (ui) Conclude
Thuidue it
..(GG18)
d6 gcdd= 6 ()
d'= d=
a=10 l0 + onqeen@ has
G61 deu ongune has Thus
a=12,
b=1,
m=2} Aat a3,bs We We
has
ggcd
Clo,35) , dos does
d=gcd(n,3 2) 127 upE d have know
=I5 =8 no
5 b=|5 gcd(3,4) gcd
=4(pndude
divi (mod not (mod divids (a
not ax 91
ons hau
solutton.no (mod ,m)
des m=35) divides 48) thatthe that b(nodSnod
m)
=
|5 Solution
35 b=4 2() Solaion
he )
b=8
() () ()
0, We 4s No u, 6)31=Teqired
Soluton. Thus
AddandQqn wute
Then.weand Now
4i |0,20,30, )4t (3| 137= 11= Sove
x 8,5684,12
\uo,68,1q6
224 ,
wd= 7a(nod o) 0 d=gcdCa,m)
(an d=gcd
(416)
he =| 10
= the ged 2(modlo) E I4 lo 10 = (nod4(mod
2)=0 Ahe
234
d wntt 224+ multples,
mutiple (C(mod 0 (mod (mod 4t 4
(mod followimg
=
0s
10 13 = (mod. 28) io)
= 28)= l4
1828 28) 0) lo). to)-0
22u(mod234÷13 Ps
. 10 )
the latai
23 s,
28) O
5(3) () )
e
8) ()
Al muliple d= tol o fod he
m=21
b=2,
a5
151=12 101 151= Muti
2/3) tt S1= (modA)
0gcd(is,2)
wing ssqù(mod4) 31
12 0= Q= (3
k
1=5
(mod 4) 51=4
snod7) (5 |2 all 1E 14+)=12. 8ples 3,
31
SoluionS 25 (mod
(mod (mod(onqunt
the nud 4 14 b
=)=
(mod 4 (mod (rnod 4 -) -2
ae solutions u, (rnod, (mod o
isa = 21) 85) 21) soutien."
) 4,\4,21,28," 3 ) m=4
qiven
Soluion tcsnties ) ll491. )
the )
by
Hen
U) given
NDfR ,m,),:
m,mg m' y=M,a,
t,
ther olbBau he
thatelaivelye on whu on.
nspti
by
he soluti OPEMAI M X
emaundu
huOTem'
lhe Such ay (a, tom
4hun ete.o Ps
maindwSölution
4,,,thun M. (a,,m,),Wn (onqrtne
m Solution a UoheexM:Th
congquence
m1), n) division M.
Intqers modulo
wise fntars,common M M= tmod Rmod
RULf (mod
paia a,, cotmgule
IdntiBs the
unmgu *Dunotng
positive and a, M,1=0,
oblain th the o
are REM
tHEO
(onqruunthORiNU MiiE 2fs x
systo
P=|toT on
theyrimeany have We and bu by
4 4
T
35) k=0,l,2,3,4
by
qiven
souibn
S,12,)9
ae 2) @o, ae,,4ial,28t)
(rmod
l0 +)
6,(mod
= k(B5/)
1:5+
(modhe 1)(mod
0 k(m/a) 19,26.33
5,12,
thw 35). 33(mod
E
26(mod
1 35).
95),
(mod
1ES
3) mod
219(
12(mod
E35)
2=l0
4+3
35) 35 gcd )ai=3(mod
a m= =
O,li2
k=
ulue 2),1=12 Ca,m) i
4k
valu!
21) solutions
Vahiow
d bs,
19(mod(no t
16 +
=5
=5 gcd 21
muwiples =
the =s(mod l01(0,d= 5 5AU
Q= d
)
on
9veG
Temainda, nemaindu
?s m:)
(tnod
Mit=|
u) 3:5.4
=,D, (1x1*g)+ iös),,B
e
l05
=
4),%
Ahule66
(ornmon
3B(nod n) i (2,4) )Cmod
=IS) (mod4)
(aa Cmod givts
(mod
(mod
Q;I=), 35 xi)+ (mod
Since
2017
M 15l0S-
Ma >M
X= =
ma)
(ag,m,m;M= I 1 233/os
X=2s
(35xz l
( \05
=
M = = 233
= X=233
(a,.m)= 3 8512l2 151
thus (onsi
del
X=
=) .:
(onqun 3),
5) 1=a(mod
(),1=123. 1(rmod
M1=
m by, xs).
simultonouslg
by
usng3) m,]=(0 1
3).1=3(mod 2| 28 l2, qiven (2x3
XO(mod
3
= =
ollowng (aa. x 8/ 84/4 fs xIxo)+
emandel
heovm (agma)=
(5,1)4 Solutton
5(mod
)
9), = 1=
J(mod
) (mod
4) 3) )
m)=(1,4).
m,-m M/m..=
= =. torutde X-lix)+
T=a(mod Mm, (mod (rnod
()1=1(mod
the at
usthu comman.
m,, I
Solve =
Mi M, it = =
a81=
M= M3 l1 I2r
f) Ca A
() EXAMPLES eqn. where The
's
Taling Sub
No
Nouw înteqers Ftnd ar+by=C DIOPHONTINE
ANEAR
FQN
whee
1+4 Ond 151 LDE calld
stitle 9
cd the Thu equaton
oantbycc
Z0
t7y aibic LDEJ
(2 SolV. n have, we
ueists
tioCi5,7) =Soludion
tnteqers
Constitutes ineare
thìs | he au
4y
+y-I5 gt -|s)=6 in) 151+t4=151 tol ocoi
+y=l in iophantira all
yinteqers
positire satiBying
a
= ng Sot
l|- 2DE's
Theneqn (i) Henu
48 giLOE.
ven he Tha' comnbining.By a whSoluton
A|
31]ty=Ga3 5X3+
|8= 3
wheu TC5x3)
91 + divids 48
l
(,5)qcd =| 18 k<Vs
-°/4 < G44k =
15 =hu
31+ ory
+ tSy
X k=oe Z, >o,b=4 dotkb,
ke
solutions o
52 5 5 2 6
(31+y X4 solutHon 4
4170,yzo. DE 4
= y=3
=
3 bcoM +
3
48 3-15k y
e au
- Solutioneu yo-
9) >0 is
= the > k
the
3 given by +he.
mbun

=h
481-9h
3)-9
O -enty ottheonpOssess¢s
m, a SYSTEM
gcd EXAMPLES Ihe
Solve eliinating
2X
HHence,which (2x3
Conside uhen Systn
41+ 2(pod)41+
21+6y.=I(mod
= )0| 3g
3y=2(mod41t a1t
) acquainted
well 1s (zt az
(mod ) -4xC,
9cd inea Solution
obtained
qcdC dy + of
Safislied I2y=2 6y Soluion
moduld
uniqu by uNEAR
1 ad-bc = ep
C-8, Ccngsunte
EI and q iua
) = (mod Cmod (mod
(mod y i (orlRUENCE
for )=| n)=| m) )
)
) process
inde orngueore
y=7 pend
gcd S thus
(0
Hene Neitx2
-
wh at15y -x3, X2 = the
4z (S'+ x5 9i+4g5hod
(4(3x5 27t - 9731
8) =-3(mod)
BiG
- -Ay(mod 4t4y 4L44) -
Cmod
G1
4yi3) A3) -25ya Sy Solut(mod
x4, ys4 y=4
204
= = x4 =1(od 5(mod on. 4) :
11 2 = (mod 4
25 (mod , (mod
(mod mod (rmod |3) y4
13) (3) 13) 13) )
18) 13) (moda)
(3). -
tene) 11(mod
Solution
theis
92-x* gcd Thus,
E3 ’
(4xs- 31+ H+ 1t
(mod1B) forL=
(nod 23(mod
D91l6) -24y D1+Sy=9(mod
= (G) T+
24y gcd(94,16)
=1. ged
lution i
3
Sy
3y= 13)
l6) Cnod = (35), 3x} = 3y=l0
43 i6)
-43(inod q(mod 10 y
y=4(mod lG) (rnod lG) (mod (móc (nod CUe

16) l6) l6)


ls) 16)
16) -O 13)

*rample. nd ) i) ) ( duchd n
()= hu ) Sromples, - by
n) lundon'.
Euts's
n-1.)= 4 C30) d(3) ()=
(2) o (cllud
n - = =
s)
(3) 's 7s 8 4 4 4 I,
a 29 (i buli
- pxime (iS,7,| (l131s (t (1
9-3= 3-
6 4.|, 2,3.4 funilion
3' numlel 15
uunlea. coprima) 13, Copimu)
It,19, copra) ts
(opirne) toprim
23
2
) Sme) imy )
23

i) a=Inodhen n).
thun tun Taepoty *Eratbple.:
(0
fadetrimsi a,
pn) n t (3,5)=|,qcd
PiPr (ab) a n=ll, 8|=
= tb
(a) gcd (mod I gcdfan)ond
inigetan ulatively (1.
dutintanePe oCb)
i) 5)
prime =|" is
n,
tue
C
and 360 ¢(860).nd
) (2)=4p(3).(4) 23To
4X
unlus
Prn=
ime (2X212)
fid
(360) 96
= (36) =
-o-4)()4)
24
x4
360 2,3,
2x3x 5
5
45
3G0
2 4
pr)
P.=2 he
(3)
=9 =
2
6.
P=3.P;= dilfeent
=q6.
5 )
U )
O then
égumaualy thernumbu (
<lool()
fnt
(aits, yeu
EXMPLES;
Find Feymat' s 's
thiontin
fexmat
Tf
Pp
a'a
(modp). T!
p-))+1= theotm
Wilson'
fs s
is
3600. 4númber
oprim 9nthe aond p
isrttle a
=| gcd primu
the
number (mod aa
with pima
Cathuowa) o
tol owing p)= (modnumbu
thu . |
he p).

:q(3600 3600
x3x = 3 3 (3400)o(tooi)=
) 420/
That ()
9
400)
q60, = 225
25 45 50q00 18003600 =2O is
:3600
Xxx I.13
3600 =
960 (00)
=
1-4)()
2 2
xlX13
3
5
Ao5 Nou Thus Nou Jhucte m
) Fumat'
thetun
Argrsm 0ing Appy
(S 5 hare 8. |Osing
S2 qitn, gB0 we 8 a 830is
4

H
2 =I(rnod7). l(mod qcd(8,=1.a)
a= 31
(9od (rood
)6 4)1(rmod4) = =p Femadt (onclude = i(mod p)
= 8pz fhovehat
4 anal Fomat's
a=si s (mod I a
drvi 's 3I phiu divisi
)
tht'um sible that 31)
). thuosu numbel ble
pet little:
pnd by by
3
's1 |
ThusCa).fs
divisible Thus 5x5"=1X
tloe
Hlene
by Bu
By(a'-).i, .qua is
3.
(e' ab t(mod
a= p)
cai)=| 5xl2(mod
SX5x5= )
2 = fumati gcd uen the 5"= S=
=I i'=|(rno =
I had juquud (0(rnod )
(no (mod (mod them
d
divi_ibie tothi (mod 3
d ), 4) t. ged
+) 4) semaihde. ) (mod )2
_how (a,)
by )
7 ha
by +heorerm Hheovtn 6ivetha
)|| hen
(17-D!+I=wison'
(ps appl
theotys Thus know,ilson'shle
i7
by
(6!41=
Cp-)!+|
-D41=
0(mod. p)apply(p-)!+l= divisble
otfs y
10!
+1
0tmod wilso
0lmod17)
vsibl die
=
(mod O
fs (mod 0 divstble
divisible n's
1 p)
p)
2x 2'
Thu 2=(rÍod4+) al
((mod
2= 232 (a: by
41
suqte = (modl19(mod
41)
=25 4) I7 =
800 x* 42
d (nod X
25
(mod mod (
suandets
4+) 41) (mocd 4) ) divigibie
41)
20
L4 T A Ron Private
to message the that Secur
mssÖges by Pablie usrs
other
K cierypt titendd|allows
L 2
C
D Bvest
B Aeo tveyont key |phyaapdy:
22 (2 navd user. key to ormuni
catton
niques
M that
tor $-
2B , svicipient
view only Tt
NOPQ13 lenan Adi edse Public messaqs privak
24 l4
the is
Shamir, the
2S 5 tokey a'
trom keycontnts. Sndu c Study
16
1. nYpt a
RS is is
l8 used used o
step sep skp Step step shp Step
De<nypHonEn(rypion e
Suth. Suh funion.
toiient
euler's
Say
numbers
which
Gi- 5'- is 4 8, 1
equivalenfly
Public that -
Computt equal that
Choose Cormput P
Brivate Ps
Comput t(tor
9 Selec
C bing
plan
!M<n : to1. qcd koown
bung M= CEMe kuy
kydEelmod ed a hiqh a2
c = Q(b)=P-)-)
vale
cphet Cnod (mod E1[mod
fein n laqe
e Seurity)
=p*9
tet fd, (n) st
tet o) n) n 4 þn) on) + prim
fen sbic
key nat7s ibl qI1to iipant
blmbrs
i
pl3. usteoGo Ina
d
13x17=22|
npxq kes and
35d=imod ed
) (35192)
ogcd =I n)92
= (1-) PsA
EXAMPLES
tyWe (13-) = privak4he pnivat
B4
={35, 2 3S
92*2 k=2 d )divide
192k +|=
192 (92 = A (yplo
kl2,3,. Ts
tnod
35 35, keys systm a
key of
(92 hen I4 pime
385
A 4he
?
By and
Palblic
Pi Thuso=
3A l,23,tyWe |3d PSA
whn, &
k ed= daBa,
vae d=
Gok+1 pxq=1I=14 h= publie e
d= = aud 13,
kuy key 1 1 alonth
48| 13 (mod e=13 @-)C1-) dita
Cmod
n ^e.
fd,n3,1 =3 t wive
oco)) provatr
ky.
t Cn) we
J=L(mod have
34,1|
(

ST0P|Sng
59 Ksl
43
4|
Cas3,
Now G=Ce
(onsidaa co,)(e) 4STOPM= Byqcd uhuee=
datasatitying 13
M Ce
tHeu
CmodCE
Encvyption STO M=
P by
0PgPz43,
9=59, 13)
=
\41s 1s9 Mmod C13
M
coulation (4) > =
, 4
(r0d (nod M (2,c)
24 (s)= 3x59 urù guthky
)=C M=lS 6)3
2534) 253ª = 2436 =2534 nuTbui
o 1, (53
2
a
Now
la15l l4ls(41 JA45
G=1814°= L819(819=(3= \319° (19)6 L8q(mod
luls=
(4is l4s3 \Ls 1819* j3,
9531)q= Sb,ss, 24,22,23,
31,40,41;43,44,
34,38, 43
13 12 (on 13 8,49,5254.SS 46,44,4
= = JAsl si = = 45
= = 1828 2,833 dea S13
35s(mod
2\82 |412 35S 1828 2186438
2081 1202 I449 |442 23, l44,8A6
1,34S(nod
(mod (mod (s19°(nod
2531) (rmod 4,60,6l,
30,
(mod (nod (mod (mod (mod (mod (mod omod
(nod 2534) 63ft 32,33,3 19,2018,
2s 253) 2s31)
2531)
2s34) 2534) 2S34) 25 2s84)2534) 2534)
8a)34)
253) 34) 2534) )
43153)
|(Pq) =81046)
coupt
by09
Using
usin9
RSA
d=437 Cl¡oslhy

You might also like