Chinese remainder theorem and Diophantine equation implementation
up vote
0
down vote
favorite
I needed an advise on implementing and solving one problem and the others like. I came across two sentences that I think will be helpful. Those are the Chinese remainder theorem and the Diofantic equation, but I do not know exactly how do I apply them to the problem.
Let me introduce this problem f.e. on the sewer pipe, I will try to describe it as a verbal task:
We need to design a sewer pipeline with an exact length of 127 m. We have tubes from 3 different suppliers. Each supplier produces tubes of different fixed lengths that can not be shortened or extended in any way:
first supplier: 12 m
second supplier: 8 m
third supplier: 10 m
At the beginning of the pipeline and at the end of the pipeline there must be bridging pipes having a length of 3 m. Between each and every tube must also be a bridging pipe.
To illustrate this, we'll show the lengths as variables:
(first supplier) X = 12 m
(second supplier) Y = 8 m
(third supplier) Z = 10 m
(bridging pipe) A = 3 m
Therefore, the scheme would be something like this:
A Y A Y A Y A Y A Z A X A X A
We ask how many tubes do we need to order from every supplier and how many solutions there are? Consider these solutions as a number of different admissible orders (one solution may look like f.e from the first sup. we'll order 5, from the second 3 and from the third 7). The bridging pipes are always sufficient and there is no need to order them in any ocasion.
How do you solve this problem? What algorithm can you use to simply achieve the expected results in similar tasks? I recall that the solution that I do not want is the gradual testing and gradual addition, those are naive solutions, I'm looking for an effective algorithm using Chinese remainder theorem or Diophantine equation.
Thanks.
algorithms diophantine-equations chinese-remainder-theorem
add a comment |
up vote
0
down vote
favorite
I needed an advise on implementing and solving one problem and the others like. I came across two sentences that I think will be helpful. Those are the Chinese remainder theorem and the Diofantic equation, but I do not know exactly how do I apply them to the problem.
Let me introduce this problem f.e. on the sewer pipe, I will try to describe it as a verbal task:
We need to design a sewer pipeline with an exact length of 127 m. We have tubes from 3 different suppliers. Each supplier produces tubes of different fixed lengths that can not be shortened or extended in any way:
first supplier: 12 m
second supplier: 8 m
third supplier: 10 m
At the beginning of the pipeline and at the end of the pipeline there must be bridging pipes having a length of 3 m. Between each and every tube must also be a bridging pipe.
To illustrate this, we'll show the lengths as variables:
(first supplier) X = 12 m
(second supplier) Y = 8 m
(third supplier) Z = 10 m
(bridging pipe) A = 3 m
Therefore, the scheme would be something like this:
A Y A Y A Y A Y A Z A X A X A
We ask how many tubes do we need to order from every supplier and how many solutions there are? Consider these solutions as a number of different admissible orders (one solution may look like f.e from the first sup. we'll order 5, from the second 3 and from the third 7). The bridging pipes are always sufficient and there is no need to order them in any ocasion.
How do you solve this problem? What algorithm can you use to simply achieve the expected results in similar tasks? I recall that the solution that I do not want is the gradual testing and gradual addition, those are naive solutions, I'm looking for an effective algorithm using Chinese remainder theorem or Diophantine equation.
Thanks.
algorithms diophantine-equations chinese-remainder-theorem
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I needed an advise on implementing and solving one problem and the others like. I came across two sentences that I think will be helpful. Those are the Chinese remainder theorem and the Diofantic equation, but I do not know exactly how do I apply them to the problem.
Let me introduce this problem f.e. on the sewer pipe, I will try to describe it as a verbal task:
We need to design a sewer pipeline with an exact length of 127 m. We have tubes from 3 different suppliers. Each supplier produces tubes of different fixed lengths that can not be shortened or extended in any way:
first supplier: 12 m
second supplier: 8 m
third supplier: 10 m
At the beginning of the pipeline and at the end of the pipeline there must be bridging pipes having a length of 3 m. Between each and every tube must also be a bridging pipe.
To illustrate this, we'll show the lengths as variables:
(first supplier) X = 12 m
(second supplier) Y = 8 m
(third supplier) Z = 10 m
(bridging pipe) A = 3 m
Therefore, the scheme would be something like this:
A Y A Y A Y A Y A Z A X A X A
We ask how many tubes do we need to order from every supplier and how many solutions there are? Consider these solutions as a number of different admissible orders (one solution may look like f.e from the first sup. we'll order 5, from the second 3 and from the third 7). The bridging pipes are always sufficient and there is no need to order them in any ocasion.
How do you solve this problem? What algorithm can you use to simply achieve the expected results in similar tasks? I recall that the solution that I do not want is the gradual testing and gradual addition, those are naive solutions, I'm looking for an effective algorithm using Chinese remainder theorem or Diophantine equation.
Thanks.
algorithms diophantine-equations chinese-remainder-theorem
I needed an advise on implementing and solving one problem and the others like. I came across two sentences that I think will be helpful. Those are the Chinese remainder theorem and the Diofantic equation, but I do not know exactly how do I apply them to the problem.
Let me introduce this problem f.e. on the sewer pipe, I will try to describe it as a verbal task:
We need to design a sewer pipeline with an exact length of 127 m. We have tubes from 3 different suppliers. Each supplier produces tubes of different fixed lengths that can not be shortened or extended in any way:
first supplier: 12 m
second supplier: 8 m
third supplier: 10 m
At the beginning of the pipeline and at the end of the pipeline there must be bridging pipes having a length of 3 m. Between each and every tube must also be a bridging pipe.
To illustrate this, we'll show the lengths as variables:
(first supplier) X = 12 m
(second supplier) Y = 8 m
(third supplier) Z = 10 m
(bridging pipe) A = 3 m
Therefore, the scheme would be something like this:
A Y A Y A Y A Y A Z A X A X A
We ask how many tubes do we need to order from every supplier and how many solutions there are? Consider these solutions as a number of different admissible orders (one solution may look like f.e from the first sup. we'll order 5, from the second 3 and from the third 7). The bridging pipes are always sufficient and there is no need to order them in any ocasion.
How do you solve this problem? What algorithm can you use to simply achieve the expected results in similar tasks? I recall that the solution that I do not want is the gradual testing and gradual addition, those are naive solutions, I'm looking for an effective algorithm using Chinese remainder theorem or Diophantine equation.
Thanks.
algorithms diophantine-equations chinese-remainder-theorem
algorithms diophantine-equations chinese-remainder-theorem
edited Nov 17 at 22:08
Key Flex
7,05431229
7,05431229
asked Nov 17 at 21:57
jirick
11
11
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3002865%2fchinese-remainder-theorem-and-diophantine-equation-implementation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown