Python exercise Complete the function named demorgan2 that will verify the following version of DeMorgan's Law for
Fantastic news! We've Found the answer you've been seeking!
Question:
Python exercise
Complete the function named demorgan2 that will verify the following version of DeMorgan's Law for sets A, B, and V:
V−(A∩B)=(V−A)∪(V−B)
where:
A and B must be subsets of V
The minus sign indicates the set difference operation
∪ indicates the union operation
∩ indicates the intersection operation
Using this function definition line:
def demorgan2(V,A,B):
where A and B are subsets of V.
First compute: V−(A∩B)
Then compute: (V−A)∪(V−B)
If the two are equal, return True; otherwise, return False.
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Posted Date: