Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert function with only AND Boolean operations

I have some function like

(A and ( B or c)) or (D and E and (F or H or R or P )))

and I want to convert that function to function with only and operations (of course if possible) I find that with DeMorgan's Laws can be done some kind of transformations but I didn't manage to conver this function any ideas ?

I know that function

!(A or B) is equal to function !A and !B

but I could not find the equal function to the one above

like image 862
Lukap Avatar asked Nov 16 '12 14:11

Lukap


People also ask

What is Boolean expressions explain WITH AND & or operation in detail?

Boolean expressions are expressions in a programming language that produce a Boolean value. This is like asking a question where the logical answers can only be true or false. Boolean operators are used to carry out Boolean algebra. The three main Boolean operators are AND, OR and NOT.

What is Boolean and operation?

Boolean Operators are simple words (AND, OR, NOT or AND NOT) used as conjunctions to combine or exclude keywords in a search, resulting in more focused and productive results. This should save time and effort by eliminating inappropriate hits that must be scanned before discarding.

What is Boolean function with example?

A Boolean function refers to a function having n number of entries or variables, so it has 2n number of possible combinations of the given variables. Such functions would only assume 0 or 1 in their output. An example of a Boolean function is, f(p,q,r) = p X q + r.


1 Answers

The function you mentioned:

!(A or B) = !A and !B

is the same as:

A or B = !(!A and !B)

So let's start by splitting your problem into two parts of ABC and DEFHRP.

(A and (B or C)) = (A and !(!B and !C))
(D and E and (F or H or R or P)) = (D and E and !(!F and !H and !R and !P))

Since these two parts are joined by an 'or', we can apply the equivalence again to get:

!(!(A and !(!B and !C)) and !(D and E and !(!F and !H and !R and !P)))
like image 171
joulesm Avatar answered Sep 23 '22 21:09

joulesm