CS 490 Mathematical Logic, Combinatorics, Counting Arguments, Graph Theory, Number Theory, Discrete Probability, Recurrence Relation. Thao Tran.

Slides:



Advertisements
Similar presentations
Chapter 8 Topics in Graph Theory
Advertisements

Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Recursive Definitions and Structural Induction
COUNTING AND PROBABILITY
Recursively Defined Functions
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Representing Relations Using Matrices
3.3 The Characteristic function of the set  function from universal set to {0,1}  Definition 3.6: Let U be the universal set, and let A  U. The characteristic.
CS128 – Discrete Mathematics for Computer Science
CSE115/ENGR160 Discrete Mathematics 04/17/12
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1.2 – Open Sentences and Graphs
Adapted from Discrete Math
IB Math Studies – Topic 3. IB Course Guide Description.
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
GRAPH Learning Outcomes Students should be able to:
Rev.S08 MAC 1140 Module 12 Introduction to Sequences, Counting, The Binomial Theorem, and Mathematical Induction.
Discrete Mathematics CS 2610 March 26, 2009 Skip: structural induction generalized induction Skip section 4.5.
Discrete Mathematics, 1st Edition Kevin Ferland
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Discrete Mathematical Structures (Counting Principles)
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
Chapter 12 Probability. Chapter 12 The probability of an occurrence is written as P(A) and is equal to.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 4 Counting methods and the pigeonhole principle.
CS201: Data Structures and Discrete Mathematics I
January 30, 2002Applied Discrete Mathematics Week 1: Logic and Sets 1 Let’s Talk About Logic Logic is a system based on propositions.Logic is a system.
Sets and Sentences Open Sentences Foundations of Real Analysis.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Mathematical Preliminaries
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematics Lecture # 1. Course Objectives  Express statements with the precision of formal logic.  Analyze arguments to test their validity.
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CS 104: Discrete Mathematics
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
English for Economic Informatics I Tomáš Foltýnek Theoretical Foundations of Informatics.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Chapter 1 Logic and proofs
1.1 – SETS AND SYMBOLS. Goals SWBAT understand basic set notation and set symbols SWBAT solve simple sentences with a given domain SWBAT graph sets of.
Discrete Structures MT217 Lecture 01. Course Objectives Express statements with the precision of formal logic Analyze arguments to test their validity.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Review: Discrete Mathematics and Its Applications
The Pigeonhole Principle
Sequences, Series, and Probability
Richard Anderson Lecture 26 NP-Completeness
Discrete Mathematics Logic.
Richard Anderson Lecture 26 NP-Completeness
Discrete Structures – CNS2300
Chapter 3 Introduction to Logic 2012 Pearson Education, Inc.
CS100: Discrete structures
ICS 353: Design and Analysis of Algorithms
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Graphs Chapter 13.
Review: Discrete Mathematics and Its Applications
Chapter 4 (Part 2): Mathematical Reasoning, Induction & Recursion
Presentation transcript:

CS 490 Mathematical Logic, Combinatorics, Counting Arguments, Graph Theory, Number Theory, Discrete Probability, Recurrence Relation. Thao Tran.

Mathematical Logic Proposition and Logical Operators: Proposition and Logical Operators: Proposition: Proposition: A proposition is a sentence to which one and only one of the terms true o false can be meaningful applied. A proposition is a sentence to which one and only one of the terms true o false can be meaningful applied. Example: “four is even,” “43 >= 21” Example: “four is even,” “43 >= 21” Logical Operators: Logical Operators: Conjunction (And): If p and q are propositions, their conjunction, p and q (denoted p ^ q), is defined by: Conjunction (And): If p and q are propositions, their conjunction, p and q (denoted p ^ q), is defined by: p q p ^ q Disjunction (Or): If p and q are propositions, their disjunction, p and q (denoted p v q), is defined by: Disjunction (Or): If p and q are propositions, their disjunction, p and q (denoted p v q), is defined by: p q p v q p q p v q

Mathematical Logic (cont.) Negation: Negation: if p is a proposition, its negation, not p, is denoted ~p and is defined by if p is a proposition, its negation, not p, is denoted ~p and is defined by p~p p~p Conditional Operator( if…then): Conditional Operator( if…then): The conditional statement if p then q, denoted The conditional statement if p then q, denoted p --> q, is defined by pqp  q Example: Example: If I pass the final, then I’ll graduate. If I pass the final, then I’ll graduate.

Mathematical Logic( cont.) Truth table: Truth table:

Mathematical Logic (cont.) Tautology, Contradiction and Equivalent: Tautology, Contradiction and Equivalent: Tautology: An expression involving logical variables that is true in all cases of its truth table. Tautology: An expression involving logical variables that is true in all cases of its truth table. Example: p v ~p Example: p v ~p Contradiction: An expression involving logical variable that is false in all cases of its truth table. Contradiction: An expression involving logical variable that is false in all cases of its truth table. Example: p ^ ~p Example: p ^ ~p Equivalent: Let S be a set of propositions and let r and s be propositions generated by S. r and s are equivalent if r s is a tautology, denoted r  s. Equivalent: Let S be a set of propositions and let r and s be propositions generated by S. r and s are equivalent if r s is a tautology, denoted r  s. Example: p v q  q v p Example: p v q  q v p

Counting Principles It is frequently necessary to count how many ways certain choices can be made. It is frequently necessary to count how many ways certain choices can be made. Basic methods: Basic methods: Sum and product rules Sum and product rules Counting functions and sequences Counting functions and sequences Binomial theorem Binomial theorem

Sum and Product Rules Rule of sum: Rule of sum: The number of ways in which either of two mutually exclusive events can occur is equal to the sum of the number of ways in which each can occur separately. The number of ways in which either of two mutually exclusive events can occur is equal to the sum of the number of ways in which each can occur separately. Rule of product: Rule of product: The number of ways in which two independent events E 1 and E 2 can occur is the product of the numbers of ways in which E 1 and E 2 can occur separately. The number of ways in which two independent events E 1 and E 2 can occur is the product of the numbers of ways in which E 1 and E 2 can occur separately.

Sum and Product (cont.) Example: Example: Suppose that a system of car registrartion is adopted in which and allowable registration plate consists of 1,2, or 3 letters, followed by a number (not starting with 0) having the same number of digits as there are letters. How many possible registration are there? Suppose that a system of car registrartion is adopted in which and allowable registration plate consists of 1,2, or 3 letters, followed by a number (not starting with 0) having the same number of digits as there are letters. How many possible registration are there?

Sum and Product (cont.) Solution: Solution: (26 x 9) + (26 x 26 x 9 x 10) + (26 x 26 x 26 x 9 x 10 x 10) = (26 x 9) + (26 x 26 x 9 x 10) + (26 x 26 x 26 x 9 x 10 x 10) =

Binomial Theorems Binomial Theorem Binomial Theorem (x+y) n = ∑ n r=0 ( n r ) x r y n-r (x+y) n = ∑ n r=0 ( n r ) x r y n-r Where : Where : ( n r ) =n!/(n-r)!r! ( n r ) =n!/(n-r)!r!

Power Set Definition: Definition: If A is any set, the power set of A is the set of all subsets of A, including the empty set and A itself. It is denoted P(A). If A is any set, the power set of A is the set of all subsets of A, including the empty set and A itself. It is denoted P(A). Example: Example: If A = {1, 2} then If A = {1, 2} then P(A) = { φ, {1}, {2}, {1,2}} P(A) = { φ, {1}, {2}, {1,2}} Formula: Formula: P(A) = 2 #A P(A) = 2 #A

Number Theory The natural numbers: The natural numbers: N = {0, 1, 2, 3, …} N = {0, 1, 2, 3, …} The integers: The integers: Z = {…, -2, -1, 0, 1, 2, …} Z = {…, -2, -1, 0, 1, 2, …} Z stands for Zahlen, meaning “numbers” in Geman Z stands for Zahlen, meaning “numbers” in Geman The rational numbers: The rational numbers: Denoted Q (quotient), comprises all those numbers that can be written in the form a/b, with a,b in Z Denoted Q (quotient), comprises all those numbers that can be written in the form a/b, with a,b in Z The real numbers: The real numbers: Denoted R: Denoted R: Example: √2, π Example: √2, π The complex numbers: The complex numbers: The set C of complex numbers is the set of all numbers of the form a+bi where a and b are real numbers and i 2 = -1 The set C of complex numbers is the set of all numbers of the form a+bi where a and b are real numbers and i 2 = -1 The reason for extending from R to C is to be able to solve all polynomial equation The reason for extending from R to C is to be able to solve all polynomial equation

Recurrence Relations Definition: Definition: Let S be a sequence of numbers. A recurrence relation on S is a formula that relates all but a finite number of terms of S to previous terms of S. That is, there is a k 0 in the domain of S such that if k > k 0, then S(k) is expressed in terms that preceed S(k). If the domain of S is {0, 1, 2…}, the terms S(0), S(1),…,S(k 0 ) are not defined by the recurrence formula. Their values are the initial conditions (or boundary conditions, or basis) that complete the definition of S. Let S be a sequence of numbers. A recurrence relation on S is a formula that relates all but a finite number of terms of S to previous terms of S. That is, there is a k 0 in the domain of S such that if k > k 0, then S(k) is expressed in terms that preceed S(k). If the domain of S is {0, 1, 2…}, the terms S(0), S(1),…,S(k 0 ) are not defined by the recurrence formula. Their values are the initial conditions (or boundary conditions, or basis) that complete the definition of S. Example: Example: The Fibonacci sequence: The Fibonacci sequence: F k = F k-2 + F k-1, k >= 2, F 0 =1, F 1 = 1 F k = F k-2 + F k-1, k >= 2, F 0 =1, F 1 = 1 This recurrence relation is called a second-order relation because F k depends on the two previous terms of F. This recurrence relation is called a second-order relation because F k depends on the two previous terms of F.

Recurrence Relations (cont.) Solving a recurrence relation: Solving a recurrence relation: Sequence are often most easily defined with a recurrence relation; however, the calculation of terms by directly applying a recurrence relation can be time consuming. Sequence are often most easily defined with a recurrence relation; however, the calculation of terms by directly applying a recurrence relation can be time consuming. Example: Example: Find recurrence relation for the sequence defined by: Find recurrence relation for the sequence defined by: D(k) = 5*2 k, k>=0 D(k) = 5*2 k, k>=0

Recurrence Relations (cont.) Answer: Answer: D(k) = 5*2 k = 2*5*2 k-1 = 2D(k-1) The relation is: D(k) – 2D(k-1) = 0 Initial condition D(0) = 5. Homogeneous recurrent relation: Homogeneous recurrent relation: An n th order linear relation is a homogeneous recurrence relation if f(k) = 0 for all k. For each recurrence relation An n th order linear relation is a homogeneous recurrence relation if f(k) = 0 for all k. For each recurrence relation S(k) + C 1 S(k-1)+…+C n S(k-n)=f(k) S(k) + C 1 S(k-1)+…+C n S(k-n)=f(k) The associated homogeneous relation is The associated homogeneous relation is S(k)+C 1 S(k-1)+ … + C n S(k-n)=0 S(k)+C 1 S(k-1)+ … + C n S(k-n)=0

Graph Theory Directed Graph: Directed Graph: Consist of a set of vertices, V, and a set of edges, E, connecting certain elements of V. Each element of E is an order pair. The first entry is the initial vertex of the edge and the second entry is the terminal vertex. Consist of a set of vertices, V, and a set of edges, E, connecting certain elements of V. Each element of E is an order pair. The first entry is the initial vertex of the edge and the second entry is the terminal vertex. Example: Example: Simple Graph & Multigraph: Simple Graph & Multigraph: Simple graph is one for which there is no more than one edge directed from any one vertex to any other vertex. All other graphs are called multigraph. Simple graph is one for which there is no more than one edge directed from any one vertex to any other vertex. All other graphs are called multigraph.

Graph Theory(cont.) Traversals: Traversals: Eulerian Graph: Eulerian Graph: Konigsberg Bridge Problem: Konigsberg Bridge Problem:

Graph Theory (cont.) Answer: Answer: A Eulerian path through a graph is a path whose edge list contains each edge of the graph exactly once. A Eulerian path through a graph is a path whose edge list contains each edge of the graph exactly once.

Graph Theory (cont.) Hamiltonian Graph: Hamiltonian Graph: A hamiltonian path through a graph is a path whose vertex list contains each vertex of the graph exactly once.A hamiltonian graph is a graph that possesses a Hamiltonian path. A hamiltonian path through a graph is a path whose vertex list contains each vertex of the graph exactly once.A hamiltonian graph is a graph that possesses a Hamiltonian path. Traveling salesman problem : Traveling salesman problem : A salesman who wants to minimize the number of miles the he travels in visiting his custommers. A salesman who wants to minimize the number of miles the he travels in visiting his custommers.

Discrete Probability The calculation of discrete probability usually involves counting arguments The calculation of discrete probability usually involves counting arguments Permutation: Permutation: P r n, is called the number of permutations of n objects taken r at a time. P r n, is called the number of permutations of n objects taken r at a time. P r n = n(n-1)…(n-r+1) P r n = n(n-1)…(n-r+1) = n! / (n-r)! = n! / (n-r)! Combination: Combination: Define for an r-element subset of an n-element set A is a combination of A, taken r at a time. Define for an r-element subset of an n-element set A is a combination of A, taken r at a time. C n r = n! / r!(n-r)! C n r = n! / r!(n-r)! Example: Compute the number of distinct 5 card hands which can be dealt from a deck of 52 cards. Example: Compute the number of distinct 5 card hands which can be dealt from a deck of 52 cards.

Discrete Probability (cont.) Answer: Answer: C 5 52 = 52!/(5! 47!) = 2,598,960 C 5 52 = 52!/(5! 47!) = 2,598,960 The pigeonhole principle: The pigeonhole principle: If n pigeons are assigned to m pigeonholes, and m km, then at least one pigeonhole must contain more than k pogeons. If n pigeons are assigned to m pigeonholes, and m km, then at least one pigeonhole must contain more than k pogeons.

References Truss, J.K. Discrete Mathematics for Computer Scientist. Addison-Wesley Publishing Company, Truss, J.K. Discrete Mathematics for Computer Scientist. Addison-Wesley Publishing Company, Kolman, Bernard and Robert. Discrete Mathematical Structures for Computer Science. Drexel University. Kolman, Bernard and Robert. Discrete Mathematical Structures for Computer Science. Drexel University. Doerr, Alan and Kenneth. Applied Doerr, Alan and Kenneth. Applied Discrete Structures for Computer Science. Science Research Associates, Inc