Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm for finding a formula that connects inputs and outputs

I seem to recall having learned a method for finding the formula that connects inputs and outputs from a table. For example:

a b c | r
1 1 0 | 0
0 1 1 | 1
1 1 1 | 1

where "r" is the result, and a, b and c are the inputs. The method involved equations with many unknowns and ended up with a formula that explained it all. (This is an example that is not that meaningful, since r = c, but you get the idea).

However, I can not remember the details, and not enough keywords to be able to find it on the web. The subject teaching this method also included a lot of boolean algebra.

I know this is a vague question, but what could this method for finding the formula from a table of values be?

like image 649
Alexander Avatar asked Apr 12 '11 09:04

Alexander


2 Answers

Are you referring to Karnaugh maps?

like image 89
Mitch Wheat Avatar answered Sep 23 '22 06:09

Mitch Wheat


There are disjunctive and conjuctive normalform. Depending on which you want you can build them from the (complete) logic tables by building terms for the 0 or 1 results by ors or ands and combining these terms with ands and ors (and the others match to 1 or 0). It sounds here more complex at it is. Wiki/Google will give you some examples when you look for conjunctive or disjunctive normalform.

EDIT: Here is the example from the wiki for both forms (DNF = disjunctive normal form, KNF = conjunctive normal form): Example from Wiki

like image 24
flolo Avatar answered Sep 21 '22 06:09

flolo