Wednesday, 16 January 2013

Venn Diagram Madness............

I came across something confusing for CSC165 Tutorial Exercise #1:

Drawing a Venn Diagram that Falsifies statement
d) "There is one of the three python programs that fails all three test suites."

So to falsify the above statement, you'd have to create a Venn Diagram portraying a situation where all python programs pass at least one test suite. If a python program passes at least 1 test suite, then it is not in the set of python programs that "fails all three test suites". Thus all we have to show on the Venn Diagram is that all of the 3 python programs in set Q passes at least one test suite. So technically, the programs can exist anywhere in Q, either in the overlapping Q and T area or just the Q area itself since the Q area itself just represents python programs, not stating how many test suites they pass or fail. So I figured the diagram for this would be:

(**Where Q is the set of 3 python programs, T is the set of universal python programs that pass all 3 test suites, and P is the universe of python programs. Also, O represents area must be occupied, X represents area that must not be occupied, and ? represents area could be empty or occupied.)

However, this diagram does not really say anything definite about making the statement false. For example, since ? represents may be empty or may be occupied, let's say for example that the overlapping T and Q area was empty. Now all the python programs in Q are in the Q only region. In this case, we may have a situation that falsifies the above statement (if all the programs in Q passed at least one test) or we may also have a situation that does not falsify it (any one of the python programs may fail all 3 tests and still be in this region). So this diagram wouldn't be enough to falsify the above claim.

During the tutorial, the Venn Diagram that was presented in answer to d) false situation was:


This Venn Diagram makes sense in that it presents a situation where the statement would be false for sure (if all of the 3 python programs passes all 3 test suites, then there can't be any that failed all 3), but there was just something still bothering me about this diagram. The area in Q may be occupied, not necessarily must not be. This diagram presents one situation where the statement would be false, but not a general diagram showing how to make the statement false. I don't know if I'm conveying myself properly, sorry for the confusion. For example, let's consider the Venn Diagram portraying a False situation for a) "All three python programs that passes all test suites." The correct diagram is:



However, another situation that would make the a) statement False would be this Venn Diagram:


This diagram would show a situation where a) would be False but it wouldn't be the correct most general Venn Diagram.

This is the feeling I'm getting for the tutorial provided Venn Diagram. I feel as if there is another region needed to indicate either programs that passed at least 1 test suite or a region indicating programs that failed all test suite.

The good thing about this experience is that after writing this blog, my head is a lot more clear about this whole situation!


2 comments:

  1. Good entry Jason. As you note, it's a bit trick to capture "the" situation when claim (d) is false, hence the most general (but uninformative) diagram is all question marks.

    ReplyDelete
  2. Thanks for taking your time to comment! Much appreciated.

    ReplyDelete