asklucas
(Lucas Petritsch)
1
Hello!
Given the input variables a and b and the output variables x and y, what do I have to enter into Wolfram|Alpha to solve this truth table:
a b | x y
0 0 | 0 0
0 1 | 0 1
1 0 | 0 0
1 1 | 1 0
The desired result is:
x = a AND b
y = NOT(a) AND b
Thanks!
Lucas.
seanc
(Sean Clarke)
2
This is probably something you need Mathematica Online to do. You probably can’t do it in Wolfram|Alpha alone.
The function you want is called BooleanFunction:
BooleanFunction[{{False, False} -> True, {False, True} -> False, {True, False} -> True, {True, True} -> True}, {x, y}]
Please see the documentation for more examples.
asklucas
(Lucas Petritsch)
3
Thanks Sean!
I had already tried various “permutations” of the syntax in the documentation.
I always get the answer:
Wolfram|Alpha doesn’t understand your query
Showing instead result for query: True, False
Using your example:
http://www.wolframalpha.com/input/?i=BooleanFunction[{{False%2C+False}±%3E+True%2C+{False%2C+True}±%3E+False%2C+{True%2C+False}±%3E+True%2C+{True%2C+True}±%3E+True}%2C+{x%2C+y}]
Does Wolfram|Alpha really not understand Mathematica’s syntax? If so, a hint within the reply of Wolfram|Alpha would be nice:
“Please use Mathematica for such advanced demands!”