CS计算机代考程序代写 14 (a) (b) (c) (d) (e) (f) (g) (h)

14 (a) (b) (c) (d) (e) (f) (g) (h)
(i) (ii) (iii) (iv) (v)
§ (a) (b) (c) (d) (e) (f)
Complete the following laws of Binary Theory ⊤=
⊥= ¬a= a∧b = a∨b = a=b = a⧧b = a⇒b =
by adding a right side using only the following symbols (in any quantity) ¬∧ a b ( )
¬∨ a b ( )
¬⇒a b ( )
⧧⇒ a b ( )
¬ if then else fi a b ( )
That’s 8×5 = 40 questions.
(i)
¬(a∧¬a)
a∧¬a
¬a
a∧b
¬(¬a∧¬b)
¬(a∧¬b) ∧¬(¬a∧b)
(ii)
a∨¬a
¬(a∨¬a)
¬a
¬(¬a∨¬b)
a∨b
¬(a∨b) ∨¬(¬a∨¬b)
(iii)
a⇒a ¬(a⇒a) ¬a
(iv)
a⇒a a⧧a a⇒(a⧧a)
(v)
ifathenaelse¬afi ifathen¬aelseafi ¬a
if a then b else a fi if a then a else b fi ifathenbelse¬bfi
ifathen¬belsebfi
¬(a∧b)
∧¬(¬a∧¬b) ∨¬(¬a∨b)
¬a⇒b ¬((a⇒b)
⇒¬(b⇒a)) (a⇒b)⇒¬(b⇒a)
(a⇒(a⧧a))⇒b (a⧧b)⇒(a⧧a)
a⧧b
(g)
(h) ¬(a∧¬b) ¬a∨b a⇒b
¬(a∨¬b)
a⇒b
Note: using continuing operators, we can write (f)(iii) and (f)(iv) as a⇒b⇒a .
¬(a⇒¬b) (a⇒(a⧧b))⇒(a⧧a)
ifathenbelse¬afi