Introduction to Discrete Mathematics Lecture 1: Sep 6 AB C a = qb+r gcd(a,b) = gcd(b,r)

Slides:



Advertisements
Similar presentations
Constructing a Truth Table
Advertisements

Logic & Critical Reasoning
Propositional Logic Lecture 10: Oct 29.
Introduction to Theorem Proving
CSE 311: Foundations of Computing Fall 2013 Lecture 3: Logic and Boolean algebra.
Tutorial 1: Logic Peter Poon. Self Introduction You can call me Peter Office: SHB117 Office hour:
Logic ChAPTER 3 1. Truth Tables and Validity of Arguments
2/17/2008Sultan Almuhammadi1 ICS Logic & Sets (An Overview) Week 1.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
EE1J2 – Discrete Maths Lecture 5
Introduction to Discrete Mathematics Lecture 1: Sep 7 AB C a = qb+r gcd(a,b) = gcd(b,r)
Propositional Logic Lecture 1: Sep 2. Content 1.Mathematical proof (what and why) 2.Logic, basic operators 3.Using simple operators to construct any operator.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Chapter 3 Introduction to Logic © 2008 Pearson Addison-Wesley. All rights reserved.
Introduction to Discrete Mathematics
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
3.2 – Truth Tables and Equivalent Statements
Logic ChAPTER 3.
CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)
Chapter 2 Midterm Review
Intro to Discrete Structures
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
Intro. to Logic CS402 Fall Propositional Calculus - Semantics (2/3) Propositional Calculus - Semantics (2/3) Moonzoo Kim CS Division of EECS Dept.
MATH 224 – Discrete Mathematics
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
INTRODUCTION TO Euclid’s geometry The origins of geometry.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Boolean Algebra. Logical Statements A proposition that may or may not be true:  Today is Monday  Today is Sunday  It is raining.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
Boolean Algebra Monday/Wednesday 7th Week. Logical Statements Today is Friday AND it is sunny. Today is Friday AND it is rainy. Today is Monday OR it.
CS203 Discrete Mathematical Structures
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Outline Logic Propositional Logic Well formed formula Truth table
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
 2012 Pearson Education, Inc. Slide Chapter 3 Introduction to Logic.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
 You will be able to use theorems and definitions to find the measures of angles.  You will be able to use theorems and definitions to write a formal.
Assign Yourself and Do Now Thursday, January 10, 2013.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Chapter 1 Logic and proofs
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Logic.
Propositional Logic.
The Foundations: Logic and Proofs
Lecture 1 – Formal Logic.
COMP 1380 Discrete Structures I Thompson Rivers University
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Propositional Calculus: Boolean Algebra and Simplification
Propositional Equivalences
Information Technology Department
Introduction to Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Introduction to Discrete Mathematics Lecture 1: Sep 6 AB C a = qb+r gcd(a,b) = gcd(b,r)

Checker x=0 Start with any configuration with all circles on or below the x-axis.

Checker x=0 Move: jump through your adjacent neighbour, but then your neighbour will disappear.

Checker x=0 Move: jump through your adjacent neighbour, but then your neighbour will disappear.

Checker x=0 Goal: Find an initial configuration with least number of circles to jump up to level k.

K=1 x=0 2 circles to reach level 1.

K=2 x=0

K=2 x=0 4 circles to reach level 2. Now we have reduced to the k=1 configuration, but one level higher.

K=3 x=0 This is the configuration for k=2, so jump two level higher.

K=3 x=0 8 circles to reach level 3.

K=4 x=0

K=4 x=0

K=4 x=0

K=4 x=0

K=4 x=0 Now we have reduced to the k=3 configuration, but one level higher 20 circles (not 16) to reach level 4!

K=5? a.39 or below b circles c circles d circles e.101 – 1000 circles f.1001 or above It turns out that it is impossible to move to level 5, and there is a very interesting mathematical proof of it.

Topic 4: Graph Theory How to color a map? How to send data efficiently? How to schedule exams?

Objectives of This Course To learn basic mathematical concepts, e.g. sets, functions, graphs To be familiar with formal mathematical reasoning, e.g. logic, proofs To improve problem solving skills To see the connections between discrete mathematics and computer science

 Introduction to logic  Motivations  Basic Definitions  Logic formula

Familiar? Obvious? c b a Pythagorean theorem

c b a (i) a c  c square, and then (ii) an a  a & a b  b square Good Proof b-a We will show that these five pieces can be rearranged into: b-a And then we can conclude that

c c c a b c b-ab-a Good Proof The five pieces can be rearranged into: (i) a c  c square

c b a b-a Good Proof How to rearrange them into an axa square and a bxb square?

b a a a b-ab-a 74 proofs in b Good Proof b

Bad Proof

Mathematical Proof To prove mathematical theorems, we need a more rigorous system. The standard procedure for proving mathematical theorems is invented by Euclid in 300BC. First he started with five axioms (the truth of these statements are taken for granted). Then he uses logic to deduce the truth of other statements. 1.It is possible to draw a straight line from any point to any other point.straight line 2.It is possible to produce a finite straight line continuously in a straight line.finite 3.It is possible to describe a circle with any center and any radius.circle 4.It is true that all right angles are equal to one another.right angles 5.("Parallel postulate") It is true that, if a straight line falling on two straight lines make the interior angles on the same side less than two right angles,Parallel postulate interior angles the two straight lines, if produced indefinitely, intersect on that side on which are the angles less than the two right angles.intersect angles

Statement (Proposition) A Statement is a sentence that is either True or False Examples: Non-examples:x+y>0 x 2 +y 2 =z 2 True False = 4 3 x 3 = is a prime They are true for some values of x and y but are false for some other values of x and y.

Logic Operators F F F T P Q FF TF FT TT QP F T T T FF TF FT TT QP ~p is true if p is false

Compound Statement p = “it is hot” q = “it is sunny” It is hot and sunny It is not hot but sunny It is neither hot nor sunny

Exclusive-Or coffee “or” tea  exclusive-or How to construct a compound statement for exclusive-or? pqp  q TTF TFT FTT FFF Idea 1: Look at the true rows Want the formula to be true exactly when the input belongs to a “true” row. The input is the second row exactly if this sub-formula is satisfied And the formula is true exactly when the input is the second row or the third row.

Exclusive-Or coffee “or” tea  exclusive-or How to construct a compound statement for exclusive-or? pqp  q TTF TFT FTT FFF Idea 2: Look at the false rows Want the formula to be true exactly when the input does not belong to a “false” row. The input is the first row exactly if this sub-formula is satisfied And the formula is true exactly when the input is not in the 1 st row and the 4 th row.

Logical Equivalence pq TTFTFF TFTTTT FTTTTT FFFFTF Logical equivalence: Two statements have the same truth table Idea 3: Guess and check As you see, there are many different ways to write the same logical formula. One can always use a truth table to check whether two statements are equivalent.

Writing Logical Formula for a Truth Table Digital logic: Given a digital circuit, we can construct the truth table. Now, suppose we are given only the truth table (i.e. the specification), how can we construct a circuit (i.e. formula) that has the same function?

Writing Logical Formula for a Truth Table pqroutput TTTF TTFT TFTT TFFF FTTT FTFT FFTT FFFF Use idea 1 or idea 2. Idea 1: Look at the true rows and take the “or”. The formula is true exactly when the input is one of the true rows.

Writing Logical Formula for a Truth Table Idea 2: Look at the false rows, negate and take the “and”. The formula is true exactly when the input is not one of the false row. pqroutput TTTF TTFT TFTT TFFF FTTT FTFT FFTT FFFF

DeMorgan’s Laws Logical equivalence: Two statements have the same truth table Statement: Tom is in the football team and the basketball team. Negation: Tom is not in the football team or not in the basketball team. Statement: The number is divisible by 7 or 11. Negation: The number is not divisible by 7 and not divisible by 11. De Morgan’s Law

DeMorgan’s Laws Logical equivalence: Two statements have the same truth table TTFF TFTT FTTT FFTT De Morgan’s Law

Simplifying Statement Practice a lot… DeMorgan Distributive law

Tautology, Contradiction A tautology is a statement that is always true. A contradiction is a statement that is always false. (negation of a tautology) In general it is “difficult” to tell whether a statement is a contradiction. It is one of the most important problems in CS – the satisfiability problem. How this is a negation of the first tautology?

Quick Summary Key points to know. 1.Write a logical formula from a truth table. 2.Check logical equivalence of two logical formulas. 3.DeMorgan’s rule and other simple logical rules (e.g. distributive). 4.Use simple logical rules to simplify a logical formula.