r/AskComputerScience • • Dec 16 '19

How does one attempt and visualize this?

Post image
35 Upvotes

19 comments sorted by

View all comments

24

u/narut0fan Dec 16 '19 edited Dec 16 '19

X = { 1, 4 }

See, X is set of all those 'n', which follows the given condition. The condition is actually an imply statement. Left part of the statement is: 'n' belongs to 'M'. Right part is: 'n' does not belong to 'L' AND 'n' does not belong to 'H'.

For each 'n' in universe 'U', if the imply statement is true, we add 'n' in 'X'. An imply statement is TRUE only in following cases:
True implies True
False implies True
False implies False

That means only if the left side of imply statement is True, and right side is False, only those values of 'n' would NOT go in set 'X'.

For n=2,3, Left side is True, right side is False.
For n=1,4, Left side is False, right side is False.

Hence, X = {1,4} :D

I hope it is clear now.

9

u/[deleted] Dec 16 '19

Thank you so much . Great Explanation, Clear and concise . i have a better understanding now