Now, of course, once we have this expression,

we can start manipulating it in varied ways.

This is one way to write the function as an expression, but if you actually look at

it, you can see that we can start changing, start changing its format.

For example, if you look at the first two clauses, you can see that one of them

is not x and not y and not z, while the other is not x and y and not z.

Notice that the, what we have both possibilities for y and

exactly the same fixed value for x.

So instead of these two, two clauses, we can combine them into one clause

which does not ask about y, and only asks about not x and not z.

So we get an equivalent expression that's slightly shorter.

There are more manipulations that we can do.

Let's not go into them, but

we can actually write the same expression in many different ways.

Some of them will be shorter than others, some, some of them might be, might be

more efficient in terms of when we actually go implement them in a computer.

But the point is, logically, they're all completely equivalent.

Now, you might wonder, how do you actually find the shortest or

most efficient formula that's equivalent to the one we've just derived?

Well, that's not an easy problem in general.

It's not easy for humans, nor is there any algorithm that can do that efficiently.

In fact, this is an NP-hard problem

to actually find the shortest expression that's equivalent to a given one, or

even to verify if the expression that you're given is just a constant 0 or 1.

What's more interesting, what I really want to focus at this point,

is that we've really prove the really remarkable mathematical theorem

that any Boolean function, it doesn't really matter on how many variables and

what the boolean function is,

can be represented in an expression using only the operations AND, OR, and NOT.