Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • \$\begingroup\$ 286 bytes maybe? lol idk how else to shorten \$\endgroup\$ Commented Jan 23, 2022 at 3:12
  • \$\begingroup\$ @DialFrost Thanks. Did you intentionally swap the locations of c=0 and n=1 or was that left in by mistake? \$\endgroup\$ Commented Jan 23, 2022 at 7:48
  • \$\begingroup\$ 282 maybe? \$\endgroup\$ Commented Jan 23, 2022 at 8:08
  • \$\begingroup\$ @DialFrost Doesn't work, since this is a recursive function f= has to be included and also if you use str instead of print, the program never actually outputs anything. (Try running with a local python interpreter) \$\endgroup\$ Commented Jan 23, 2022 at 8:13
  • 1
    \$\begingroup\$ @l4m2 Yes. The proof is as follows. Assume f is functionally complete. Then any gate m can be represented as a composition of gates: m(x,y)=f(g(x,y),h(x,y)) where g and h are again compositions of f (or the functions l(x,y)=x and r(x,y)=y). Now if we say that x=y then m(x,x)=f(g(x,x),h(x,x)), and since we can choose m arbitrarily, this shows that with functionally complete gates we can build all unary functions by composing previously obtained unary functions with the gate. \$\endgroup\$ Commented Jun 26, 2022 at 9:08