Detached mathematics Modular addition

 25 June 05:18   We accept already advised moduli and modular addition aback in , about in this area we will yield a added indepth appearance of modular arithmetic.

    For revision, you should analysis the actual in if you choose.

    When we allege of accompanying equations with affiliation to modular arithmetic, we are talking about accompanying solutions to sets of equations in the form

    : x ≡ a1 (mod m1)

    : :

    : :

    : x ≡ ak (mod mk)

    There are two arch methods we will consider, alternating barter and the Chinese butt theorem.

    The adjustment of alternating barter is that area we use the analogue of the modulus to carbon these accompanying equations, and then successively create substitutions.

    It will apparently be best to actuate the abstraction with an example.

    Example: Break 3x ≡ 10 (mod 19), and x ≡ 19 (mod 21) using sucessive substitution.

    First:

    :3x ≡ 10 (mod 19)

    Find the changed of 3 in Z19; 3-1=-6, then

    : x ≡ -60 (mod 19)

    : x ≡ 16 (mod 19)

    : x = 16 + 19j ∃ j∈Z (

    Substitute in the additional equation

    : (16+19j) ≡ 19 (mod 21)

    : 19j ≡ 3 (mod 21)

    Find the changed of 19 in Z21; 19-1=10

    : j = 30 (mod 21)

    : j = 9 (mod 21)

    Writing in the agnate form

    : j = 9 + 21k ∃ k∈Z

    Substituting aback j in (: x ≡ 16 + 19(9+21k)

    : x ≡ 187+399k

    Writing aback in the first form

    : x ≡ 187 (mod 399)

    which is our solution.

    The Chinese butt assumption is a adjustment for analytic accompanying beeline congruences if the moduli are coprime.

    Given the equations

    : x ≡ a1 (mod m1)

    : :

    : :

    : x ≡ ak (mod mk)

    multiply the moduli together, ie N=m1m2...mk,

    then address n1=N/m1, ..., nk=N/mk.

    We then set yk be the changed of nk mod mk for all k, so yknk=1 mod mk.

    Our band-aid will be

    :x ≡ a1y1n1+...+akyknk (mod N)

    To see why this works accede what ethics x mod mk takes. The appellation akyknk mod mk becomes according to ak as yknk=1 mod mk, and all the agreement ajyjnj mod mk become according to aught as if j
eq k mk is a agency of nj.

    

    The Chinese Butt Assumption is of immense applied use, as if we ambition to break an blueprint mod M for some ample M, we can instead break it mod p for every prime agency of M and use CRT to access a band-aid mod M.

    This area deals with searching admiral of numbers modulo some modulus. We attending at able means of calculating

    : ab (mod m)

    If we approved to account this commonly - by artful ab and then demography the modulus - it would yield an absonant bulk of time. About some of the approach abaft modular addition allows us a few shortcuts.

    We will attending at some of these and the approach complex with them.

    Fermats assumption allows us to see area ab (mod m) is 1. This has an appliance in disproving primality.

    It states

    :If p is prime, and gcd(a,p)=1, then, in Zp

    :ap-1=1.

    So, for example, 1310=1 in Z11.

    In Zn, can we can address some elements as admiral of an element? This is conceivably possible.

    Lets attending at Z3.

    :20=1

    :21=2

    :22=1

    The elements aggregate in actuality :Z3

    Generally, we have

    :If p prime, then there is an aspect g∈Zp

    We can accurate this abstraction in a altered way, using the abstraction of the order.

    We denote the adjustment of a ∈ Zn: ak=1 in Zn.

    For example, On(-1)=2 for all n, since

    :(-1)2=1 for all n.

    Question; for n=2 -1 is coinciding to 1 so has adjustment one??

    


    Note if gcd(a,n)≠1, that is, a ∉ Zn

    The orders obey some properties, the first of which was originally accurate by Lagrange:

    If p prime, gcd(a,p)=1,

    Given these facts above, we can acquisition archaic elements in Zp for p > 2 adequately easily.

    Using the aloft facts, we alone charge to analysis a(p-1)/pi=xi in Zp for all i, area the pi are the prime factors of p-1. If any of the xi are 1, a is not a archaic element, if none are, it is.

    Example: Acquisition a archaic aspect of Z11.

    Try 2. p-1 = 10 = 2 . 5

    Check:

    : 210/2=25=10

    : 210/5=22=4

    Neither is 1, so we can say that 2 is a archaic aspect in Z11.

    Given the above, acknowledgment the following. (Answers chase to even-numbered questions)

    # Is 4 archaic in Z13?

    # Is 5 archaic in Z23?

    # Acquisition a archaic aspect of Z5.

    # Acquisition a archaic aspect of Z19.

    :2. Yes: In Z23, (23-1)=2:4. 2. Check: (19-1) has audible prime factors 2 and 3. In Z19, 218/2≠1 and 218/3≠1 but 218=1 so 2 is primitive.

    Eulers totient action is a appropriate action that allows us to generalize Fermats little assumption above.

    It is authentic as

    : φ(n) = |Zn::=||

    ::that is the amount of elements that accept inverses in Zn

    We accept the afterward after-effects arch on from antecedent definitions.

    # φ(p) = p - 1

    # φ(pk) = pk-pk-1

    # φ(mn)=φ(m)φ(n) for gcd(m,n)=1

    # For any accumulation n, the sum of the totient ethics of anniversary of its divisors equals n.

    In additional symbols:

    sum_ phi(d) = n.

    Proof of 2.: There are pk elements in Zpk. The non-invertible elements in Zpk are the multiples of p and there are pk-1 of them: p, 2p, 3p, ..., (pk-1-1)p, pk. Removing the non-invertible elements from the invertible ones leaves pk-pk-1 left. ?

    Corollary to 1, 2 and 3:

    If n has audible prime factors (ie not counting powers) pi for i=1,...,r we have

    :phi(n)=nprod_^r (1-frac)

    For example:

    :16=24, so φ(16)=(16)(1-1/2)=16/2=8

    :φ(11)=(11)(1-1/11)=(11)(10/11)=10

    ::(confirm from afore 11 prime so φ(11)=11-1=10).

    Proof of 3.: We can prove this adequation using a appropriate case of the Chinese Butt Theorem, area the CRT is now just a arrangement of 2 congruences, namely:

    :x a2 (mod n)

    (remember that the CRT is applicative actuality because m and n are affected coprime in the equality).

    Note that a1 can yield on m ethics (from 0 to m-1), and a2 can yield on n ethics (from 0 to n-1). Aswell agenda that, for anniversary and anybody of the m

    With this bijective character acreage in mind, the affidavit is simple. Go through anniversary x, from 0 to m

    If gcd (x,m

    :x = a1 + k:x = a2 + q

    Therefore, a1so gcd (a1,m) = 1, and accordingly a1 is a totient of m. Advance analogously to prove that a2 is a totient of n.

    Proving the additional administration is actual agnate in that it requires some simple backup algebra.

    So what accept we shown? In the aloft we accept apparent that for every totient x of m

    Proof of 4.: Let Q(g) be the set of all integers amid 1 and n inclusive, such that

    gcd(x,n) = g. Q(g) is nonempty if and alone if g divides n. If g doesnt bisect n, then acceptable luck

    finding an x such that g is the greatest accepted DIVISOR of x and n. Secondly, if x belongs to

    Q(g) for a accustomed g, then it deceit accord to addition Q(...), since, if n is fixed, then

    gcd(x,n) is unique, by analogue of the GREATEST accepted divisor. Thirdly, for all x between

    1 and n inclusive, there exists a g such that gcd (x,n) = g (in the affliction case, its 1).

    Put together, these three backdrop betoken that the abutment of all the Q(g) sets (for anniversary g a

    divisor of n), which are pairwise mutually exclusive, is the set . And therefore, the sum of the cardinalities of anniversary Q(g) equals n.

    Now we appearance that |Q(g)| = φ(n/g).

    One direction: Let x be an approximate affiliate of Q(g) for some g. Therefore, we accept that

    gcd (x,n) = g => gcd (x/g, n/g) = 1 => x/g belongs to the set of numbers coprime to n/g (whose cardinality of advance is φ(n/g)). For altered xs, the two ethics x1/g and x2/g are distinct. So for anniversary x in Q(g), there is a appropriately different x/g in

    the set of numbers coprime to n/g.

    Other direction: Let x be an approximate affiliate of the set of numbers coprime to n/g. This implies

    gcd (x,n/g) = 1 => gcd (xg,n) = g => xg belongs to Q(g). For altered xs, the two values

    x1g and x2g are distinct. So for anniversary x in the set of numbers coprime to

    n/g, there is a appropriately different xg in Q(g).

    Therefore, |Q(g)| = φ(n/g).

    We can now generalize Fermats assumption to extend accomplished just Zn.

    Eulers assumption says:

    : If a ∈ Zn:: aφ(n)=1

    : analogously if gcd(a,n)=1,

    :: aφ(n)≡1 (mod n)

    Example: Acquisition 3216 in Z14.

    We charge to account firstly φ(14)=φ(7)φ(2)=(7-1)(2-1)=6.

    Then address the backer as: 216 = 6 × 36

    So: 3216=(36)36

    But Eulers assumption tells us 36=1 in Z14 (ie., mod 14) back 3φ(14)=1 in Z14 as above.

    So we have: 3216=136=1.

    When Eulers or Fermats assumption fails us in the adding of a top power, there is a way to decompose an backer down so adding is still easy.

    Let us plan through an archetype as motivation.

    Example. 528 in Z4.

    First address 28 in abject 2 = (11100)2 = 24+23+22 = 16 + 8 + 4

    Now 528 = 516+8+4 = 516 58 54

    Now carbon these admiral of 2 as again exponents:

    : (((52)2)2)2 × ((52)2)2 × (52)2

    When you account anniversary exponent, abate mod 4 anniversary time.

    Given the above, account the afterward powers. (Answers chase to even-numbered questions)

    # 312 (mod 13)

    # 242 (mod 43)

    # 6168 (mod 30)

    # 2252 (mod 19)

    # 261 (mod 22)

    # 813 (mod 5)

    # 1110 (mod 11) (Tricky!)

    :2. Back gcd(2,43)=1 and the backer is one beneath than the modulus, use Fermats assumption - the acknowledgment is 1

    :4. Beam that φ(19)=18 and 18|252. 252/18=14. Decompose the backer then as 218×14=(218)14=1.

    :6. Use fast exponentiation by squaring: the acknowledgment is 3

    

 


Tags: different, example, numbers, factors, allows, chinese, elements, solution, write, common, prime, greatest, values, modular, mathematics, direction

 &equiv, theorem, primitive, example, prime, element, elements, arithmetic, coprime, modular, values, exponent, fermats, totient, numbers, given, powers, write, chinese, distinct, eulers, simultaneous, remainder, equations, calculate, modulus, direction, invertible, belongs, unique, moduli, proof, ×, inverse, different, substitution, factors, following, allows, solve, solution, , modular arithmetic, primitive element, numbers coprime, fermats theorem, remainder theorem, chinese remainder, given the, prime factors, chinese remainder theorem, greatest common divisor, non invertible elements, distinct prime factors, discrete mathematics modular, mathematics modular arithmetic,

Share Detached mathematics Modular addition:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Reference & Education  -  Mathematics