A function is said to be **Self dual** if and only if its dual is equivalent to the given function, i.e., if a given function is **f(X, Y, Z) = (XY + YZ + ZX)** then its dual is, **fd(X, Y, Z) = (X + Y).(Y + Z).(Z + X)** (fd = dual of the given function) = **(XY + YZ + ZX)**, it is equivalent to the given function. So function is self dual.

In a dual function:

- 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.

A Switching function or Boolean function is said to be Self dual if :

- The given function is neutral i.e., (number of min terms is equal to the number of max terms).For more about min term and max term (see Canonical and standard Form).
- The function does not contain two mutually exclusive terms.

**Note:** Mutually exclusive term of XYZ is (X’Y’Z’) i.e, compliment of XYZ. So, two mutually exclusive terms are compliment of each other.

**Example:**

SL NO. | X | Y | Z |
---|---|---|---|

0 | 0 | 0 | 0 |

1 | 0 | 0 | 1 |

2 | 0 | 1 | 0 |

3 | 0 | 1 | 1 |

4 | 1 | 0 | 0 |

5 | 1 | 0 | 1 |

6 | 1 | 1 | 0 |

7 | 1 | 1 | 1 |

In the above table, Mutually exclusive terms are:

(0,7), (1,6), (2,5), (3,4)

**Explanation:**

- Compliment of (000) i.e, 0 is (111) i.e, 7 so, (0, 7 are mutually exclusive to each other.)
- Compliment of (001) i.e, 1 is (110) i.e, 6 so, (1, 6 are mutually exclusive to each other.)
- Compliment of (010) i.e, 2 is (101) i.e, 5 so, (2, 5 are mutually exclusive to each other.)
- Compliment of (011) i.e, 3 is (100) i.e, 4 so, (3, 4 are mutually exclusive to each other.)

Now, lets check number of Self dual functions possible for a given function.

Let, a function has **n** variables then,

Number of pairs possible = 2^{n}/2 = 2^{(n-1)}

Therefore, number of Self dual functions possible with **n** variables

= 2^{2(n-1)}

There are 2 possibilities for each pair.

**Example:** What is total number of self dual of a function which has 3 variables X, Y and Z ?

= 2^{2(3-1)}= 2^{22}= 2^{4}= 16

**Note:**

- Every Self dual function is neutral but every neutral function is not Self dual.
- Self duality is closed under compliment i.e, compliment of a Self dual function is also Self dual.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Difference between Programmable Logic Array and Programming Array Logic
- Half Subtractor in Digital Logic
- Half Adder in Digital Logic
- Counters in Digital Logic
- Synchronous Sequential Circuits in Digital Logic
- Multiplexers in Digital Logic
- Full Adder in Digital Logic
- Full Subtractor in Digital Logic
- Binary Decoder in Digital Logic
- Encoder in Digital Logic
- Functional Completeness in Digital Logic
- Ripple Counter in Digital Logic
- BCD Adder in Digital Logic
- Shift Registers in Digital Logic
- Consensus Theorem in Digital Logic
- n-bit Johnson Counter in Digital Logic
- Encoders and Decoders in Digital Logic
- Variable Entrant Map (VEM) in Digital Logic
- Static Hazards in Digital Logic
- Universal Shift Register in Digital logic

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.