# The answer to my Venn Diagram query!

I was right - using cross-hatching in a Venn Diagram can have meaning beyond simple shading!

Do you recall my blog from a few days ago when I posed a question about Venn Diagrams? At that time, I noted that although the fundamental concept behind these little rapscallions is quite simple, I had a niggling recollection that I had seen something about these little rascals a long time ago and I couldn't quite remember what it was.

Let me quickly remind you as to the problem and then I'll regale you with the answer. Consider the first group of diagrams below. At the top we have a classic Venn representation. The rectangle is the "universe" containing everything. The two overlapping circles represent two "classes" called A and B. The area where the two circles intersect equals A AND B; the left-hand area equals A AND NOT(B); the right-hand area equals B AND NOT(A); the total area covered by both circles equals A OR B; and the area outside the two circles equals NOT(A) AND NOT(B), which – using a standard DeMorgan Transformation – is the same as saying NOT(A OR B).

Now look at the shaded area in the middle diagram; this equals A AND NOT(B). No problems thus far. But what about the bottom diagram with the cross-hatched lines? This is where I was having a problem, because I vaguely remembered seeing something about this ages and ages ago. That is, I seemed to recall that the use of cross-hatched lines could be used to indicate the fact that this area represents something different to the shaded area in the middle diagram.

So I posed the question: *"Does anyone know anything about this? Is it just my imagination, or does this actually mean something?"* And the email floodgates opened. . . The vast majority of responses were similar to the following:

I believe cross-hatched lines mean exactly the same thing as even shading. It's easier and quicker to draw a few lines than color in a region, especially when the diagram is monochrome. That way, for example, one region can have straight lines, and another cross hatched lines, instead of trying to do two different grayscale shadings.

In fact I started to doubt myself. Maybe I was just imagining things. But then I received an email saying:

I believe that this cross-hatching is intended to show that this portion of the set is empty. That is . . . without the shading, the diagram shows the union of three subsets: A AND NOT(B), A AND B, B AND NOT(A). The cross-hatching indicates that the subset A AND NOT(B) is empty. Thus, the only elements of A in existence are also elements of B. In other words, A is a subset of B. This could also be shown by drawing an A circle that is entirely contained within the B circle.

Yes! That's it! I knew I'd seen something about this. I've represented this in the new diagrams below. Also, now I know what to look for, I've just tracked down an Interesting Website that explains this in more detail.

Now this may seem to be a pointless exercise, but remember that the above is a trivial example. When you start to think about things, it's actually easy to see how this technique could start to become really useful when you start adding more classes (circles) and wish to exclude certain intersections and so forth.

So there we have it. There's always something new to learn, isn't there? I love this stuff!

Speaking of which . . . if you think of any interesting nuggets of trivia relating to Venn Diagrams, drop me a line, because I think I might write a small paper on them explaining them to beginners, and I always like to include interesting "stuff".

Questions? Comments? Feel free to email me – Clive "Max" Maxfield – at max@techbites.com and copy Gabe at gmoretti@gabeoneda.com. And, of course, if you haven't already done so, don't forget to Sign Up for the weekly EDA DesignLine Newsletter.