0
$\begingroup$

I was reading Code by Charles Petzold and i found myself struggling with the rules of sets.

On the 81th page it says :

The commutative, associative, and distributive rules all hold for Boolean algebra. What's more, in Boolean algebra the + operator is distributive over the x operator. This isn't true of conventional algebra:

W + (B x F) = (W + B) x (W + F)

The union of white cats and black female cats is the same as the intersection of two unions: the union of white cats and black cats, and the union of white cats and female cats. This is somewhat difficult to grasp, but it works.

So i used Venn Diagrams to demonstrate my supposition for the first part of equation Click here

And the second Click

My question is what does the C (filled blue) set contain? I hope that i filled that right. I personally think , that ALL white cats and also Cats that are female and black at the same time I got it by the 1st diagram, but not the second. I just can't understand what the word "OR" means in this context. Please leave feedback on my 2nd diagram and correct if i am mistaken. Thanks in advance.

$\endgroup$
  • $\begingroup$ "OR" is set union: "Cats are either male or female" means that the set of all Cats is "made of" the set of male Cats "plus" (set union) the set of female Cats. $\endgroup$ – Mauro ALLEGRANZA Apr 2 '17 at 11:43
  • $\begingroup$ "AND" is set intersection : male Cats are both male and cats, i.e. they are the intersection of the set of all Cats with the set of all male "animals". $\endgroup$ – Mauro ALLEGRANZA Apr 2 '17 at 11:44
  • $\begingroup$ Your first Venn diagram must be redraw: W + (B x F) does not "cover " all Cats. We have also Black male Cats (that are neither White nor Black female). $\endgroup$ – Mauro ALLEGRANZA Apr 2 '17 at 11:47
0
$\begingroup$

HINT

When using Venn diagrams you want each circle to represent a 'simple' or 'atomic' class of objects. So for example: 'cats' would be a simple category. Or: 'white things'. But you really don't want to use 'things that are cat or black'. Indeed, even 'white cats' is already a combination of 'things that are cat and that are white': you really want to leave out logical operations in your definition for a single circle. Indeed, you use intersection, union, etc. to think about 'and', 'or', etc.

So in your case: have circles for 'cats', 'white things' and 'black things', and try again.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.