Fredkin/CSWAP GateFredkin/CSWAP Gate
Definition
The following vector-valued Boolean function is referred to as a Fredkin Gate.
F:{0,1}3→{0,1}3
F(a,b,c)=(a,(¬a∧b)∨(a∧c),(¬a∧c)∨(a∧b))
- CSWAP Gate is also known as.
Description
Introduced by Edward Fredkin, the Fredkin Gate swaps the remaining two values without altering the first input, if the first input is 1. The specific computation is as follows.
F(0,0,0)F(0,0,1)F(0,1,0)F(0,1,1)F(1,0,0)F(1,0,1)F(1,1,0)F(1,1,1)=(0,(¬0∧0)∨(0∧0),(¬0∧0)∨(0∧0))=(0,0∨0,0∨0)=(0,0,0)=(0,(¬0∧0)∨(0∧1),(¬0∧1)∨(0∧0))=(0,0∨0,1∨0)=(0,0,1)=(0,(¬0∧1)∨(0∧0),(¬0∧0)∨(0∧1))=(0,1∨0,0∨0)=(0,1,0)=(0,(¬0∧1)∨(0∧1),(¬0∧1)∨(0∧1))=(0,1∨0,1∨0)=(0,1,1)=(1,(¬1∧0)∨(1∧0),(¬1∧0)∨(1∧0))=(1,0∨0,0∨0)=(1,0,0)=(1,(¬1∧0)∨(1∧1),(¬1∧1)∨(1∧0))=(1,0∨1,0∨0)=(1,1,0)=(1,(¬1∧1)∨(1∧0),(¬1∧0)∨(1∧1))=(1,0∨0,0∨1)=(1,0,1)=(1,(¬1∧1)∨(1∧1),(¬1∧1)∨(1∧1))=(1,0∨1,0∨1)=(1,1,1)
From the table, it is evident that F is a reversible function and that composing F twice results in an identity function.
Id=F∘F
Furthermore, since {F} is functionally complete, F is a universal gate.
Boolean Function | Symbol |
F |  |
Truth Table |
Input | Output | a | b | c | a | (¬a∧b)∨(a∧c) | (¬a∧c)∨(a∧b) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
|
Theorem
Assuming unrestricted use of projection and injection, the Fredkin Gate F is a universal gate. In other words, {F} is functionally complete.
Proof
Theorem
The set of NOT Gate and AND Gate, {¬,∧}, is functionally complete.
Following the theorem, demonstrating that projection, injection, and F can appropriately represent NOT and AND concludes the proof.
NOT Gate
¬=p0∘p1∘F∘2∘1
Holds true. Since 2∘1(a)=(a,0,1), the following is obtained:
F∘2∘1(a)=F(a,0,1)=(a,a,¬a)
To eliminate the first two values, take p0∘p1, resulting in:
p0∘p1∘F∘2∘1(a)=p0∘p1(a,a,¬a)=¬a
※ Additionally, applying p2 to (1) yields a duplication function.
AND Gate
∧=p0∘p1∘F∘2
Holds true. Initially, F∘2(a,b) is as follows:
F∘2(a,b)=F(a,b,0)=(a,(¬a∧b)∨(a∧0),(¬a∧0)∨(a∧b))=(a,(¬a∧b)∨0,0∨(a∧b))=(a,¬a∧b,a∧b)
Therefore, taking p0∘p1 results in:
p0∘p1∘F∘2(a,b)=p0∘p1(a,¬a∧b,a∧b)=a∧b
■
See Also