Introduction to Discrete Structures PDF
Document Details
Uploaded by SkilledClover4107
African University of Science and Technology, Abuja
Kasiemobi Martins Offie
Tags
Summary
These lecture notes introduce discrete structures, focusing on topics such as propositional logic, sets, functions, and proof techniques. The notes also cover applications in computer science. They present a foundational overview for understanding discrete structures.
Full Transcript
AFRICAN UNIVERSITY OF SCIENCE AND TECCHNOLOGY, ABUJA. FACULTY OF COMPUTING & INFORMATION TECHNOLOGY SEN/CSC 203 DISCRETE STRUCTURES (2 Units) Lecturer: Kasiemobi Martins Offie Course Content Propositional Logic. Predicate Logic. Sets. Functions. Sequences and Summat...
AFRICAN UNIVERSITY OF SCIENCE AND TECCHNOLOGY, ABUJA. FACULTY OF COMPUTING & INFORMATION TECHNOLOGY SEN/CSC 203 DISCRETE STRUCTURES (2 Units) Lecturer: Kasiemobi Martins Offie Course Content Propositional Logic. Predicate Logic. Sets. Functions. Sequences and Summation. Proof Techniques. Mathematical induction. Inclusion-exclusion and Pigeonhole principles. Permutations and Combinations (with and without repetitions). The Binomial Theorem. Discrete Probability. Recurrence Relations. Propositional logic is a branch of mathematics Proposition that studies the logical relationships between propositions (or statements, sentences, al logic assertions) taken as a whole, and connected via logical connectives Logic is the basis of all mathematical reasoning and all automated reasoning. The rules of logic specify the meaning of What is mathematical statements. These rules help us understand and reason with statements such Logic? as – Which in Simple English means “There exists an integer that is not the sum of two squares“. Importance of Mathematical Logic The rules of logic give precise meaning to mathematical statements. These rules are used to distinguish between valid and invalid mathematical arguments. Apart from its importance in understanding mathematical reasoning, logic has numerous applications in Computer Science, varying from the design of digital circuits to the construction of computer programs and verification of the correctness of programs. Propositional Logic What is a Proposition? A proposition is the basic building block of logic. It is defined as a declarative sentence that is either True or False, but not both. The Truth Value of a proposition is True(denoted as T) if it is a true statement, and False(denoted as F) if it is a false statement. For Example, The sun rises in the East and sets in the West. 1+1=2 ‘b’ is a vowel All of the above sentences are propositions, where the first two are Valid(True) and the third one is Invalid(False). Some sentences that do not have a truth value or may have more than one truth value are not propositions. For Example, What time is it? Go out and Play x+1=2 The above sentences are not propositions as the first two do not have a truth value, and the third one may be true or false. To represent propositions, propositional variables are used. By Convention, these variables are represented by small alphabets such as p,q,r,s p,q,r,s. The area of logic which deals with propositions is called propositional calculus or propositional logic. It also includes producing new propositions using existing ones. Propositions constructed using one or more propositions are called compound propositions. The propositions are combined together using Logical Connectives or Logical Operators. Truth Table Since we need to know the truth value of a proposition in all possible scenarios, we consider all the possible combinations of the propositions which are joined together by Logical Connectives to form the given compound proposition. This compilation of all possible scenarios in a tabular format is called a truth table. Example, Negation of “It is raining today”, is “It is not the case that is raining today” or simply “It is not raining today”. Example, Conjunction of the propositions p : “Today is Friday” and q : “It is raining today”, p∧q is “Today is Friday and it is raining today”. This proposition is true only on rainy Fridays and is false on any other rainy day or on Fridays when it does not rain. Example, Disjunction of the propositions p : “Today is Friday” and q : “It is raining today”, p∨q is “Today is Friday or it is raining today”. This proposition is true on any day that is a Friday or a rainy day(including rainy Fridays) and is false on any day other than Friday when it also does not rain. Example, Exclusive or of the propositions p p :“Today is Friday” and q : “It is raining today”, p⊕q is “Either today is Friday or it is raining today, but not both”. This proposition is true on any day that is a Friday or a rainy day(not including rainy Fridays) and is false on any day other than Friday when it does not rain or rainy Fridays. One might wonder that why is p→q true when p is false. This is because the implication guarantees that when p and q are true then the implication is true. But the implication does not guarantee anything when the premise p is false. There is no way of knowing whether or not the implication is false since p did not happen. This situation is similar to the “Innocent until proven Guilty” stance, which means that the implication p→q is considered true until proven false. Since we cannot call the implication p→q This follows from the Explosion false when Principle which p says: is false, “A our only False statement implies anything” alternative is to callstatements Conditional it true. play a very important role in mathematical reasoning, thus a variety of terminology is used to express p→q , some of which are listed below. Example, “If it is Friday then it is raining today” is a proposition which is of the form p→q. The above proposition is true if it is not Friday(premise is false) or if it is Friday and it is raining, and it is false when it is Friday but it is not raining. Some other common ways of expressing p↔q are: “p is necessary and sufficient for q””if p then q, and conversely””p if q” Example, “It is raining today if and only if it is Friday today.” is a proposition which is of the form p↔q. The above proposition is true if it is not Friday and it is not raining or if it is Friday and it is raining, and it is false when it is not Friday or it is not raining. Exercise: 1) Consider the following statements: P: Good mobile phones are not cheap. Q: Cheap mobile phones are not good. L: P implies Q M: Q implies P N: P is equivalent to Q Which one of the following about L, M, and N is CORRECT? (A) Only L is TRUE. (B) Only M is TRUE. (C) Only N is TRUE. (D) L, M and N are TRUE. Let a and b be two proposition a: Good Mobile phones. b: Cheap Mobile Phones. P and Q can be written in logic as P: a-->¬b Q: b--> ¬ a. 2) Which one of the following is not equivalent to p q (A)(¬p∨q)∧(p∨¬q) (B)(¬p∨q)∧(q→p) (C)(¬p∧q)∨(p∧¬q) (D)(¬p∧¬q)∨(p∧q) This question is the revision of basics of propositional logic. Conjunction of p and q, denoted by p∧q, is the proposition ‘p and q’. The conjunction p ∧ q is True, when both p and q is True. Disjunction of p and q, denoted by p∨q, is the proposition ‘p or q’. The disjunction p∨q is False when both p and q is False. Logical Implication - It is a type of relationship between two statements or sentence. Denoted by ‘p → q’. The conditional statement p → q is false when p is true and q is false, and true otherwise. i.e. p → q = ¬p ∨ q Bi-Condition A bi-conditional statement is a compound statement formed by combining two conditionals under “and.” Bi-conditionals are true when both statements have the exact same truth value. Solution : p↔q means both p→q and q→p p→q is equivalent to ¬p ∨ q and q is equivalent to ¬ q ∨ p So A and B are fine. D is a different way of writing A p ↔ q = (p→ q) ∧ (q→p) = (¬ p ∨ q) ∧ (q → p) [ Since p→ q = ¬ p ∨ q ] = (¬ p ∨ q) ∧ (¬ q ∨ p) = (¬p ∧ p )∨ (¬p