Docsity

Propositional Logic Homework I - Spring 2006, Assignments of Computer Science

Toggle sidebar
bg1
22C:181 — Spring 2006
Homework I
1. [10 points]
Show that for any wffs a, b and g, the propositional formula ((a ⁄ b) Ÿ (ÿa ⁄ g)) fi
b ⁄ g is a tautology.
2. [15 points]
Provide an expression utilizing
only
the 'nand' operation (negated 'and', see
truth table definition below) that is logically equivalent to each of the three usual
Boolean operations ÿ, Ÿ, and ⁄.
P
Q
P nand Q
T
T
F
T
F
T
F
T
T
F
F
T
3. [10 points]
Show that (x nand y) nand z is not logically equivalent to x nand (y nand z) (i.e.,
nand is not associative).
4. [10 points]
Determine if the program assertion (see Chapter 14 of Diller) below is valid and
justify your answer. Assume that the domain of the program variables is integers.
{true}
if X>Y then skip else X:= X*X*Y
{X>Y}

Partial preview of the text

Download Propositional Logic Homework I - Spring 2006 and more Assignments Computer Science in PDF only on Docsity!

22C:181 — Spring 2006 Homework I

1. [10 points] Show that for any wffs a, b and g, the propositional formula ((a ⁄ b) Ÿ (ÿa ⁄ g)) fi b ⁄ g is a tautology. 2. [15 points] Provide an expression utilizing only the ' nand ' operation (negated 'and', see truth table definition below) that is logically equivalent to each of the three usual Boolean operations ÿ, Ÿ, and ⁄. P Q P nand Q T T F T F T F T T F F T 3. [10 points] Show that (x nand y) nand z is not logically equivalent to x nand (y nand z) (i.e., nand is not associative). 4. [10 points] Determine if the program assertion (see Chapter 14 of Diller) below is valid and justify your answer. Assume that the domain of the program variables is integers. {true} if X>Y then skip else X:= XXY {X>Y}