Construct an OR gate when missing input information

345 Views Asked by At

Is there a way to construct an OR gate when the input for one combination is unknown?

For example, suppose that the gate, $X$, outputs for the following inputs, $x_1$ and $x_2$, $x_1 = T$, $x_2 = T$: $X= T$; $x_1 = T$, $x_2 = F$: $X = F$; $x_1 = F$, $x_2 = T$, $X = F$. For the input $x_1 = F$ and $x_2 = F$, the gate randomly chooses to output $T$ or $F$. Is there a way to construct an OR gate using $X$? Assume that inputs and outputs may be duplicated and negated and we can use multiple $X$ gates. Assume that no other gates may be used (such as AND, XOR...etc.). The inputs and outputs may only be duplicated and negated.

1

There are 1 best solutions below

4
On

Write $X*Y$ for the connective described in the question.

Suppose that there are only two inputs, $X$ and $Y$. Say that a gate with a certain outcome for each possible input is determinate. Then all determinate gates constructable out of $\neg$ and $*$ will either be functions of both $X$ and $Y$, or just $X$ or just $Y$, or neither. Say that a determinate gate is degenerate if it doesn't depend on both $X$ and $Y$. $\phi(X,Y)$ is degenerate iff $\phi(X,1)=\phi(X,0)$ for $X=0,1$ or $\phi(0,Y)=\phi(1,Y)$ for $Y=0,1$. (So, for example $\neg X, X\vee X, X\wedge \neg X$ and $X\wedge (Y\vee \neg Y)$ are degenerate but $X\vee Y$ is not degenerate. By definition no degenerate gate is indeterminate so $X*X$ isn't degenerate.)

We shall show that every determinate gate (constructed from $*$ and $\neg$) is degenerate. (And thus, that $\vee$ cannot be defined.)

Base case: $X*Y, Y*Y$ and $X*X$ are not determinate, and $\neg X$ and $\neg Y$ are degenerate.

Inductive step:

If $\neg\phi(X,Y)$ is determinate, then $\phi(X,Y)$ must also be determinate. By inductive hypothesis this means that $\phi(X,Y)$ is degenerate, which implies that $\neg \phi(X,Y)$ is degenerate.

Suppose that $\psi(X,Y) * \chi(X,Y)$ is a determinate logic gate. This implies that both $\psi$ and $\chi$ are determinate (see lemma below).

Thus by inductive hypothesis, both $\psi$ and $\chi$ are degenerate. If $\psi$ and $\chi$ both depend on at most $X$ (or on at most $Y$) then $\psi * \chi$ is degenerate depending on at most $X$ only (at most $Y$ only). Suppose, without loss of generality, that $\phi$ depends on $X$ and $\psi$ on $Y$. Since $\psi(X) *\chi(Y)$ is determinate, we know there's no choice of $X$ and $Y$ such that $\psi(X)=\chi(Y)=0$. So either $\psi(X)=1$ no matter what $X$ is, in which case $\psi(X)*\chi(Y)$ is degenerate depending on $Y$ only, or $\chi(Y)=1$ no matter what $Y$ is, meaning that $\psi(X)*\chi(Y)$ is degenerate depending on $X$ only.

(Lemma: If $\phi=\psi * \chi$ is determinate both $\psi$ and $\chi$ are determinate.

If $\psi$ was not determinate, for example, then for some choice of $X,Y\in\{0,1\}$ we can make $\psi(X,Y)$ random. However it was stipulated in the question that the outcomes of random processes are always made independently, so for this choice of $X$ and $Y$, $\phi(X,Y)$ is independent of the value of $\chi(X,Y)$ (whether or not the latter value is random). Conditional on $\chi(X,Y)=1$, $\psi(X,Y)$ has a chance of being $1$ or $0$, and similarly conditional on $\chi(X,Y)=0$. If $\chi(X,Y)=1$ then $\psi(X,Y)*\chi(X,Y) = \psi(X,Y)$, which can be 1 or 0. If $\chi(X,Y)=0$ then $\psi(X,Y)*\chi(X,Y) = 0$ if $\psi(X,Y)=1$, and has a chance of being $1$ if $\psi(X,Y)=0$. So in this case $\psi(X,Y)*\chi(X,Y)$ is random too.)