5

How many self-dual Boolean functions of n variables are there?Please help me how to calculate such like problems.

A Boolean function $f_1^D$ is said to be the dual of another Boolean function $f_1$ if $f_1^D$ is obtained from $f_1$ by interchanging the operations $+$ and $\cdot$ and the constants $0$ and $1$. For example, if $f_1(a,b,c)=(a+b)\cdot(b+c)$ then $f_1^D(a,b,c)=a\cdot{b}+b\cdot{c}$.

A Boolean function $f$ is self-dual if $f_1=f_1^D$. Given $f_1(a,b,c)=a\bar{b}+\bar{b}c+x$, find the Boolean expression $x$ such that $f_1$ is self-dual.

How to calculate this value?Please help me.

amitabha
  • 381

2 Answers2

1

As I said, we'll start with expanding the definition (I'll write $x'$ instead of $\overline{x}$):

$\begin{align*} ab' + b'c + x &= (ab' + b'c + x)^D \\ &= (a + b')(b' + c)x^D \\ &= (ac + b')x^D \end{align*}$

where $x(a, b, c)$.

Let's decompose $x$ wrto $b$: $x(a, b, c) = by(a, c) + b'z(a, c)$, so $x^D = (b + y^D)(b' + z^D)$.

We have equivalent equation $ab' + b'c + by + b'z = (ac + b')(b + y^D)(b' + z^D) = (b' + acz^D)(b + y^D) = abcz^D + b'y^D + acy^Dz^D$.

Case $b = 1$ gives $y = acz^D$.

Case $b = 0$ gives $a + c + z = y^D$ which is equivalent to the first case. So we have a necessary condition.

Now take any boolean function $z(a,c)$ so $y = acz^D$ and $x = abcz^D + b'z$.

Then LHS: $ab' + b'c + abcz^D + b'z$,

RHS: $abcz^D + b'(a + c + z) + ac(a + c + z)z^D = abcz^D + ab' + b'c + b'z + acz^D$ = LHS.

So it is also suffitient condition.

So $\{abcz^D + b'z: z(a, c)\}$ are all solutions.

user87690
  • 9,133
1

The total number of self dual functions possible with $n$ variables is $2^m$, where $m=2^{n-1}$.