I'm stuck with one problem. I have two boolean functions:
$1)$ $x \oplus 1$
$2)$ $x \oplus y \oplus 1$
The question is which of them is self-dual and which is not. I know the definition that one boolean function is self-dual iff it is equivalent to its dual function (i.e. if their outputs are respectively equal). As a result I get that 1) is not self-dual, and 2) is self-dual. When I checked the answer, it claims the absolute opposite - 1) is self-dual and 2) is not. I will show my truth table for case 1):
$1)$ $x \oplus 1$
$x$ $\quad$ $1$ $\quad$ $x \oplus 1$
$0$ $\quad$ $1$ $\qquad$ $1$
$1$ $\quad$ $1$ $\qquad$ $0$
Dual of $x \oplus 1$: $\lnot (\lnot x \oplus 0)$
$\lnot x$ $\quad$ $0$ $\quad$ $\lnot x \oplus 0$ $\quad$ $\lnot (\lnot x \oplus 0)$
$1$ $\quad$ $0$ $\qquad$ $1$ $\qquad \qquad$ $0$
$0$ $\quad$ $0$ $\qquad$ $0$ $\qquad \qquad$ $1$
The one mistake I've made could probably be putting the brackets - maybe negation should be applied before XOR, but then the second function will also be self-dual. I'm a little confused and will be grateful if anyone clarifies this to me. I've used the following definition for dual function:
The dual of $f(x,y,z) \quad$ is $\quad \lnot f(\lnot x, \lnot y, \lnot z)$.
AND operator of a given function is changed to OR operator and vice-versa. A constant 1 (or true) of a given function is changed to a constant 0 (or false) and vice-versa; which perplexed me more.
– ash975 Jul 29 '21 at 14:36