{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture07

# lecture07 - CS 70 Spring 2005 Discrete Mathematics for CS...

This preview shows pages 1–3. Sign up to view the full content.

CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding proper reasoning and proofs, we now study it from a computational perspective. Eventually we will find ways to manipulate logical expressions algorithmically so as to solve hard problems automatically. In so doing, we will come across some fundamental notions of complexity . We will also have a pretty good Minesweeper program. Boolean expressions and Boolean functions Just as arithmetic deals with all the mathematics that arises from operations on numbers, the study of Boolean functions deals with all the mathematics that arises from operations on the Boolean values true BOOLEAN VALUES and false, which we will denote by T and F . (1 and 0 are also commonly used.) Despite there being just two values, lots of interesting mathematics arises. We begin with a formal constructive definition of the set of Boolean expressions or (Boolean formulæ or BOOLEAN EXPRESSIONS propositional logic expressions or propositional sentences). Notice that this is very similar to the definition of binary trees, etc. It’s more complex because the set is more complex. Let X be the set of proposition symbols { X 1 ,... X n } (also called Boolean variables ), and B be the set of PROPOSITION SYMBOLS Boolean expressions on X . (Notice that we underline the expressions themselves to avoid confusion with the logical notation surrounding them. We won’t do this from now on, but you might want to do it mentally if you find yourself getting confused.) Definition 7.1 (Boolean expressions) : T B and F B X X [ X B ] B B [ ¬ B B ] B 1 , B 2 B [ B 1 B 2 B ] B 1 , B 2 B [ B 1 B 2 B ] B 1 , B 2 B [ B 1 = B 2 B ] B 1 , B 2 B [ B 1 B 2 B ] To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions) : For any property P , if P ( T ) and P ( F ) and X X P ( X ) and B B [ P ( B ) = P ( ¬ B )] and B 1 , B 2 B [ P ( B 1 ) P ( B 2 ) = P ( B 1 B 2 )] and B 1 , B 2 B [ P ( B 1 ) P ( B 2 ) = P ( B 1 B 2 )] and B 1 , B 2 B [ P ( B 1 ) P ( B 2 ) = P ( B 1 = B 2 )] and B 1 , B 2 B [ P ( B 1 ) P ( B 2 ) = P ( B 1 B 2 )] then B B P ( B ) . CS 70, Spring 2005, Notes 7 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
P Q ¬ P P Q P Q P = Q P Q False False True False False True True False True True False True True False True False False False True False False True True False True True True True Table 1: Truth tables for all the Boolean operators Some useful terminology: an expression of the form B 1 B 2 is called a conjunction ; B 1 and B 2 are its CONJUNCTION conjuncts . An expression of the form B 1 B 2 is called a disjunction ; B 1 and B 2 are its disjuncts .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}