4

Considering: $$G(X,A,B)=(X∧A)∨(¬X∧B)$$

For all boolean unary operator $F(X)$, there exists a unique pair of $A,B$ so that $G(X,A,B)=F(X)$ for all $X$. That is, by assigning correct $A,B$, function $G$ can generate any unary boolean operator. There exists some other constructions of $G$ with less binary operators ($⊕$ means xor): $$G(X,A,B)=(X∧A)⊕B$$ $$G(X,A,B)=(X∨A)⊕B$$ Now consider an arbitrary binary operator $F(X,Y)$ and function $G(X,Y,A,B,C,D)$, a trivial construction might be: $$G(X,Y,A,B,C,D)=(X∧Y∧A)∨(¬X∧Y∧B)∨(X∧¬Y∧C)∨(¬X∧¬Y∧D)$$ Again, by changing value of $A,B,C,D$, function $G$ can generate all possible binary operator $F$. But this construction is computationally expensive.

My question is:

  • Is there a construction of $G(X,Y,A,B,C,D)$ requiring only $5$ binary operators to connect these operands? If not, what is the min number of binary operators required? (all 16 binary operators are useable)
  • For $F(X_1,X_2 ... X_i)$, $G(X_1 ... X_i,A_1 ... A_{2^i})$, how to find a construction of $G$ with min number of binary operators?

Edit:

I asked deepseek-R1 and it let me use the ANF form (Zhegalkin algebra): $$G(X,Y,A,B,C,D)=D⊕(C∧X)⊕(B∧Y)⊕(A∧X∧Y)$$

It has 7 binary operators. Not sure if this is the simplest construction.

Tankut Beygu
  • 4,412
  • "Mock" means to make fun of. I suspect you meant to write "make'. Please edit your question to make it make sense. – Rob Arthan Jul 21 '24 at 21:10
  • @Rob Arthan Indeed verb "to mock" has to be repaced by another one ; Instead of "to make", I would advise "to retrieve" – Jean Marie Jul 22 '24 at 05:34
  • 1
    Ok I will change it to "retrieve". Sorry for the confusion. – Xiaoyou Zhai Jul 22 '24 at 07:16
  • 1
    "Retrieve" sounds weird in this context ("retrieve" means to find something you have lost): if you don't like "make", I'd say "generate". More importantly, what binary operators are you allowing? You clearly need to take into account all 6 variables, so it looks highly unlikely that 5 binary operators would do as each variable would have to appear exactly once. – Rob Arthan Jul 22 '24 at 19:48
  • Sure I'll change it to "generate". I am allowing all 16 binary operators. It will be better if the operators are commutative. – Xiaoyou Zhai Jul 22 '24 at 20:50
  • Of course, you can gain 2 operators using factorisation ; for example the 2 last factors : $(X∧¬Y∧C)∨(¬X∧¬Y∧D)$ can be factored into $¬Y∧((X∧C)∨(¬X∧D))$. Can you do more ? I don't know... – Jean Marie Jul 22 '24 at 21:42
  • I don't see how $G(X,A,B)=(X∧A)⊕B$ works. That's not equivalent to the first $G$, is it? – Karl Feb 13 '25 at 16:14
  • 1
    @Karl I'm not sure what you don't see. Setting $A$ to false you get $G(X,\bot,B)=B$, so $G(X,\bot,\bot)$ and $G(X,\bot,\top)$ are the two constant functions. Setting $A$ to true instead we have $G(X,\top,B)=X\oplus B$, so $G(X,\top,\bot)=X$ is the identity, and $G(X,\top,\top)=\neg X$ is negation. That's all 4 unary operations. – Z. A. K. Feb 13 '25 at 16:39
  • I see. I thought we wanted $A,B$ to be the actual entries in the truth table for $F(X)$, which is the case for the first given $G$. – Karl Feb 13 '25 at 17:00

0 Answers0