Propositional Calculus

Size: px
Start display at page:

Download "Propositional Calculus"

Transcription

1 Propositional Calculus Proposition is a statement that is either or. Example 1 Propositions: It rains. Sun is shining and my coat is wet. If Ann plays with me, I give her a candy. x > 10 x = 1 and y < 10 Propositional variables are propositions, that is, they can only be assigned either the truth value or the truth value. Propositional constants and are denoted by symbols 1 (or T, standing for ) and 0 (or F, standing for ). Propositions can be denoted by propositional variables, e.g., A: Sun is shining. B: My coat is wet. C: x > 10 Assigning A = 1 (A is ) means that the proposition "Sun is shining" is (the case is that the sun is shining), assigning A = 0 (A is ) means that the proposition "Sun is shining" is (the case is that the sun is not shining). Assigning C = 1 means the case that x is greater than 10, assigning C = 0 means the case that x is not greater than ten, that is, x is less than or equal to 10. We can now state the proposition "Sun is shining and my coat is wet" in a more compact form: "A and B" (in fact, even in a more compact form: A B, using the logical "and" connective ). An atomic proposition is a proposition consisting of only a single propositional variable or a single propositional constant. Nonatomic propositions are called compound propositions, and they contain at least one logical connective. In a truth table we can list the truth values of a proposition under all possible assignments. Example 2 Truth table for the proposition A B: A B A B

2 With logical connectives propositions can be combined to form new propositions (cf., A B, where propositions A and B are combined with the connective ). Logical connectives ~ (negation), (conjunction), (disjunction), fi (conditional), «(biconditional) can be defined by means of truth tables. Notice, that the negation connective operates one proposition, all the other connectives operate with two propositions. Negation ~P can be pronounced "not P" P ~P Conjunction P Q can be pronounced "P and Q" P Q P Q Disjunction P Q can be pronounced "P or Q" P Q P Q Conditional P Q can be pronounced "If P, then Q" P Q P Q Biconditional P Q can be pronounced "P if and only if Q" P Q P Q Example 3 Calculate (i.e., evaluate the truth values of the following logical expressions): ~1 solution: solution: 0 2

3 0 1 solution: solution: solution: 0 Logical arguments, like "Sun is shining and my coat is wet.", can be written with propositional calculus notation with the help of the above pronounciation rules (and common sense). Example 4 Let's analyse the statement "If Ann plays with me, I give her a candy." as a logical argument. We can find two atomic propositions A: Ann plays with me. B: I give her (Ann) a candy. These two propositions can be combined with the "if.. then" connective ( ): A B. To check if this straightforward conversion is correct, we can find the truth table for the original argument and compare it to the truth table of proposition A B: Ann plays with me. (Ann doesn't play with me) (Ann doesn't play with me) (Ann plays with me) (Ann plays with me) I give her a candy. (I don't give her a candy) (I give her a candy) (I don't give her a candy) (I give her a candy) If Ann plays with me, I give her a candy. ( meaning that there is no conflict between the described situation and this argument) (to be strict, there is no conflict, because the argument doesn't say anything about the situation when Ann doesn't play) ( meaning that there is conflict between the described situation and this argument) Compare this to the truth table of A B and see that they are identical. Convert the following logical arguments to propositional calculus notation: 1. I give Ann a candy if and only if Ann plays with me. 2. I don't go to London or I go to London and send Bill a postcard. 3. I'll give you a candy or a doll. 4. I'll give you a candy but not my doll. In programming languages logical expressions may look different, because of the use of other notation than ours. However, the same logic works. For example, the expression True And False in Visual Basic evaluates False and the expression =AND(TRUE; FALSE) in Excel's spreadsheet evaluates FALSE. 3

4 The following table shows corresponding expressions. We suppose that A and B are valid logical expressions (logical or propotional variables, constants, or compound expressions) in the shown context: Propositional calculus notation Visual Basic notation Excel spreadsheet function notation ~A Not A =NOT(A) A B A And B =AND(A;B) A B A Or B =OR(A;B) A B A Imp B A B A Eqv B In many programming languages there is also an "exclusive or" operator (Xor), which is like Or, but "True Xor True" evaluates False. Parentheses are used to show the order of calculation. Example 5 3 * (2 + 5) = 3 * 7 = 21 1 (1 0) = 1 0 = 1 Example 6 Find the truth table for proposition A (A B). A B A B A (A B) = = = = = = 1 1 = = 1 Normally, this is done more simply just by showing the results of each stage: A B A B A (A B) Example 7 Find the truth table for proposition A (B C). A B C B C A (B C) = = = = = = = = = = = = = = = = 1 4

5 Find the truth tables for the following propositions: 5. ~A (A B) 6. A ~(A B) 7. A (A ~A) 8. A (B C) 9. ~(A (B C)) 10. ~A (B C) 11. A (B C) 12. (~A B) ((B A) B) 13. (A B) B 14. Write the above propositions with the Visual Basic notation. 15. Write the above propositions with no conditional or biconditional connectives with the Excel spreadsheet function notation. What is the order of calculation, if parentheses are missing? Precedence order of connectives: ~, ( and ), fi, «Example 8 There is precedence order between arithmetic operators + and *, namely * takes precedence over +. That is, * 3 = 1 + (2 * 3) rather than (1 + 2) * 3. In the same way we use the precedence order of logical connectives: A B C is to be understood as (A B) C, not as A (B C), because takes precedence over. Notice, that there is no precedence order between and. Therefore, for example, expression A B C cannot be understood at all. It is not a proposition! However, in some programming languages there is a fixed order for the "and" and "or" operators, but make sure what it is, or, preferably, use parentheses to avoid errors. We can make use of the following rules, too: P Q R is understood as (P Q) R. P Q R is understood as (P Q) R. ~~P is understood as ~(~P). Example 9 (A C) B C is understood as ((A C) B) C. Show the order of calculation explicitly by inserting all the needed parentheses: 16. A B C 17. ~A B C 18. ~A B A B C 19. A B B 20. B A B 5

6 Remove all the parentheses that are not necessarily needed (the order of calculation should not be changed!): 21. (A (B C)) 22. (~A (B (A B))) C 23. (~A (B (A B))) C 24. ~(A (B (A B))) C 25. ~(A (B (A B))) C 26. (~A (A B)) (A (A B)) 27. (~A (A B)) (A ~(A B)) Equivalent propositions are such that evaluate the same truth values in all cases, whatever the truth values of the propotional variables are. Equivalence is denoted by the symbol. Example 10 Let's prove that ~A (A B) A (A B). A B ~A A B ~A (A B) A (A B) Proposition that is in all cases, is called a tautology. Proposition that is in all cases, is called a contradiction. Example 11 (~A (A B)) (A (A B)) is a tautology. A set of equivalences should be learned by heart, in order to be able to manipulate logical expressions. Useful laws for manipulating expressions: Law P ~P 1 P ~P 0 P 0 P P 1 P P 1 1 P 0 0 P P P P P P ~(~P) P P Q Q P P Q Q P P Q Q P (P Q) R P (Q R) (P Q) R P (Q R) (P Q) R P (Q R) Name Tautology law Contradiction law Identity laws Domination laws Idempotent laws Double-negation law Commutative laws Associative laws 6

7 P (Q R) (P Q) (P R) P (Q R) (P Q) (P R) P (P Q) P P (P Q) P ~(P Q) ~P ~Q ~(P Q) ~P ~Q P Q ~P Q P Q (P Q) (Q P) Distributive laws Absorption laws De Morgan's laws removing conditionals and biconditionals Example 12 Let's simplify the expression ~A (A B) using the above equivalences (laws): ~A (A B) (~A A) B Associative law 1 B Tautology law B 1 Commutative law 1 Domination law It appears that ~A (A B) is a tautology. Let's take another: ~A (A B) (~A A) (~A B) Distributive law 1 (~A B) Tautology law (~A B) 1 Commutative law ~A B Identity law Example 13 A B C ~(A B) C Don't do the following: A B C A ~B C Example 14 A B C ~A (B C) Don't do the following: A B C ~A B C removing conditional Why is this incorrect? removing conditional Why is this incorrect? First, remove all conditionals and biconditionals, then simplify (so that equivalence holds at each stage): 28. ~B A B 29. A ~B B 30. (A ~B B) ((A ~B B) (A C ~B)) 31. ~(~A ~B C) 32. ~(A ~B) A 33. A ~B C 34. A ~B C ~A 35. A B ~A B C 36. A B C ~A ~B 7

8 Simplifying conditional expressions in programming languages is analogous with simplifying propositions. However, sometimes the simplification can be carried out even further, because the following equivalences hold: Not (a < b) a >= b Not (a > b) a <= b Not (a <= b) a > b Not (a >= b) a < b Not (a = b) a <> b Not (a <> b) a = b In many programming languages comparison operators take precedence over logical operators, e.g., Not (a < b) can be written as Not a < b, (x < 10) and (y = 1) can be written as x < 10 and y = 1. Example 15 x > 18 Or Not (x <= 18 Or y = 'John') x > 18 Or (x > 18 And y <> 'John') De Morgan's law x > 18 Absorption law Simplify: 37. Not (x <= 5 Or Not (x > 5 Or y < 3)) 38. Not (x < 5 And y = 1) Or x < Not (x = 1 Or y = 2 Or z = 3) Or (x <> 1 And z <>3) 40. i < 1 Or Not (i < 1 Or y = 1) And i >= 1 And y <> i >= 1 Or Not (i < 1 And x = 2) Or x <> 2 Or (i >= 1 And z = 3) How to construct a logical expression that behaves in a desired way? For example, you wish to construct an expression with three propositional variables A, B, and C, which behaves as shown in the following truth table: A B C? The problem can also be formulated as follows: Find an expression for a truth function f, such that f(0,1,0) = f(1,0,1) = 1 (0 otherwise). One way to do this is by first writing expressions generating one desired -value, and then combining these expressions with the disjunction connective: f(a,b,c) = (~A B ~C) (A ~B C). This technique leads to an expression which is in the disjunctive normal form. 8

9 Another way to do this is by first writing expressions generating one desired value, and then combining these expressions with the conjuction connective: f(a,b,c) = (A B C) (A B ~C) (A ~B ~C) (~A B C) (~A ~B C) (~A ~B ~C). This technique leads to an expression which is in the conjunctive normal form. True or : 42. For any proposition, it is always possible to construct an equivalent proposition which does not contain conditional or biconditional connectives. 43. For any proposition, it is always possible to construct an equivalent proposition which contains only negation and conjunction connectives. 44. For any proposition, it is always possible to construct an equivalent proposition which contains only negation and disjunction connectives. Find an expression for a truth function f, such that 45. f(1,0) = 1 (0 otherwise) 46. f(1,0) = f(0,1) = 1 (0 otherwise) 47. f(0,0) = f(1,1) = f(1,0) = 1 (0 otherwise) 48. f(0,0,1) = f(1,1,0) = f(0,1,1) = 1 (0 otherwise) 49. f(1,1,1) = f(1,1,0) = f(1,0,0) = 0 (1 otherwise) 50. f(0,1,0,1,1,0,1) = f(1,1,0,1,1,1,0) = 1 (0 otherwise) 51. f(0,1,0,1,1,0,1) = f(1,1,0,1,1,1,0) = 0 (1 otherwise) Logical operations can be performed with microchips. Truth values are implemented as electrical currency levels (no currency:, currency: ). In microchip design the following symbols (or correspondents) are used: a b a b a b a b a ~ a AND OR NOT Construct microchip layouts for the following truth functions: 52. f(a,b) = (A B) ~B 53. f(a,b,c) = ((~A B) (~A ~B)) C 54. f(a,b,c) = (A B) ~((A B) C) 55. f(a,b,c,d) = (~A B) (~B C) ~(A B D) 56. f(0,0,1) = f(1,1,0) = f(0,1,1) = 1 (0 otherwise) 9

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,

More information

Boolean Algebra A B A AND B = A*B A B A OR B = A+B

Boolean Algebra A B A AND B = A*B A B A OR B = A+B Boolean Algebra Algebra is the branch of mathematics that deals with variables. Variables represent unknown values and usually can stand for any real number. Because computers use only 2 numbers as we

More information

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions

More information

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus

More information

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics 400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {

More information

Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday)

Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday) Math 55 - Spring 04 - Lecture notes # 1 - Jan 20 (Tuesday) Name, class, URL (www.cs.berkeley.edu/~demmel/ma55) on board Head TA Mike West speaks on bureaucracy Advertise CS 70 (T Th 2-3:30) as an "honors"

More information

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2 2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of

More information

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009 TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009 Recitation #12 Question: Use Prim s algorithm to find a minimum spanning tree for the given weighted graph. Step 1. Start from the

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

CS February 17

CS February 17 Discrete Mathematics CS 26 February 7 Equal Boolean Functions Two Boolean functions F and G of degree n are equal iff for all (x n,..x n ) B, F (x,..x n ) = G (x,..x n ) Example: F(x,y,z) = x(y+z), G(x,y,z)

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): 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

More information

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION 2. BOOLEAN ALGEBRA 2.1 INTRODUCTION In the previous chapter, we introduced binary numbers and binary arithmetic. As you saw in binary arithmetic and in the handling of floating-point numbers, there is

More information

Program Verification & Testing; Review of Propositional Logic

Program Verification & Testing; Review of Propositional Logic 8/24: p.1, solved; 9/20: p.5 Program Verification & Testing; Review of Propositional Logic CS 536: Science of Programming, Fall 2018 A. Why Course guidelines are important. Active learning is the style

More information

Propositional Calculus. Math Foundations of Computer Science

Propositional Calculus. Math Foundations of Computer Science Propositional Calculus Math Foundations of Computer Science Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they can use it to

More information

Summary of Course Coverage

Summary of Course Coverage CS-227, Discrete Structures I Spring 2006 Semester Summary of Course Coverage 1) Propositional Calculus a) Negation (logical NOT) b) Conjunction (logical AND) c) Disjunction (logical inclusive-or) d) Inequalities

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning

More information

STABILITY AND PARADOX IN ALGORITHMIC LOGIC

STABILITY AND PARADOX IN ALGORITHMIC LOGIC STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Information Science 1

Information Science 1 Information Science Boolean Expressions Week College of Information Science and Engineering Ritsumeikan University Topics covered l Terms and concepts from Week 9 l Binary (Boolean) logic History Boolean

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

Logic and Proof course Solutions to exercises from chapter 6

Logic and Proof course Solutions to exercises from chapter 6 Logic and roof course Solutions to exercises from chapter 6 Fairouz Kamareddine 6.1 (a) We prove it as follows: Assume == Q and Q == R and R == S then by Transitivity of == R and R == S. Again, by Transitivity

More information

Lecture 5. Logic I. Statement Logic

Lecture 5. Logic I. Statement Logic Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.

More information

COMP Intro to Logic for Computer Scientists. Lecture 2

COMP Intro to Logic for Computer Scientists. Lecture 2 COMP 1002 Intro to Logic for Computer Scientists Lecture 2 B 5 2 J Language of logic: building blocks Proposition: A sentence that can be true or false. A: It is raining in St. John s right now. B: 2+2=7

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the logic we've been using in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical equivalences.

More information

Introduction to Computer Architecture

Introduction to Computer Architecture Boolean Operators The Boolean operators AND and OR are binary infix operators (that is, they take two arguments, and the operator appears between them.) A AND B D OR E We will form Boolean Functions of

More information

1 Introduction to Logic

1 Introduction to Logic 1 Introduction to Logic Some Vocabulary Logic is the science of discursive reasoning.1 As a science, logic aims to discover general laws that apply to all discursive reasoning. Narrowly specific kinds

More information

BOOLEAN ALGEBRA AND CIRCUITS

BOOLEAN ALGEBRA AND CIRCUITS UNIT 3 Structure BOOLEAN ALGEBRA AND CIRCUITS Boolean Algebra and 3. Introduction 3. Objectives 3.2 Boolean Algebras 3.3 Logic 3.4 Boolean Functions 3.5 Summary 3.6 Solutions/ Answers 3. INTRODUCTION This

More information

Software Engineering Lecture Notes

Software Engineering Lecture Notes Software Engineering Lecture Notes Paul C. Attie August 30, 2013 c Paul C. Attie. All rights reserved. 2 Contents I Hoare Logic 11 1 Propositional Logic 13 1.1 Introduction and Overview..............................

More information

Section 1.1 Logic LOGIC

Section 1.1 Logic LOGIC Section 1.1 Logic 1.1.1 1.1 LOGIC Mathematics is used to predict empirical reality, and is therefore the foundation of engineering. Logic gives precise meaning to mathematical statements. PROPOSITIONS

More information

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F 1 Logical Operations 1.1 And The and operator is a binary operator, denoted as, &,, or sometimes by just concatenating symbols, is true only if both parameters are true. A B A B F T F F F F The expression

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam

More information

Propositional Calculus. Math Foundations of Computer Science

Propositional Calculus. Math Foundations of Computer Science Propositional Calculus Math Foundations of Computer Science Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they can use it to

More information

Propositional Logic:

Propositional Logic: CS2209A 2017 Applied Logic for Computer Science Lecture 2 Propositional Logic: Syntax, semantics, truth table Instructor: Yu Zhen Xie Language of logic: building blocks Proposition: A sentence that can

More information

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction Computer Organization and Levels of Abstraction Announcements Today: PS 7 Lab 8: Sound Lab tonight bring machines and headphones! PA 7 Tomorrow: Lab 9 Friday: PS8 Today (Short) Floating point review Boolean

More information

Solutions to In-Class Problems Week 1, Fri

Solutions to In-Class Problems Week 1, Fri Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Radhika Nagpal Solutions to In-Class Problems Week 1, Fri Problem 1. Translate

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the logic we've been using in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical equivalences.

More information

Relational & Logical Operators

Relational & Logical Operators Relational & Logical Operators ELEC 206 Prof. Siripong Potisuk 1 Objectives Learn how to change the flow of execution of a MATLAB program through some kind of a decision-making process within that program

More information

Answer Key #1 Phil 414 JL Shaheen Fall 2010

Answer Key #1 Phil 414 JL Shaheen Fall 2010 Answer Key #1 Phil 414 JL Shaheen Fall 2010 1. 1.42(a) B is equivalent to B, and so also to C, where C is a DNF formula equivalent to B. (By Prop 1.5, there is such a C.) Negated DNF meets de Morgan s

More information

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

More information

Foundations of Computation

Foundations of Computation Foundations of Computation Second Edition (Version 2.3.2, Summer 2011) Carol Critchlow and David Eck Department of Mathematics and Computer Science Hobart and William Smith Colleges Geneva, New York 14456

More information

LECTURE 2 An Introduction to Boolean Algebra

LECTURE 2 An Introduction to Boolean Algebra IST 210: Boot Camp Ritendra Datta LECTURE 2 An Introduction to Boolean Algebra 2.1. Outline of Lecture Fundamentals Negation, Conjunction, and Disjunction Laws of Boolean Algebra Constructing Truth Tables

More information

III SEMESTER B. A. PHILOSOPHY PHL3B04 - SYMBOLIC LOGIC AND INFORMATICS QUESTION BANK FOR INTERNAL ASSESSMENT. Multiple Choice Questions

III SEMESTER B. A. PHILOSOPHY PHL3B04 - SYMBOLIC LOGIC AND INFORMATICS QUESTION BANK FOR INTERNAL ASSESSMENT. Multiple Choice Questions III SEMESTER B. A. PHILOSOPHY PHL3B04 - SYMBOLIC LOGIC AND INFORMATICS QUESTION BANK FOR INTERNAL ASSESSMENT Multiple Choice Questions MODULE - I 1. In Symbolic logic, do not change their value. a) Variables

More information

Computer Organization and Levels of Abstraction

Computer Organization and Levels of Abstraction Computer Organization and Levels of Abstraction Announcements PS8 Due today PS9 Due July 22 Sound Lab tonight bring machines and headphones! Binary Search Today Review of binary floating point notation

More information

== is a decent equivalence

== is a decent equivalence Table of standard equiences 30/57 372 TABLES FOR PART I Propositional Logic Lecture 2 (Chapter 7) September 9, 2016 Equiences for connectives Commutativity: Associativity: P Q == Q P, (P Q) R == P (Q R),

More information

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

More information

Logic Haskell Exercises

Logic Haskell Exercises Logic Haskell Exercises Young W. Lim 2018-09-15 Sat Young W. Lim Logic Haskell Exercises 2018-09-15 Sat 1 / 36 Outline 1 Based on 2 Logic Using TAMO.hs Young W. Lim Logic Haskell Exercises 2018-09-15 Sat

More information

Mixed Integer Linear Programming

Mixed Integer Linear Programming Mixed Integer Linear Programming Part I Prof. Davide M. Raimondo A linear program.. A linear program.. A linear program.. Does not take into account possible fixed costs related to the acquisition of new

More information

c) the set of students at your school who either are sophomores or are taking discrete mathematics

c) the set of students at your school who either are sophomores or are taking discrete mathematics Exercises Exercises Page 136 1. Let A be the set of students who live within one mile of school and let B be the set of students who walk to classes. Describe the students in each of these sets. a) A B

More information

Chapter 3: Operators, Expressions and Type Conversion

Chapter 3: Operators, Expressions and Type Conversion 101 Chapter 3 Operators, Expressions and Type Conversion Chapter 3: Operators, Expressions and Type Conversion Objectives To use basic arithmetic operators. To use increment and decrement operators. To

More information

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax Scheme Tutorial Introduction Scheme is an imperative language with a functional core. The functional core is based on the lambda calculus. In this chapter only the functional core and some simple I/O is

More information

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012 Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012 1 Digital vs Analog Digital signals are binary; analog

More information

2.1 Sets 2.2 Set Operations

2.1 Sets 2.2 Set Operations CSC2510 Theoretical Foundations of Computer Science 2.1 Sets 2.2 Set Operations Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero or more

More information

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f? 1. Prove: A full m-ary tree with i internal vertices contains n = mi + 1 vertices. 2. For a full m-ary tree with n vertices, i internal vertices, and l leaves, prove: (i) i = (n 1)/m and l = [(m 1)n +

More information

Evaluation of Predicate Calculus By Arve Meisingset, retired research scientist from Telenor Research Oslo Norway

Evaluation of Predicate Calculus By Arve Meisingset, retired research scientist from Telenor Research Oslo Norway Evaluation of Predicate Calculus By Arve Meisingset, retired research scientist from Telenor Research 31.05.2017 Oslo Norway Predicate Calculus is a calculus on the truth-values of predicates. This usage

More information

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson Lecture Notes 15 Number systems and logic CSS 501 - Data Structures and Object-Oriented Programming Professor Clark F. Olson Number systems The use of alternative number systems is important in computer

More information

CS40-S13: Functional Completeness

CS40-S13: Functional Completeness CS40-S13: Functional Completeness Victor Amelkin victor@cs.ucsb.edu April 12, 2013 In class, we have briefly discussed what functional completeness means and how to prove that a certain system (a set)

More information

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline. Review EECS 150 - Components and Design Techniques for Digital Systems Lec 05 Boolean Logic 94-04 David Culler Electrical Engineering and Computer Sciences University of California, Berkeley Design flow

More information

COMP combinational logic 1 Jan. 18, 2016

COMP combinational logic 1 Jan. 18, 2016 In lectures 1 and 2, we looked at representations of numbers. For the case of integers, we saw that we could perform addition of two numbers using a binary representation and using the same algorithm that

More information

Workbook Unit 13: Natural Deduction Proofs (IV)

Workbook Unit 13: Natural Deduction Proofs (IV) Workbook Unit 13: Natural Deduction Proofs (IV) Overview 1 1. The Biconditional Introduction Rule ( Int) 2 2. The Disjunction Elimination Rule ( Elim) 7 3. Reductio ad absurdum arguments: ~Int and ~Elim

More information

Combinational Logic & Circuits

Combinational Logic & Circuits Week-I Combinational Logic & Circuits Spring' 232 - Logic Design Page Overview Binary logic operations and gates Switching algebra Algebraic Minimization Standard forms Karnaugh Map Minimization Other

More information

Geometry Note-Sheet Overview

Geometry Note-Sheet Overview Geometry Note-Sheet Overview 1. Logic a. A mathematical sentence is a sentence that states a fact or contains a complete idea. Open sentence it is blue x+3 Contains variables Cannot assign a truth variable

More information

Fondamenti della Programmazione: Metodi Evoluti. Lezione 5: Invariants and Logic

Fondamenti della Programmazione: Metodi Evoluti. Lezione 5: Invariants and Logic Fondamenti della Programmazione: Metodi Evoluti Prof. Enrico Nardelli Lezione 5: Invariants and Logic versione originale: http://touch.ethz.ch Reminder: contracts Associated with an individual feature:

More information

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction

More information

1.1 - Introduction to Sets

1.1 - Introduction to Sets 1.1 - Introduction to Sets Math 166-502 Blake Boudreaux Department of Mathematics Texas A&M University January 18, 2018 Blake Boudreaux (Texas A&M University) 1.1 - Introduction to Sets January 18, 2018

More information

EE292: Fundamentals of ECE

EE292: Fundamentals of ECE EE292: Fundamentals of ECE Fall 2012 TTh 10:00-11:15 SEB 1242 Lecture 22 121115 http://www.ee.unlv.edu/~b1morris/ee292/ 2 Outline Review Binary Number Representation Binary Arithmetic Combinatorial Logic

More information

Propositional Logic. Andreas Klappenecker

Propositional Logic. Andreas Klappenecker Propositional Logic Andreas Klappenecker Propositions A proposition is a declarative sentence that is either true or false (but not both). Examples: College Station is the capital of the USA. There are

More information

Mathematical Logic Part Two

Mathematical Logic Part Two Mathematical Logic Part Two Recap from Last Time Recap So Far A propositional variable a variable that either true or false. The propositional connectives are as follows: Negation: p Conjunction: p q Djunction:

More information

MTH001 short notes. Interest is the cost of borrowing money.

MTH001 short notes. Interest is the cost of borrowing money. MTH001 short notes What is interest? Interest is the cost of borrowing money. What is simple interest? Simple interest = p * i * n where: p = principal (original amount borrowed or loaned) i = interest

More information

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010 (More) Propositional Logic and an Intro to Predicate Logic CSCI 3202, Fall 2010 Assignments Next week: Guest lectures (Jim Martin and Nikolaus Correll); Read Chapter 9 (but you can skip sections on logic

More information

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture Homework 1 Due Date: Wednesday 11/26/07 - at the beginning of the lecture Problems marked with a [*] are a littlebit harder and count as extra credit. Note 1. For any of the given problems make sure that

More information

Evaluation Trees for Proposition Algebra

Evaluation Trees for Proposition Algebra Evaluation Trees for Proposition Algebra Alban Ponse joined work with Jan A. Bergstra section Theory of Computer Science Informatics Institute, University of Amsterdam https://staff.fnwi.uva.nl/a.ponse/

More information

Standard Boolean Forms

Standard Boolean Forms Standard Boolean Forms In this section, we develop the idea of standard forms of Boolean expressions. In part, these forms are based on some standard Boolean simplification rules. Standard forms are either

More information

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

More information

2 Introduction to operational semantics

2 Introduction to operational semantics 2 Introduction to operational semantics This chapter presents the syntax of a programming language, IMP, a small language of while programs. IMP is called an "imperative" language because program execution

More information

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 Combinational Logic Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke) Last

More information

GC03 Boolean Algebra

GC03 Boolean Algebra Why study? GC3 Boolean Algebra Computers transfer and process binary representations of data. Binary operations are easily represented and manipulated in Boolean algebra! Digital electronics is binary/boolean

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

LECTURE 17. Expressions and Assignment

LECTURE 17. Expressions and Assignment LECTURE 17 Expressions and Assignment EXPRESSION SYNTAX An expression consists of An atomic object, e.g. number or variable. An operator (or function) applied to a collection of operands (or arguments)

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

Introduction to Boolean Algebra

Introduction to Boolean Algebra Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or and ) variables and functions find its use in modern digital computers since they too use two-level systems

More information

boolean.py Documentation

boolean.py Documentation boolean.py Documentation Release 3.2 Sebastian Krämer Apr 13, 2018 Contents 1 User Guide 1 1.1 Introduction............................................... 1 1.2 Installation................................................

More information

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1 CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are

More information

Cambridge International AS & A Level Computer Science

Cambridge International AS & A Level Computer Science Topic Support Guide Cambridge International AS & A Level Computer Science 9608 For examination from 2017 Topic 3.3.2 Boolean algebra Cambridge International Examinations retains the copyright on all its

More information

Introduction to Boolean Algebra

Introduction to Boolean Algebra Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or and ) variables and functions find its use in modern digital computers since they too use two-level systems

More information

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee Sets Mukulika Ghosh Fall 2018 Based on slides by Dr. Hyunyoung Lee Sets Sets A set is an unordered collection of objects, called elements, without duplication. We write a A to denote that a is an element

More information

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems 1. Search trees for the state-space graph given below: We only show the search trees corresponding

More information

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits. COURSE / CODE DIGITAL SYSTEMS FUNDAMENTAL (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) BOOLEAN ALGEBRA Boolean Logic Boolean logic is a complete system for logical operations. It is used in countless

More information

First-Order Predicate Logic. CSCI 5582, Fall 2007

First-Order Predicate Logic. CSCI 5582, Fall 2007 First-Order Predicate Logic CSCI 5582, Fall 2007 What Can t We Do in FOPL? We can t take anything back once we ve asserted it. We can t make statements about relations themselves (e.g., Brother is a commutative

More information

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

Math Week in Review #5. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both. Math 166 Fall 2006 c Heather Ramsey Page 1 Math 166 - Week in Review #5 Sections A.1 and A.2 - Propositions, Connectives, and Truth Tables A proposition, or statement, is a declarative sentence that can

More information

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall c Dr Oksana Shatalov, Fall 2014 1 2. Sets 2.1&2.2: Sets and Subsets. Combining Sets. Set Terminology and Notation DEFINITIONS: Set is well-defined collection of objects. Elements are objects or members

More information

CSC 501 Semantics of Programming Languages

CSC 501 Semantics of Programming Languages CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this

More information

CSE-6490B Assignment #1

CSE-6490B Assignment #1 29 October 2008 CSE-6490B Assignment #1 p. 1 of 5 CSE-6490B Assignment #1 1. Queries in Datalog. Enroll now in Datalog U.! (5 points) Consider the following schema. student(s#, sname, dob, d#) FK (d#)

More information

Chapter 9 Deductive Arguments II Truth-Functional Logic. Tutorial: Truth Tables

Chapter 9 Deductive Arguments II Truth-Functional Logic. Tutorial: Truth Tables Chapter 9 Deductive Arguments II ruth-unctional Logic utorial: ruth ables ruth ables he aim of this tutorial is to help you learn to construct truth tables and use them to test the validity of arguments.

More information

Logic and its Applications

Logic and its Applications Logic and its Applications Edmund Burke and Eric Foxley PRENTICE HALL London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Contents Preface xiii Propositional logic 1 1.1 Informal introduction

More information

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry Interpretations and Models Chapter 2.1-2.4 - Axiomatic Systems and Incidence Geometry Axiomatic Systems in Mathematics The gold standard for rigor in an area of mathematics Not fully achieved in most areas

More information

Computer Science. Unit-4: Introduction to Boolean Algebra

Computer Science. Unit-4: Introduction to Boolean Algebra Unit-4: Introduction to Boolean Algebra Learning Objective At the end of the chapter students will: Learn Fundamental concepts and basic laws of Boolean algebra. Learn about Boolean expression and will

More information

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Functions and Expressions CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and

More information

Sets. {1, 2, 3, Calvin}.

Sets. {1, 2, 3, Calvin}. ets 2-24-2007 Roughly speaking, a set is a collection of objects. he objects are called the members or the elements of the set. et theory is the basis for mathematics, and there are a number of axiom systems

More information