edited by
3,147 views
12 votes
12 votes

Let $f: \left\{0, 1\right\}^{n} \rightarrow \left\{0, 1\right\}$ be a boolean function computed by a logical circuit comprising just binary AND and binary OR gates (assume that the circuit does not have any feedback). Let PARITY : $\left\{0, 1\right\}^{n} \rightarrow \left\{0, 1\right\}$ be the boolean function that outputs $1$ if the total number of input bits set to $1$ is odd. Similarly, let MAJORITY be the boolean function that outputs $1$ if the number of input bits that are set to $1$ is at least as large as the number of input bits that are set to $0$. Then, which of the following is NOT possible?

  1. $f(0, 0, . . . , 0) = f(1, 1, . . . , 1) = 0$.
  2. $f(0, 0, . . . , 0) = f(1, 1. . . . , 1) = 1$
  3. $f$ is the MAJORITY function.
  4. $f$ is the PARITY function.
  5. $f$ outputs $1$ at exactly one assignment of the input bits.
edited by

3 Answers

9 votes
9 votes
Note: NOT is absent in function $f$.

 

for two boolean variables, $p_{1}=1$,$p_{2}=1$,   neither $p_{1}\wedge p_{2}$ nor $p_{1} \vee p_{2}$ is $0$. ie, $f(1,1)$ is never $0.$

for $i = 1$ to $n$. $f(p_{i})$ is a function of AND,OR operations on $p_{i}$. if all $p_{i}=1$, then $f$ can never be $0$;

similarly, if all $p_{i}=0,$  $f$ can never be $1$;

Therefore  ${A,B}$ are not possible.

for $j<n$, if all $p_{j}=0$ and $p_{n-j}=1$,then  $f(p_{j}, p_{n-j}) =$majority if each $0$ is AND with each $1.$The remaining $1's$ or $0's$ are OR with the result.

Hence, MAJORITY can be computed from $f$.

Option C is possible.

To check odd number of $1's$, for PARITY function,  we have to get the result $0$ for even number of $1's$ which is not possible with just AND and OR operations, how might we combine(since NOT is absent in $f$);

D  is not possible.

For option E, we check by symmetry. When the inputs are complemented among $0's$ and $1's$, can $f$ change to $f'$? $f$ is not always fixed for a particular input,. example, $f(0,1) = 0\vee 1=1$   $0\wedge 1=0$,hence $f$ can take multiple values for same input. Therefore E is also not right.

The only possible answer is C .'Hence A,B,D,E are not possible.
edited by
2 votes
2 votes

Only C is possible.

Answer:

Related questions

16 votes
16 votes
3 answers
1
42 votes
42 votes
4 answers
3