Introduction to Discrete Mathematics

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:
About the Course Lecture 0: Sep 2 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
1 Intro to Logic Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
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
Discrete Structures for Computer Science Ruoming Jin MW 5:30 – 6:45pm Fall 2009 rm MSB115.
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.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
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
Chapter 2 Midterm Review
Intro to Discrete Structures
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
About the Course Lecture 0: Sep 10 AB C. Plan  Course Information and Arrangement  Course Requirement  Topics and objectives of this course.
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.
Discrete Structures for Computer Science Muad M. Abu-Ata Summer 2013.
MATH 224 – Discrete Mathematics
CSci 2011 Textbook ^Discrete Mathematics and Its Applications,  Rosen  6th Edition  McGraw Hill  2006.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 24.
1 Inference Rules and Proofs (Z); Program Specification and Verification Inference Rules and Proofs (Z); Program Specification and Verification.
1 10/13/2015 MATH 224 – Discrete Mathematics Why Study Discrete Math  Determination of the efficiency of algorithms, e.g., insertion sort versus selection.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
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.
Mathematical Induction I Lecture 4: Sep 16. This Lecture Last time we have discussed different proof techniques. This time we will focus on probably the.
Discrete Structures – CS Text Discrete Mathematics and Its Applications Kenneth H. Rosen (7 th Edition) Chapter 1 The Foundations: Logic and Proofs.
MATH 224 – Discrete Mathematics
SSK3003 DISCRETE STRUCTURES
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
Chinese Remainder Theorem Dec 29 Picture from ………………………
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.
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.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
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.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
1 CSC 281 Discrete Mathematics for Computer Science Dr.Yuan Tian Syllabus.
رياضيات متقطعة لعلوم الحاسب 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
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CS/APMA 202 Spring 2005 Aaron Bloomfield. Sequences in Nature
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Chapter 1 Logic and proofs
Introduction to Discrete Mathematics Lecture 1: Sep 6 AB C a = qb+r gcd(a,b) = gcd(b,r)
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Propositional Logic.
Lecture 1 – Formal Logic.
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Discrete Structures for Computer Science
Propositional Calculus: Boolean Algebra and Simplification
Administrivia Course Web:
Introduction to Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
Discrete Structures for Computer Science
Discrete Structures for Computer Science
CSE 311 Foundations of Computing I
Discrete Structures for Computer Science
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

Introduction to Discrete Mathematics B C a = qb+r gcd(a,b) = gcd(b,r)

Basic Information Course homepage: http://www.cse.iitd.ac.in/~naveen/teaching/courses/COL202/ Instructor: Naveen Garg Teaching Assistants: Jatin Batra, Nikhil Kumar Lectures: M(0800-0920) and Th(0800-0920) Tutorials: M,W,Th (1300-1400) Slides: Will be posted on the course page adapted (with permission from Lac chi Lau) from course on Discrete Mathematics at CUHK.

Course Material Textbook: Discrete Mathematics and its Applications, 7th ed Author: Kenneth H. Rosen Publisher: McGraw Hill Reference Texts (links available at the course-page): Course notes from “mathematics for computer science” Discrete Mathematics, Lecture Notes, by L. Lov ́asz and K. Vesztergombi

Course Requirements Minors: 30% Lecture Quizzes: 25% Tutorial Quizzes: 10% Major 35%

Checker x=0 Start with any configuration with all men 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 men to jump up to level k.

K=1 x=0 2 men.

K=2 x=0

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

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

K=3 x=0 8 men.

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 men!

K=5 39 or below 40-50 men 51-70 men 71- 100 men 101 – 1000 men 1001 or above

Example 1 How to play Rubik Cube? Google: Rubik cube in 26 steps http://www.cse.cuhk.edu.hk/~chi/csc2110-2008/notes/Rubik-Cube.ppt

Example 2 The mathematics of paper folding http://www.ushistory.org/betsy/flagstar.html http://erikdemaine.org/foldcut/

Example 3 3D-images http://128.100.68.6/~drorbn/papers/PDI/

Why Mathematics? Design efficient computer systems. How did Google manage to build a fast search engine? What is the foundation of internet security? algorithms, data structures, database, parallel computing, distributed systems, cryptography, computer networks… Logic, number theory, counting, graph theory…

Topic 1: Logic and Proofs How do computers think? Logic: propositional logic, first order logic Proof: induction, contradiction Artificial intelligence, database, circuit, algorithms

Topic 2: Number Theory Number sequence (Extended) Euclidean algorithm Prime number, modular arithmetic, Chinese remainder theorem Cryptography, RSA protocol Cryptography, coding theory, data structures

Topic 3: Counting A B C Sets and Functions Combinations, Permutations, Binomial theorem Counting by mapping, pigeonhole principle Recursions A B C Probability, algorithms, data structures

Topic 3: Counting How many steps are needed to sort n numbers? Algorithm 1 (Bubble Sort): Every iteration moves the i-th smallest number to the i-th position Algorithm 2 (Merge Sort): Which algorithm runs faster?

Topic 4: Graph Theory Graphs, Relations Degree sequence, Eulerian graphs, isomorphism Trees Matching Coloring Computer networks, circuit design, data structures

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

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

Pythagorean theorem c b a Familiar? Obvious?

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

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

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

Good Proof a b a b-a a b 74 proofs in http://www.cut-the-knot.org/pythagoras/index.shtml

Bad Proof A similar rearrangement technique shows that 65=64… What’s wrong with the 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. It is possible to draw a straight line from any point to any other point. It is possible to produce a finite straight line continuously in a straight line. It is possible to describe a circle with any center and any radius. It is true that all right angles are equal to one another. ("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, the two straight lines, if produced indefinitely, intersect on that side on which are the angles less than the two right angles. Euclid’s proof of Pythagorean’s theorem http://en.wikipedia.org/wiki/Pythagorean_theorem

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

Q P P Q Q P P Q F T F T F T F T Logic Operators ~p is true if p is false F T Q P F T P Q F T Q P F T P Q

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

 p q p  q T F Exclusive-Or exclusive-or coffee “or” tea How to construct a compound statement for exclusive-or? Idea 1: Look at the true rows Idea 1: Look at the true rows Idea 1: Look at the true rows p q p  q T F 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.

 p q p  q T F Exclusive-Or exclusive-or coffee “or” tea How to construct a compound statement for exclusive-or? Idea 2: Look at the false rows p q p  q T F 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 1st row and the 4th row.

p q T F Logical Equivalence Idea 3: Guess and check Logical equivalence: Two statements have the same truth table 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 Use idea 1 or idea 2. Idea 1: Look at the true rows and take the “or”. p q r output T F 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”. p q r output T F The formula is true exactly when the input is not one of the false row.

DeMorgan’s Laws Logical equivalence: Two statements have the same truth table De Morgan’s Law 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. De Morgan’s Law Statement: The number 783477841 is divisible by 7 or 11. Negation: The number 783477841 is not divisible by 7 and not divisible by 11.

DeMorgan’s Laws Logical equivalence: Two statements have the same truth table De Morgan’s Law T F De Morgan’s Law

Simplifying Statement DeMorgan Distributive See textbook for more identities.

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.

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

Course Project Pick an interesting mathematical topic, write a report of about 10 pages. 3 students in a group Can use any references, but cite them. Choose 1-3 groups to present, up to 5% bonus

A Project Tell an interesting story related to mathematics. More about good topic and nice presentation, than mathematical difficulty. Interesting or curious problems, interesting history Surprising or elegant solutions Nice presentation, easy to understand

Project Ideas Magic tricks More games, more paper folding, etc Logic paradoxes Prime numbers Game theory http://www.cse.cuhk.edu.hk/~chi/csc2110/project.html Deadline: November 16.