0% found this document useful (0 votes)
43 views

Logic and Set Theory

Uploaded by

Precia Alday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
43 views

Logic and Set Theory

Uploaded by

Precia Alday
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 110
TABLE OF CONTENTS CHAPTER 1: ALGEBRA OF PROPOSITION Algebra of Propositions. Propositions, Exercises... Logical Operators. Exercises, Operation on Statements. Exercises, Logical identities. Exercises, Chapter Test. CHAPTER 2:QUANTIFIERS Quantifiers 2 The Three Quantifers. Exercises Negation of Quantifer.... Exercises, Chapter Test. CHAPTER 3. BOOLEAN ALGEBRA Boolean Algebra Exercises, The Basic Laws in Boolean Algebra, Exercises, Ten Basic Rules of Boolean Algebra. Exercises, 3 De Morgan's Theorem, Exercises, Logic Gates, Exercises, Chapter Test. CHAPTER 4, LOGICAL REASONING Logical Reasoning... Exercises, . Analyzing Arguments using Truth Table. 7 7 a 22 23 23 25 26 27 28 29 29 30 31 31 34 35 37 4 Exercises... Chapter Test. CHAPTER 5. SETS AND SUBSETS Set Exercises, Set Theory Symbol Exercises, Subset... Solving Problem using the Concert Set Toes ekg the Methods of Venn Diagram, Exercises, Chapter Test. CHAPTER 6. BASIC SET OPERATIONS Set Operation Exercises... Algebra of Set. Exercises... Chapter Test. CHAPTER 7, SETS OF NUMBERS Set Basic Operation of Sets, Exercises... Types of Sets. Exercises... Chapter Test. CHAPTER 8. FUNCTIONS Function. Exercises. Types of Function, Exercises. Chapter Test... CHAPTER 9. PRODUCT SETS & GRAPHS OF FUNCTIONS Ordered Pair. Exercises. Product Set. 43 43 45 47 50 cil 87 Sess 94 95 95 Breteisessxucaismscnistin The Graph of a Function... Exercises, Chapter Test. CHAPTER 10. RELATIONS: Relation. Exercises. ‘ Properties of Relation Exercises. Relation represented by diagraph. Exercises. Equivalence Relation. Exercises. : The Well Ordering Principle Exercises, Transitive Closure... Exercises. Chapter Test... 7 102 103 104 105 105 106 106 106 107 108 108 108 109 109 109 CHAPTER 1 Agebra of Propositions Introduction: inmathematics, we are in business of providing or disproving certain types of sentences ‘As such, we are concerned with sentences that are either true or false. These are called propositions, This chapter presents the propositions, compound proposition, the use of logical identities and the three primary logical operations such as AND, OR, and NOT, 1. Solve traditional logical problems by algebraic methods 2. Make use of such logical identities to prove any expression to be true or not. 3. Use the three primary logical operations AND, OR and NOT in logical problems. Lecture Notes ‘What is Algebra of Proposition? Algebra of Proposition is a branch of mathematical logic that deals with propositions from the aspect of their logical meanings (true or false) and with logical operations on them. ... The development of the algebra of logic was an atternpt to solve traditional logical problems by algebraic methods. 1.1. PROPOSITIONS 1.14. Proposition In Logic, a proposition is a statement that affirms or denies something, The meaning expressed in such a statement, as opposed to the way it is expressed. In Mathematics it is a theorem to be demonstrated or a problem to be solved and a statement which has a truth value either true (1) or false (F). Examples of propositions are’ 1. Abicycle has two wheels’ that can be assigned a value of T: 2. Abicycle has ten wheels’ that can be assigned a value of 'F 3. The planet Earth is round’ that can be assigned a value of T; 4, The planet Earth has the shape of a cube’ that can be assigned a value of 'F 1:12. Law of Dichotomy ‘An important property of propositions is that they satisfy the law of dichotomy, that is, a proposition must have a logical value of either true (1) or false (F). Thus, a statement that cannot clearly be assigned a logical value of either true (T) or false (), is not a proposition. 1.1.3. Law of the excluded middle Another important property of propositions is that they satisfy the law of the excluded middle, that is a proposition cannot be simultaneously true (T) and false (F) Thus, a statement that cannot unmistakably be assigned one, and only one logical value, is not a proposition. 1.1.4, Proposition versus statements Itis important to stress at this point that not all statements are propositions. ‘An illustrative example of this, given by Dr Guillermo Miranda, is the statement ‘trains.’ Let us assume that it is raining today but that it will be sunny tomorrow. The statement ‘It rains today’ is then true (1), however the statement ‘It rains everyday’ is false (F). Thus, the logical value (that is whether itis T or F) of the statement ‘It rains’ depends upon the context in which itis said. Therefore ‘It rains' cannot be assigned clearly and unmistakably a unique logical value, and thus it is not @ proposition. Thus, itis very important when one applies a mathematical property or proposition to the development of models in natural sciences, to keep in mind the context or assumptions that form part of the mathematical proposition, to ensure that itis applicable to the given model 1.15, Equal propositions Within propositional algebra, two propositions are said to be equal if and only if they have the same logical value. Thus, from this definition, given two propositions A and B, the following can be stated: if A and B are both true (1) then they are equal, that is A = B; if A and B are both false (F) then they are equal, that is A = B; if Ais true (T) and B is false (F) then they are not equal, that is 4 # B if Ais false (F) and Bis true (T) then they are not equal, that is 4 # B. Note that the four items above cover all the possible combinations of the logical values of propositions A and B; regardless of what propositions A and B actually are. 1.16, Examples To illustrate the ideas, consider the propositions presented in section 1.11, and defining propositions A, B, C, and D: Az A bicycle has two wheels’: BE “A bicycle has ten wheels’ C= The planet Earth is round; D= ‘The planet Earth has the shape of a cube’; it follows that A=C that is ‘A bicycle has two wheels'= The planet Earth is round’; since both A and C are true (T), It also follows that B=D that is ‘A bicycle has ten wheels’ = ‘The planet Earth has the shape of a cube’ since both B and D are false (F) In turn, it then follows that A#D that is ‘A bicycle has two wheels'# ‘The planet Earth has the shape of a cube" since A is true (T) and D is false (F). It also follows that BeC that is A bicycle has ten wheels' # The planet Earth is round’; since B is false (F) and C is true (7). Additionally, one can also state that AtB that is ‘A bicycle has two wheels'# A bicycle has ten wheels’ since A is true (T) and 8 is false (F). It also follows that c#D that is The planet Earth is round’: 'The planet Earth has the shape of a cube" since C is true (T) and Dis false (F). As a final example consider the following two propositions * ‘A bicycle has eleven wheels’ that can be assigned a value of 'F * ‘Abicycle has twelve wheels’ that can be assigned a value of F Since both propositions have the same logical value of false (F, it follows that both propositions are equal in propositional algebra, that is ‘A bicycle has eleven wheels'= ‘A bicycle has twelve wheels EXERCISE: A. Read the following set of statements. Identify whether itis true or false in its nature. 1. a. There are 12 months in a year. b. There are 15 months in a year. 2. a, Rainbow has 6 colors b, Rainbow has 7 colors. B. Using the four statements above, apply the concepts in equal proposition 1.2. LOGICAL OPERATORS. What is a logical operator? A logical operator defines a new proposition, S, from one or more given propositions A, B.... such that the logical value of the new proposition S depends on, and only on, the logical values of the given propositions 4, 8, A logical operator is uniquely determined by its truth table. A truth table presents al the possible combinations of logical values for the given propositions 4, B,... and the corresponding logical value of $ for each combination. 1.2.1. The + operator (NOT) Not A (=A) is true when A is false, and vice-versa, “P| 5 Example using statement Statement: 6 is a prime number. Not Operator: 6 is not a prime number; Its not true that 6 is prime. 1.2.2. The V operator (OR) Given two propositions A and B, the new proposition A VB may be formed, Take note that A or Bis true if either A or B is true, including the case when both are true. AAB a) 3) 3) tn) 3) a) 3] oe a) a] oa] Example using statement pvq Let p=Washington is in Canada. Let g= London is in England, Or Operator: Washington is in Canada or London is in England 1.2.3. The A operator (AND) Given two propositions A and B, the new proposition A AB may be formed. Take note that, A and B (AaB) is true when both A and B is true. A | BAB a] at) 3] 3) a] 3) 3] 5) | 3) 3] 3) Example using statement: paq Let p=Washington is in Canada Let q= London is in England, And Operator: Washington is in Canada and London is in England EXERCISE: A. Draw a truth table for the following proposition’ rhs suvy ayA~z Read the statements below. Using the 3 logical operators, give what is being asked. Perform the - operator in the following statement, a 5is an even number. b. Thas no factor. . Earth is the fourth planet from the Sun 2, Perform the v and A operator in the following statement a. Manila is the capital of the Philippines. Bangkok is the capital of Thailand, b. Mt. Fujiis in Japan. Mt. Kilimanjaro is in Tanzania. 3. Using the following statements, perform what is needed. u- The sky is blue, v- The leaves are green. w- The sun is yellow. acu b. suv © vvw d. u Aww ev Anw 13. OPERATIONS ON STATEMENT 1.3.1 Negation The negation of a statement A, denoted by 7A (‘not A’), is the statement that is true if A is false, and false if A is true. 10 Tz 133 13.4 13.5 Example’ 1) fp: °2 is even” then sp: °2 is not even’ 2) If ps2 +2= 5" then sp:'2+2 #5" Conjunction The conjunction of two statements A and B, denoted by A AB (“A and B’), is the statement which is true if and only if A is true and B is true. We read it as “and”. Disconjunction The disjunction of two statements A and B is a statement AVB which is true if and only if Ais true or B is true. Similarly, the disjunction of p and q has value false only when both are false. We read it as “or’. Implication The implication of p and g has value false only when p is true and q is false. itis denoted by p ~ q and read ifp then q, A statement in the form p ~ q is also called a conditional statement, in which p is a sufficient condition for q and q is a necessary condition for p. Equivalence Staternents The equivalence statement p + q is true only when p and q have the same value. Itis read p if and only if q and is also called a biconditional statement, in which p is a necessary and sufficient condition for q, and vice versa, Theorem: The following is a list of some common logical equivalence rules: 1) pAg=aqnp pvg=qvp 2) PAGAN =(PAQAr pv@vn )vr 3) PAV) VV (pAr) PVGAN=(PY@AYN 4) >Gp)=p Fey 13.6. The Truth Table A table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements. In using truth table, we will need to use the operations on statements. To review, the following symbols are shown below. The Truth Table P q paq pyq p>q peq T T T T T T T F F T F F F T F T T F F F E F T T Example: 1. Construct a truth table for the statement (m—-p) m ® =P m=--p T T F F T F T T F T F T F F T T 2. Construct a truth table for the statement (map) =r m p =p masp t (map) or T T F F T T T F T T T T F T F F T T F F T F T T T T F F F T T F T T F F F T F F FE T F F T F F T In this case, when mis true, p is false, and ris false, then the antecedent ma=p will be true but the consequence false, resulting in an invalid implication; every other case gives a valid implication. 2 Exercise: 14. A. Write the following propositions using x, y, and z. Let x: "There are clouds." y: ‘It is raining”, z: "it is not sunny." There are clouds if and only fit is raining, IF there are no clouds, then it is sunny. Wefan ewne Nowawne 10. n 12. Either it is raining or sunny. IFit is not sunny, then either there are clouds or itis raining, itis not raining if and only if there are no clouds and it is sunny. Construct a truth table for the staternent: (aap) vr (xa-y)Az ex(fv-g) Logical Identities Identity Laws Domination Laws idempotent Laws Double Negation Law Commutative Laws Associative Laws Distribution Laws De Morgan's Laws Miscellaneous or Tautology ‘And Contradiction Implication Equivalence . Bicondtional Equivalence Logical Identities pal op; pvFeop PT q) © Gp vq) Peoger(p>q) » (Gp) 2B The Proof Process y + [= Example: 1. Prove: (pq) v q <= pvq, Solution: para) vq Left-Hand Statement qv (pra) Commutative © (qvp) A (g vq) Distributive © (vp) aT Or Tautology = avp Identity © pvq Commutative Take note: Begin with exactly the left-hand side statement. End with exactly what is on the right. Justify EVERY step with a logical equivalence EXERCISE: 1. Prove: p+.q@-q > =p 2. Provep 9 CHAPTER TEST: A. Write the following propositions using p, q, Let p: “Today is cold’, q: “Today is hot", and r: “Today is windy’ a) Today is hot if and only if not windy. b) Either today is cold or not cold. ©) If today is not windy then it is not hot, ) Today is neither cold nor windy. €) If today is windy then either it is hot or cold. B. Draw the truth table for each of the following propositions. a). pVv-q b). = (pAq)—>p 9. (PA -g) + Gp va) d).(p +g) +6 2). [0 Ag) = bp viqs =n] C. Draw the truth table for each of the following propositions USING (<—>) (V) (=) (A) (3). 1. p: (5 is a positive integer) q; (4 > 5) 2 p:(3<4)q:@-2= 6) 3. pi(4< 4) q: @- =6) 4. p:(4>5);q(9-2 = 6) 5 p@+2=4).q:2=4-2) 6. pS > 3); q: (16= 0) D. Write an equivalent statement using contrapositive a) If study hard then | get good mark. b) Ifit rains then it is not hot. ©) If today is not Sunday then tomorrow is not Monday. 15 d) If | am not lazy then | come to the lecture. E. Prove by applying the logical equivalence rules. a) +(p +g) =pA-g b)p=q=-g--p Op=q-n=q>(p-n dp>@an=prqQaip>n a (pvg =r=(p-NAG=7 F, True or False, Prove by any method you like. ap-g-ns(p-q—r bp+-qvn=(p7qvp-n OPAG=N= (pA) > (pan dpva-n=@vq-—vn G. Using logical identities, 1. Prove: p> pv qisa tautology. 2. Prove: (pag) — pis a tautology. 3, Prove or Disprove: p> q>pa—q 7??? Reference: Wofister ee duki rs NGOVnotes chi. pdf https://courses lumenlearning.com/mathdlibarts/chapter/truth-tables-and-analyzing- arguments-examples/ 16 CHAPTER 2 Quantifiers Introduction: Remember that the sentence “x is an American, is not a proposition. This is because the truth of the statement changes based on different values for xx. Such a sentence is called ‘an open sentence or predicate. However, itis quite useful to include variables in our statements, so our logic should be able to accommodate that. To this end we introduce quantifiers. A quantifier is a symbol which states how many instances of the variable satisfy the sentence. This chapter presents the logical connectives, predicates and quantifiers 1. Analyze the logical structure of statements symbolically, including the penne proper use of logical connectives, predicates, and quantifiers. Use the appropriate quantifier that indicate the number of elements that a statement pertains to. Clee Lecture Notes What is Quantifier? A quantifier is a word or phrase which is used before a noun to indicate the amount or quantity: ‘Some’, 'many,'a lot of and''a few’ are examples of quantifiers. Quantifiers can be used with both countable and uncountable nouns. .. There is a large quantity of fish in this river. He's got more friends than his sister. 2.1 The Three Quantifiers 2.1.1. Universal Quantifier The universal quantifier, V, reads “for all’. IFE is a set and P is a predicate defined on elements of E (that is, a Boolean-valued function P: E — (true, false}), then the assertion v7 Vx € E, P(x) states that P(x) is true for all elements x of E. Example 1. Wx(x? > 0), ie., “the square of any number is not negative.” 2. vxvy(x+y =y +2), ie, the commutative law of addition 3. wxvyW2((x + y) + z= x(y + z)), ie, the associative law of addition. The “all” forrn. The universal quantifier is frequently encountered in the following context: vx(P(x) = Q@)), which may be read, “All x satisfying P(x) also satisfying Q(x)". Parentheses are crucial here; be sure you understand the difference between the “all” form and which may be read, "All x satisfying P(x) also satisfy Q(x)" Parentheses are crucial here; be sure you understand the difference between the “all” ¥x(P(x) = Q(x)), and (vx(P@)) = Q@). The latter formula might also be written as vx(P(x) => Q(x))which is to say that the universal quantifier has higher precedence than the conditional; to avoid misunderstanding, it is best to include the parentheses. The meaning of this formula might nat be clear at first. ThexinP() is bound by the universal quantifier, but the xin Q(x) is not. The formula vx(P(x) = Q(x))has the same meaning as (¥x(P(x) = Q(y) and its truth depends on the value assigned to the variable in Q(), Example: 1. a(x isa square = xis arectangle), ie, “all squares are rectangles.” 2. ¥x(x lives in Walla Walla = x lives in Washington), ie,” every person who lives in Walla Walla lives in Washington.” This construction sometimes is used to express a mathematical sentence of the form "if this, then that," with an "understood" quantifier. Example: 1. Ifwe say, "ix is negative, so is its cube,” we usually mean "every negative x has a negative cube’. This should be written symbolically as Wx(x <0) = (x? < 0)) 18 2. “If two numbers have the sae square, then they have the same absolute value” should be written as. va¥y((x? = y*) = (lel = byl) If Sis a set, the sentence “every x in S satisfies P(x)" is written formally as vx((x € 5 > P(x)) For clarity and brevity, this is usually written vx € S(P(x). To understand and manipulate the formula Wx € S(P(x) properly, you will sometimes need to “unabbreviate” it, rewriting it as vx((x € S => P(x)), Example: 1. wx € [0,1](Vx = x) stands for vx(x € [0,1] = Vx =x) 1. Wx < O(lxl = =x) stands for vax(xr < 0 > xl = —x) 2.12, Existential Quantifier The existential quantifier, 3, reads “it exists’. If E is a set and P is a predicate defined on the elements of E, then the assertion ax € E, P(x) states that there exists an element x of E such that P(x) is true. Example. Let P(n) be a predicate defined on the set of integers by “n is even’. The assertion 3n, P(n) states that there exists an even integer. The assertion Wn,P(n), which is false, states that all integers are even We will sometimes use a modified version of 3 which states existence of a unique element of a set satisfying a given predicate Another example: x(x > x) is true since x = 0 is a solution, There are many others. © ax ay (x? + y? = 2xy) is true since x = y = 1 is one of many solutions. The 'some” form. The existential quantifier is frequently encountered in the following context: ax(PQ) AQ), which may be read, “Some x satisfying P(x) also satisfies Q(x)." Example 19 * ax(x is a professor Axis a republican), ie, "some professor is a republican.” * ax(x is a prime number Ax is even), ie., ‘some prime number is even.” It may at first seem that “Some x satisfying P(x) satisfies Q(x)" should be translated as ax(P(x) = Q(x), like the universal quantifier. To see why this does not work, suppose P(x) and Q(x) = "xis an orange”. The sentence "some apples are oranges" is certainly false, but ax(P(x) = Q(x), is true, To see this suppose x9 is some particular orange. Then P(x) = Q(x) evaluates to F=9T, which is T, and the existential quantifier is satisfied ‘We use abbreviations of the "some" form much like those for the “all” form. Example: 3x < (x? = 1) stands for ax((x < 0) A (x? = 1) © ax € [0,1](2x? + x = 1) stands for 3x((x € [0,1]) A(2x? +x ») If ¥ corresponds to “all” and a corresponds to "some" do we need a third quantifier to correspond to "none"? As the following shows, this is not necessary: Example: * "No democrats are republicans’, can be written as vx(x is ademocrat > x is not a republican). * "No triangle are rectangles,” can be written x(x isa triangle > x is not a rectangle). In general, the statement ‘no x satisfying P(X) satisfies Q(x)" can be written vx(P(x) = =Q(@)), (You may wonder why we do not use 3x(P(x) A Q(x)). In fact, we could—it is equivalent to ax(P(x) = Q(x), 20 2.13. The Existential Quantifier (followed by the exclamation point) The existential quantifier followed by the exclamation point, al, reads ‘there is a unique”. If E is a set and P a predicate defined on elements of E, then the assertion al x EE, P(x) states that there exists a unique element x of E such that P(x) is true. Example: Let P(x): x + 2 = 5. a. Wx Ply): “for al real numbers x, x + 2 = 5°, which is false. b, 3x P(x): “there is a real number x such that x + 2 = 5", which is true. ©. 31x P(e): “there is a unique real number x such that x + 2 = 5°, which is true. d. 3x PQs) “there is a real number x such that x + 2 = S* @, 73x P(x): “there is no real number x such that x + 2 = 5" which is equivalent to f Wy -P(W): “for all real numbers x, x + 2 #5". Q. Vx P(x): “for all real numbers x, x + 2= 5°. h. +x P(x): ‘not all real numbers x satisfies x + 2 = 5° which is equivalent to 3y i, >PQ): “there is a real number x such that x +2 # 5" EXERCISE: In these problems, assume the universe of discourse is the real numbers. A. Express the following as formulas involving quantifiers: a) Any number raised to the fourth power is non-negative. b) The sine of an angle is always between +1+1 and -1-1 ©) The secant of an angle is never strictly between +1+1 and -1-1 B, Suppose X and Y are sets. Express the following as formulas involving quantifiers a) Every element of X is an element of ¥. b) Same element of X is an element of ¥. ) No element of X is an element of Y. a C. Express the following laws symbolically a) the commutative law of multiplication b) the associative law of multiplication the distributive law D. Are the following sentences true or false? 1. Wx Vy(x < y > x? (Wx € E, Pw) = Ix EE, 4P(X) (2) > (Ax EE, P(X) = We EE, PL), Thus if E and F are two sets and P a predicate of two variables x € E and y € F, the negation of Wx € E,ay € F,P(y) is ax € XWy € F,aPlKy) Therefore, the negation of All sheeps are black is the statement There exists a sheep that is not black and reversely 22 Similarly, the negation of All men have at least one friend There is a man who has no friends. Indeed, if E is the set of men and P(xy) denotes “y is a friend of x’ then the first statement translates into vx € E.ay EEPKxy), and its negation is therefore ax € Evy € E,-PKy) EXERCISE: Negate the following statements then denote it using symbols. All dogs are poodles. Some books have hard covers. No USS. presidents were residents of Georgia, Some cats are mammals, Some cats aren't mammals. veer CHAPTER TEST A Let P(x): x < 2x a) What is the value of Wx P(x)? b) What is the value of 3x P(x)? ©) What is the value of a! x P(x)? B. Let P (x y): x + y? = («+ y* Find the values of the following propositions, a) 3x By P (x,y) b) Ax vy P (« y) ©) Vx By P (x, y) ) By vx P (Ky) €) Wy ax P (x y) 23 . Repeat the Problem in B employing a! instead of a D. Repeat the same problem in B using the following predicates. aP wy +y>0 b)P Wy) ey 2d OP &yixt-y¥ 20 AP & yxe-y? > 0 E, Suppose P(x) and Qty) are formulas. a) Is 3x Sy(P(x) A Q(y) equivalent to 3x (P(x) ABQ)? Reference: https:/Awww_ whitman,edu/mathematics/higher_ math online/section01,02,html bttos//www math fsuedu/~wooland/nm2ed/Part?Module/Part2Madulel pdt 24 CHAPTER 3 Boolean Algebra Introduction: George Boole, a nineteenth-century English Mathematician, developed a system of logical algebra by which reasoning can be expressed mathematically. In 1854, Boole published a classic book, "An Investigation of the Laws of thought” on which he founded the Mathematical theories of Logic and Probabilities. This chapter presents the Boolean Algebra and its rule, the basic laws of Boolean algebra. It will also discuss the ten basic rules of Boolean algebra, the De Morgan's theorem, and the Logic gates. 1. Specifies the relationship between Boolean variables which is used to design combinational logic circuits using Logic Gates. 2. Demonstrate knowledge and understanding on Laws of Boolean Algebra Lecture Notes WHAT IS A BOOLEAN ALGEBRA? 3.1. BOOLEAN ALGEBRA Boolean lagic is an abstract mathernatical structure. Boolean Algebra is the calculus of logic. ttis used to analyze and simplify the digital (logic) circuits. It uses only the binary numbers ite, O.and 1. Its also called as Binary Algebra or logical Algebra. Boolean algebra was invented by George Boole in 1854. Boole tried to formalize the process of logical reasoning using symbols instead of words. Boolean Algebra provides us a basic logic for the operations on binary numbers 0, 1. Therefore, Boolean Algebra an essential tool since telephone, computers and many kinds of electronic control devices are based on a binary system, this branch of Mathematics are very useful for the internal warking, 25 Boolean refers to a system of logical thought that is used to create true/false statements 1is considered to be true because it is non-zero. The fourth expression assigns a value of 0 to 1. Vis considered to be false 3.1. Rule in Boolean Algebra Following are the important rules used in Boolean algebra + Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW. + Complement of a variable is represented by an overbar (-). Thus, complement of variable B is represented as B. Thus if8 = Othen B =1andB=1then B =o. © ORing of the variables is represented by a plus (+) sign between ther, For example, ORing of A, B, C is represented as A + B + C. ‘+ Logical ANDing of the two or more variable is represented by writing a dot between them such as A.B.C. Sometime the dot may be omitted like ABC. EXERCISE: 1. Boolean algebra is a strange sort of math. For example, the complete set of rules for Boolean addition is as follows: tet=1 Suppose a student saw this for the very first time, and was quite puzzled by it. What would you say to him or her as an explanation for this? How would in the world can 1+1=1 and not 2? And why are there no more rules for Boolean addition? Where is the rule for 142 or 2+2? 2. The following set of mathematical expressions is the complete set of times tables for the Boolean number system: 0x0=0 Ox 1x0=0 1xl=1 26 Explain how this can be so, being that there is no statement saying 1 x2 = 2 or 2 x3 = 6 Where are all the other numbers besides 0 and 1? 3.2. THE BASIC LAWS OF BOOLEAN ALGEBRA 3.2.1. Commutative Law allowing a change in position for addition and multiplication. Any binary operation which satisfies the following expression is referred to as commutative operation Examples i, A-B=B-A ii A+B=B+A Commutative law states that changing the sequence of the variables does not have any effect on the output of a logic circuit. 3.2.2. Associative Law allowing the removal of brackets for addition and multiplication. This law states that the order in which the logic operations are performed is irrelevant as their effect is the same. Examples i (A+B)-C= Ax(B-C) ii, (A¥B)+ C= A+B+0) 3.2.3. Distributive Law allowing the factoring of an expression, are the same as in ordinary algebra Distributive law states the following condition Examples i A= (B+ ©) = ACB)+A(C) Here is list of properties of Boolean Algebra 2 + associativity of a: AA(BAC) = (AAB) AC * associativity of v: AV(BVC) = (AVB) VC. * commutativity of A: AAB = BAA. + commutativity of v: AVB = BVA. + distributivity of A with respect to v: AA(BVC) = (AAB) V(AAC) + the true statement 1 is a neutral element for the operation A, and the false statement 0 is a neutral element for v: for any statement A we always have Al =A, AW=A + 0 annuls all statements: for any assertion A we have AAO = 0. EXERCISE: A. Determine what kind of Boolean law is being applied. 1. (A-B)-C= A“B-C) 2. A> (B+ ©) = A-B)+A(C) 3, AVB = BVA 4, AA(BAC) = (AAB) AC 5, AtB=B+A, B. The Law of Distribution in Boolean algebra is identical to the law of distribution in normal’ algebra: A(B+ ©) = ABHAC Applying the Law of Distribution While the process of distribution is not difficult to understand, the reverse of distribution (called factoring) seems to be a more difficult process for many students to master: AB+AC= A(B+ C) Factoring A out of each term 28 Survey the following examples of factoring, and then describe what this process entails What pattern(s) are you looking for when trying to factor a Boolean expression? CD+AD+BD=D(C+A+B) XY Z+XYZ=Y(XZ+XzZ) J+ JK =J(+K) AB+ ABCD + BCD + B= B(A+ ACD+CD+1) 3.3. Ten Basic Rules of Boolean Algebra Anything ANDed with a 0 is equal to 0. A*0 = 0 Anything ANDed with a 1 is equal to itself. A* Anything ORed with a 0 is equal to itself, A + Anything ORed with a 1is equal to. A+ 1=1 Anything ANDed with itselfis equal to itself. A* A = A Anything ORed with itself is equal to itself. A + A = A Anything ANDed with its own complement equals 0. A*A Anything ORed with its own complement equals 1. A & A. > A 1 Anything complemented tuice is equal to the original, A= A 10, The two variable rule, AFAB=A+B POENauawne EXERCISE: ADetermine which rule is being used in each step of the following Boolean simplification: AB + B(B+C) + BC AB + BB+ BC + BC AB +B+ BC +BC AB} BA BC AB+B+C B+C 29 B. A student makes a mistake somewhere in the process of simplifying the following Boolean expression’ AB+A(B+C) AB+AB+C ABEC Determine where the mistake was made, and what the proper sequence of steps should be to simplify the original expression. 3.4, De Morgan's Theorem ‘+ De Morgan's theorem allows large bars in a Boolean Expression to be broken up into smaller bars over individual variables. + De Morgan's theorem says that a large bar over several variables can be broken between the variables ifthe sign between the variables is changed. + De Morgan's theorem can be used to prove that a NAND gate is equal to an OR gate with inverted inputs. + De Morgan's theorem can be used to prove that a NOR gate is equal to an AND gate with inverted inputs. + Inorder to reduce expressions with large bars, the bars must first be broken up. This means that in some cases, the first steo in reducing an expression is to use De Morgan's theorem. itis highly recommended to place parentheses around terms where lines have been broken. For example: Apply De Morgan Theorem to remove the overbar covering both terms from the expression, X= +D To apply DeMorgan’s theorem to the expression, you can break the overbar covering both terms and change the sign between the terms. This results in 30 Deleting the double bar gives X=C:D EXERCISE: Use DeMorgan's Theorem, as well as any other applicable rules of Boolean algebra, to simplify the following expression so there are no more complementation bars extending over multiple variables 2 3. xyviy 35. Logic Gates Logic gates are the basic building blocks of any digital system. Its an electronic circuit having one or more than one input and only one output. The relationship between the input and the output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate etc. 3.5.1. AND Gate The AND gate receives two inputs a and b, and produces an output denoted by anb. The truth table for an AND gate is as follows Input. Output ano a fb o [0 0 . J } ab oft 0 7 0 0 This is an AND gate a 1 1 31 The only way that the output can be 1is when a AND b is both 1. In other word there are needs to be an electrical pulse at a AND b before the AND gate will output an electrical pulse 3.5.2. OR Gate The OR gate receives two inputs a and b, and produces an output denoted by AVB The truth table for an OR gate is as follows: put] output ajo avb 0 0 0 0 1 1 1 0 1 1 1 1 Pn This is an OR gate The output will be one when an a and b or both are 1 3.5.3. NOT Gate NOT gate is also The truth table for a NOT gate is as follows: known as Inverter. A not gate is capable of reversing the input pulse. Input a Output ~a 0 1 1 0 D This is a NOT gate The NOT Gate receives an input either a pulse (1) or no pulse (0) and produces an output that follows Ifinput a is 1, the output is 0. IFinput a is 0, the output is 1 32 These three gates, NOT, AND, and OR, can be joined together to form combinatorial circuits to represent Boolean expression. Example: Use logic gates to represent a ~pva Solution: Draw up the truth table for each circuit P | q | ~P | ~pva ofofifd 7? = b. wy) Anx Solution: Draw up the truth table for each circuit x] y pw] ~~ | wyax 0 0 0 1 0 0 1 1 1 1 1 oO 1 0 0 1 1 1 0 0 33 EXERCISE: ‘A, Write the Boolean expression for each of these logic gates, showing how the output (Q algebraically relates to the inputs (A and B): 7 :4D-- B. Convert the following logic gate circuit into a Boolean expression, writing Boolean sub-expressions next to each gate output in the diagram 34 Chapter Test: Identify each of these logic gates by name, and complete their respective truth tables: seem Det B B B =]-J2]e]>) ALB] Ouy Ala 5 5 0 [0 ola 0/0 oir oft oyt [6 ifo ijo ift ft it Use logic gates to represent these expressions and draw up the corresponding truth table. 1. xA(-yvx) 2. av(~bAc) 3. [av(~bvo)] A~b 35 Write down the Boolean expression for each of the circuits below. 48 b Give the relationship that represents the dual of the Boolean property A + 1 = 1? (Note: * = AND, + = ORand' = NOT) 1 AM1=1 2. A*0=0 3, A+0 A A*ASA 5. Att=1 Reference: hups://www.tutorialspoint,com/computer_logical_organization/boolean_algebra,htm hups://pbte.edu.pk/text% 20books/dae/math_123/Chapter_11.pdf htip//www_cimtorg.uk/projects/mepres/alevel/discrete_ch1L pdf hups://www.allaboutcircuits.com/worksheets/boolean-algebra/ hupy/www.ee.surrey.ac.ul’Projects/Labview/boolalgebra/quiz/index.huml ll c a A ification/4 hups://www.siue,edu/~jloreaw/courses/math-223/notes/sec-quantifiers.html hups://www.allaboutcircuits.com/worksheets/boolean-algebra/ 36 CHAPTER 4 Logical Reasoning Introduction: Logic may be defined as the science of reasoning. However, this is not to suggest that logic is an empirical (ie, experimental and observational) science like physics, biology or psychology. Rather, logic is a non-empirical science like mathematics. Also, in saying that, logic is the science of reasoning, we do not mean that is concerned with the actual mental (or physical) process employed by thinking entity when it is reasoning, The investigation of the actual reasoning process falls more appropriately within the province of psychology, neurophysiology, or cybernetics. Distinguishing correct reasoning from incorrect reasoning is the task of logic. This chapter presents the argument and its components, constructing truth tables, proving and disproving hypothesis, evaluating the truth of staternent and the different types of reasoning, 1. Isolate and identify the various components of any given argument. 2. Construct truth tables, prove or disprove a hypothesis, and evaluate the ise ‘truth of a statement using the principles of logic. 3. Discuss the different types of reasoning erg Lecture Notes 4.1 Logical Reasoning? Logical reasoning is a form of thinking in which premises and relations between premises are used in a rigorous manner to infer conclusions that are entailed (or implied) by the premises and the relations. It is the umbrella term for at least three different types of reasoning. These are known as deductive reasoning, inductive reasoning and abductive reasoning and are based on deduction, induction and abduction respectively. 4.11, What is an Argument? Logical argument is a claim that a set of premises support a conclusion 37 Iris also a collection of statements, one of which is designated as the conclusion, and the remainder of which are designed as the premises. Note that it is not a definition of a good argument. Also, note that in the context of ordinary discourse, an argument has an additional trait Usually, the premises of an argument are intended to support or justify the conclusion of the argument. The building blocks of a logical argument are propositions, also called statements. A proposition is a statement which is either true or false. For example, “Washington D.C. is the capital of the United States." ‘An argument is connected series of statements that create a logical, clear, and defined statement. There are three stages to create a logical argument: Premise, inference, and conclusion. Stage 1: Premise The premise defines the evidence, or the reasons, that exist for proving your statement Premises often start with words like “because’, "since", “obviously” and so on, Stage 2: Inference In this stage, we take one or more statements that are agreed upon as true and come up with a new statement. This new statement often uses the words ‘implies’, ‘suggest’ or “therefore” Stage 3: Conclusion The conclusion of an argument is a final statement, The conclusion is often stated as the final stage of inference. It’s validity, or truth, is confirmed by the truth of the premises statement(s) and inference statement(s). Conclusions use words like “therefore’, “it follows that” and “in conclusion’. 38 A Logical Arguments Example: + Premise Statements: “Washington D.C. is the capital of the United States.” “The President of the United States lives in the White House." “The White House is at 1600 Pennsylvania Avenue, Washington D.C." © Inference Statements: “These statements imply that the White House is located in Washington D.C.” “These statement also imply that the President lives in Washington D.C. by living in the White House." Conclusion Statement: Therefore, the President of the United States lives in the capital of the United States. 4.12. Two general types of arguments: inductive and deductive arguments. ‘An inductive argument uses collection of specific examples as its premises and uses them to propose a general conclusion. Ex: "The last mayor was honest, The current mayor is honest. All mayors are honest." A deductive argument uses a collection of general statements as its premises and uses them to propose a specific situation as the conclusion. Ex: "Every word has the letter e in it. Therefore, your name has the letter e in it.” For instance, > The argument ‘when | went to the store last week I forgot my purse, and when | went today | forgot my purse. | always forget my purse when I go the store is an inductive argument. The premises are: forgot my purse last week | forgot my purse today The conclusion is: | always forget my purse Notice that the premises are specific situations, while the conclusion is a general statement. In this case, this is a fairly weak argument, since it is based on only two instances. 39 > The argument ‘every day for the past year, a plane flies over my house at 2pm. A plane will fly over my house every day at 2pm’ is a stronger inductive argument, since itis based on a larger set of evidence 4.13. EVALUATING INDUCTIVE AND DEDUCTIVE ARGUMENTS © An inductive argument is never able to prove the conclusion true, but it can provide either weak or strong evidence to suggest it may be true. © A deductive argumentis considered valid if all the premises are true, and the conclusion follows logically from those premises. In other words, the premises are true, and the conclusion follows necessarily from those premises. EXAMPLE 1. The argument “All cats are mammals and a tiger is a cat, so a tiger is a mammal" is a valid deductive argument, The premises are All cats are mammals A tiger is a cat The conclusion is: A tiger is a mammal Both the premises are true. To see that the premises must logically lead to the conclusion, one approach would be use a Venn diagram. From the first premise, we can conclude that the set Of cats is a subset of the set of mammals. From the second premise, we are told that a tiger lies within the set of cats From that, we can see in the Venn diagram that the tiger also lies inside the set of mammals, s0 the conclusion is valid 2. Premise: All firefighters know CPR Premise: Jill knows CPR Conclusion: il is a firefighter From the first premise, we know that firefighters allie inside the set of those who know CPR. From the second premise, we know that Jill is a member of that larger set, but we do not have enough information to know if she also is a member of the smaller subset that is firefighters. Since the conclusion does not necessarily follow from the premises, this is an invalid argument, regardless of whether Jill actually isa firefighter. “it is important to note that whether or not Jill is actually @ firefighter is not important in evaluating the validity of the argument; we are only concemed with whether the premises are enough to prove the conclusion. EXERCISE: 1. Using the three stages (premises, inference and conclusion), create your own logical argument. (At least two arguments) 2. Determine if the following statements is deductive or inductive. a. It’s sunny in Singapore. If it's sunny in Singapore, then he won't be carrying an umbrella. So, he won't be carrying an umbrella b. Every time I've walked by that dog, it hasn't tried to bite me. So, the next time | walk by that dog it won't try to bite me. 3, Evaluate the following deductive/inductive argument. Include a diagram for your answer. a a. Premise 1: All dogs are mammals. Premise 2: All collies are mammals. Conclusion: All callies are dogs b. Premise 1: All cats are mammals. Premise 2: All mammals are animals. Conclusion: All cats are animals. 4.2. ANALYZING ARGUMENTS USING TRUTH TABLES To analyze an argument with a truth table 1. Represent each of the premises symbolically 2. Create a conditional statement, joining all the premises with and to form the antecedent, and using the conclusion as the consequent. 3. Create a truth table for that statement. If it is always true, then the argument is valid. Example: Consider the argument 1. Premise: if you bought bread, then you went to the store Premise: You bought bread Conclusion: You went to the store While this example is hopefully fairly obviously a valid argument, we can analyze it using a truth table by representing each of the premises symbolically. We can then look at the implication that the premises together imply the conclusion. Ifthe truth table is a tautology (always true), then the argument is vali. We'll get B represent ‘you bought bread” and S represent “you went to the store’. Then the argument becomes: Premise: B-SB—S Premise: BB ‘Conclusion: S To test the validity, we look at whether the combination of both premises implies the conclusion; is it true that a2 B s B=S (B=S)aB [(BS)AB)$ T T T T T T F F F T F T T F T F FE T F T Since the truth table for [(B-S)AB]+S[(B-S)AB]—S is always true, this is a valid argument. EXERCISE: Consider the following arguments. Analyze it and prove using truth tables. The variables to be used were indicated in each number. 1. Premise: If goto the mall, then Il buy new jeans Premise: if | buy new jeans, I'l buy a shirt to go with it Conclusion: if | got to the mall, I'll buy a shirt Let M = I go to the mall, J = | buy jeans, and S = | buy a shirt 2. Premise: IF go to school, then I'll graduate. Premise: If I graduate, I'll have a job. Conclusion: If go to school, I'l have a job. Let S= | go to school, G= | graduate and have a job. CHAPTER TEST. A. Differentiate inductive and deductive argument. B. Show the stages of creating logical argument using a graphic organizer, Give example in each stage C. Consider the arguments. Identify and prove if itis valid or invalid argument. 4. Premise: If you live in Seattle, you live in Washington. Premise: Marcus does not lve in Seattle. Conclusion: Marcus does not live in Washington. “You are a married man, so you must have a wife.” D. Using truth table, analyze the arguments. Premise: If | work hard, I'l get a raise. Premise: If | get a raise, I'll buy a boat. Conclusion: If | don’t buy a boat, | must not have worked hard N 43 E. Premise 1: Most peacocks eat oatmeal for breakfast. Premise 2: This bird is a peacock. Conclusion: Therefore, probably this bird eats oatmeal for breakfast. References: hups://www.fibonicci,com/logical-reasoning/ https://www.lead4change.org/2014/03/06/taking-lesson-crafting-logical-argument/ hups://link. springer comvreferenceworkentry/10.1007%2F978-1-4419-1428-6 790 https://courses.Jumenlearning.com/wmopen-mathforliberalarts/chapter/building-arguments-with- logic/ hups://iep.utm.edu/ded-ind/ htips://courses.lumenlearning.com/atd-pima-philosophy/chapter/1-2-arguments-) reasoning/ huwps://courses.lumenlearning.com/mathdlibarts/chapter/truth-tables-and-analyzing-arguments- examples! CHAPTER 5 Sets and Subsets Introduction: The notion of set in mathematics is ancient. However, the modern theory of sets was bom in the 1870s under the impetus of mathematicians like Georg Cantor (1845-1918) and Richard Dedekind (1831-1916). The discoveries of paradoxes such as Russel’s one led in the beginning of the 20th century to a formalization of the theory of sets and a discovery of different axiomatic formulations, including that of Zermelo-Frankel which is the most widely used nowadays. The introduction by Cantor of the Theory of Cardinals for infnite sets has been considered as a genuine revolution in the late nineteenth century. This chapter presents the concept of sets and subsets. It will also deal in solving a problem which include the use of Venn diagrams. This chapter includes the operations and properties on sets and subsets as well SEPA 1. Solve problems using the concepts of set theory, including the methods Objectives RUA 2. Demonstrate understanding on the different concepts, operations and properties on sets and subsets. Lecture Notes 5.1 Set Set is an organized collection of objects, things or symbols with common characteristics that are clearly defined. The individual objects in a set are called the members or elements of the set. There are three ways to describe sets: 1. Listing the Elements (Rooster Method) The set can be defined by listing allits element, separated by commas, and enclosed within braces Examples P= {b,e,m,s,y} 4s ¥=(135,7,9} P= (vw,x,y,2} 2. Describing The Elements The set can be defined, where possible, by describing the elements clearly in words. Examples: Eis the set of the multiples ofS. Mis the set of vowels in the English alphabet Zis the set of months of a year. 3. Description by Set Builder Notation The set can be defined by describing the elements using mathematical statements. This is called the set-builder notation. Examples: 1. C= (x:xis aninteger,x > -3} This is read as: “C is the set of elements x such that xis an integer greater than -3 2, D = {x:x is the capital city of the Philippines} * We should describe a certain property which all the elements x, in a set, have in ‘common so that we can know whether a particular thing belongs to the set. * We relate a member and a set using the symbol €. If an object x is an element of set A, we write x € A. If an object z is not an element of set A, we write x € A * denotes “is an element of' or “is a member of or “belongs to". € denotes “is not an element of’ or "is not a member of" or “does not belongs to”. Example: IfA = {13,5}, then 1€ Aand2¢A 46 EXERCISE: HOV Renee Read the following questions. Choose the correct answer. Which of the following set is shown with roster notation? a (qeZ|-4°5) vb. (q¢Zlqz-5) c {x€R|x<3} d. All of the above. ‘Write each given set in the Set-Builder Form: 12,4, 6, 8, 10} 2,3,5,7, 1) (lanuary, June, July} {a,€, i, 0, u} (Tuesday, Thursday} Write each of the following sets in the Roster form: The set of first seven natural numbers. a7 The set of whole numbers less than 5. The set of five numbers each of which is divisible by 3. The set of whole numbers less than 20 and divisible by 3 The set of integers greater than -2 and less than 4. hewn D. Using the items in B, write each set in a form of describing elements 5.2. Set Theory Symbols Set P= {1,3} Collection of abjects B= {23,9} 3,9} a Intersect Gy Belong to both set A and set B u Union AUB ={1,2,3,9} _| Belong to set A or set B < Proper Subset (ea ‘A set that is contained in CcB another set. < Subset (yea A set that is contained in or {13} SA equal to another set. € Not a Proper {13} eA A set that is not contained in Subset another set. 5 Superset Bac Set B includes set C € Is amember 3EA 3 is element in set A é Isnota member 4€A 4is not an element in Set A Other concepts of sets > The empty set or null set is the set that has no elements > The cardinality or cardinal numbers of a set is the numbers of elements in a set. > Two sets are equivalent if they contain the same number of elements. > Two sets are equal if the contain the exact same elements although their order can be different N, the set of natural numbers (non-negative integers) 0,1.2, Z, the set of all integers ~, -2, -2,0,1,2, > Q the set of rational numbers, i. the ones of the form p q where p and q are integers with q not equal to zero. > R, the set of real numbers. vy 48 Example of using the symbols in sets * The set of natural numbers N contains the elements 12,3. © The set of integers Z contains all the natural numbers together with their negative and zero: -3, -2, -1,0,1,2,3 * The set of rational numbers Q contains of numbers of the form a/b where a and b are integers with b=0, for examples 1/3, 5= 5,1, -22/7, 0/19, etc. Hence all integers are rational numbers, but some rational numbers are not integers The set of all real numbers is denoted by R. The set of irrational number 3 contains of all real numbers which are not rational, such as ¥2,n, etc. * The set of even numbers E contains the elements 0, +2, +4, 6, ... which are those of the form 2n for the same integer n. The set off odd numbers U is the set of integers which are not even. Hence odd numbers are +11, +3, 5, which can be written as 2n+1 for some integer n. In Summary Z={0,41,42,43,_} N= {x €Z|x > 0} e={2nln€Z} U={x€Z|\x €e} a/bla € Z*b EN} fre Rlx€ Q) Example: Describe the elements of each set. 1. SetA 2. SetB 49 3. Describe the subset and universal set shown below, v Answers: i In this example, we can describe the sets es this way, Z Set Y is the universal set The set of vowels and the first five consonants in alphabet. Set X is a subset of Y. The set of first five consonants in EXERCISE: Alf, A=13,5,7,9} B=2,.4,6,8, 10) C= (12, 14, 18, 20, 24) D = (21, 26, 31, 36} 1. State whether true or false. aisec b6eA col d.24EC e31ED 2. Fill in the blanks. aze__ b.4_B c. 26 d8e__ e5_A 50 53. Subset Subset is a set of whose elements are all members of another set. The symbol “E", means “is a subset of” The symbol “c", means “is a proper subset of” Example: Ww W: The whole numbers: {0,1,2,3 ...} oP4 A:{1,2,3} B:{1,2,3} C:{5,6,7} D:{0,1,2,3,4,5} Since all of the members of set A are members of set D, A is a subset of D. Symbolically this is represented as A & D. Note that A D implies that n(A) < n(0) (ie. 3 < 6). Note that A is also a proper subset of D since set D has members that do not belong to set A (A # D). Symbolically this is represented as A < D, Note that A ¢ D implies that n(A) < n(0) (ie. 3 < 6). Since some of the members of set C are NOT members of set D, C is NOT a subset of D. Symbolically this is represented as C ¢ D. Since all of the members of set A are members of set B, A is a subset of B. Symbolically this is represented as AS B. Although A & B, since there are no members of set B that are NOT members of set A (A= 8), Ais NOT a proper subset of B. Any set is considered to be a subset of itself No set is a proper subset of itself. The empty set is a subset of every set. The empty set is a proper subset of every set except for the empty set. 51 5.4, Solving Problems using the Concepts of Set Theory including the methods of Venn Diagrams Set theory has its own notations and symbols that can seem unusual for many. In this tutorial, we look at some solved examples to understand how set theory works and the kind of problems it can be used to solve. For example Set of natural numbers = {12,3,....4 Set of whole numbers, = {0,1,2,3,....} Each abject is called an element of the set. The set that contains all the elements of a given collection is called the universal set and is. represented by the symbol ‘y’, pronounced as ‘mu. For two sets A and B, + n(AuB) is the number of elements present in either of the sets A or B + n(AnB) is the number of elements present in both the sets A and B. + n(AuB) = n(A) + (n(B) — n(n) For three sets A, B and C, © n(AUBuC) = n(A) + n{B) + n(C) ~ n(ANB) — n(BAQ = n(CnA) + NAMB) Consider the following example: 1. Ina class of 100 students, 35 like Math and 45 like English. 10 like both. How many like either of them and how many like neither? Solution: Total number of students, n(u) = 100 Number of Math students, n(M) = 35 Number of English students, n(E) = 45 Number of students who like both, n(EnM) = 10 Number of students who like either of them, n{EUM) = n(E) + n(M) ~ n(EnM) > 45+35-10 = 70 Number of students who like neither = n(y)) - n(EuM) = 100-70 = 30 52 Using Venn Diagram, we can easily solve the problem As itis said, one picture is worth a thousand words. One Venn diagram can help solve the problem faster and save time. This is especially true when more than two categories are involved in the problem 2. There are 30 students in a class. Among them, 8 students are learning both English and French. A total of 18 students are learning English, if every student is learning at least one language, how many students are learning French in total? Solution, The Venn diagram for this problem looks like this. Every student is learning at least one language. Hence there is na one who fall in the category ‘neither’ So in this case, n(EUF) = n(u). 33 itis mentioned in the problem that a total of 18 are learning English. This DOES NOT mean that 18 are learning ONLY English, Only when the word ‘only’ is mentioned in the problem should we consider it so. Now, 18 are learning English and 8 are learning both. This means that 18 ~ 8 = 10 are learning ONLY English N(u) = 30, n{E) = 10 n(EuF) = n(E) + n(F) — n(EnF) 30 = 18+ nF) -8 nF) = 20 Therefore, total number of students learning French = 20. Note: The question was only about the total number of students learning French and not about those learning ONLY French, which would have been a different answer, 12. Finally, the Venn diagram looks like this. 3, Among a group of students, 50 played basketball, 50 played softball and 40 played volley tall. 15 played both basketball and softball, 20 played both softball and volley ball, 15 played basketball and volley ball and 10 played all three. If every student played at least one game, find the number of students and how many played only basketball, only softball and only volley ball? Solution 1(B) = 50, n(S) = 50, n(V) = 40 n{BNS) = 15 54 n(SnV) = 20 n(BnV) = 15 n(BnSAv) = 10 No. of students who played at least one game n(BuSuV) = n(B) + n(S) + N(V) — N(BAS) — N(SAV) — n(BAV) + n(BASAV) = 50 +50 + 40- 15-20-15 + 10 Total number of students = 100. Let a denote the number of people who played basketball and volleyball only. Let b denote the number of people who played basketball and softball only. Let c denote the number of people who played softball and volleyball only. Let d denote the number of people who played all three games, Accordingly, d = n (BnSnV) = 10 Now, n(BnV) =a +d = 15 n(BnS) = b +d = 15 n{SnV) = ¢ +d = 20 Therefore, a = 15 ~ 10 = § {basketball and volleyball only] b= 15-10 = 5 [basketball and softball only] ¢ = 20-10 = 10 [softball and volleyball only] No. of students who played only basketball = n(8) - [a + b + d) = 50-(5 + 5 + 10) = 30 No. of students who played only softball = n(S) - fb + ¢ +d] = 50-(5 + 10 + 10) = 25 No. of students who played only volley ball = n(V) ~ [a + ¢ + d] = 40-(10 + 5 + 10) = 15 5 Alternatively, we can solve it faster with the help of a Venn diagram The Venn diagram for the given information looks like this Subtracting the values in the intersections from the individual values gives us the number of students who played only one game. EXERCISE! Read the following problem. Solve the problems using the concepts of Set Theory including the methods of Venn Diagrams. 1. There are 35 students in art class and $7 students in dance class. Find the number of students who are either in art class or in dance class. a. When two classes meet at different hours and 12 students are enrolled in both activities. b. When two classes meet at the same hour. 2. Ina group of 100 persons, 72 people can speak English and 43 can speak French. How many can speak English only? How many can speak French only and how many can speak both English and French? 3. Ina competition, a school awarded medals in different categories. 36 medals in dance, 12 medals in dramatics and 18 medals in music. If these medals went to a total of 45 persons and only 4 persons got medals in all the three categories, how many received medals in exactly two of these categories? 56

You might also like