0
votes

So I have this boolean logic case.

three variables x, y, and z. The (ternary) parity function p(x, y, z) is a boolean function with value

• F, if an even number of the inputs x, y, and z have truth value T

• T, if an odd number of inputs have truth value T

this is my truth table (ill put just a few case) below

x y z - p(x, y, z)

F F F (?)

F F T evaluates to T because there is one T which is odd

F T T evaluates to F because there is two T which is even

my question is that, what if all of the three input evaluates to F. It is neither T odd or T false. So what would it evaluates to?

1
0 is even So technically you have an even number of parameters with a value of T when you have none - litelite
Then F F F should evaluates to T? but technically F F F means there are three Fs which corresponds to odd number of Fs? How can that evaluate to T? - BorisA
It will evaluate to F as the number of T is 0 i.e. even - Md Johirul Islam
We are counting the occurence of T in the input @MdJohirulIslam if there is even number of T's it will evaluate to F. if there is odd number of T's it will evaluate to T. - BorisA
@BorisA It will evaluate to F because you count the number of T. It is 0. You check if 0 is even. It is, so you return F. Your deffinition only says if the number is even not that there should be at least one - litelite

1 Answers

0
votes

The definition of an even number x is that it is divisible by 2 with no remainder. 0/2 = 0, so if there are zero T, it will evaluate to F