This is an assignment for describing the implies operator using English:
For an implies truth table I want x being true and y being true to be true. I want x being false and y being false to be true and I want x being false and y being true to be true. The only thing I don’t want to be true is that x is true and y is false.
That way it looks like the implies truth table. The output of (1,0) is 0.
I was thinking about making implies operator this morning and found that for the rows I want a T output, I didn’t have to make an operator for them. What worked is just thinking about what I can’t have true in an implies table. That’s the x being true and y being false.
The way I described the operator is: I can’t have both x be true and y be false. Here’s the operator: not(and(x,not(y)))
I was answering with expressions for all the rows of the table til i remembered this:
One expression is enough
Or(and(x,y), and(x,not(y)))
x
y
Or(and(x,y), and(x,not(y)))
1
1
1
1
0
1
0
1
0
0
0
0
Or(and(x,y), and(not(x),y), and(not(x),not(y)))
x
y
Or(and(x,y), and(not(x),y), and(not(x),not(y)))
1
1
1
1
0
0
0
1
1
0
0
1
Yeah use and, or, not to express a row with a true output. If there’s more than one expression combine them with OR. I think u can express a false output if u wanted instead.
The first step is to choose if you want to express all the false outputs or true outputs. Each false or true output means one expression that we have to make. For our table above we’ll choose true. That means we only have to make two expressions
Next step is using the “and” operator to make an expression for each true row. Your working expression has to return the value true when you plug in the two inputs of that row. For our example, I’ll do row two: and(x,not(y)). This returns the value true.
Next step is if we made more than one expression, we gotta combine them with the “or” operator. This will give us a working expression for the whole table. For our table above, I made the two expressions and(x,not(y)) & and(not(x),y). Them combined looks like this: or(and(x,not(y)), and(not(x),y).
The last step is to check if the expression is correct. Go through the truth table and plug in the inputs of each row. If you get the same outputs as the table then your expression is correct.
edit: for “or(and(x,not(y)), and(not(x),y)” im missing one more paranthesis at the end of the expression. Should look like this: or(and(x,not(y)), and(not(x),y))
Ok so I cant use expressions like T or F in this activity. How do i construct T or F like i did with other operators? My answer is gonna have “and” or “not” or “or”.
So for T I gotta make an expression that works like it? T makes the desired row true and all other rows false.
For F , the expression will make the desired row false and all other rows false.
For all possible values a variable can have that means:
x,y
1,1
1,0
0,1
0,0
F would make all rows false. All I would need to do is make an expression for one row and negate it.
I actually came up with this:
and(not(x),not(y), y)= F
I read ahead and see maybe the expression T means all rows are true?
I would write: or(x,y,not(x)) = T
I read ahead and I see i was close:
I didnt have to include a second variable. I think it’s just like the expressions T and F. They dont have to include x or y i think
Edit:I included the wrong quote at the end. It was supposed to be this: