linear equations with boundary conditions
$begingroup$
When solving a system of linear equations I want to introduce "boundary conditions" (not sure if that's the right term) to the values of the variables. Each variable must be a non-negative integer and has a maximum value.
Here is an example of such a problem;
begin{array}{|c|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 0 & 0 & 0 & 0 & 1 & 1 \ hline
0 & 1 & 0 & 0 & 1 & 0 & 1 \ hline
0 & 0 & 1 & 0 & 1 & 1 & 2 \ hline
0 & 0 & 0 & 1 &-1 &-1 &-1 \ hline
end{array}
The system of equations is already transformed to reduced echelon form.
The given maximum values for variables a to f are as following;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 2 & 2 & 1 & 1 & 1 \ hline
end{array}
Another condition is that the sum of all variables is a constant, in the case of the example it is 3. This is easily achieved by adding the row "1 1 1 1 1 1 3" (which is already a linear combination of other rows so doesn't add anything).
Without the boundary conditions the trivial solution would be 1 1 2 -1 0 0 but since negative values are not allowed this solution is not valid.
With the given conditions the possible solution are;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
0 & 0 & 0 & 1 & 1 & 1 \ hline
0 & 1 & 1 & 0 & 0 & 1 \ hline
1 & 0 & 1 & 0 & 1 & 0 \ hline
end{array}
Is there any way of solving this problem in polynomial time complexity? It is not possible to introduce the conditions by adding extra rows to the system of linear equations, right?
Eventually I want to solve systems with up to 40 variables.
I preferable want to list all possible solutions but determining whether or not a valid solution exists without brute-forcing all possibilities would also be nice.
linear-algebra systems-of-equations
$endgroup$
add a comment |
$begingroup$
When solving a system of linear equations I want to introduce "boundary conditions" (not sure if that's the right term) to the values of the variables. Each variable must be a non-negative integer and has a maximum value.
Here is an example of such a problem;
begin{array}{|c|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 0 & 0 & 0 & 0 & 1 & 1 \ hline
0 & 1 & 0 & 0 & 1 & 0 & 1 \ hline
0 & 0 & 1 & 0 & 1 & 1 & 2 \ hline
0 & 0 & 0 & 1 &-1 &-1 &-1 \ hline
end{array}
The system of equations is already transformed to reduced echelon form.
The given maximum values for variables a to f are as following;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 2 & 2 & 1 & 1 & 1 \ hline
end{array}
Another condition is that the sum of all variables is a constant, in the case of the example it is 3. This is easily achieved by adding the row "1 1 1 1 1 1 3" (which is already a linear combination of other rows so doesn't add anything).
Without the boundary conditions the trivial solution would be 1 1 2 -1 0 0 but since negative values are not allowed this solution is not valid.
With the given conditions the possible solution are;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
0 & 0 & 0 & 1 & 1 & 1 \ hline
0 & 1 & 1 & 0 & 0 & 1 \ hline
1 & 0 & 1 & 0 & 1 & 0 \ hline
end{array}
Is there any way of solving this problem in polynomial time complexity? It is not possible to introduce the conditions by adding extra rows to the system of linear equations, right?
Eventually I want to solve systems with up to 40 variables.
I preferable want to list all possible solutions but determining whether or not a valid solution exists without brute-forcing all possibilities would also be nice.
linear-algebra systems-of-equations
$endgroup$
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52
add a comment |
$begingroup$
When solving a system of linear equations I want to introduce "boundary conditions" (not sure if that's the right term) to the values of the variables. Each variable must be a non-negative integer and has a maximum value.
Here is an example of such a problem;
begin{array}{|c|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 0 & 0 & 0 & 0 & 1 & 1 \ hline
0 & 1 & 0 & 0 & 1 & 0 & 1 \ hline
0 & 0 & 1 & 0 & 1 & 1 & 2 \ hline
0 & 0 & 0 & 1 &-1 &-1 &-1 \ hline
end{array}
The system of equations is already transformed to reduced echelon form.
The given maximum values for variables a to f are as following;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 2 & 2 & 1 & 1 & 1 \ hline
end{array}
Another condition is that the sum of all variables is a constant, in the case of the example it is 3. This is easily achieved by adding the row "1 1 1 1 1 1 3" (which is already a linear combination of other rows so doesn't add anything).
Without the boundary conditions the trivial solution would be 1 1 2 -1 0 0 but since negative values are not allowed this solution is not valid.
With the given conditions the possible solution are;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
0 & 0 & 0 & 1 & 1 & 1 \ hline
0 & 1 & 1 & 0 & 0 & 1 \ hline
1 & 0 & 1 & 0 & 1 & 0 \ hline
end{array}
Is there any way of solving this problem in polynomial time complexity? It is not possible to introduce the conditions by adding extra rows to the system of linear equations, right?
Eventually I want to solve systems with up to 40 variables.
I preferable want to list all possible solutions but determining whether or not a valid solution exists without brute-forcing all possibilities would also be nice.
linear-algebra systems-of-equations
$endgroup$
When solving a system of linear equations I want to introduce "boundary conditions" (not sure if that's the right term) to the values of the variables. Each variable must be a non-negative integer and has a maximum value.
Here is an example of such a problem;
begin{array}{|c|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 0 & 0 & 0 & 0 & 1 & 1 \ hline
0 & 1 & 0 & 0 & 1 & 0 & 1 \ hline
0 & 0 & 1 & 0 & 1 & 1 & 2 \ hline
0 & 0 & 0 & 1 &-1 &-1 &-1 \ hline
end{array}
The system of equations is already transformed to reduced echelon form.
The given maximum values for variables a to f are as following;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
1 & 2 & 2 & 1 & 1 & 1 \ hline
end{array}
Another condition is that the sum of all variables is a constant, in the case of the example it is 3. This is easily achieved by adding the row "1 1 1 1 1 1 3" (which is already a linear combination of other rows so doesn't add anything).
Without the boundary conditions the trivial solution would be 1 1 2 -1 0 0 but since negative values are not allowed this solution is not valid.
With the given conditions the possible solution are;
begin{array}{|c|c|c|c|c|c|}
hline
a & b & c & d & e & f \ hline
0 & 0 & 0 & 1 & 1 & 1 \ hline
0 & 1 & 1 & 0 & 0 & 1 \ hline
1 & 0 & 1 & 0 & 1 & 0 \ hline
end{array}
Is there any way of solving this problem in polynomial time complexity? It is not possible to introduce the conditions by adding extra rows to the system of linear equations, right?
Eventually I want to solve systems with up to 40 variables.
I preferable want to list all possible solutions but determining whether or not a valid solution exists without brute-forcing all possibilities would also be nice.
linear-algebra systems-of-equations
linear-algebra systems-of-equations
edited Dec 31 '18 at 12:38
David
asked Dec 31 '18 at 9:50
DavidDavid
11
11
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52
add a comment |
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Your question is related to integer programming (maximize $c^Tx$ subject to $Axleq b$ and $x_iinmathbb{Z}$). To get constraints like $Ax=b$ you can do $Axleq b$ and $-Axleq -b$ and to get constraints like $x_igeq 0$ you can do $-Ixleq 0$.
Your problem is about finding feasible points for the optimization problem above; i.e. you don't care about the value of $c^Tx$.
In general, integer programming is NP-complete. Similarly, the task of finding all feasible points cannot be done in polynomial time because there could be exponentially many feasible points. I am unsure about the time complexity of finding a single point.
A general technique for solving integer programs is to first solve the linear program (same problem without integer constraints) and then round it. However, this doesn't always gives the best solution, or guarantee that the rounded point is in your region. There are also plenty of software packages for integer and linear programming, so it might also be worth just seeing if those work out of the box for your needs.
Finally, if your equations have some additional structure, then it might be possible to solve this specific class of problems more efficiently.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f3057557%2flinear-equations-with-boundary-conditions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Your question is related to integer programming (maximize $c^Tx$ subject to $Axleq b$ and $x_iinmathbb{Z}$). To get constraints like $Ax=b$ you can do $Axleq b$ and $-Axleq -b$ and to get constraints like $x_igeq 0$ you can do $-Ixleq 0$.
Your problem is about finding feasible points for the optimization problem above; i.e. you don't care about the value of $c^Tx$.
In general, integer programming is NP-complete. Similarly, the task of finding all feasible points cannot be done in polynomial time because there could be exponentially many feasible points. I am unsure about the time complexity of finding a single point.
A general technique for solving integer programs is to first solve the linear program (same problem without integer constraints) and then round it. However, this doesn't always gives the best solution, or guarantee that the rounded point is in your region. There are also plenty of software packages for integer and linear programming, so it might also be worth just seeing if those work out of the box for your needs.
Finally, if your equations have some additional structure, then it might be possible to solve this specific class of problems more efficiently.
$endgroup$
add a comment |
$begingroup$
Your question is related to integer programming (maximize $c^Tx$ subject to $Axleq b$ and $x_iinmathbb{Z}$). To get constraints like $Ax=b$ you can do $Axleq b$ and $-Axleq -b$ and to get constraints like $x_igeq 0$ you can do $-Ixleq 0$.
Your problem is about finding feasible points for the optimization problem above; i.e. you don't care about the value of $c^Tx$.
In general, integer programming is NP-complete. Similarly, the task of finding all feasible points cannot be done in polynomial time because there could be exponentially many feasible points. I am unsure about the time complexity of finding a single point.
A general technique for solving integer programs is to first solve the linear program (same problem without integer constraints) and then round it. However, this doesn't always gives the best solution, or guarantee that the rounded point is in your region. There are also plenty of software packages for integer and linear programming, so it might also be worth just seeing if those work out of the box for your needs.
Finally, if your equations have some additional structure, then it might be possible to solve this specific class of problems more efficiently.
$endgroup$
add a comment |
$begingroup$
Your question is related to integer programming (maximize $c^Tx$ subject to $Axleq b$ and $x_iinmathbb{Z}$). To get constraints like $Ax=b$ you can do $Axleq b$ and $-Axleq -b$ and to get constraints like $x_igeq 0$ you can do $-Ixleq 0$.
Your problem is about finding feasible points for the optimization problem above; i.e. you don't care about the value of $c^Tx$.
In general, integer programming is NP-complete. Similarly, the task of finding all feasible points cannot be done in polynomial time because there could be exponentially many feasible points. I am unsure about the time complexity of finding a single point.
A general technique for solving integer programs is to first solve the linear program (same problem without integer constraints) and then round it. However, this doesn't always gives the best solution, or guarantee that the rounded point is in your region. There are also plenty of software packages for integer and linear programming, so it might also be worth just seeing if those work out of the box for your needs.
Finally, if your equations have some additional structure, then it might be possible to solve this specific class of problems more efficiently.
$endgroup$
Your question is related to integer programming (maximize $c^Tx$ subject to $Axleq b$ and $x_iinmathbb{Z}$). To get constraints like $Ax=b$ you can do $Axleq b$ and $-Axleq -b$ and to get constraints like $x_igeq 0$ you can do $-Ixleq 0$.
Your problem is about finding feasible points for the optimization problem above; i.e. you don't care about the value of $c^Tx$.
In general, integer programming is NP-complete. Similarly, the task of finding all feasible points cannot be done in polynomial time because there could be exponentially many feasible points. I am unsure about the time complexity of finding a single point.
A general technique for solving integer programs is to first solve the linear program (same problem without integer constraints) and then round it. However, this doesn't always gives the best solution, or guarantee that the rounded point is in your region. There are also plenty of software packages for integer and linear programming, so it might also be worth just seeing if those work out of the box for your needs.
Finally, if your equations have some additional structure, then it might be possible to solve this specific class of problems more efficiently.
edited Dec 31 '18 at 17:06
answered Dec 31 '18 at 17:00
tchtch
833310
833310
add a comment |
add a comment |
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.
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%2f3057557%2flinear-equations-with-boundary-conditions%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
$begingroup$
see en.wikipedia.org/wiki/Simplex_algorithm
$endgroup$
– Martín Vacas Vignolo
Dec 31 '18 at 10:09
$begingroup$
Thanks Martin! That is exactly what I was looking for.
$endgroup$
– David
Dec 31 '18 at 12:44
$begingroup$
Actually I don't really see how to convert my problem into a problem solvable by the simplex algorithm. The algorithm tries to minimize the value for Z but in my case I already know Z (1, 1, 2, -1) and instead I want to find values for a, b, c, d, e, f.
$endgroup$
– David
Dec 31 '18 at 13:52