Lecture 11:  Complex Conditions

Activity:

Please simplify the following conditionals so that the ! operator is only used as !=.  As you complete these problems, keep in mind De Morgan's laws.  Here A and B represent variables.

1.  !(A != B)

2.  !((A == 1) || (A == 4))

3.  !((A >= 4) && (B < 2))

4.  !((A != 5) || (B == 6))

5.  !((A != 5) || (A == 5))
(Note:  Can this conditional evaluate to true?)

6.  !((A != 5) && (A == 5))
(Note:  Can this conditional evaluate to false?)

Conditionals that never evaluate to true are called contradictions.  Conditionals that always evaluate to true are called tautologies.