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

Size: px
Start display at page:

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

Transcription

1 Chapter 9 Deductive Arguments II ruth-unctional Logic utorial: ruth ables

2 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. 2

3 ruth tables often seem complex and difficult. his initial perception, however, is misleading. By following a consistent, step-by-step process, constructing truth tables will soon become second nature. he practice it does take to gain this skill is worth the effort for at least two reasons: 1. ruth tables are powerful and let you test the validity of arguments with certainty. 2. he skills involved in constructing truth tables are foundational for more sophisticated sorts of symbolic logic. 3

4 Before we begin, it is important to take a minute to think about what truth tables are and what their purpose is. Like Venn diagrams, truth tables are a way of representing an argument symbolically for the purpose of determining the argument s validity or invalidity. Validity, we recall, refers to a deductive argument whose true premises guarantee the truth of its conclusion. In contrast, an invalid argument is one where the truth of the premises do not guarantee the truth of the conclusion. ruth tables, then, offer a systematic way to investigate these relationships and determine validity or invalidity. 4

5 irst things first. As with Venn diagrams, truth tables require an argument to be translated into a form using claim variables for the claims. Each claim variable stands for a complete sentence. Each claim variable has a truth value; that is, it is either true or false. P his is a truth table. As you can see it shows the possible truth values of the claim P. 5

6 Next, realize that whatever truth value a claim has, its negation (contradictory claim) has the opposite truth value. P ~P We use the ~ to represent the negation and pronounce this truth function symbol as not. his truth table is the definition of negation. So, if P is true then not P is false and if P is false then not P is true. 6

7 Let s look at the remaining truth function symbols. hey each represent the relationship between two claims. A conjunction is a compound claim asserting both of the simpler claims contained in it. A conjunction is true if and only if both of the simpler claims are true. P & Q his is a conjunction using the & symbol. It is pronounced P and Q. 7

8 So, what would a truth table for a conjunction look like? Remember it must show all the possible combinations of truth values of its claims. his table must contain 4 lines because it needs to show all possible combinations of truth values of P and Q. P rue and Q rue P rue and Q alse P alse and Q rue P alse and Q alse P Q P&Q???? 8

9 Now, look at the third column. he lines below P and Q show the truth values of this conjunction based on the truth values of its parts. Since a conjunction is only true when both its parts are true we can see how the lines are assigned values. P Q P&Q Study this table carefully. Make sure you understand what the purpose of each part is and what it tells you. It is essential that you understand these basics in order to use truth tables to test validity. 9

10 A disjunction is a compound claim asserting either or both of the simpler claims contained in it. A disjunction is false if and only if both of the simpler claims are false. P v Q his is a disjunction using the v symbol. It is pronounced P or Q. P Q P v Q his truth table represents the rule of disjunction. As you can see, the only way P or Q is false is the case where both P is false and Q is false. 10

11 A conditional is a compound claim asserting the second simpler claim on the condition that the first is true. A conditional is false if and only if the first claim is true and the second false. P _ Q P Q P _ Q his is a conditional using the _ symbol. It is pronounced if P then Q. his truth table represents the conditional. As you can see, the only way if P then Q is false is the case where P is true and Q is false. 11

12 We are now ready to look at truth tables themselves. When constructing truth tables, keep the following three rules in mind: 1. Use parentheses, as in algebra, to represent where the truth function operation is doing its work. 2. he table must capture all possible combinations of truth values for individual sentences contained in the complex expression. 3. he table must contain columns for the parts of the final complex expression, if any of those parts is not a single claim variable. 12

13 Now, use a truth table to determine the validity or invalidity of this argument: If building the bookshelf requires a screwdriver then I will not be able to build it. After reading the directions I see that a screwdriver is needed. So, I can t build it. irst, translate this argument into standard form Now into symbols S _ ~B S _ ~B If S then not B S _ Not B 13

14 S _ ~B S _ ~B Now, build a truth table. We have two claim variables, S and ~B which will each need a column. Next, we need a column for each premise and the conclusion. he second premise is already represented, so we only need to add the first premise to our table. S ~B S _ ~B ~B 14

15 S _ ~B S _ ~B Now, fill in the truth values for the first premise based on the rule of the conditional. or convenience we can add columns for the second premise and the conclusion, though they are already in the table. S ~B S _ ~B S We re done. Our truth table now tells us whether or not the argument is valid. What do you think? ~B 15

16 S _ ~B S _ ~B o use the table to test the validity of our argument, we need to concentrate on the definition of validity. An argument is valid if it is impossible for the premises to be true and the conclusion to be false. Since our truth table represents all possible combinations of the truth values of the parts of the argument, we simply S ~B S _ ~B need to inspect it to see if any line shows true premises and a false conclusion. As you can see, there are no such lines; this is a valid argument. When the premises are true so is the conclusion. S ~B 16

17 Now, use a truth table to determine the validity or invalidity of this argument: Martin is not buying a new car, since he said he would buy a new car or take a Hawaiian vacation and I just heard him talking about his trip to Maui. C or H irst, translate this argument H _ into standard form Not C C v H Now into symbols H _ ~ C 17

18 C v H H ~ C _ Now, build a truth table. We have two claim variables, C and H which will each need a column. Next, we need a column for each premise and the conclusion. he second premise is already represented, so we only need to add the first premise to our table. C H C v H ~C 18

19 C v H H _ Now, fill in the truth values for the first premise based on the rule of disjunction. ~ C or convenience we add columns for the second premise, though it is already in the table. We merely recopy the H column and determine the truth values of the conclusion ~ C column by negating the C. C H C v H H ~C We re done. Our truth table now tells us whether or not the argument is valid. What do you think? 19

20 C v H H ~ C _ C H C v H H ~C When you inspect the truth table you want to see if it is possible for the premises to be true and the conclusion false. Note the red shaded line. It is possible for the premises to be true and the conclusion false. his is an invalid argument. 20

21 Now, use a truth table to determine the validity or invalidity of this argument: If you want to over-clock your processor you must make both hardware and software changes. Unfortunately, you are either ignorant of hardware or software. So, you won t be over-clocking your processor. irst, translate this argument into standard form Now into symbols O _ (H & S) ~H v ~S _ ~ O If O then H and S Not H or Not S _ Not O 21

22 O _ (H & S) ~H v ~S _ ~ O O H S Now, build a truth table. We have three claim variables, O, H, and S, which will each need a column. With three variables we will need 8 lines to show all possible true value combinations. Note the S column alternates one true and one false all the way down, the H line alternates pairs of trues and falses and the O line alternates four trues with four falses. If we had another column it would alternate eight trues with eight falses. Now add columns for the premises. 22

23 O _ (H & S) ~H v ~S _ ~ O Next we add a column for H & S by applying the rule of conjunction to the H and S truth values we have already drawn. We need columns for ~H and ~S ; we get these truth values by negating H and S. O H S ~H ~S H & S 23

24 O _ (H & S) ~H v ~S _ ~ O O H S Now add a column for the first premise by applying the rule of the conditional to the O and H&S values in the table. ~H ~S H & S O _ (H&S) 24

25 O _ (H & S) ~H v ~S _ ~ O O H S Now add a column for the second premise by applying the rule of disjunction to the ~H and ~S values in the table. ~H ~S H & S O _ (H&S) ~H v ~S 25

26 O _ (H & S) ~H v ~S _ ~ O O H S ~H ~S Now add a column for the conclusion by negating the O column, and determine the validity or invalidity. H & S O _ (H&S) ~H v ~S ~ O 26

27 O _ (H & S) ~H v ~S _ ~ O O H S here are no cases where the premises are true and the conclusion false; this is a valid argument. ~H ~S H & S O _ (H&S) ~H v ~S ~ O 27

28 Obviously there are more complex arguments than the ones addressed in this tutorial. However, if you are systematic in applying the rules, the complexity is irrelevant. 28

1. Logic as a subject matter is the study of logics, understood as models of acceptable inference patterns

1. Logic as a subject matter is the study of logics, understood as models of acceptable inference patterns Lecture 9: Propositional Logic I Philosophy 130 23 & 28 October 2014 O Rourke I. Administrative A. Problem sets due Thursday, 30 October B. Midterm course evaluations C. Questions? II. Logic and Form A.

More information

A Brief Introduction to Truth-Table Logic. Kent Slinker Pima Community College

A Brief Introduction to Truth-Table Logic. Kent Slinker Pima Community College ` A Brief Introduction to ruth-able Logic Kent Slinker Pima Community College Earlier in this class, we learned that all arguments are either valid or invalid. Additionally, we learned that certain valid

More information

Logical Connectives. All kittens are cute. ; I like pizza. ; The sky is blue. ; Triangles have three sides.

Logical Connectives. All kittens are cute. ; I like pizza. ; The sky is blue. ; Triangles have three sides. Logical Connectives We have learned what a statement is. Recall that a statement is just a proposition that asserts something that is either true or false. For instance, these are propositions: All kittens

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

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

Truth Functional Properties on Truth Trees

Truth Functional Properties on Truth Trees Truth Functional Properties on Truth Trees Truth-functional: Truth Falsity Indeterminacy Entailment Validity Equivalence Consistency A set of sentences of SL is truth-functionally consistent if and only

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

My dear students, Believe in yourselves. Believe in your abilities. You can DO this! -Dr. M

My dear students, Believe in yourselves. Believe in your abilities. You can DO this! -Dr. M 1/29 2/22 3/12 4/8 5/9 6/20 otal/100 Please do not write in the spaces above. Directions: You have 50 minutes in which to complete this exam. You must show all work, or risk losing credit. Be sure to answer

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

Propositional Logic. Part I

Propositional Logic. Part I Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.

More information

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

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

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

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

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

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

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

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

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

Strategy. 1. You must do an internal needs analysis before looking at software or creating an ITT

Strategy. 1. You must do an internal needs analysis before looking at software or creating an ITT Strategy 1. You must do an internal needs analysis before looking at software or creating an ITT It is very easy to jump straight in and look at database software before considering what your requirements

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

Grade 7/8 Math Circles Fall November 6/7/8 Boolean Logic

Grade 7/8 Math Circles Fall November 6/7/8 Boolean Logic Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Fall 28 - November 6/7/8 Boolean Logic Logic is everywhere in our daily lives. We

More information

Part II Composition of Functions

Part II Composition of Functions Part II Composition of Functions The big idea in this part of the book is deceptively simple. It s that we can take the value returned by one function and use it as an argument to another function. By

More information

THE FOUNDATIONS OF MATHEMATICS

THE FOUNDATIONS OF MATHEMATICS THE FOUNDATIONS OF MATHEMATICS By: Sterling McKay APRIL 21, 2014 LONE STAR - MONTGOMERY Mentor: William R. Brown, MBA Mckay 1 In mathematics, truth is arguably the most essential of its components. Suppose

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

Simplifying Logical Formulas

Simplifying Logical Formulas Simplifying Logical Formulas Assume we have a SCHEME logical expression involving the operators and, or, not, and the truth constants #t and (). Example: (and a (not b) (or b c) (not (and c (not d))) #t

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

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement

More information

(Refer Slide Time 5:19)

(Refer Slide Time 5:19) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture - 7 Logic Minimization using Karnaugh Maps In the last lecture we introduced

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

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

Flow Control. So Far: Writing simple statements that get executed one after another.

Flow Control. So Far: Writing simple statements that get executed one after another. Flow Control So Far: Writing simple statements that get executed one after another. Flow Control So Far: Writing simple statements that get executed one after another. Flow control allows the programmer

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

ISTOCKPHOTO. 18 BETTER SOFTWARE OCTOBER 2007

ISTOCKPHOTO. 18 BETTER SOFTWARE OCTOBER 2007 ISTOCKPHOTO 18 BETTER SOFTWARE OCTOBER 2007 www.stickyminds.com www.stickyminds.com OCTOBER OCTOBER 2007 BETTER SOFTWARE 19 I remember the first time I heard the phrase orthogonal arrays it was in 2000

More information

Thomas Jefferson High School for Science and Technology Program of Studies TJ Math 1

Thomas Jefferson High School for Science and Technology Program of Studies TJ Math 1 Course Description: This course is designed for students who have successfully completed the standards for Honors Algebra I. Students will study geometric topics in depth, with a focus on building critical

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

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th COMS 1003 Fall 2005 Introduction to Computer Programming in C Bits, Boolean Logic & Discrete Math September 13 th Hello World! Logistics See the website: http://www.cs.columbia.edu/~locasto/ Course Web

More information

Grade 7/8 Math Circles Fall November 6/7/8 Boolean Logic

Grade 7/8 Math Circles Fall November 6/7/8 Boolean Logic Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Fall 28 - November 6/7/8 Boolean Logic Logic is everywhere in our daily lives. We

More information

Set and Set Operations

Set and Set Operations Set and Set Operations Introduction A set is a collection of objects. The objects in a set are called elements of the set. A well defined set is a set in which we know for sure if an element belongs to

More information

G.CO.C.9: Compound Statements

G.CO.C.9: Compound Statements Regents Exam Questions G.CO.C.9: Compound Statements www.jmap.org Name: G.CO.C.9: Compound Statements 1 The statement "x is a multiple of 3, and x is an even integer" is true when x is equal to 1) 9 2)

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

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989

P Is Not Equal to NP. ScholarlyCommons. University of Pennsylvania. Jon Freeman University of Pennsylvania. October 1989 University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science October 1989 P Is Not Equal to NP Jon Freeman University of Pennsylvania Follow this and

More information

(Refer Slide Time: 1:43)

(Refer Slide Time: 1:43) (Refer Slide Time: 1:43) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture - 27 Pattern Detector So, we talked about Moore

More information

(iv) The square root of an integer is a rational number. (viii) There is an infinite number of natural numbers.

(iv) The square root of an integer is a rational number. (viii) There is an infinite number of natural numbers. A statement is a sentence that is either always true or always false. Examples 2 ` 2 4. Suppose x 2 2. henx is not an integer. All cats are gray. I have a gray cat. Non-examples x is an odd number. Let

More information

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true. You can t prove a predicate is true because a predicate is not an assertion, you can t prove it is valid as it is not a deduction! If someone asks you to prove P(x), it is not totally clear what they mean.

More information

Propositional logic (Ch. 7)

Propositional logic (Ch. 7) Propositional logic (Ch. 7) Announcements Writing 3 due Sunday - ideally use for project - if you haven't decided project by then, you will have to redo this work Logic: definitions We say that two sentences

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

Lecture 20: Satisfiability Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Lecture 20: Satisfiability Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY Lecture 20: Satisfiability Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Problem of the Day Suppose we are given

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

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

Induction and Semantics in Dafny

Induction and Semantics in Dafny 15-414 Lecture 11 1 Instructor: Matt Fredrikson Induction and Semantics in Dafny TA: Ryan Wagner Encoding the syntax of Imp Recall the abstract syntax of Imp: a AExp ::= n Z x Var a 1 + a 2 b BExp ::=

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

2.4. You are constantly bombarded with information through magazines, newspapers, What's Your Proof? Angle Postulates and Theorems.

2.4. You are constantly bombarded with information through magazines, newspapers, What's Your Proof? Angle Postulates and Theorems. What's Your Proof? Angle Postulates and Theorems.4 Learning Goals Key Terms In this lesson, you will: Use the Corresponding Angle Postulate. Prove the Alternate Interior Angle Theorem. Prove the Alternate

More information

COP 2000 Introduction to Computer Programming Mid-Term Exam Review

COP 2000 Introduction to Computer Programming Mid-Term Exam Review he exam format will be different from the online quizzes. It will be written on the test paper with questions similar to those shown on the following pages. he exam will be closed book, but students can

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

(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

Propositional Calculus

Propositional Calculus 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

More information

Section 1.1 Patterns in Division

Section 1.1 Patterns in Division Section 1.1 Patterns in Division Divisibility refers to whether or not a number is divisible by another number. If a number divides evenly into another number (no remainder), then it is divisible by that

More information

7. Relational Calculus (Part I) 7.1 Introduction

7. Relational Calculus (Part I) 7.1 Introduction 7. Relational Calculus (Part I) 7.1 Introduction We established earlier the fundamental role of relational algebra and calculus in relational databases (see 5.1). More specifically, relational calculus

More information

PIC 10A Flow control. Ernest Ryu UCLA Mathematics

PIC 10A Flow control. Ernest Ryu UCLA Mathematics PIC 10A Flow control Ernest Ryu UCLA Mathematics If statement An if statement conditionally executes a block of code. # include < iostream > using namespace std ; int main () { double d1; cin >> d1; if

More information

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop

AXIOMS OF AN IMPERATIVE LANGUAGE PARTIAL CORRECTNESS WEAK AND STRONG CONDITIONS. THE AXIOM FOR nop AXIOMS OF AN IMPERATIVE LANGUAGE We will use the same language, with the same abstract syntax that we used for operational semantics. However, we will only be concerned with the commands, since the language

More information

Trombone players produce different pitches partly by varying the length of a tube.

Trombone players produce different pitches partly by varying the length of a tube. Trombone players produce different pitches partly by varying the length of a tube. 7 Variables A variable is a connection between a name and a value.* That sounds simple enough, but some complexities arise

More information

Logical statements and. Lecture 1 ICOM 4075

Logical statements and. Lecture 1 ICOM 4075 Logical statements and operations Lecture 1 ICOM 4075 What is a statement? By a statementwe understand a sentence that affirms or denies the validity of a property or concept Examples: The color white

More information

9. MATHEMATICIANS ARE FOND OF COLLECTIONS

9. MATHEMATICIANS ARE FOND OF COLLECTIONS get the complete book: http://wwwonemathematicalcatorg/getfulltextfullbookhtm 9 MATHEMATICIANS ARE FOND OF COLLECTIONS collections Collections are extremely important in life: when we group together objects

More information

2SAT Andreas Klappenecker

2SAT Andreas Klappenecker 2SAT Andreas Klappenecker The Problem Can we make the following boolean formula true? ( x y) ( y z) (z y)! Terminology A boolean variable is a variable that can be assigned the values true (T) or false

More information

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely

Practice Final. Read all the problems first before start working on any of them, so you can manage your time wisely PRINT your name here: Practice Final Print your name immediately on the cover page, as well as each page of the exam, in the space provided. Each time you are caught working on a page without your name

More information

Please try all of the TRY THIS problems throughout this document. When done, do the following:

Please try all of the TRY THIS problems throughout this document. When done, do the following: AP Computer Science Summer Assignment Dr. Rabadi-Room 1315 New Rochelle High School nrabadi@nredlearn.org One great resource for any course is YouTube. Please watch videos to help you with any of the summer

More information

Class 8 - September 13 Indirect Truth Tables for Invalidity and Inconsistency ( 6.5)

Class 8 - September 13 Indirect Truth Tables for Invalidity and Inconsistency ( 6.5) Philosophy 240: Symbolic Logic Fall 2010 Mondays, Wednesdays, Fridays: 9am - 9:50am Hamilton College Russell Marcus rmarcus1@hamilton.edu Class 8 - September 13 Indirect Truth Tables for Invalidity and

More information

Please consider the environment before printing this tutorial. Printing is usually a waste.

Please consider the environment before printing this tutorial. Printing is usually a waste. Ortiz 1 ESCI 1101 Excel Tutorial Fall 2011 Please consider the environment before printing this tutorial. Printing is usually a waste. Many times when doing research, the graphical representation of analyzed

More information

PHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points):

PHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points): Section I True / False questions (2 points each) 1. TRUE Any argument that is sound is also valid. 2. FALSE_ If the premises of an argument are all true, then that argument is sound. 3. TRUE Every universal

More information

(Provisional) Lecture 08: List recursion and recursive diagrams 10:00 AM, Sep 22, 2017

(Provisional) Lecture 08: List recursion and recursive diagrams 10:00 AM, Sep 22, 2017 Integrated Introduction to Computer Science Hughes (Provisional) Lecture 08: List recursion and recursive diagrams 10:00 AM, Sep 22, 2017 Contents 1 Announcements 1 2 Evaluation Correction 1 3 Lists 2

More information

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT 20170926 CNF-SAT: CNF-SAT is a problem in NP, defined as follows: Let E be a Boolean expression with m clauses and n literals (literals = variables, possibly negated), in which - each clause contains only

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #17 Loops: Break Statement (Refer Slide Time: 00:07) In this session we will see one more feature that is present

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

Bits, Words, and Integers

Bits, Words, and Integers Computer Science 52 Bits, Words, and Integers Spring Semester, 2017 In this document, we look at how bits are organized into meaningful data. In particular, we will see the details of how integers are

More information

Week - 01 Lecture - 03 Euclid's Algorithm for gcd. Let us continue with our running example of gcd to explore more issues involved with program.

Week - 01 Lecture - 03 Euclid's Algorithm for gcd. Let us continue with our running example of gcd to explore more issues involved with program. Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 03 Euclid's Algorithm

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

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

Basic Structure of Denotational Definitions

Basic Structure of Denotational Definitions asic Structure of Denotational Definitions This chapter presents the format for denotational definitions. We use the abstract syntax and semantic algebra formats to define the appearance and the meaning

More information

Computational Expression

Computational Expression Computational Expression Conditionals Janyl Jumadinova 10 October, 2018 Janyl Jumadinova Computational Expression 10 October, 2018 1 / 16 Computational Thinking: a problem solving process Decomposition

More information

A set, collection, group, or configuration containing members regarded as having certain attributes or traits in common.

A set, collection, group, or configuration containing members regarded as having certain attributes or traits in common. Chapter 6 Class Action In Chapter 1, we explained that Java uses the word class to refer to A set, collection, group, or configuration containing members regarded as having certain attributes or traits

More information

, ->, and <-> just as atomic sentence letter (which we can still

, ->, and <-> just as atomic sentence letter (which we can still Chapter 1. INTRODUCTION TO PREDICATE LOGIC NOTES In predicate logic we study the logical form INSIDE atomic (shortest) sentences. To say: ''Adam is blond." is to attribute the property of being blond to

More information

MITOCW watch?v=hverxup4cfg

MITOCW watch?v=hverxup4cfg MITOCW watch?v=hverxup4cfg PROFESSOR: We've briefly looked at graph isomorphism in the context of digraphs. And it comes up in even more fundamental way really for simple graphs where the definition is

More information

Lecture 3: Linear Classification

Lecture 3: Linear Classification Lecture 3: Linear Classification Roger Grosse 1 Introduction Last week, we saw an example of a learning task called regression. There, the goal was to predict a scalar-valued target from a set of features.

More information

Department: Course: Chapter 1

Department: Course: Chapter 1 Department: Course: 2016-2017 Term, Phrase, or Expression Simple Definition Chapter 1 Comprehension Support Point Line plane collinear coplanar A location in space. It does not have a size or shape The

More information

STUDENT LESSON A14 Boolean Algebra and Loop Boundaries

STUDENT LESSON A14 Boolean Algebra and Loop Boundaries STUDENT LESSON A14 Boolean Algebra and Loop Boundaries Java Curriculum for AP Computer Science, Student Lesson A14 1 STUDENT LESSON A14 Boolean Algebra and Loop Boundaries INTRODUCTION: Conditional loops

More information

Testing for Truth TEACHER NOTES. About the Lesson. Vocabulary. Teacher Preparation and Notes. Activity Materials

Testing for Truth TEACHER NOTES. About the Lesson. Vocabulary. Teacher Preparation and Notes. Activity Materials About the Lesson In this activity, students will identify whether points lie within a shaded region that is bounded by linear inequalities. he focus is on testing the points for truth in the inequality.

More information

Introduction to Structural Operational Semantics

Introduction to Structural Operational Semantics Introduction to Structural Operational Semantics Patricia ILL School of Computing University of Leeds United Kingdom Roberto ANARA Department of Mathematics University of Parma Italy Copyright c 200 Patricia

More information

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences.

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences. Quantification In this and subsequent chapters, we will develop a more formal system of dealing with categorical statements, one that will be much more flexible than traditional logic, allow a deeper analysis

More information

Back to the knights and knaves island

Back to the knights and knaves island Back to the knights and knaves island During your Thanksgiving trip, you found another island with knights and knaves (you have a feeling that you may encounter many such islands this semester). Knights

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

6.001 Notes: Section 1.1

6.001 Notes: Section 1.1 6.001 Notes: Section 1.1 Slide 1.1.1 This first thing we need to do is discuss the focus of 6.001. What is this course all about? This seems quite obvious -- this is a course about computer science. But

More information

Control structures: if

Control structures: if Control structures: if Like a recipe tells the cook what to do, a program tells the computer what to do; in imperative languages like Java, lines in the program are imperative statements and you can imagine

More information

Fundamental Concepts. Chapter 1

Fundamental Concepts. Chapter 1 Chapter 1 Fundamental Concepts This book is about the mathematical foundations of programming, with a special attention on computing with infinite objects. How can mathematics help in programming? There

More information

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55. 1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)

More information

Chapter 5 Selection Statements. Mr. Dave Clausen La Cañada High School

Chapter 5 Selection Statements. Mr. Dave Clausen La Cañada High School Chapter 5 Selection Statements Mr. Dave Clausen La Cañada High School Objectives Construct and evaluate Boolean expressions Understand how to use selection statements to make decisions Design and test

More information

CPSC 121: Models of Computation

CPSC 121: Models of Computation CPSC 121: Models of Computation Unit 1 Propositional Logic Based on slides by Patrice Belleville and Steve Wolfman Last Updated: 2017-09-09 12:04 AM Pre Lecture Learning Goals By the start of the class,

More information

Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur. Lecture 13 Path Testing

Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur. Lecture 13 Path Testing Software Testing Prof. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture 13 Path Testing Welcome to this session and we will discuss about path

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

(Refer Slide Time: 00:01:30)

(Refer Slide Time: 00:01:30) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture - 32 Design using Programmable Logic Devices (Refer Slide Time: 00:01:30)

More information