ebook img

Discrete Mathematics. Essentials and Applications PDF

444 Pages·2023·6.535 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Discrete Mathematics. Essentials and Applications

Discrete Mathematics Essentials and Applications Ali Grami AcademicPressisanimprintofElsevier 125LondonWall,LondonEC2Y5AS,UnitedKingdom 525BStreet,Suite1650,SanDiego,CA92101,UnitedStates 50HampshireStreet,5thFloor,Cambridge,MA02139,UnitedStates TheBoulevard,LangfordLane,Kidlington,OxfordOX51GB,UnitedKingdom Copyright©2023ElsevierInc.Allrightsreserved. Nopartofthispublicationmaybereproducedortransmittedinanyformorbyanymeans,electronic ormechanical,includingphotocopying,recording,oranyinformationstorageandretrievalsystem, withoutpermissioninwritingfromthePublisher.Detailsonhowtoseekpermission,furtherinfor- mationaboutthePublisher’spermissionspoliciesandourarrangementswithorganizationssuchas theCopyright.ClearanceCenterandtheCopyrightLicensingAgency,canbefoundatourwebsite: www.elsevier.com/permissions. Thisbookandtheindividualcontributionscontainedinitareprotectedundercopyrightbythe Publisher(otherthanasmaybenotedherein). Notices Knowledgeandbestpracticeinthisfieldareconstantlychanging.Asnewresearchandexperience broadenourunderstanding,changesinresearchmethods,professionalpractices,ormedicaltreat- mentmaybecomenecessary. Practitionersandresearchersmustalwaysrelyontheirownexperienceandknowledgeinevaluating andusinganyinformation,methods,compounds,orexperimentsdescribedherein.Inusingsuch informationormethodstheyshouldbemindfuloftheirownsafetyandthesafetyofothers,including partiesforwhomtheyhaveaprofessionalresponsibility. Tothefullestextentofthelaw,neithernorthePublisher,northeauthors,contributors,oreditors, assumeanyliabilityforanyinjuryand/ordamagetopersonsorpropertyasamatterofproducts liability,negligenceorotherwise,orfromanyuseoroperationofanymethods,products,instructions, orideascontainedinthematerialherein. LibraryofCongressCataloging-in-PublicationData AcatalogrecordforthisbookisavailablefromtheLibraryofCongress BritishLibraryCataloguing-in-PublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary ISBN:978-0-12-820656-0 ForinformationonallAcademicPresspublicationsvisitourwebsiteat https://www.elsevier.com/books-and-journals Publisher/AcquisitionsEditor:KateyBirtcher EditorialProjectManager:ChrisHockaday ProductionProjectManager:KamatchiMadhavan Designer:MatthewLimbert PrintedintheUnitedStatesofAmerica. Lastdigitistheprintnumber:9 8 7 6 5 4 3 2 1 To the billions of people living in poverty and the few living to end the injustice of poverty and In loving memory of my friends Farzin Sharifi and Razgar Rahimi Preface As any author knows, writing a textbook is a long but rewarding process. I enjoy writing, but even more so, I enjoy having written a book that can help students study, learn, and apply subject matter. Discrete mathematics is about the processes that consist of a sequence of individual steps.Discretemathematics,whichincludesamultitudeofdiverseyetinterrelatedtopics, isthestudyofdiscretestructuresandisaccountedasaneffectiveapproachfordeveloping problem-solving strengths and critical thinking skills. The relevance, importance, and applications of discrete mathematics have significantly increased over the past few de- cades, mainly due to the development of an array of computers, which all operate in discrete steps; they are ubiquitous and indispensable in all facets of life. Thisbookpresentstheessentialsandapplicationsofdiscretemathematicsinasimple andintuitiveapproachwhilemaintainingareasonablelevelofmathematicalrigor.With anaccessiblewritingstyle,thegoalistointroduceamathematicalmethodofthinkingto help solve an array of problems in computer science, software engineering, information technology, and engineering design. As the topics in mathematics are best understood when they are introduced in a va- riety of contexts and used to solve problems in a broad range of applied situations, the focus of this book is on the concise and lucid introduction of core concepts, followed by illustrative examples and practical applications. With a basic background in algebra as the only prerequisite, the topics presented in a manner that can be understood by bothfirst-yearandsecond-yearundergraduatestudentsinengineeringandcomputersci- ence,andcanbetaughtinaone-semestercourse(36lecturehours).Thisbookconsistsof 20shortchapters,eachdiscussesonemajortopic.Achaptercanbecoveredinonetotwo lecture hours, depending on the breadth and depth of its topic. Thepedagogybehindthisbookanditschoiceofcontentsevolvedovermanyyears. Almost all of the material in the book has been class tested and proven very effective. Thereareover400independentexamplestohelpunderstandthefundamentalconcepts andatotalof200exercisestotestunderstandingofthematerial.Uponrequestfromthe publisher,aSolutionsManualcanbeobtainedonlybyinstructorswhousethebookfor adoption in a course. No book is flawless, and this book is certainly no different from others. Your com- mentsandsuggestionsforimprovementarealwayswelcome.Iwouldgreatlyappreciate it if you would please send your feedback to [email protected]. vii Acknowledgments The last thing an author usually writes in a book is the acknowledgments. Most readers of a book do not read the author’s acknowledgments, as they find them a total bore. However, the author truly regards them as a source of tremendous joy and a tiny attempt to pay back a nonrepayable debt of gratitude. As this is my last book, I would like to take this opportunity to express my heartfelt appreciationtomycaringsisterShahnam,whohelpedmeforover25yearsbybeingthe caregiver for our mother and providing her with the utmost love and care. Also, I am deeply grateful to Ken Gordon, who a long time ago did me the greatest favor. I owe him immeasurably for what I treasure most in life. Writingatextbookisinsomesensecollaborative,asoneisboundtoleanonthebits andpiecesofmaterialsandtheideasandconceptsdevelopedbyothers.Iwouldtherefore like to thank the many authors whose invaluable writings and insights helped me very much, and also all the students I have had over the years. A reflection of what I learned from themison everypage of thisbook. Myspecial gratitudegoes to Dr.AzamAsilian Bidgoli,whocarefullyreviewedtheentiremanuscriptandhelpedimprovemanyaspects of the book through her dedicated commitment and broad knowledge. The financial support of the Natural Sciences and Engineering Research Council (NSERC) of Canada was also crucial to this project. I am very much appreciative of the staff of Elsevier for their support throughout various phases of this project: Steve Merken, Katey Birtcher, Alice Grant, Chris Hockaday, Kamatchi Madhavan, and all members of the production team. Finally,Iamincrediblyfortunatetohaveanextraordinaryfamilywithboundlesslove and support: my exceptional wife Shirin, who makes me the luckiest husband, and my two half universes, Nickrooz and Neeloufar, who are compassionate, smart, hard- working,generous,fun,andontheirwaytorealizetheirdreams,makingmetheproud- est father. ix CHAPTER 1 Propositional Logic Contents 1.1 Propositions 1 1.2 BasicLogicalOperators 3 1.3 ConditionalStatements 7 1.4 PropositionalEquivalences 11 1.5 LogicPuzzles 17 ThephilosopherAristotleisoftencalledthefatheroflogic.Logicisthebasisuponwhich correct inferences may be made from facts. Logic deals with formal principles of reasoning, strict criteria of validity, and necessary rules of thought. Logic is extensively used to solve a multitude of problems and make valid arguments in our everyday lives. Although logic is an essential tool in our interactions with other people as well as in the decisions we make every day, it does have limitations, simply because logic cannot helpconvincesomeoneoutofsomethingtheywerenotreasonedintointhefirstplace. Therulesoflogicprovidemeaningtomathematicalstatements,verifythecorrectnessof programsandalgorithmsincomputerscience,andhelpconstructsomeproofsinsoftware systems. Logic can also be employed in the optimum design of engineering systems, where the system is complex and consists of many subsystems with redundancy. Logic is also applied in physical and social sciences to draw conclusions from experiments. This chapter briefly presents the fundamentals of propositional logic. 1.1 Propositions The basic building blocks of logic are propositions. A proposition is a declarative state- ment,whichiseithertrueorfalsebutnotboth;thatis,ithasawell-definedtruthvalue. In addition, it is sometimes difficult to know if a sentence is a proposition, and if it is a proposition, it may not be known for some reason whether it is true or false. The area of logic that deals with propositions is called propositional logic. Example 1.1 Considerthefollowingstatements,andifastatementisaproposition,identifyits truth value. (a) How are you? (b) What a kind person! DiscreteMathematics ©2023ElsevierInc. 1 ISBN978-0-12-820656-0,https://doi.org/10.1016/B978-0-12-820656-0.00001-0 Allrightsreserved. 2 DiscreteMathematics (c) 2þ2 ¼ 3. (d) Ice floats in water. (e) The earth is flat. (f) Yellow is a primary color. (g) Blue is the best color. (h) Close the door. (i) God exists. Solution (a) It is not a proposition, as it is a question. (b) It is not a proposition, as it is an exclamation. (c) It is a proposition, and it is false. (d) It is a proposition, and it is true. (e) It is a proposition, and it is false. (f) It is a proposition, and it is true. (g) It is not a proposition, as it is an opinion. (h) It is not a proposition, as it is a command. (i) It is not a proposition, as it is an opinion. Example 1.2 Consider the following statements, and if a statement is a proposition, identify its truthvalue. (a) xþ1 ¼ 5. (b) There is life in outer space. (c) This sentence is false. (d) Fermat’slasttheorem:Theequationxnþyn ¼ zn,wherex,y,andzarein- tegers and xyzs0, has no solutions for an integer n > 2. (e) Human beings will never live to be 200 years old. Solution (a) It is not a proposition because x is unknown. However, for a value of x, it becomes a proposition. (b) It is a proposition. Because science has not advanced enough to know with certainty, we cannot show if this proposition is true or false. (c) If we assume the sentence “This sentence is false” is true, then the sentence says it is false, which contradicts our assumption. If we assume the sentence “This sentence is false” is false, then the sentence says it is true, which again contradicts our assumption. We can thus conclude that “This sentence is false”isaself-contradictorysentence,anditisnotapropositionbutaparadox. (d) Itisaproposition.However,forover300years,wedidnotknowifthisprop- osition was true or false, but in 1994, it was proven to be true. (e) It is a proposition. Because science has not advanced enough to know with certainty what the future holds, at the present time, we cannot know if this proposition is true or false. PropositionalLogic 3 Themathematician GottfriedLeibniz introducedsymbolisminto logic. We use lower- case letters, such as p;q;r;s; and t, to denote propositional variables or statement vari- ables. The truth value of a proposition is either true or false. If the truth value of a proposition is true, it is denoted by T, and if the truth value of a proposition is false, it is denoted by F. If a proposition cannot be broken down into simpler propositions, it is then called a simple proposition, a primitive proposition, or an atomic proposition. For instance, the proposition“Theearthisflat”isasimpleproposition,whichisfalse,andtheproposition “The sun is hot” is a simple proposition, which is true. Ifapropositionisacomposite(i.e.,itiscomposedofmorethanoneproposition),itis then called a compound proposition. The truth value of a compound proposition is completelydeterminedbyboththetruthvaluesofitssimplepropositionsandthelogical operatorsconnectingthesimplepropositions.Forinstance,theproposition“Waterboils at50degrees celsiusandwaterfreezesat0degreescelsius,”whichisacompoundprop- ositionconnectedbyan“and”,isfalse,andtheproposition“Therearemorewomenthan menintheworldormencanbecomepregnant,”whichisacompoundpropositioncon- nected by an “or”, is true. 1.2 Basic Logical Operators Logical operators, also known as logical connectives, are used to combine two or more simplepropositionstoformacompoundproposition.Astatementformorapropositional form is an expression consisting of propositional variables and logical operators. The truth table for a given propositional form presents the truth values that corre- spond to all possible combinations of truth values for the propositional variables. Two compound propositions are called logically equivalent or simply equivalent if they have identical truth tables (i.e., they have the same truth values regardless of the truth values of its propositional variables). The notation “h” denotes logical equivalence. The negation of the proposition p, denoted by p, is the statement “It is not the case thatp.”Thesimplepropositionp,whichisreadas“notp,”hasthetruthvaluethatisthe opposite of the truth value of p. Table 1.1 presents the truth table for the negation of a propositionp,whereithastworowscorrespondingtothetwopossibletruthvaluesofp. TABLE1.1 Truthtableforthenegation ofaproposition. p p T F F T

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.