Discrete Mathematics Lecture Notes PDF

Document Details

RapidNephrite5737

Uploaded by RapidNephrite5737

University of Engineering and Technology, Lahore

null

Tags

discrete mathematics logic mathematical structures mathematics

Summary

These lecture notes provide an introduction to discrete mathematics. The topics covered include logic, sets, and relations, along with fundamental concepts like propositions and logical connectives. Additional topics like functions, sequences, and recurrence relations are also discussed.

Full Transcript

The history of discrete mathematics has involved a number of challenging problems which have focused attention within areas of the field. In graph theory, much research was motivated by attempts to prove the four color theorem, first stated in 1852, but not proved until 1976 (by Kenneth Appel and...

The history of discrete mathematics has involved a number of challenging problems which have focused attention within areas of the field. In graph theory, much research was motivated by attempts to prove the four color theorem, first stated in 1852, but not proved until 1976 (by Kenneth Appel and Wolfgang Haken, using significant computer assistance).  In mathematics, the four color theorem, or the four color map theorem, states that,  producing a figure called a map, no more than four colors are required to color the regions of the map so that no two adjacent regions have the same color.  Discrete structure is the study of mathematical structures that are fundamentally discrete rather than continuous.  In contrast to real numbers that have the property of varying/changing "smoothly", the objects studied in discrete mathematics – such as integers, graphs, and statements in logic.  More formally, discrete structures has been characterized as the branch of mathematics dealing with countable sets.  Discrete structure therefore excludes topics in "continuous mathematics" such as calculus or Euclidean geometry  Discrete mathematics is the part of mathematics devoted to the study of discrete objects (Kenneth H. Rosen, 6th edition).  Discrete mathematics is the study of mathematical structures that are fundamentally discrete rather than continuous (wikipedia)  Discrete Mathematics with Applications (second edition) by Susanna S. Epp  Discrete Mathematics and Its Applications (fourth edition) by Kenneth H. Rosen  Discrete Mathematics by Ross and Wright  1. Logic  2. Sets & Operations on sets  3. Relations & Their Properties  4. Functions  5. Sequences & Series  6. Recurrence Relations  7. Mathematical Induction  8. Loop Invariants  10. Combinatorics  11. Probability  12. Graphs and Trees  Logic is the study of the principles and methods that distinguish between a valid and an invalid argument.  A statement is a declarative sentence that is either true or false but not both.  A statement is also referred to as a proposition  A proposition (or Statement) is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both.  a. 2+2 = 4,  b. It is Sunday today  If a proposition is true, we say that it has a truth value of "true”.  If a proposition is false, its truth value is "false".  The truth values “true” and “false” are, respectively, denoted by the letters T and F. Propositions  1) Grass is green.  2) 4 + 2 = 6  3) 4 + 2 = 7  4) There are four fingers in a hand. Not Propositions  1) Close the door.  2) x is greater than 2.  3) He is very rich  x + 2 is positive. Not a statement  May I come in? Not a statement  Logic is interesting. A statement  It is hot today. A statement  x + y = 12 Not a statement  Simple statements could be used to build a compound statement.  EXAMPLES:  “3 + 2 = 5” and “Lahore is a city in Pakistan”  “The grass is green” or “ It is hot today”  “Discrete Mathematics is not difficult to me”  AND, OR, NOT are called LOGICAL CONNECTIVES.  Statements are symbolically represented by letters such as p, q, r,...  EXAMPLES:  p = “Islamabad is the capital of Pakistan”  q = “17 is divisible by 3”  p = “Islamabad is the capital of Pakistan”  q = “17 is divisible by 3”  p ∧ q = “Islamabad is the capital of Pakistan and 17 is divisible by 3”  p ∨ q = “Islamabad is the capital of Pakistan or 17 is divisible by 3”  ~p = “It is not the case that Islamabad is the capital of Pakistan”  or simply “Islamabad is not the capital of Pakistan”  Let p = “It is hot”, and q = “ It is sunny” SENTENCE SYMBOLIC FORM  1.It is not hot. ~ p  2.It is hot and sunny. p ∧q  3.It is hot or sunny. p ∨ q  4.It is not hot but sunny. ~ p ∧q  5.It is neither hot nor sunny. ~ p ∧ ~ q  Let h = “Zia is healthy”  w = “Zia is wealthy”  s = “Zia is wise”  Translate the compound statements to symbolic form:  1) Zia is healthy and wealthy but not wise. (h ∧ w) ∧ (~ s)  2) Zia is not wealthy but he is healthy and wise. ~ w ∧ (h ∧ s)  3) Zia is neither healthy, wealthy nor wise .~h∧~w∧~s  Let m = “Ali is good in Mathematics”  c = “Ali is a Computer Science student”  Translate the following statement forms into plain English:  1) ~ c : Ali is not a Computer Science student  2) c ∨ m Ali is a Computer Science student or good in Maths.  3) m ∧ ~ c Ali is good in Maths but not a Computer Science student  A convenient method for analyzing a compound statement is to make a truth  table for it.  A truth table specifies the truth value of a compound proposition for all possible truth values of its constituent propositions.  If p is a statement variable, then negation of p, “not p”, is denoted as “~p”  It has opposite truth value from p i.e., if p is true, then ~ p is false; if p is false, then ~ p is true.  If p and q are statements, then the conjunction of p and q is “p and q”, denoted as  “p ∧ q”.  Remarks  o p ∧ q is true only when both p and q are true.  o If either p or q is false, or both are false, then p ∧ q is false.  If p & q are statements, then the disjunction of p and q is “p or q”, denoted as  “p ∨ q”.  Remarks:  o p ∨ q is true when at least one of p or q is true.  o p ∨ q is false only when both p and q are false.  1. ~ p ∧ q  2. ~ p ∧ (q ∨ ~ r)  3. (p∨q) ∧ ~ (p∧q)  In English language the word OR is sometimes used in an inclusive sense (p or q or  both).  Example: I shall buy a pen or a book.  In the above statement, if you buy a pen or a book in both cases the statement is true and  if you buy both pen and book, then statement is again true. Thus we say in the above statement we use or in inclusive sense. The word OR is sometimes used in an exclusive sense (p or q but not both). As in the below statement Example:  Tomorrow at 9, I’ll be in Lahore or Islamabad.  Now in above statement we are using OR in exclusive sense because if both the statements are true, then we have F for the statement.  While defining a disjunction the word OR is used in its inclusive sense. Therefore, the symbol ∨ means the “inclusive OR”  When OR is used in its exclusive sense, The statement “p or q” means “p or q but not  both” or “p or q and not p and q” which translates into symbols as (p ∨ q) ∧ ~ (p ∧ q)  It is abbreviated as p ⊕ q or p XOR q TRUTH TABLE FOR (p∨q) ∧ ~ (p ∧ q)  If two logical expressions have the same logical values in the truth table, then we say that the two logical expressions are logically equivalent.  In the following example, ~ (~ p ) is logically equivalent p. So it is written as ~(~p) ≡ p  Rewrite in a simpler form:  “It is not true that I am not happy.”  Solution:  Let p = “I am happy”  then ~ p = “I am not happy”  and ~ ( ~ p) = “It is not true that I am not happy”  Since ~ ( ~ p) ≡ p  Hence the given statement is equivalent to “I am happy”  1) The negation of an AND statement is logically equivalent to the OR statement in which each component is negated. Symbolically ~ (p ∧ q) ≡ ~ p ∨ ~ q  2) The negation of an OR statement is logically equivalent to the AND statement in which each component is negated. Symbolically ~ (p ∨ q) ≡ ~ p ∧ ~ q  Show that (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)  Are the statements ( p ∧ q ) ∨ r and p ∧ ( q ∨ r ) logically equivalent?  A tautology is a statement form that is always true regardless of the truth values of the statement variables.  A tautology is represented by the symbol “t”.  A contradiction is a statement form that is always false regardless of the truth values of the statement variables. A contradiction is represented by the symbol “c”.  So if we have to prove that a given statement form is CONTRADICTION, we will make the truth table for the statement form and if in the column of the given statement form all the entries are F, then we say that statement form is contradiction. 1) Commutative Laws  p∧q≡q∧p  p∨q≡q∨p 2) Associative Laws  (p∧q)∧r≡p∧(q∧r)  (p∨q)∨r≡p∨(q∨r) 3) Distributive Laws  p∧(q∨r)≡(p∧q)∨(p∧r)  p∨(q∧r)≡(p∨q)∧(p∨r) 4) Identity Laws  p∧t≡p  p∨c≡p 5) Negation Laws  p ∨ ∼p ≡ t  p ∧ ∼p ≡ c 6) Double Negation Law  ∼( ∼p) ≡ p 7) Idempotent Laws  p∧p≡p  p∨p≡p 8) DeMorgan’s Laws  ~ ( p ∧ q ) ≡ ~p ∨ ∼q  ~ ( p ∨ q ) ≡ ~p ∧ ∼q 9) Universal Bound Laws  p∨t≡t  p∧c≡c 10) Absorption Laws  p∨(p∧q)≡p  p∧(p∨q)≡p 11) Negation of t and c  ~t≡c  ~c≡t

Use Quizgecko on...
Browser
Browser