top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Programming puzzle: How do you design a boolean circuit in python?

+1 vote
42 views

How do you design a boolean circuit that contains at most 2 NOT gates, but may contain as many AND or OR gates that inverts three inputs? IOW: Build three inverters by using only two inverters (and an infinite amount of AND/OR).

Surprisingly, this is possible (and I even know the solution, but won't give it away just yet).

I found this puzzle again and was thinking about: How would I code a brute-force approach to this problem in Python? And to my surprise, it isn't as easy as I thought. So I'm looking for some advice from you guys
(never huts to improve ones coding skills).

posted Dec 9, 2013 by Sonu Jindal

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
+1 vote

I want to do the Boolean search over various sentences or documents. I do not want to use special programs like Whoosh, etc.

May I use any other parser? If anybody may kindly let me know.

+1 vote

How do you shuffle a binary tree without using any external data structures.
Note: With equal probability to every node.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...