Solving a System of Congruences Using Chinese Remainder Theorem

  • Thread starter Thread starter Hernaner28
  • Start date Start date
  • Tags Tags
    System
Click For Summary

Homework Help Overview

The discussion revolves around solving a system of congruences using the Chinese Remainder Theorem. The original poster presents a series of congruences that need to be solved simultaneously, expressing concerns about the complexity of the process given the number of equations involved.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the application of the Chinese Remainder Theorem and the Extended Euclidean Algorithm as potential methods for solving the system. There are inquiries about simplifying the system, such as removing redundant equations or finding alternative approaches to reduce the workload.

Discussion Status

Participants are actively engaging with the problem, sharing their understanding of relevant theorems and algorithms. Some express uncertainty about specific steps in the solution process, while others suggest methods for approaching the problem. There is no explicit consensus on a single method, but various ideas and techniques are being explored.

Contextual Notes

The original poster notes the tedious nature of solving multiple equations sequentially and questions the necessity of all equations in the system. There is also mention of the potential for simplification through the identification of equivalent forms of the system.

Hernaner28
Messages
261
Reaction score
0

Homework Statement


Solve the following system:

\displaystyle \left\{ \begin{array}{*{35}{l}}<br /> x\equiv 1\left( \bmod 2 \right) \\<br /> x\equiv 2\left( \bmod 3 \right) \\<br /> x\equiv 3\left( \bmod 4 \right) \\<br /> x\equiv 4\left( \bmod 5 \right) \\<br /> x\equiv 5\left( \bmod 6 \right) \\<br /> x\equiv 6\left( \bmod 7 \right) \\<br /> x\equiv 7\left( \bmod 8 \right) \\<br /> x\equiv 8\left( \bmod 9 \right) \\<br /> \end{array} \right.


Homework Equations


Chinese remainder theorem.


The Attempt at a Solution



Well, what I did was to substract the module in each equation, so now I have:

\displaystyle \left\{ \begin{array}{*{35}{l}}<br /> x\equiv -1\left( \bmod 2 \right) \\<br /> x\equiv -1\left( \bmod 3 \right) \\<br /> x\equiv -1\left( \bmod 4 \right) \\<br /> x\equiv -1\left( \bmod 5 \right) \\<br /> x\equiv -1\left( \bmod 6 \right) \\<br /> x\equiv -1\left( \bmod 7 \right) \\<br /> x\equiv -1\left( \bmod 8 \right) \\<br /> x\equiv -1\left( \bmod 9 \right) \\<br /> \end{array} \right.

Now, if I try to solve one equation and then replace in the next it would be a tedious work to do. I've seen chinese remainder theorem but it doesn't help me, or at least I don't realize. What can I do next to simplify this system?

Thanks!
 
Physics news on Phys.org
Are you familiar with the linear congruence theorem?

Suppose ##a,b,n \in \mathbb{Z}, \space n>0##

Then ##ax \equiv bmodn \space## has a solution for x ##⇔ gcd(a,n)|b##.
 
Yes. That follows from the solutions for the linear diophantine equations.

What do you suggest? THanks!
 
Hernaner28 said:
Yes. That follows from the solutions for the linear diophantine equations.

What do you suggest? THanks!

With multiple applications of the theorem, you will be able to solve your system. Are you also familiar with the Extended Euclidean algorithm? It is also very important for solving linear congruences.
 
Yes. I know how to solve this kind of systems. To do that I always use the extended euclidean algorithm to compute the inverse of a (in the equation you wrote). But in this particular problem I have 8 equations and it would be tedious to solve one, and then replace it in the next, and then again same thing until I get to the solution.
I wonder if there's something I can do to simplify the system (e.g. remove redundant equations or change something).

Thanks
 
Hernaner28 said:
Yes. I know how to solve this kind of systems. To do that I always use the extended euclidean algorithm to compute the inverse of a (in the equation you wrote). But in this particular problem I have 8 equations and it would be tedious to solve one, and then replace it in the next, and then again same thing until I get to the solution.
I wonder if there's something I can do to simplify the system (e.g. remove redundant equations or change somthing).

Thanks

Hmm I wouldn't be familiar with any methods beyond the theorem and the algorithm. Sure it's cumbersome, but if it's for a homework assignment or something, I'm sure it's intended to get you used to calculating quickly and to hammer the concepts in ( So I can understand why it's so long ).

EDIT : You could write out each relation as a set and then take the intersection of your set to be the solution x as well? Otherwise I think multiple substitutions is the only way.
 
I've looked at the solution and the next step was to say that system is equivalent to:

\displaystyle x\equiv -1\left( \bmod {{3}^{2}}\cdot {{2}^{3}}\cdot 7\cdot 5 \right)

which is a piece of cake. Even so, I do not understand what was done there. It's not the factorization of 9x8x7x6x5x2 . What is it then?

Thanks!
 
Hernaner28 said:
I've looked at the solution and the next step was to say that system is equivalent to:

\displaystyle x\equiv -1\left( \bmod {{3}^{2}}\cdot {{2}^{3}}\cdot 7\cdot 5 \right)

which is a piece of cake. Even so, I do not understand what was done there. It's not the factorization of 9x8x7x6x5x2 . What is it then?

Thanks!

Yes that is the case. x = 2519 is the solution to your system.

The way it was obtained more than likely was multiple applications of the E.E.A. The set intersecton idea I wrote out in my last post works, but is probably better for smaller systems of equations unless you can see the pattern ahead of time.
 
Last edited:
Hernaner28 said:
I've looked at the solution and the next step was to say that system is equivalent to:

\displaystyle x\equiv -1\left( \bmod {{3}^{2}}\cdot {{2}^{3}}\cdot 7\cdot 5 \right)

which is a piece of cake. Even so, I do not understand what was done there. It's not the factorization of 9x8x7x6x5x2 . What is it then?

Thanks!

It's the least common multiple of 2,3,4,5,6,7,8,9. Any common multiple would work, but the least one will give you the smallest solution.
 
  • #10
Ahh I see, that's it, the least common multiple. Thanks both!
 

Similar threads

Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 105 ·
4
Replies
105
Views
10K
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
2
Views
2K