https://github.com/snowleopard/bbforce
Boolean Brute Force
https://github.com/snowleopard/bbforce
Last synced: 12 months ago
JSON representation
Boolean Brute Force
- Host: GitHub
- URL: https://github.com/snowleopard/bbforce
- Owner: snowleopard
- Created: 2013-08-31T13:14:45.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-01T19:42:56.000Z (almost 13 years ago)
- Last Synced: 2025-03-12T21:17:09.010Z (over 1 year ago)
- Language: Haskell
- Size: 145 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
bbforce (Boolean Brute Force)
=============================
[This](https://github.com/snowleopard/bbforce/blob/master/bbforce.hs) is a brute force solver for the first part of the following [puzzle from MIT Tech Review](http://www.technologyreview.com/sites/default/files/magazine/mitnews/puzzlecorner/MA13MITPuzzleCorner.pdf):
>Howard Cohen has plenty of AND and OR gates but just two inverters. How can he invert three signals a, b, and c?
>More generally, he wonders if the ratio I/S can ever be less than 2/3, where I is the number of inverters and S is the number of signals to invert (once again, unlimited AND and OR gates are available).
The generated solution can be found [here](https://github.com/snowleopard/bbforce/blob/master/Solution.md) (spoiler alert!).
To answer the second part of the puzzle note that the obtained circuit is functionally nothing else than just three inverters. That is, having an unlimited number of ANDs and ORs we can get three inverters from two inverters. But then nothing prevents us from applying the same step again resulting in four inverters, etc. Hence, rather surprisingly the ratio can be made arbitrarily small: two inverters are enough to invert as many signals as we need!