Propositional Logic: Contents
|
|
- Dominick Silvester Norton
- 7 years ago
- Views:
Transcription
1 Propositional Logic
2 Propositional Logic: Contents Syntax and Semantics of Propositional Logic Satisfiability (SAT) Tableau Algorithm for SAT Structural induction Semantic consequence and logical equivalence Conjunctive and disjunctive normal form (CNF and DNF) Logic in Computer Science 2
3 Formulas of propositional Logic The alphabet of propositional logic consists of an infinite set p 1, p 2,... of atomic formulas; the logical connectives: ( not ), called negation; ( and ), called conjunction; ( or ), called disjunction; brackets: ( and ). Remarks: atomic formulas are also called propositional variables; we use letters p, q, r and indexed letters q 1, q 2,... to denote atomic formulas. Logic in Computer Science 3
4 Formulas of propositional logic The set P of all formulas of propositional logic is defined inductively: all atomic formulas are formulas; if P is a formula, then P is a formula; if P and Q are formulas, then (P Q) is a formula; if P and Q are formulas, then (P Q) is a formula; Nothing else is a formula. Remarks: So, formulas are just strings over a certain alphabet without truth values or meaning. We use P, Q, R and indexed letters such as P 1, P 2,..., Q 1, Q 2,... to denote formulas of propositional logic. Logic in Computer Science 4
5 Truth Values An interpretation I is a function which assigns to any atomic formula p i a truth value I(p i ) {0, 1}. If I(p i ) = 1, then p i is called true under the interpretation I. If I(p i ) = 0, then p i is called false under the interpretation I. Given an assignment I we can compute the truth value of compound formulas step by step using so-called truth tables. Logic in Computer Science 5
6 Truth tables: negation The negation P of a formula P is true when P is false and false otherwise: Definition Suppose an interpretation I is given and we know the value I(P ). Then the value I( P ) is computed by I( P ) = { 0 if I(P ) = 1 1 if I(P ) = 0 Corresponding truth table: P P Logic in Computer Science 6
7 Truth tables: conjunction The conjunction (P Q) is true if and only if both P and Q are true. Definition Suppose an interpretation I is given and we know I(P ) and I(Q). Then I(P Q) = { 1 if I(P ) = 1 and I(Q) = 1 0 if I(P ) = 0 or I(Q) = 0 Corresponding truth table: P Q (P Q) Logic in Computer Science 7
8 Truth tables: disjunction The disjunction (P Q) is true if and only if P is true or Q is true. Definition Suppose an interpretation I is given and we know I(P ) and I(Q). Then I(P Q) = { 1 if I(P ) = 1 or I(Q) = 1 0 if I(P ) = 0 and I(Q) = 0 Corresponding truth table: P Q (P Q) Logic in Computer Science 8
9 Truth under an interpretation So, given an interpretation I, we can compute the truth value I(P ) of any formula P under I. If I(P ) = 1, then P is called true under the interpretation I. If I(P ) = 0, then P is called false under the interpretation I. Logic in Computer Science 9
10 Example List the Interpretations I such that P = ((p 1 p 2 ) p 3 ) is true under I. P is true under I 1, I 2, and I 3, where I 1 (p 1 ) = I 1 (p 2 ) = I 1 (p 3 ) = 1, I 2 (p 1 ) = I 2 (p 3 ) = 1 and I 2 (p 2 ) = 0, I 3 (p 1 ) = I 3 (p 2 ) = 0 and I 3 (p 3 ) = 1. p 1 p 2 p 3 p 2 (p 1 p 2 ) P Logic in Computer Science 10
11 Truth table for ( P Q) P Q P ( P Q) ( P Q) represents the assertion if P is true, then Q is true. Define a new connective by: (P Q) = ( P Q). In what follows we use (P Q) as an abbreviation for ( P Q). Logic in Computer Science 11
12 Truth table for ((P Q) (Q P )) P Q (P Q) (Q P ) ((P Q) (Q P )) ((P Q) (Q P )) represents the assertion P is true if and only if Q is true. Define a new connective by: (P Q) := ((P Q) (Q P )). In what follows we use (P Q) as an abbreviation for ((P Q) (Q P )). Logic in Computer Science 12
13 Satisfiability Definition A formula P is satisfiable if and only if there exists an interpretation I such that I(P ) = 1. Examples Every atomic formula p is satisfiable: given p, take the interpretation I with I(p) = 1. p is satisfiable: take the interpretation I with I(p) = 0. Then I( p) = 1. (p p) is not satisfiable: for any interpretation I, I(p p) = 0. (p q) is satisfiable: take the interpretation I with I(p) = 1 and I(q) = 0. Logic in Computer Science 13
14 Satisfiability and Puzzles (1) Isaac and Albert were excitedly describing the result of the Third Annual International Science Fair Extravaganza in Sweden. There were three contestants, Louis, Rene, and Johannes. Isaac reported that Louis won the fair, while Rene came in second. Albert, on the other hand, reported that Johannes won the fair, while Louis came in second. In fact, neither Isaac nor Albert had given a correct report of the results of the science fair. Each of them had given one true statement and one false statement. What was the actual placing of the three contestants? (Credits: based on slides by Andrei Voronkov) Logic in Computer Science 14
15 Encoding into SAT We take atomic formulas L1, L2, L3, R1, R2, R3, J1, J2, J3 with the intuitive meaning: L1: Louis came in first, L2: Louis came in second, L3: Louis came in third. R1: Rene came in first, R2: Rene came in second, R3: Rene came in third. J1: Johannes came in first, J2: Johannes came in second, J3: Johannes came in third. We represent the information about Isaac s report using the formula J: J = ((L1 R2) ( L1 R2)) We represent the information about Albert s report using the formula A: A = ((J1 L2) ( J1 L2)) Logic in Computer Science 15
16 Encoding into SAT We have to encode additional information. Namely, everybody comes in at exactly one place: represent this using (P 1 P 2 ), where P 1 = ((L1 L2 L3) (R1 R2 R3) (J1 J2 J3)) and P 2 = ( (L1 L2) (L1 L3) (L2 L3) (R1 R2) ) Only one person can come in first, etc: represent this using Q, where Q = ( (L1 R1) (L2 R2) (L3 R3) (R1 J1) ) Any interpretation I with I(J A P 1 P 2 Q) = 1 corresponds to a possible placing of the three contestants. Logic in Computer Science 16
17 Note on Conjunctions and Disjunctions On the previous slide, we have used formulas (P 1 P n ) and (P 1 P n ) which we have not defined yet. Note that according to the syntax of propositional formulas we use brackets whenever we form the conjunction/disjunction of two formulas. (P 1 P n ) is defined by induction over n as follows: (P 1 ) = P 1 ; (P 1 P n+1 ) = ((P 1 P n ) P n+1 ); (P 1 P n ) is defined by induction over n as follows: (P 1 ) = P 1 ; (P 1 P n+1 ) = ((P 1 P n ) P n+1 ); Logic in Computer Science 17
18 Checking Satisfiability (SAT) We want an algorithm that checks whether a given propositional formula is satisfiable. In other words, for a given P, we search for an interpretation I such that I(P ) = 1. If this search is successful, then the output of the algorithm should be yes, P is satisfiable. If no such interpretation can be found, then the output of the algorithm should be no, P is not satisfiable. Logic in Computer Science 18
19 SAT applications SAT has numerous applications in computer and information science. Here are some: Circuit design: e.g., when are two circuits equivalent? Model checking: does a program represented as a graph structure satisfy its specification? Planning in artificial intelligence; Haplotyping in bioinformatics: derive haplotype data from genotype data. Logic in Computer Science 19
20 Satisfiability checking based on Truth Tables Here is an algorithm checking satisfiability that is directly based on truth tables: 1. Let P be the input formula; 2. Using truth tables, compute the value I(P ) for all interpretations I; 3. if an I is found such that I(P ) = 1, then output P is satisfiable ; 4. If no such I is found, output P is not satisfiable. If P is not satisfiable, then this algorithms requires the computation of I(P ) for 2 n many interpretations I, where n is the number of atomic formulas in P. Thus the running time of this algorithm is exponential. Major open problem in computer science: does there exist an algorithm checking satisfiability that runs in polynomial time? This problem is also known as the P=NP problem. Logic in Computer Science 20
21 Tableau Method Intuition: to check satisfiability of P, we apply tableau rules to P that make explicit the constraints that P imposes on formulas occuring in P (subformulas). If all sequences of rule applications lead to an obviously unsatisfiable constraint, then P is unsatisfiable. If at least one sequence of rule applications leads to a constraint that cannot be decomposed further and does not contain an obviously unsatisfiable set of constraints, then P is satisfiable. A constraint S is a finite set of propositional formulas. S is satisfiable if there exists an interpretation I such that I(P ) = 1 for all P S. Logic in Computer Science 21
22 Tableau method (Intuition) To check satisfiable of P, one starts with constraint {P }. Then, one applies rules that reflect the following facts: if (P Q) is satisfiable, then {P, Q, (P Q)} is satisfiable; if P is satisfiable, then {P, P } is satisfiable; if (P Q) is satisfiable, then { P, Q, (P Q)} is satisfiable. if (P Q) is satisfiable, then {P, (P Q)} is satisfiable or {Q, (P Q)} is satisfable; if (P Q) is satisfiable, then { P, (P Q)} is satisfiable or { Q, (P Q)} is satisfiable; To avoid branching, we first consider satisfiability of formulas not containing any (P Q) and (P Q). Logic in Computer Science 22
23 Ingredients of the algorithm (partial) A constraint S is a finite set of propositional formulas; A constraint S contains a clash if there exists a formula P such that P S and P S. A non-branching completion rule is of the form S = S, where S, S are constraints. A constraint S is complete if no completion rule is applicable to S. Logic in Computer Science 23
24 Completion Rules (partial) Assume that S does not contain a clash (if it does, no rule is applicable). ( -rule) ( -rule) ( -rule) S = S {P, Q} if (a) (P Q) S and (b) {P, Q} S. S = S {P } if (a) P S and (b) P S. S = S { P, Q} if (a) (P Q) S and (b) { P, Q} S. Logic in Computer Science 24
25 Example 1 We check satisfiability of P = (( p q) r). Set S 0 = {(( p q) r)}. An application of = gives S 1 = S 0 {( p q), r}. An application of = gives S 2 = S 1 { p, q} An application of = gives S 3 = S 2 {r} Note that S 3 = {P, ( p q), r, p, q, r}. Logic in Computer Science 25
26 Example 1 (continued) S 3 = {P, ( p q), r, p, q, r}. No completion rule is applicable to S 3 ; Thus, S 3 is complete. S 3 does not contain any clash. Thus, the output is P is satisfiable. S 3 describes an interpretation I under which P is true. Namely, we set for any atomic formula x from P : I(x) = 1 if, and only if, x S 3. Thus, I(q) = I(r) = 1 and I(p) = 0. Then I(P ) = 1. Logic in Computer Science 26
27 Example 2 We check satisfiability of P = ((p q) p). Set S 0 = {((p q) p)}. An application of = gives S 1 = S 0 {(p q), p}. An application of = gives S 2 = S 1 {p, q} An application of = gives S 3 = S 2 { p} Note that S 3 = {P, (p q), p, p, q, p}. Thus S 3 contains a clash: p S 3 and p S 3 and we output P is not satisfiable. Logic in Computer Science 27
28 Tableau Path (partial) A sequence S 0, S 1,..., S n of constraints is a tableau path if for any i < n at least one of the following conditions is satisfied: S i = S i+1 S i = S i+1 S i = S i+1 Logic in Computer Science 28
29 The tableau algorithm (partial) A tableau path S 0,..., S n is complete if S n is complete. A tableau path S 0,..., S n contains a clash if S n contains a clash. To check satisfiability of a formula P, do the following: Generate a tableau path starting with the constraint {P }; If the tableau path is complete and does not contain a clash, then output P is satisfiable. If the tableau path contains a clash, then output P is not satisfiable. Logic in Computer Science 29
30 Example 3 We check satisfiability of P = ((p q) (p q)). Set S 0 = {((p q) (p q))}. An application of = gives S 1 = S 0 {(p q), (p q)}. An application of = gives S 2 = S 1 {p, q} An application of = gives S 3 = S 2 { p, q} S 3 contains a clash: p S 3 and p S 3 and we output P is not satisfiable. Logic in Computer Science 30
31 Analysing the Tableau Algorithm (partial) To show that the tableau algorithm does what it is supposed to do, one has to show the following. Let P be a propositional formula. Termination: The algorithm terminates: there is no infinite tableau path S 0, S 1,... starting with {P }. Soundness: If there exists a complete tableau path S 0, S 1,..., S n with {P } = S 0 and without clash, then P is satisfiable. Completeness: If P is satisfiable, then no tableau path (generated by the three rules above) S 0, S 1,..., S n with {P } = S 0 contains a clash. For the proof, we require definitions and proofs by structural induction. This will be done later. Logic in Computer Science 31
32 Branching How to deal with formulas containing (P Q) or (P Q)? Recall that if (P Q) is satisfiable, then {P, (P Q)} is satisfiable or {Q, (P Q)} is satisfable; if (P Q) is satisfiable, then { P, (P Q)} is satisfiable or { Q, (P Q)} is satisfiable; Thus, we have to explore different ways to satisfy a formula. Logic in Computer Science 32
33 Example 4 We check satisfiability of P = ((p p) (q q)). Set S 0 = {P }. An application of = gives S 1 = S 0 {p p} or S 2 = S 0 {(q q)}. We first try to satisfy S 1. An application of = to S 1 gives S 3 = S 1 {p, p} which contains a clash. We have been unsuccessful. We now try to satisfy S 2. An application of = to S 2 gives S 4 = S 2 {q, q} S 4 does not contain a clash and is complete. Logic in Computer Science 33
34 Example 4 (continued) We have two tableau paths S 0, S 1, S 3 S 0, S 2, S 4 The second path is complete and does not contain a clash. Thus, the output is P is satisfiable. Recall that S 4 = {P, (q q), q}. S 4 also describes an interpretation I under which P is true, namely I(q) = 1. Logic in Computer Science 34
35 Ingredients of the algorithm (complete) A constraint S is a finite set of propositional formulas; A constraint S contains a clash if there exists a formula P such that P S and P S. A non-branching completion rule is of the form S = S, where S, S are constraints. A branching completion rule is of the form S = S 1 or S 2, where S, S 1, S 2 are constraints. A constraint S is complete if no completion rule is applicable to S. Logic in Computer Science 35
36 Completion Rules Assume that S does not contain a clash (if it does, no rule is applicable). ( -rule) S = S {P, Q} if (a) (P Q) S and (b) {P, Q} S. ( -rule) ( -rule) ( -rule) ( -rule) S = S {P } if (a) P S and (b) P S. S = S { P, Q} if (a) (P Q) S and (b) { P, Q} S. S = S {P } or S {Q} if (a) (P Q) S and (b) P S and Q S. S = S { P } or S { Q} if (a) (P Q) S and (b) P S and Q S. Logic in Computer Science 36
37 Tableau Path A sequence S 0, S 1,..., S n of constraints is a tableau path if for any i < n at least one of the following conditions is satisfied: S i = S i+1 S i = S i+1 S i = S i+1 for some S: S i = S i+1 or S or S i = S or S i+1 for some S: S i = S i+1 or S or S i = S or S i+1 Logic in Computer Science 37
38 The tableau algorithm A tableau path S 0,..., S n is complete if S n is complete. A tableau path S 0,..., S n contains a clash if S n contains a clash. To check satisfiability of a formula P, do the following: Generate tableau paths starting with the constraint {P }; If there is a tableau path that is complete and does not contain a clash, then output P is satisfiable. If no such tableau path can be found (i.e., all complete tableau paths starting with P contain a clash), then output P is not satisfiable. Logic in Computer Science 38
39 Example 5 We check satisfiability of P = ((( p q) p) q). Set S 0 = {P }. An application of = gives S 1 = S 0 {(( p q) p), q}. An application of = gives S 2 = S 1 {( p q), p}. An application of = gives S 3 = S 2 { p} S 3 contains a clash: p S 3 and p S 3. The other possible application of = to S 2 gives S 4 = S 2 {q} S 4 is complete and does not contain a clash. Logic in Computer Science 39
40 Example 5 (continued) We have two tableau paths S 0, S 1, S 2, S 3 S 0, S 1, S 2, S 4 The second path is complete and does not contain a clash. Thus, the output is P is satisfiable. Recall that S 4 = {P, (( p q) p), p, q, ( p q), q}. S 4 also describes an interpretation I under which P is true. Namely, we set for any atomic formula x from P : I(x) = 1 if, and only if, x S 4. Thus, I(p) = I(q) = 1. Then I(P ) = 1. Logic in Computer Science 40
41 Example 6 We check satisfiability of P = ((( p q) p) q). Set S 0 = {P }. An application of = gives S 1 = S 0 {(( p q) p), q}. An application of = gives S 2 = S 1 {( p q), p}. An application of = gives S 3 = S 2 { p} S 3 contains a clash: p S 3 and p S 3. The other possible application of = gives S 4 = S 2 {q} S 4 contains a clash: q S 4 and q S 4. Logic in Computer Science 41
42 Example 6 (continued) We have two tableau paths S 0, S 1, S 2, S 3 S 0, S 1, S 2, S 4 Both contain a clash. Thus, the output is P is not satisfiable. Logic in Computer Science 42
43 Analysing the Tableau Algorithm To show that the tableau algorithm does what it is supposed to do, one has to show the following. Let P be a propositional formula. Termination: The algorithm terminates: there are only finitely many tableau paths starting with {P }. Soundness: If there exists a complete tableau path S 0, S 1,..., S n with S 0 = {P } without clash, then P is satisfiable. Completeness: If P is satisfiable, then there exists a complete tableau path S 0, S 1,..., S n with S 0 = {P } without clash. For the proof, we require definitions and proofs by structural induction. We first introduce this important concept. Logic in Computer Science 43
44 Definitions by structural induction Many important functions F which have as domain the set of all propositional formulas are defined by specifying the values F (p i ), for all propositional variables p i, F (P Q), given the values F (P ) and F (Q), F (P Q), given the values F (P ) and F (Q), F ( P ), given the value F (P ). Such a definition is called a definition by structural induction. (The idea should be familar from proofs by induction for natural numbers.) Logic in Computer Science 44
45 Example 1: Interpretations The definition of interpretations I was given by structural induction. To define an interpretation I it is sufficient to define I(p i ) for all atomic formulas p i. The values I(P ), P an arbitrary propositional formula, are then given by means of truth tables. In other words, truth tables define the values I(P Q), given the values I(P ) and I(Q), I(P Q), given the values I(P ) and I(Q), I( P ), given the value I(P ). Logic in Computer Science 45
46 Example 2: Subformulas The function sub(p ) giving the subformulas of a formula P is defined by structural induction as follows: sub(p i ) = {p i }, for all atomic formulas p i, sub(p Q) = {(P Q)} sub(p ) sub(q) sub(p Q) = {(P Q)} sub(p ) sub(q) sub( P ) = { P } sub(p ). The set sub(p ) is called the set of subformulas of P. Logic in Computer Science 46
47 Subformulas Compute sub(p ) for P = ((p 1 p 2 ) p 3 ). sub(p ) = {P } sub(p 1 p 2 ) sub( p 3 ) = {P } {(p 1 p 2 )} sub(p 1 ) sub( p 2 ) sub( p 3 ) = {P, (p 1 p 2 )} {p 1 } { p 2 } sub(p 2 ) { p 3 } sub(p 3 ) = {P, (p 1 p 2 ), p 1, p 2, p 2, p 3, p 3 } Logic in Computer Science 47
48 Example 3: Length of a formula The function L(P ) giving the length of a formula is defined by structural induction as follows: L(p i ) = 1, for all atomic formulas p i, L(P Q) = 1 + L(P ) + L(Q), L(P Q) = 1 + L(P ) + L(Q), L( P ) = 1 + L(P ). L(P ) is called the length of formula P. Logic in Computer Science 48
49 Length of a formula Compute L(P ) for P = (p 0 p 1 ). L(P ) = 1 + L(p 0 p 1 ) = L(p 0 ) + L( p 1 ) = L(p 1 ) = 5. Logic in Computer Science 49
50 Proofs by structural induction Statements about objects defined by structural induction can often be proved by structural induction. We illustrate this proof method by means of the following example. ( sub(p ) denotes the number of subformulas of P.) Theorem For every formula P : sub(p ) L(P ). Proof The proof is by structural induction. In other words, we show: 1. for all atomic formulas p i : sub(p i ) L(p i ); 2. for all formulas P and Q: if sub(p ) L(P ) and sub(q) L(Q), then sub(p Q) L(P Q); 3. for all formulas P and Q: if sub(p ) L(P ) and sub(q) L(Q), then sub(p Q) L(P Q); 4. for every formula P : if sub(p ) L(P ), then sub( P ) L( P ). Logic in Computer Science 50
51 We now check (1.)-(4.): 1. sub(p i ) = 1 1 = L(p i ). 2. Suppose sub(p ) L(P ) and sub(q) L(Q). Then sub(p Q) = {P Q} sub(p ) sub(q) 1 + sub(p ) + sub(q) 1 + L(P ) + L(Q) = L(P Q). 3. Exercise. 4. Exercise. Logic in Computer Science 51
52 Termination of the tableau algorithm Assume P is given. We have to show that there are only finitely many tableau paths {P } = S 0, S 1,..., S n. Let sub (P ) = sub(p ) { Q Q sub(p )}. Now observe for any tableau path {P } = S 0, S 1,..., S n : S 0 S 1 S n sub (P ). Hence the length of any tableau path {P } = S 0, S 1,..., S n is not greater than sub (P ) and the number of such tableau paths is not greater that sub (P ) sub (P ). (Here, by X Y we denote that X is a proper subset of Y.) Logic in Computer Science 52
53 Soundness of the tableau algorithm Let {P } = S 0, S 1,..., S n be a complete tableau path such that S n does not contain a clash. We define an interpretation I by { 1 if pi S I(p i ) = n 0 if p i S n We show the following claim by structural induction: Claim 1 I(Q) = 1 for all Q S n ; I(Q) = 0 for all Q S n. Since P S n, we obtain I(P ) = 1. Thus P is satisfiable. Logic in Computer Science 53
54 The steps of the structural induction We have to show: 1. Claim 1 holds for all atomic formulas p i ; 2. if Claim 1 holds for P 1 and P 2, then Claim 1 holds for (P 1 P 2 ); 3. if Claim 1 holds for P 1 and P 2, then Claim 1 holds for (P 1 P 2 ); 4. if Claim 1 holds for Q, then it holds for Q. Logic in Computer Science 54
55 Proof of Point 1 Let p i be an atomic formula. We have to show (a) I(p i ) = 1 if p i S n ; (b) I(p i ) = 0 if p i S n. Point (a) follows by definition of I. For Point (b), assume that p i S n. Since S n does not contain a clash, p i S n. Hence, by definition of I, I(p i ) = 0. Logic in Computer Science 55
56 Proof for Point 2 Assume Claim 1 holds for P 1 and P 2. Suppose (P 1 P 2 ) S n. Then, by non-applicability of = to S n, P 1 S n and P 2 S n ; By induction hypothesis, I(P 1 ) = 1 and I(P 2 ) = 1; Hence I(P 1 P 2 ) = 1. Suppose (P 1 P 2 ) S n. Then, by non-applicability of = to S n, P 1 S n or P 2 S n ; By induction hypothesis, I(P 1 ) = 0 or I(P 2 ) = 0; Hence I(P 1 P 2 ) = 0. Logic in Computer Science 56
57 Proof for Point 3 Assume Claim 1 holds for P 1 and P 2. Suppose (P 1 P 2 ) S n. Then, by non-applicability of = to S n, P 1 S n or P 2 S n ; By induction hypothesis, I(P 1 ) = 1 or I(P 2 ) = 1; Hence I(P 1 P 2 ) = 1. Suppose (P 1 P 2 ) S n. Then, by non-applicability of = to S n, P 1 S n and P 2 S n ; By induction hypothesis, I(P 1 ) = 0 and I(P 2 ) = 0; Hence I(P 1 P 2 ) = 0. Logic in Computer Science 57
58 Proof for Point 4 Assume Claim 1 holds for Q. We show Claim 1 for Q. Suppose Q S n. By induction hypothesis, I(Q) = 0. Hence I( Q) = 1. Suppose Q S n. Then, by non-applicability of = to S n, Q S n. By induction hypothesis, I(Q) = 1; Hence I( Q) = 0. Logic in Computer Science 58
59 Completeness of the tableau algorithm Assume that P is satisfiable. We have to construct a complete tableau path {P } = S 0, S 1,..., S n such that S n does not contain a clash. Let I be an interpretation with I(P ) = 1. We construct the tableau path as follows: Let S 0 = {P } and assume that S 0 S 1 S i have already been defined such that I(Q) = 1 for all Q S i. Then S i does not contain a clash. If no completion rule is applicable, then the path is complete and we are done. Now assume that a completion rule is applicable. We show that we can apply the rule in such a way that S i = S i+1 and I(Q) = 1 for all Q S i+1. Logic in Computer Science 59
60 Construction of S i+1 1. If P 1 P 2 S i and = is applicable, then set S i+1 = S i {P 1, P 2 }. Then I(P 1 ) = I(P 2 ) = 1 since I(P 1 P 2 ) = 1. Thus I(Q) = 1 for all Q S i Otherwise, if (P 1 P 2 ) S i and = is applicable, then set S i+1 = S i { P 1, P 2 }. Then I( P 1 ) = I( P 2 ) = 1 since I( (P 1 P 2 )) = 1. Thus I(Q) = 1 for all Q S i Otherwise, if P 1 S i and = is applicable, then set S i+1 = S i {P 1 }. Then I(P 1 ) = 1 since I( P 1 ) = 1. Thus I(Q) = 1 for all Q S i+1. Logic in Computer Science 60
61 Construction of S i+1 1. Otherwise, if (P 1 P 2 ) S i and = is applicable, then I( P 1 ) = 1 or I( P 2 ) = 1 since I( (P 1 P 2 )) = 1. In the first case let S i+1 = S i { P 1 }. In the second case let S i+1 = S i { P 2 }. In both cases I(Q) = 1 for all Q S i Otherwise, if (P 1 P 2 ) S i and = is applicable, then I(P 1 ) = 1 or I(P 2 ) = 1 since I(P 1 P 2 ) = 1. In the first case let S i+1 = S i {P 1 }. In the second case let S i+1 = S i {P 2 }. In both cases I(Q) = 1 for all Q S i+1. Logic in Computer Science 61
62 Modern SAT solvers High performance SAT solvers are not tableau based. They are based on modern versions of the Davis-Putnam-Logemann-Loveland algorithm (DPLL) developed in the 1960s (which is based on a very general proof method called resolution); and on stochastic local search algorithms. Many solvers are available as free and open source software. Logic in Computer Science 62
63 Tautology Definition A tautology is a formula which is true under all interpretations. Example All formulas of the form P P are tautologies, because for all interpretations I: I(P P ) = 1 P P P P Observation: A formula P is a tautology if, and only if, P is not satisfiable. Logic in Computer Science 63
64 Contradiction Definition A contradiction is a formula which is false under all interpretations. Example All formulas of the form P P are tautologies, because for all interpretations I: I(P P ) = 0 P P P P Observation: A formula P is a contradiction if, and only if, P is not satisfiable Logic in Computer Science 64
65 Semantic consequence Definition Suppose X is a finite set of formulas and P is a formula. Then P follows from X (is a semantic consequence of X) if the following holds for every interpretation I: If I(Q) = 1 for all Q X, then I(P ) = 1. This is denoted by X = P. Logic in Computer Science 65
66 Example 1 Show {p 1 p 2 } = p 1 p 2. Solution: p 1 p 2 p 1 p 2 p 1 p The statement follows, because in any row where the column for p 1 p 2 contains 1 the column for p 1 p 2 also contains 1. Logic in Computer Science 66
67 Example 2 Show {p 1 } = p 2. Solution: Take the interpretation I with I(p 1 ) = 1 and I(p 2 ) = 0. Logic in Computer Science 67
68 Example 3 We show that = P if, and only if, P is a tautology. ( ) Assume P is not a tautology. Take interpretation I with I(P ) = 0. Then I(Q) = 1 for all Q, but I(P ) 1, Hence = P. ( ) Assume = P. Take interpretation I with I(Q) = 1 for all Q and I(P ) 1. Then P is not a tautology. Logic in Computer Science 68
69 Example 4 (ex falso quodlibet) We show that {(P P )} = Q holds for all formulas Q. Let Q be arbitrary. There is no interpretation I such that I(P P ) = 1. Thus, if I is an interpretation such that I(P P ) = 1, then I(Q) = 1. Thus {(P P )} = Q. Logic in Computer Science 69
70 Reduction to Satisfiability Recall that we call a finite set S of formulas satisfiable if there exists an interpretation I such that I(Q) = 1 for all Q S. Note that the set S = {Q 1,..., Q n } is satisfiable if, and only if, the formula obtained by taking the conjunction of all Q 1,..., Q n, (Q 1... Q n ), is satisfiable. Observation For every finite set S of formulas and every formula P : S = P if, and only if, S { P } is not satisfiable. Thus, we can use the tableau algorithm to check semantic consequence: to check whether S = P check that S { P } is not satisfiable. Logic in Computer Science 70
71 Example We check {p q} = p q. To this end, we have to show that S 0 = {p q, (p q)} is not satisfiable. We do this using the tableau algorithm: an application of = to S 0 gives S 1 = S 0 {p, q, (p q)} an application of = to S 1 gives S 2 = S 1 { p, q} S 2 contains a clash: {p, p} S 2. Thus, all tableau paths starting with S 0 contain a clash. Hence S 0 is not satisfiable. Logic in Computer Science 71
72 Logical equivalence Definition Two formulas P and Q are called equivalent if they have the same truth value under every possible interpretation. In other words, P and Q are equivalent if I(P ) = I(Q) for every interpretation I. This is denoted by P Q. Observation For any two formulas P and Q: P Q if, and only if, neither (P Q) nor (Q P ) are satisfiable. Thus, we can use the tableau algorithm to check logical equivalence: to check whether P Q check that (P Q) is not satisfiable and (Q P ) is not satisfiable. Logic in Computer Science 72
73 Laws for equivalences The following equivalences can be checked using the tableau algorithm or by truth tables: Associative laws: P (Q R) (P Q) R, P (Q R) (P Q) R Commutative laws: P Q Q P, P Q Q P Logic in Computer Science 73
74 Laws for Equivalence Distributive laws: P (Q R) (P Q) (P R), P (Q R) (P Q) (P R) Complement law: P P De Morgan s laws: (P Q) P Q, (P Q) P Q. Logic in Computer Science 74
75 Proof of {(p (q r))} = ((p q) (p r)) We have to show that S 0 = {(p (q r)), ((p q) (p r))} is not satisfiable. an application of = to S 0 gives S 1 = S 0 {p, (q r)} an application of = to S 1 gives S 2 = S 1 { (p q), (p r)} Logic in Computer Science 75
76 Continue by decomposing (q r) S 2 (1) First option: an application of = to (q r) S 2 gives S 3 = S 2 {q} an application of = to (p q) S 3 gives S 4 contains the clash {p, p}. = S 3 { p} which the other application of = to (p q) S 3 gives S 5 which contains the clash {q, q}. = S 3 { q} Thus, every complete tableau path starting with S 0, S 1, S 2, S 3 contains a clash. Logic in Computer Science 76
77 Continue by decomposing (q r) S 2 (2) Second option: an application of = to (q r) S 2 gives S 6 = S 2 {r}. an application of = to (p r) S 6 gives S 7 contains the clash {p, p}. = S 6 { p} which the other application of = to (p r) S 6 gives S 8 which contains the clash {r, r}. = S 6 { r} Thus, every complete tableau path starting with S 0, S 1, S 2, S 6 contains a clash. We can conclude that all complete tableau paths starting with S 0 contain a clash. Logic in Computer Science 77
78 Conjunctive and disjunctive normal form A formula (P 1 P 2 P n ) is called a disjunction of P 1,..., P n ; Similarly, (P 1 P 2 P n ) is called a conjunction of P 1,..., P n ; A formula which is either an atomic formula or its negation is called a literal; A formula is in conjunctive normal form (CNF) if it is a conjunction of disjunctions of literals. A formula is in disjunctive normal form (DNF) if it is a disjunction of conjunctions of literals. Logic in Computer Science 78
79 Examples p 1, p 1, p 5 are literals. They are also in CNF and in DNF. (p q) is in CNF and in DNF. ((p 1 p 2 ) ( p 1 p 3 )) and ((p 1 p 2 ) p 1 ) are in CNF and not in DNF. ((p 1 p 2 ) ( p 1 p 3 )) and (p (p p)) are in DNF and not in CNF. Logic in Computer Science 79
80 CNF Theorem (1) Every formula is equivalent to a formula in CNF. (2) Every formula is equivalent to a formula in DNF. Proof of (1) Suppose a formula P is given. We transform P to a formula in CNF using the Laws of equivalence: Step 1. Apply De Morgan s laws and Complement law P P until negation ( ) occurs in front of atomic formulas only. Step 2. Apply Distributive law P (Q R) (P Q) (P R) and Commutative laws until the formula is in CNF. Logic in Computer Science 80
81 Example Transform ( (p 0 p 1 ) (p 2 p 1 )) into CNF. ( (p 0 p 1 ) (p 2 p 1 )) is equivalent to (de Morgan s Law) is equivalent to (Distributive law) is equivalent to (Distributive law) is equivalent to (Distributive law) (( p 0 p 1 ) (p 2 p 1 )) ((( p 0 p 1 ) p 2 ) (( p 0 p 1 ) p 1 )) (( p 0 p 2 ) ( p 1 p 2 ) ( p 0 p 1 ) p 1 )) (( p 0 p 2 ) ( p 1 p 2 ) ( p 0 p 1 ) ( p 1 p 1 )). Logic in Computer Science 81
Introduction to Logic in Computer Science: Autumn 2006
Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding
More informationCHAPTER 7 GENERAL PROOF SYSTEMS
CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes
More informationHandout #1: Mathematical Reasoning
Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or
More informationNP-Completeness and Cook s Theorem
NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:
More informationCHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs
CHAPTER 3 Methods of Proofs 1. Logical Arguments and Formal Proofs 1.1. Basic Terminology. An axiom is a statement that is given to be true. A rule of inference is a logical rule that is used to deduce
More informationLikewise, we have contradictions: formulas that can only be false, e.g. (p p).
CHAPTER 4. STATEMENT LOGIC 59 The rightmost column of this truth table contains instances of T and instances of F. Notice that there are no degrees of contingency. If both values are possible, the formula
More informationMathematical Induction
Mathematical Induction In logic, we often want to prove that every member of an infinite set has some feature. E.g., we would like to show: N 1 : is a number 1 : has the feature Φ ( x)(n 1 x! 1 x) How
More informationResolution. Informatics 1 School of Informatics, University of Edinburgh
Resolution In this lecture you will see how to convert the natural proof system of previous lectures into one with fewer operators and only one proof rule. You will see how this proof system can be used
More informationSudoku as a SAT Problem
Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal ines@sat.inesc-id.pt Joël Ouaknine Oxford University Computing Laboratory, UK joel@comlab.ox.ac.uk Abstract Sudoku
More informationCS510 Software Engineering
CS510 Software Engineering Propositional Logic Asst. Prof. Mathias Payer Department of Computer Science Purdue University TA: Scott A. Carr Slides inspired by Xiangyu Zhang http://nebelwelt.net/teaching/15-cs510-se
More informationMathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson
Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement
More informationLogic in general. Inference rules and theorem proving
Logical Agents Knowledge-based agents Logic in general Propositional logic Inference rules and theorem proving First order logic Knowledge-based agents Inference engine Knowledge base Domain-independent
More informationSchedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material
OLC mputational gic Schedule Time and Place Thursday, 8:15 9:45, HS E Logic (master program) Georg Moser Institute of Computer Science @ UIBK week 1 October 2 week 8 November 20 week 2 October 9 week 9
More informationOHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012
276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the
More informationCS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
More informationBeyond Propositional Logic Lukasiewicz s System
Beyond Propositional Logic Lukasiewicz s System Consider the following set of truth tables: 1 0 0 1 # # 1 0 # 1 1 0 # 0 0 0 0 # # 0 # 1 0 # 1 1 1 1 0 1 0 # # 1 # # 1 0 # 1 1 0 # 0 1 1 1 # 1 # 1 Brandon
More informationAlgorithmic Software Verification
Algorithmic Software Verification (LTL Model Checking) Azadeh Farzan What is Verification Anyway? Proving (in a formal way) that program satisfies a specification written in a logical language. Formal
More informationFormal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
More information3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
More informationI. GROUPS: BASIC DEFINITIONS AND EXAMPLES
I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called
More informationSolutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1
Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1 Prof S Bringsjord 0317161200NY Contents I Problems 1 II Solutions 3 Solution to Q1 3 Solutions to Q3 4 Solutions to Q4.(a) (i) 4 Solution to Q4.(a)........................................
More informationTesting LTL Formula Translation into Büchi Automata
Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland
More information6.2 Permutations continued
6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of
More informationdef: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.
Section 1.5 Methods of Proof 1.5.1 1.5 METHODS OF PROOF Some forms of argument ( valid ) never lead from correct statements to an incorrect. Some other forms of argument ( fallacies ) can lead from true
More informationExamination paper for MA0301 Elementær diskret matematikk
Department of Mathematical Sciences Examination paper for MA0301 Elementær diskret matematikk Academic contact during examination: Iris Marjan Smit a, Sverre Olaf Smalø b Phone: a 9285 0781, b 7359 1750
More informationSample Induction Proofs
Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given
More informationGeneral Information and Communication Technology. Second module of this course: Boolean logic. Some elements of computational complexity
General Information and Communication Technology Course Number 322 Jacobs University Bremen Herbert Jaeger Second module of this course: Boolean logic and Some elements of computational complexity Boolean
More information6.080/6.089 GITCS Feb 12, 2008. Lecture 3
6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my
More informationUpdating Action Domain Descriptions
Updating Action Domain Descriptions Thomas Eiter, Esra Erdem, Michael Fink, and Ján Senko Institute of Information Systems, Vienna University of Technology, Vienna, Austria Email: (eiter esra michael jan)@kr.tuwien.ac.at
More informationCSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi
Propositional Logic: logical operators Negation ( ) Conjunction ( ) Disjunction ( ). Exclusive or ( ) Conditional statement ( ) Bi-conditional statement ( ): Let p and q be propositions. The biconditional
More informationUniversity of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees
University of Ostrava Institute for Research and Applications of Fuzzy Modeling Reasoning in Description Logic with Semantic Tableau Binary Trees Alena Lukasová Research report No. 63 2005 Submitted/to
More informationCHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.
CHAPTER 2 Logic 1. Logic Definitions 1.1. Propositions. Definition 1.1.1. A proposition is a declarative sentence that is either true (denoted either T or 1) or false (denoted either F or 0). Notation:
More informationMathematical Induction
Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,
More informationA Working Knowledge of Computational Complexity for an Optimizer
A Working Knowledge of Computational Complexity for an Optimizer ORF 363/COS 323 Instructor: Amir Ali Ahmadi TAs: Y. Chen, G. Hall, J. Ye Fall 2014 1 Why computational complexity? What is computational
More informationCSC 373: Algorithm Design and Analysis Lecture 16
CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements
More information1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)
Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:
More informationBorne inférieure de circuit : une application des expanders
Borne inférieure de circuit : une application des expanders Simone Bova 1 Florent Capelli 2 Friedrich Slivovski 1 Stefan Mengel 3 1 TU Wien, 2 IMJ-PRG, Paris 7, 3 CRIL, Lens 6 Novembre 2015 JGA 2015 Motivation
More informationChapter. NP-Completeness. Contents
Chapter 13 NP-Completeness Contents 13.1 P and NP......................... 593 13.1.1 Defining the Complexity Classes P and NP...594 13.1.2 Some Interesting Problems in NP.......... 597 13.2 NP-Completeness....................
More informationLecture 7: NP-Complete Problems
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit
More informationThe Classes P and NP
The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the
More informationINTRODUCTORY SET THEORY
M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,
More informationChapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
More informationLogic in Computer Science: Logic Gates
Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers
More informationA Propositional Dynamic Logic for CCS Programs
A Propositional Dynamic Logic for CCS Programs Mario R. F. Benevides and L. Menasché Schechter {mario,luis}@cos.ufrj.br Abstract This work presents a Propositional Dynamic Logic in which the programs are
More informationLecture 1: Course overview, circuits, and formulas
Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik
More informationModel Checking II Temporal Logic Model Checking
1/32 Model Checking II Temporal Logic Model Checking Edmund M Clarke, Jr School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 2/32 Temporal Logic Model Checking Specification Language:
More informationGenerating models of a matched formula with a polynomial delay
Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic
More informationReading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
More informationWRITING PROOFS. Christopher Heil Georgia Institute of Technology
WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this
More informationSimilarity and Diagonalization. Similar Matrices
MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that
More informationExtending Semantic Resolution via Automated Model Building: applications
Extending Semantic Resolution via Automated Model Building: applications Ricardo Caferra Nicolas Peltier LIFIA-IMAG L1F1A-IMAG 46, Avenue Felix Viallet 46, Avenue Felix Viallei 38031 Grenoble Cedex FRANCE
More informationLecture 2: Universality
CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal
More informationCSE 135: Introduction to Theory of Computation Decidability and Recognizability
CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing
More information1 Solving LPs: The Simplex Algorithm of George Dantzig
Solving LPs: The Simplex Algorithm of George Dantzig. Simplex Pivoting: Dictionary Format We illustrate a general solution procedure, called the simplex algorithm, by implementing it on a very simple example.
More informationSatisfiability Checking
Satisfiability Checking SAT-Solving Prof. Dr. Erika Ábrahám Theory of Hybrid Systems Informatik 2 WS 10/11 Prof. Dr. Erika Ábrahám - Satisfiability Checking 1 / 40 A basic SAT algorithm Assume the CNF
More information1. Prove that the empty set is a subset of every set.
1. Prove that the empty set is a subset of every set. Basic Topology Written by Men-Gen Tsai email: b89902089@ntu.edu.tw Proof: For any element x of the empty set, x is also an element of every set since
More informationMATH10040 Chapter 2: Prime and relatively prime numbers
MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive
More informationMatrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.
Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that
More informationa 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More informationPredicate Logic. For example, consider the following argument:
Predicate Logic The analysis of compound statements covers key aspects of human reasoning but does not capture many important, and common, instances of reasoning that are also logically valid. For example,
More informationCMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013
CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages
More informationOptimizing Description Logic Subsumption
Topics in Knowledge Representation and Reasoning Optimizing Description Logic Subsumption Maryam Fazel-Zarandi Company Department of Computer Science University of Toronto Outline Introduction Optimization
More informationThe Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
More informationDegrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.
Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets. Logic is the study of reasoning. A language of propositions is fundamental to this study as well as true
More informationFoundational Proof Certificates
An application of proof theory to computer science INRIA-Saclay & LIX, École Polytechnique CUSO Winter School, Proof and Computation 30 January 2013 Can we standardize, communicate, and trust formal proofs?
More informationv w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.
3. Cross product Definition 3.1. Let v and w be two vectors in R 3. The cross product of v and w, denoted v w, is the vector defined as follows: the length of v w is the area of the parallelogram with
More informationTheorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive
Chapter 3 Number Theory 159 3.1 Prime Numbers Prime numbers serve as the basic building blocs in the multiplicative structure of the integers. As you may recall, an integer n greater than one is prime
More informationNOTES ON LINEAR TRANSFORMATIONS
NOTES ON LINEAR TRANSFORMATIONS Definition 1. Let V and W be vector spaces. A function T : V W is a linear transformation from V to W if the following two properties hold. i T v + v = T v + T v for all
More information1 if 1 x 0 1 if 0 x 1
Chapter 3 Continuity In this chapter we begin by defining the fundamental notion of continuity for real valued functions of a single real variable. When trying to decide whether a given function is or
More informationDiscrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2
CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us
More informationFull and Complete Binary Trees
Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full
More informationnpsolver A SAT Based Solver for Optimization Problems
npsolver A SAT Based Solver for Optimization Problems Norbert Manthey and Peter Steinke Knowledge Representation and Reasoning Group Technische Universität Dresden, 01062 Dresden, Germany peter@janeway.inf.tu-dresden.de
More informationNotes on Complexity Theory Last updated: August, 2011. Lecture 1
Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look
More informationHow To Understand The Theory Of Computer Science
Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked
More information(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.
(LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,
More information! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs
,!0((,.+#$),%$(-&.& *,2(-$)%&2.'3&%!&, Logics for Data and Knowledge Representation Alessandro Agostini agostini@dit.unitn.it University of Trento Fausto Giunchiglia fausto@dit.unitn.it The Logic of Descriptions!$%&'()*$#)
More informationINCIDENCE-BETWEENNESS GEOMETRY
INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full
More informationWHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?
WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly
More informationCorrespondence analysis for strong three-valued logic
Correspondence analysis for strong three-valued logic A. Tamminga abstract. I apply Kooi and Tamminga s (2012) idea of correspondence analysis for many-valued logics to strong three-valued logic (K 3 ).
More informationCardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.
Section 2.5 Cardinality (another) Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted A = B, if and only if there is a bijection from A to B. If there is an injection
More informationSystems of Linear Equations
Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and
More informationGraph Theory Problems and Solutions
raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is
More informationCOMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012
Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about
More informationCartesian Products and Relations
Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) :(a A) and (b B)}. The following points are worth special
More informationFundamentele Informatica II
Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear
More informationWe would like to state the following system of natural deduction rules preserving falsity:
A Natural Deduction System Preserving Falsity 1 Wagner de Campos Sanz Dept. of Philosophy/UFG/Brazil sanz@fchf.ufg.br Abstract This paper presents a natural deduction system preserving falsity. This new
More informationComputational Models Lecture 8, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance
More informationBasic Proof Techniques
Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document
More information. 0 1 10 2 100 11 1000 3 20 1 2 3 4 5 6 7 8 9
Introduction The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive integer We say d is a
More informationMath 3000 Section 003 Intro to Abstract Math Homework 2
Math 3000 Section 003 Intro to Abstract Math Homework 2 Department of Mathematical and Statistical Sciences University of Colorado Denver, Spring 2012 Solutions (February 13, 2012) Please note that these
More informationUndergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics
Undergraduate Notes in Mathematics Arkansas Tech University Department of Mathematics An Introductory Single Variable Real Analysis: A Learning Approach through Problem Solving Marcel B. Finan c All Rights
More informationDetermination of the normalization level of database schemas through equivalence classes of attributes
Computer Science Journal of Moldova, vol.17, no.2(50), 2009 Determination of the normalization level of database schemas through equivalence classes of attributes Cotelea Vitalie Abstract In this paper,
More informationThis asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
More informationThis chapter is all about cardinality of sets. At first this looks like a
CHAPTER Cardinality of Sets This chapter is all about cardinality of sets At first this looks like a very simple concept To find the cardinality of a set, just count its elements If A = { a, b, c, d },
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.
MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column
More informationThe Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.
The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,
More information2 Temporal Logic Model Checking
Bounded Model Checking Using Satisfiability Solving Edmund Clarke 1, Armin Biere 2, Richard Raimi 3, and Yunshan Zhu 4 1 Computer Science Department, CMU, 5000 Forbes Avenue Pittsburgh, PA 15213, USA,
More informationBounded Treewidth in Knowledge Representation and Reasoning 1
Bounded Treewidth in Knowledge Representation and Reasoning 1 Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien Luminy, October 2010 1 Joint work with G.
More informationPredicate logic. Logic in computer science. Logic in Computer Science (lecture) PART II. first order logic
PART II. Predicate logic first order logic Logic in computer science Seminar: INGK401-K5; INHK401; INJK401-K4 University of Debrecen, Faculty of Informatics kadek.tamas@inf.unideb.hu 1 / 19 Alphabets Logical
More informationWhich Semantics for Neighbourhood Semantics?
Which Semantics for Neighbourhood Semantics? Carlos Areces INRIA Nancy, Grand Est, France Diego Figueira INRIA, LSV, ENS Cachan, France Abstract In this article we discuss two alternative proposals for
More information