How many boolean functions of $F(x,y,z) = F(x',y,z') + F(x,y',z)$?
$begingroup$
How to find total number of boolean functions of the equation :
$F(x,y,z) = F(x',y,z') + F(x,y',z)$
Is there any procedure for this ?
functions discrete-mathematics boolean-algebra
$endgroup$
add a comment |
$begingroup$
How to find total number of boolean functions of the equation :
$F(x,y,z) = F(x',y,z') + F(x,y',z)$
Is there any procedure for this ?
functions discrete-mathematics boolean-algebra
$endgroup$
add a comment |
$begingroup$
How to find total number of boolean functions of the equation :
$F(x,y,z) = F(x',y,z') + F(x,y',z)$
Is there any procedure for this ?
functions discrete-mathematics boolean-algebra
$endgroup$
How to find total number of boolean functions of the equation :
$F(x,y,z) = F(x',y,z') + F(x,y',z)$
Is there any procedure for this ?
functions discrete-mathematics boolean-algebra
functions discrete-mathematics boolean-algebra
edited Dec 9 '16 at 10:35
Jon Garrick
asked Dec 9 '16 at 9:06
Jon GarrickJon Garrick
1,246828
1,246828
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
A function with three variables is described in a truth-table with eight (2*2*2) rows:
x y z F
0 0 0 f0
0 0 1 f1
0 1 0 f2
0 1 1 f3
1 0 0 f4
1 0 1 f5
1 1 0 f6
1 1 1 f7
As any value in the output column can be either 0
or 1
, disregarding the equation constraint, the total number of different Boolean functions with three input variables is 2^(2*2*2) = 2^8 = 256
The given equation translates to a set of equations (+ = or):
f0 = f5 + f2 = f2 + f5
f1 = f4 + f3 = f3 + f4
f2 = f7 + f0 = f0 + f7
f3 = f6 + f1 = f1 + f6
f4 = f1 + f6 = f1 + f6
f5 = f0 + f7 = f0 + f7
f6 = f3 + f4 = f3 + f4
f7 = f2 + f5 = f2 + f5
Each of the eight equations has one other equation with the same right-hand-side. This leads to:
f0 = f7
f1 = f6
f2 = f5
f3 = f4
Inserted in the set of equations:
f0 = f2 = f5 = f7
f1 = f3 = f4 = f6
There are four solutions for (f0; f1): (0; 0), (0; 1), (1; 0)
and (1; 1)
Translated back - as an example - to the original truth-table for (f0=1; f1=0)
:
x y z F x'y z' F1 x y' z F2 F=F1+F2
0 0 0 f0 1 1 0 1 1 0 1 0 1 1
0 0 1 f1 0 1 0 0 0 0 1 1 0 0
0 1 0 f2 1 1 1 1 1 0 0 0 1 1
0 1 1 f3 0 1 1 0 0 0 0 1 0 0
1 0 0 f4 0 0 0 1 0 1 1 0 0 0
1 0 1 f5 1 0 0 0 1 1 1 1 1 1
1 1 0 f6 0 0 1 1 0 1 0 0 0 0
1 1 1 f7 1 0 1 0 1 1 0 1 1 1
The total number of functions which fulfil the equation is four.
Two of these are trivial constant functions: always 0
, or always 1
Alternative approach using the MiniZinc constraint solver:
% function F is determined by 2^n = 8 function values:
array[0..7] of var bool: f;
function var bool: F(bool: x, bool: y, bool: z) =
% bool variable are automatically converted (coerced) in 0 .. 1
f[4*x+2*y+z];
constraint forall(x,y,z in [false,true]) (
F(x, y, z) == (F(not x, y, not z) / F(x, not y, z))
);
MiniZinc comes up with four solutions as expected:
[false, false, false, false, false, false, false, false]
[false, true, false, true, true, false, true, false]
[true, false, true, false, false, true, false, true ]
[true, true, true, true, true, true, true, true ]
$endgroup$
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
add a comment |
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%2f2050881%2fhow-many-boolean-functions-of-fx-y-z-fx-y-z-fx-y-z%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$
A function with three variables is described in a truth-table with eight (2*2*2) rows:
x y z F
0 0 0 f0
0 0 1 f1
0 1 0 f2
0 1 1 f3
1 0 0 f4
1 0 1 f5
1 1 0 f6
1 1 1 f7
As any value in the output column can be either 0
or 1
, disregarding the equation constraint, the total number of different Boolean functions with three input variables is 2^(2*2*2) = 2^8 = 256
The given equation translates to a set of equations (+ = or):
f0 = f5 + f2 = f2 + f5
f1 = f4 + f3 = f3 + f4
f2 = f7 + f0 = f0 + f7
f3 = f6 + f1 = f1 + f6
f4 = f1 + f6 = f1 + f6
f5 = f0 + f7 = f0 + f7
f6 = f3 + f4 = f3 + f4
f7 = f2 + f5 = f2 + f5
Each of the eight equations has one other equation with the same right-hand-side. This leads to:
f0 = f7
f1 = f6
f2 = f5
f3 = f4
Inserted in the set of equations:
f0 = f2 = f5 = f7
f1 = f3 = f4 = f6
There are four solutions for (f0; f1): (0; 0), (0; 1), (1; 0)
and (1; 1)
Translated back - as an example - to the original truth-table for (f0=1; f1=0)
:
x y z F x'y z' F1 x y' z F2 F=F1+F2
0 0 0 f0 1 1 0 1 1 0 1 0 1 1
0 0 1 f1 0 1 0 0 0 0 1 1 0 0
0 1 0 f2 1 1 1 1 1 0 0 0 1 1
0 1 1 f3 0 1 1 0 0 0 0 1 0 0
1 0 0 f4 0 0 0 1 0 1 1 0 0 0
1 0 1 f5 1 0 0 0 1 1 1 1 1 1
1 1 0 f6 0 0 1 1 0 1 0 0 0 0
1 1 1 f7 1 0 1 0 1 1 0 1 1 1
The total number of functions which fulfil the equation is four.
Two of these are trivial constant functions: always 0
, or always 1
Alternative approach using the MiniZinc constraint solver:
% function F is determined by 2^n = 8 function values:
array[0..7] of var bool: f;
function var bool: F(bool: x, bool: y, bool: z) =
% bool variable are automatically converted (coerced) in 0 .. 1
f[4*x+2*y+z];
constraint forall(x,y,z in [false,true]) (
F(x, y, z) == (F(not x, y, not z) / F(x, not y, z))
);
MiniZinc comes up with four solutions as expected:
[false, false, false, false, false, false, false, false]
[false, true, false, true, true, false, true, false]
[true, false, true, false, false, true, false, true ]
[true, true, true, true, true, true, true, true ]
$endgroup$
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
add a comment |
$begingroup$
A function with three variables is described in a truth-table with eight (2*2*2) rows:
x y z F
0 0 0 f0
0 0 1 f1
0 1 0 f2
0 1 1 f3
1 0 0 f4
1 0 1 f5
1 1 0 f6
1 1 1 f7
As any value in the output column can be either 0
or 1
, disregarding the equation constraint, the total number of different Boolean functions with three input variables is 2^(2*2*2) = 2^8 = 256
The given equation translates to a set of equations (+ = or):
f0 = f5 + f2 = f2 + f5
f1 = f4 + f3 = f3 + f4
f2 = f7 + f0 = f0 + f7
f3 = f6 + f1 = f1 + f6
f4 = f1 + f6 = f1 + f6
f5 = f0 + f7 = f0 + f7
f6 = f3 + f4 = f3 + f4
f7 = f2 + f5 = f2 + f5
Each of the eight equations has one other equation with the same right-hand-side. This leads to:
f0 = f7
f1 = f6
f2 = f5
f3 = f4
Inserted in the set of equations:
f0 = f2 = f5 = f7
f1 = f3 = f4 = f6
There are four solutions for (f0; f1): (0; 0), (0; 1), (1; 0)
and (1; 1)
Translated back - as an example - to the original truth-table for (f0=1; f1=0)
:
x y z F x'y z' F1 x y' z F2 F=F1+F2
0 0 0 f0 1 1 0 1 1 0 1 0 1 1
0 0 1 f1 0 1 0 0 0 0 1 1 0 0
0 1 0 f2 1 1 1 1 1 0 0 0 1 1
0 1 1 f3 0 1 1 0 0 0 0 1 0 0
1 0 0 f4 0 0 0 1 0 1 1 0 0 0
1 0 1 f5 1 0 0 0 1 1 1 1 1 1
1 1 0 f6 0 0 1 1 0 1 0 0 0 0
1 1 1 f7 1 0 1 0 1 1 0 1 1 1
The total number of functions which fulfil the equation is four.
Two of these are trivial constant functions: always 0
, or always 1
Alternative approach using the MiniZinc constraint solver:
% function F is determined by 2^n = 8 function values:
array[0..7] of var bool: f;
function var bool: F(bool: x, bool: y, bool: z) =
% bool variable are automatically converted (coerced) in 0 .. 1
f[4*x+2*y+z];
constraint forall(x,y,z in [false,true]) (
F(x, y, z) == (F(not x, y, not z) / F(x, not y, z))
);
MiniZinc comes up with four solutions as expected:
[false, false, false, false, false, false, false, false]
[false, true, false, true, true, false, true, false]
[true, false, true, false, false, true, false, true ]
[true, true, true, true, true, true, true, true ]
$endgroup$
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
add a comment |
$begingroup$
A function with three variables is described in a truth-table with eight (2*2*2) rows:
x y z F
0 0 0 f0
0 0 1 f1
0 1 0 f2
0 1 1 f3
1 0 0 f4
1 0 1 f5
1 1 0 f6
1 1 1 f7
As any value in the output column can be either 0
or 1
, disregarding the equation constraint, the total number of different Boolean functions with three input variables is 2^(2*2*2) = 2^8 = 256
The given equation translates to a set of equations (+ = or):
f0 = f5 + f2 = f2 + f5
f1 = f4 + f3 = f3 + f4
f2 = f7 + f0 = f0 + f7
f3 = f6 + f1 = f1 + f6
f4 = f1 + f6 = f1 + f6
f5 = f0 + f7 = f0 + f7
f6 = f3 + f4 = f3 + f4
f7 = f2 + f5 = f2 + f5
Each of the eight equations has one other equation with the same right-hand-side. This leads to:
f0 = f7
f1 = f6
f2 = f5
f3 = f4
Inserted in the set of equations:
f0 = f2 = f5 = f7
f1 = f3 = f4 = f6
There are four solutions for (f0; f1): (0; 0), (0; 1), (1; 0)
and (1; 1)
Translated back - as an example - to the original truth-table for (f0=1; f1=0)
:
x y z F x'y z' F1 x y' z F2 F=F1+F2
0 0 0 f0 1 1 0 1 1 0 1 0 1 1
0 0 1 f1 0 1 0 0 0 0 1 1 0 0
0 1 0 f2 1 1 1 1 1 0 0 0 1 1
0 1 1 f3 0 1 1 0 0 0 0 1 0 0
1 0 0 f4 0 0 0 1 0 1 1 0 0 0
1 0 1 f5 1 0 0 0 1 1 1 1 1 1
1 1 0 f6 0 0 1 1 0 1 0 0 0 0
1 1 1 f7 1 0 1 0 1 1 0 1 1 1
The total number of functions which fulfil the equation is four.
Two of these are trivial constant functions: always 0
, or always 1
Alternative approach using the MiniZinc constraint solver:
% function F is determined by 2^n = 8 function values:
array[0..7] of var bool: f;
function var bool: F(bool: x, bool: y, bool: z) =
% bool variable are automatically converted (coerced) in 0 .. 1
f[4*x+2*y+z];
constraint forall(x,y,z in [false,true]) (
F(x, y, z) == (F(not x, y, not z) / F(x, not y, z))
);
MiniZinc comes up with four solutions as expected:
[false, false, false, false, false, false, false, false]
[false, true, false, true, true, false, true, false]
[true, false, true, false, false, true, false, true ]
[true, true, true, true, true, true, true, true ]
$endgroup$
A function with three variables is described in a truth-table with eight (2*2*2) rows:
x y z F
0 0 0 f0
0 0 1 f1
0 1 0 f2
0 1 1 f3
1 0 0 f4
1 0 1 f5
1 1 0 f6
1 1 1 f7
As any value in the output column can be either 0
or 1
, disregarding the equation constraint, the total number of different Boolean functions with three input variables is 2^(2*2*2) = 2^8 = 256
The given equation translates to a set of equations (+ = or):
f0 = f5 + f2 = f2 + f5
f1 = f4 + f3 = f3 + f4
f2 = f7 + f0 = f0 + f7
f3 = f6 + f1 = f1 + f6
f4 = f1 + f6 = f1 + f6
f5 = f0 + f7 = f0 + f7
f6 = f3 + f4 = f3 + f4
f7 = f2 + f5 = f2 + f5
Each of the eight equations has one other equation with the same right-hand-side. This leads to:
f0 = f7
f1 = f6
f2 = f5
f3 = f4
Inserted in the set of equations:
f0 = f2 = f5 = f7
f1 = f3 = f4 = f6
There are four solutions for (f0; f1): (0; 0), (0; 1), (1; 0)
and (1; 1)
Translated back - as an example - to the original truth-table for (f0=1; f1=0)
:
x y z F x'y z' F1 x y' z F2 F=F1+F2
0 0 0 f0 1 1 0 1 1 0 1 0 1 1
0 0 1 f1 0 1 0 0 0 0 1 1 0 0
0 1 0 f2 1 1 1 1 1 0 0 0 1 1
0 1 1 f3 0 1 1 0 0 0 0 1 0 0
1 0 0 f4 0 0 0 1 0 1 1 0 0 0
1 0 1 f5 1 0 0 0 1 1 1 1 1 1
1 1 0 f6 0 0 1 1 0 1 0 0 0 0
1 1 1 f7 1 0 1 0 1 1 0 1 1 1
The total number of functions which fulfil the equation is four.
Two of these are trivial constant functions: always 0
, or always 1
Alternative approach using the MiniZinc constraint solver:
% function F is determined by 2^n = 8 function values:
array[0..7] of var bool: f;
function var bool: F(bool: x, bool: y, bool: z) =
% bool variable are automatically converted (coerced) in 0 .. 1
f[4*x+2*y+z];
constraint forall(x,y,z in [false,true]) (
F(x, y, z) == (F(not x, y, not z) / F(x, not y, z))
);
MiniZinc comes up with four solutions as expected:
[false, false, false, false, false, false, false, false]
[false, true, false, true, true, false, true, false]
[true, false, true, false, false, true, false, true ]
[true, true, true, true, true, true, true, true ]
edited Dec 26 '18 at 12:02
answered Dec 9 '16 at 12:20
Axel KemperAxel Kemper
3,26611418
3,26611418
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
add a comment |
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
$begingroup$
Very Nice Explaination !!
$endgroup$
– Jon Garrick
Dec 9 '16 at 13:07
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%2f2050881%2fhow-many-boolean-functions-of-fx-y-z-fx-y-z-fx-y-z%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