0% found this document useful (0 votes)
21 views

CS2742 Midterm Test 1 Study Sheet Propositional Logic

The document provides an overview of key concepts in propositional logic, including: 1) Propositional statements that can be true or false, logic connectives like negation, conjunction, disjunction, and their precedence order. 2) Truth tables that list the truth values of statements for each combination of variable values. 3) Logical equivalence between statements that have the same truth tables, such as DeMorgan's laws. 4) Arguments consisting of premises and a conclusion, and the concept of a valid argument where the premises imply the conclusion. 5) Normal forms like conjunctive normal form (CNF) and disjunctive normal form (DNF) that are useful for propositional proofs

Uploaded by

ZhichaoWang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

CS2742 Midterm Test 1 Study Sheet Propositional Logic

The document provides an overview of key concepts in propositional logic, including: 1) Propositional statements that can be true or false, logic connectives like negation, conjunction, disjunction, and their precedence order. 2) Truth tables that list the truth values of statements for each combination of variable values. 3) Logical equivalence between statements that have the same truth tables, such as DeMorgan's laws. 4) Arguments consisting of premises and a conclusion, and the concept of a valid argument where the premises imply the conclusion. 5) Normal forms like conjunctive normal form (CNF) and disjunctive normal form (DNF) that are useful for propositional proofs

Uploaded by

ZhichaoWang
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CS2742 midterm test 1 study sheet

Propositional logic:
Propositional statement: expression that has a truth value (true/false). It is a tautology if it is always
true, contradiction if always false.
Logic connectives: negation (not) p, conjunction (and) pq, disjunction (or) pq, implication
p q (equivalent to p q), biconditional p q (equivalent to (p q) (q p)). The order of
precedence: strongest, next, next, and the same, weakest.
If p q is an implication, then q p is its contrapositive, q p a converse and p q
an inverse. An implication is equivalent to its contrapositive, but not to converse/inverse or their
negations. A negation of an implication p q is p q (it is not an implication itself!)
A truth table has a line for each possible values of propositional variables (2k lines if there are k
variables), and a column for each variable and subformula, up to the whole statement. The cells of
the table contain T and F depending whether the (sub)formula is true for the corresponding values
of variables.
A truth assignment is a string of values of variables to the formula, usually a row with values of first
several columns in the truth table (number of columns = number of variables). A truth assignment
is satisfying the formula if the value of the formula on these variables is T, otherwise the truth
assignment is falsifying. A truth assignment can be encoded by a formula that is a of variables
and their negations, with negated variables in places that have F in the assignment, and non-negated
that have T. For example, x = T, y = F, z = F is encoded as (x y z).It is an encoding in a
sense that this formula is true only on this truth assignment and nowhere else.
Two formulas are logically equivalent if they have the same truth table. The most famous example of
logically equivalent formulas is (p q) (p q) (with a dual version (p q) (p q))
where p and q can be arbitrary (propositional, here) formulas. These pairs of logically equivalent
formulas are called DeMorgans law.
There are several other important pairs of logically equivalent formulas, called logical identities or
logic laws. We will talk more about them when we talk about Boolean algebras. Here, just remember
that F p p p F , F p T p p and T p p p T .
A set of logic connectives is called complete if it is possible to make a formula with any truth table
out of these connectives. For example, , is a complete set of connectives, and so is the Sheffers
stroke | (where p|q (p q)), also called NAND for not-and. However, , is not a complete
set of connectives because it is impossible to express a truth table with 0 when all variables are 1
with them.
An argument consists of several formulas called premises and a final formula called a conclusion.
If we call premises A1 . . . An and conclusion B, then an argument is valid iff premises imply the
conclusion, that is, A1 An B. We usually write them in the following format:
Today is either Thursday or Friday
On Thursdays I have to go to a lecture
1

Today is not Friday (alternatively, On Friday I have to go to the lecture)

I have to go to a lecture today


A valid form of argument is called rule of inference. The most prominent such rule is called modus
ponens.
pq
p
q
There are several main types of proofs depending on the types of rules of inference used in the proof.
The main ones are proof by contrapositive, by contradiction and by cases.
There are two main normal forms for the propositional formulas. One is called Conjunctive normal
form (CNF) and is an of of either variables or their negations (here, by and we mean several
formulas with between each pair, as in (x y z) (u y) x. A literal is a variable or its
negation (x or x, for example). A of (possibly more than 2) literals is called a clause, for example
(u z x), so a CNF is true for some truth assignment whenever this assignment makes each of
the clauses is true, that is, each clause has a literal that evaluates to true under this assignment.. A
Disjunctive normal form (DNF) is like CNF except the roles of and are reversed. A of literals
in a DNF is called a term. To construct a DNF and a CNF, start from a truth table and then for every
satisfying truth assignment its encoding to a DNF, and for every falsifying truth assignment the
negation of its encoding to the CNF, and apply DeMorgans law. This may result in a very large
CNFs and DNFs, comparable to the size of the truth table itself (2number of variables ). Alternatively,
a CNF can be constructed from a formula by assigning a new variable vi to every connective and
rewriting the formula as a conjunction of v1 and expressions defining vi0 s, each containing just two
other variables, and then converting these expressions into small CNFs using truth tables. For
example, a formula (x y) (z) can be converted to a CNF by introducing variables v1 and v2 ,
then writing v1 (v1 (v2 z)) (v2 (x y)), then replacing each part by a CNF using truth
tables.
A resolution proof system is used to find a contradiction in a formula (and, similarly, to prove that a
formula is a tautology by finding a contradiction in its negation). Resolution starts with a formula
in a CNF form, and applies the rule from clause (C x) and clause (D x) derive clause (C D)
until a falsity F (equivalently, empty clause () ) is reached (so in the last step one of the clauses being
resolved contains just one variable and another clause being resolved contains just that variables
negation. Resolution can be used to check the validity of an argument by running it on the of all
premises (converted, each, to a CNF) together with the negation of the conclusion.
Boolean functions are functions which take as argument boolean (ie, propositional) variables and
return 1 or 0 (or, the convention here is 1 instead of T, and 0 instead of F). Each Boolean function
on n variables can be fully described by its truth table. A size of a truth table of a function on n
variables is 2n . Even though we often can have a smaller description of a function, vast majority of
Boolean functions cannot be described by anything much smaller. Every Boolean function can be
described by a CNF or DNF, using the above construction.
2

x
x

NOT

~x
y

x
AND

x /\ y
y

OR

x \/ y

Figure 1: Types of gates in a digital circuit.


Boolean circuits is a generalization of Boolean formulas in which we allow to reuse a part of a formula
rather than writing it twice. To make a transition write Boolean formulas as trees and reuse parts
that are repeating. The connectives become circuit gates.
It is possible to have more than 2 inputs into an AND or OR circuit, but not a NOT circuit.
It is possible to construct arithmetic circuits (e.g., for doing addition on numbers) by using a Boolean
circuit to compute each bit of the answer separately.

You might also like