From Xor to Milp formula
$begingroup$
In the most part of the text books on Mixed Integer Linear programming, one can find that
$P_1$ XOR $P_2$ XOR ... XOR $P_n$ can be transposed in
$p_1 + p_2 + ... + p_n = 1$ where each $p_i$ is a boolean variable associated to the propositions $P_i$.
This is done without any demonstration. This is intuitively evident and through the Normal conjunctive form easy to demonstrate for $n= 2$. But astonishingly, I am not able to demonstrate this for $n geq 3$.
For instance here is what append with 3 propositions :
$P_1$ XOR $P_2$ XOR $P_3$ can be put in Conjunctive Normal Form as
$(neg P_1 vee neg P_2 vee P_3) wedge (neg P_1 vee
P_2 vee neg P_3) wedge (P_1 vee neg P_2 vee neg P_3) wedge (P_1 vee P_2 vee P_3)$
and transform as the following set of inequalities
$begin{array}{l}(1-p1) + (1-p2) + p3 geq 1\
(1-p1) + p2 + (1-p3) geq 1\
p1 + (1-p2) + (1-p3) geq 1\
p1+p2+p3 geq 1
end{array}$
To obtain the desired result, from the 3 first equations one must deduce that
$p_1+p_2+p_3 leq 1$
but obviously I do not know how to obtain this.
Could some one help me.
In all cases thanks
propositional-calculus
$endgroup$
add a comment |
$begingroup$
In the most part of the text books on Mixed Integer Linear programming, one can find that
$P_1$ XOR $P_2$ XOR ... XOR $P_n$ can be transposed in
$p_1 + p_2 + ... + p_n = 1$ where each $p_i$ is a boolean variable associated to the propositions $P_i$.
This is done without any demonstration. This is intuitively evident and through the Normal conjunctive form easy to demonstrate for $n= 2$. But astonishingly, I am not able to demonstrate this for $n geq 3$.
For instance here is what append with 3 propositions :
$P_1$ XOR $P_2$ XOR $P_3$ can be put in Conjunctive Normal Form as
$(neg P_1 vee neg P_2 vee P_3) wedge (neg P_1 vee
P_2 vee neg P_3) wedge (P_1 vee neg P_2 vee neg P_3) wedge (P_1 vee P_2 vee P_3)$
and transform as the following set of inequalities
$begin{array}{l}(1-p1) + (1-p2) + p3 geq 1\
(1-p1) + p2 + (1-p3) geq 1\
p1 + (1-p2) + (1-p3) geq 1\
p1+p2+p3 geq 1
end{array}$
To obtain the desired result, from the 3 first equations one must deduce that
$p_1+p_2+p_3 leq 1$
but obviously I do not know how to obtain this.
Could some one help me.
In all cases thanks
propositional-calculus
$endgroup$
$begingroup$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37
add a comment |
$begingroup$
In the most part of the text books on Mixed Integer Linear programming, one can find that
$P_1$ XOR $P_2$ XOR ... XOR $P_n$ can be transposed in
$p_1 + p_2 + ... + p_n = 1$ where each $p_i$ is a boolean variable associated to the propositions $P_i$.
This is done without any demonstration. This is intuitively evident and through the Normal conjunctive form easy to demonstrate for $n= 2$. But astonishingly, I am not able to demonstrate this for $n geq 3$.
For instance here is what append with 3 propositions :
$P_1$ XOR $P_2$ XOR $P_3$ can be put in Conjunctive Normal Form as
$(neg P_1 vee neg P_2 vee P_3) wedge (neg P_1 vee
P_2 vee neg P_3) wedge (P_1 vee neg P_2 vee neg P_3) wedge (P_1 vee P_2 vee P_3)$
and transform as the following set of inequalities
$begin{array}{l}(1-p1) + (1-p2) + p3 geq 1\
(1-p1) + p2 + (1-p3) geq 1\
p1 + (1-p2) + (1-p3) geq 1\
p1+p2+p3 geq 1
end{array}$
To obtain the desired result, from the 3 first equations one must deduce that
$p_1+p_2+p_3 leq 1$
but obviously I do not know how to obtain this.
Could some one help me.
In all cases thanks
propositional-calculus
$endgroup$
In the most part of the text books on Mixed Integer Linear programming, one can find that
$P_1$ XOR $P_2$ XOR ... XOR $P_n$ can be transposed in
$p_1 + p_2 + ... + p_n = 1$ where each $p_i$ is a boolean variable associated to the propositions $P_i$.
This is done without any demonstration. This is intuitively evident and through the Normal conjunctive form easy to demonstrate for $n= 2$. But astonishingly, I am not able to demonstrate this for $n geq 3$.
For instance here is what append with 3 propositions :
$P_1$ XOR $P_2$ XOR $P_3$ can be put in Conjunctive Normal Form as
$(neg P_1 vee neg P_2 vee P_3) wedge (neg P_1 vee
P_2 vee neg P_3) wedge (P_1 vee neg P_2 vee neg P_3) wedge (P_1 vee P_2 vee P_3)$
and transform as the following set of inequalities
$begin{array}{l}(1-p1) + (1-p2) + p3 geq 1\
(1-p1) + p2 + (1-p3) geq 1\
p1 + (1-p2) + (1-p3) geq 1\
p1+p2+p3 geq 1
end{array}$
To obtain the desired result, from the 3 first equations one must deduce that
$p_1+p_2+p_3 leq 1$
but obviously I do not know how to obtain this.
Could some one help me.
In all cases thanks
propositional-calculus
propositional-calculus
edited Jan 22 at 15:35
cyrille.piatecki
asked Jan 22 at 14:14
cyrille.piateckicyrille.piatecki
1113
1113
$begingroup$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37
add a comment |
$begingroup$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37
$begingroup$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
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%2f3083207%2ffrom-xor-to-milp-formula%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
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.
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%2f3083207%2ffrom-xor-to-milp-formula%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$
Not clear... are the $p_i$ and the $P_i$ the same variables ? are they booleans ? If so, we have $n$ cases mutually exclusive (XOR) and exactly one of them is TRUE. Thus, we have a sum of $n$ booleans with $n-1$ of them FALSE ($0$) and one TRUE ($1$).
$endgroup$
– Mauro ALLEGRANZA
Jan 22 at 14:34
$begingroup$
Mauro, you were true. I have corrected the question. My problem is not to know if the formula is true. It is. The problem is to show this through the standard CNF conversion to boolean expressions
$endgroup$
– cyrille.piatecki
Jan 22 at 15:37