I'm new to computer science and recently took a class. I'm struggling with this question which i don't quiet understand though i'm aware of bitwise operations
Question image:
Can I have a clear explanation please ?
Use DeMorgan's Laws (https://en.wikipedia.org/wiki/De_Morgan's_laws)
NOT (A and B) = (NOT A) or (NOT B)
NOT (A or B) = (NOT A) and (NOT B)
Following this logic:
The diagram represents
NOT ( NOT (male and adult male) and NOT (female and minor female) )
NOT (male and adult male)
is satisfied as long as you are NOT adult male
and thus can be replaced by this. Similarly, NOT (female and minor female)
can be replaced by NOT minor female
Thus:
NOT ( (NOT adult male) and (NOT minor female) )
Using DeMorgan's law, this becomes:
adult male or minor female
We can see that this matches answer B.
The answer is b). For instance in the left bottom box, the adult male is not allowed. Since the result of this box is not allowed on the upper level, the opposite of the allowed must be the very solution. The same needs to be done for the right box.
a) and c) don't work, because they result in true for either of the lower boxes. d) doesn't work, because 'minor male' for instance would be allowed in both lower boxes, hence the and condition in the upper box would give true and the negation would make it false.
This is a very simple explanation that makes the point clear without using too complex algebra stuff...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With