Having a list of boolean variables $(x_1, x_2, ..., x_n)$
I wonder if it would be possible to create a boolean logical formula (using and, or, not) that returns true if the number of true values in the variable list is even?
Example
$P([0,0,1,1,1]) = false$
$P([1,0,1,0,0]) = true$
Thanks
Use $\lnot (x_1 \oplus x_2 \oplus \dots \oplus x_n)$ where $\oplus$ is the XOR operation.