Method of successive substitution

In modular arithmetic, the method of successive substitution is a method of solving problems of simultaneous congruences by using the definition of the congruence equation. It is commonly applied in cases where the conditions of the Chinese remainder theorem are not satisfied.

There is also an unrelated numerical-analysis method of successive substitution, a randomized algorithm used for root finding, an application of fixed-point iteration.

The method of successive substitution is also known as back substitution.

Examples

Example One

Consider the simple set of simultaneous congruences

x ≡ 3 (mod 4)
x ≡ 5 (mod 6)

Now, for x ≡ 3 (mod 4) to be true, x = 3 + 4j for some integer j. Substitute this in the second equation

3+4j ≡ 5 (mod 6)

since we are looking for a solution to both equations.

Subtract 3 from both sides (this is permitted in modular arithmetic)

4j ≡ 2 (mod 6)

We simplify by dividing by the greatest common divisor of 4,2 and 6. Division by 2 yields:

2j ≡ 1 (mod 3)

The Euclidean modular multiplicative inverse of 2 mod 3 is 2. After multiplying both sides with the inverse, we obtain:

j ≡ 2 × 1 (mod 3)

or

j ≡ 2 (mod 3)

For the above to be true: j = 2 + 3k for some integer k. Now substitute back into 3 + 4j and we obtain

x = 3 + 4(2 + 3k)

Expand:

x = 11 + 12k

to obtain the solution

x ≡ 11 (mod 12)

Example 2 (An Easier Method)

Although the method utilized in the preceding example is coherent, it does not work for every problem.

Consider these four systems of congruences:

In order to proceed in finding an expression that represents all the solutions that satisfies this system of linear congruences, it is important to know that a (mod b) has an analogous identity:

PROCEDURE

1. Begin by rewriting the first congruence as an equation:

2. Rewrite the second congruence as an equation, and set the equation found in the first step equal to this equation, since x will substitute the x in the second congruence:

Because a must be a positive nonnegative inverse, we need a positive a. Thus, we add whatever our current modulus is to a, which is a = -1 + 3 = 2.

3. We now rewrite a = 2 in terms of our current modulus:

4. We now substitute our current value of a into our equation that we found in step 1 with respect to x:

∴ x = 6b + 5.

5. We now substitute our new value for x into the x in our third linear congruence, and rewrite 3 (mod 5) to its equivalent expression:

Because b = -2, we add our current to modulus to it in order to obtain b = 3.

∴ b = 5c + 3.

6. We again substitute our new value for b into our equation that we found in step 4 with respect to x:

∴ x = 30c + 23, ∀c ∈ Z

7. We now substitute our new value for x into the x of our final linear congruence, rewriting 4 (mod 11) to its equivalent expression:

Adding our current modulus to the value that c represents, our new c = 10.

∴ c = 11d + 10, ∀d ∈ Z.

8. Our final step is to substitute c into the equation with respect to x that we found in step 6:

∴ 330d + 323 represents all solutions that satisfies the system of congruences with which we began.

Checking Our Work

To check that our answer is correct, we deduce whether each respective residue is conceived when we compute 323 by the modulo of each congruence:

323 ≡ 1 (mod 2)

323 ≡ 2 (mod 3)

323 ≡ 3 (mod 5)

323 ≡ 4 (mod 11)

An alternative method would be to deduce whether each modulus divides the difference of 323 and each congruence's respective residue:

2 | (323 - 1) is true.

3 | (323 - 2) is true.

5 | (323 - 3) is true.

11 | (323 - 4) is true.

Another way to solve the system of linear congruences is to use the Chinese Remainder Theorem, and it will give us the same result.

Example 3 (Similar Method Utilized Above but with a Twist)

When solving a system of linear congruences using the method utilized in the above example, there will be situations where solving for a variable will produce a rational.

The key to solving for the variable is to add the current modulus to the other side of the equation, until a multiple of the coefficient of the variable that is being solved for

is procured. Here is an example:

PROCEDURE

1. Rewrite the first linear congruence to its equivalent equation:

2. Rewrite the second congruence as an equation, and set the expression equal to the expression found in the preceding step:

This is where the method used in example 2 appears to have troubles, but I found a solution: Add whatever the current modulus is to the side of the equation where the variable is not, until the coefficient is able to divide it. The reason why we can do this is because of the definition of a congruence class Thus,

3. Add 5, which is our modulus, to -1, to obtain:

4. Rewrite a = 2 as its equivalent modular equation

5. Substitute our current a into the equation procured in step 1 with respect to x:

6. Finally, rewrite the third congruence, and set it equal to the equation incurred in the preceding step, solving for b.

Substituting for x, we have

Add our current modulus, which is 7, to -6, until a multiple of 8 is conceived:

Thus,

Rewriting b in terms of its modulus, we have

7. Substitute our new equation b for b in the equation with respect to x we conceived in step 6:

105c + 23 represents all solutions that satisfies the system of congruences with which we began.

Checking Our Work

To check that our answer is correct, we deduce whether each respective residue is conceived when we compute 23 by the modulo of each congruence:

23 ≡ 2 (mod 3)

23 ≡ 3 (mod 5)

23 ≡ 2 (mod 7)

General algorithm

In general:

If the moduli are coprime, the Chinese remainder theorem gives a straightforward formula to obtain the solution.

See also

External links

The Wikibook Discrete Mathematics has a page on the topic of: Modular arithmetic
This article is issued from Wikipedia - version of the Monday, February 22, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.