linear congruences ax b mod n for x z a x b in z n in
play

Linear congruences: ax b (mod n ) for x Z a x = b in Z n (in - PDF document

Linear congruences: ax b (mod n ) for x Z a x = b in Z n (in particular x { 0 , 1 , . . . , n 1 } ) [ a ] n [ x ] n = [ b ] n in Z n x Z satisfies ax b (mod n ) if and only if there is y Z such that ax


  1. Linear congruences: • ax ≡ b (mod n ) for x ∈ Z • a ⊙ x = b in Z n (in particular x ∈ { 0 , 1 , . . . , n − 1 } ) • [ a ] n ⊙ [ x ] n = [ b ] n in Z n

  2. x ∈ Z satisfies ax ≡ b (mod n ) if and only if there is y ∈ Z such that ax + yn = b .

  3. Theorem. Let n ∈ N , let a, b ∈ Z . Assume that gcd( a, n ) = Aa + Bn . (i) If b is not a multiple of gcd( a, n ), then the equation ax ≡ b (mod n ) does not have a solution. (ii) If gcd( a, n ) | b , then the equation ax ≡ b (mod n ) does have a soltuion and the set of all its solutions is � � b n gcd( a, n ) + k gcd( a, n ); k ∈ Z A .

  4. Theorem. Let n ∈ N , let [ a ] n , [ b ] n ∈ Z n . Assume that gcd( a, n ) = Aa + Bn . (i) If b is not a multiple of gcd( a, n ), then the equation [ a ] n ⊙ [ x ] n = [ b ] n does not have a solution. (ii) If gcd( a, n ) | b , then the equation [ a ] n ⊙ [ x ] n = [ b ] n has gcd( a, n ) distinct solutions in Z n and the set of all these solutions is �� � � b n gcd( a, n ) + k n ; k = 0 , 1 , . . . , gcd( a, n ) − 1 A . gcd( a, n )

  5. Theorem. Let n ∈ N , let a, b ∈ Z . Consider some solution x p of the congruence ax ≡ b (mod n ). Then x ∈ Z is a solution of this congruence if and only if x = x p + x h for some x h ∈ Z that solves the congruence ax ≡ 0 (mod n ).

  6. Fact. Let n ∈ N , consider a ∈ Z n . The set of all solutions of the congruence a ⊙ x = 0 (mod n ) is � n � k gcd( a, n ); k ∈ Z .

  7. Algorithm for solving the equation ax ≡ b (mod n ) in Z , or the equation [ a ] n ⊙ [ x ] n = [ b ] n in Z n , or the equation ax = b in Z n for a, b ∈ Z n . 0. Rewrite the equation as ax + ny = b . Using the extended Eu- clidean algorithm find gcd( a, n ) = Aa + Bn (or guess it). 1. If gcd( a, n ) divides b , then the equation has a solution. 2. If gcd( a, n ) dl b , rovnice m een. b a) Multiply gcd( a, n ) = Aa + Bn by the number gcd( a, n ), changing Ab Bb it into a gcd( a, n ) + n gcd( a, n ) = b , which has the same form as the Ab equation in step 0 . We see a particular solution x p = gcd( a, n ). b) Cancel the associated homogeneous equation ax + ny = 0 by the number gcd( a, n ), creating a ′ x + n ′ y = 0, this has a general solution x h = kn ′ , k ∈ Z . c) A general solution of the given equation is then x p + x h . Depending on how the question was given you get the following: • The set of all integer solutions of the congruence ax ≡ b (mod n ) is { x p + kn ′ ; k ∈ Z } , that is, x = x p + kn ′ , k ∈ Z . • The set of all solutions in Z n of the equation [ a ] n [ x ] n = [ b ] n is { [ x p + kn ′ ] n ; k = 0 , 1 , 2 , . . . , gcd( a, n ) − 1 } . • The set of solutions in Z n of the equation ax = b can be obtained by choosing a suitable representative of the class [ x p + kn ′ ] n for all k = 0 , 1 , . . . , gcd( a, n ) − 1. Formally, let k 0 be the least integer such that x p + kn ′ ≥ 0. Then the set of all solutions in Z n of the equation ax = b is { x p + kn ′ ; k = k 0 , k 0 + 1 , . . . , k 0 + gcd( a, n ) − 1 } .

  8. Systems of linear congruences: Assume that moduli n 1 , . . . , n m ∈ N and right-hand sides b 1 , . . . , b m ∈ Z are given. We are looking for integers x such that x ≡ b 1 (mod n 1 ), x ≡ b 2 (mod n 2 ), . . . x ≡ b m (mod n m ).

  9. Theorem. (Chinese remainder theorem) Let n 1 , n 2 , . . . , n m ∈ N , b 1 , b 2 , . . . , b m ∈ Z . Consider the system of equations x ≡ b 1 (mod n 1 ), x ≡ b 2 (mod n 2 ), . . . x ≡ b m (mod n m ). If the numbers n i are all pairwise coprime, then this system has a solution. This solution is unique up to modulo n = n 1 n 2 · · · n m , conversely, all elements from this congruence class modulo n are also solutions.

  10. Algorithm for solving systems of congruences x ≡ b 1 (mod n 1 ), x ≡ b 2 (mod n 2 ) , . . . , x ≡ b m (mod n m ) in case that all numbers n i are pairwise coprime. 1. Denote n = n 1 n 2 · · · n m and N i = n n i for all i . 2. For every i find the inverse of N i with respect to multiplication modulo n i . m 3. Let x = � b i x i N i . The set of all solutions of the given system is i =1 { x + kn ; k ∈ Z } .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend