0% found this document useful (0 votes)
192 views26 pages

DSGT Module 1 Notes

Uploaded by

yuknomebrawh
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)
192 views26 pages

DSGT Module 1 Notes

Uploaded by

yuknomebrawh
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/ 26
Chapter | _ Contents : propositional legic , Prediaqte logic laws of logic, quantifiers, Norma\ form Inference theory of Predicate tegte calculus Mathematical Induction that is logic ? The orcl logic is derbved from +he greek word | ‘logos’ Which means reasoning. logic is +he scienc of reasoning Logic #$ has practical applications ~ designing of computtog machines in 7 pecifications of system artificial inte tlegence > omopliter gramming > pregramming Langit z aswell as to many areas of Study Proposition > A proposition is a declarcative Stateme denence ("ea sentence +hat declares Some fact) _that is either +rue or false, bur not oH, Examples - — 1 Delhi is the Capital of Inclia 2 [+2 = : - 3. toronto is capital of Canada 7 4 249-5 _ - __propositions 1,2 Of true 2,4 are false __ consider sne folowing tenes | iShat is toe time 2 Read +hic Carefully 3 a4 —1 4 - 2 itt I Or Pot Propasitions because they qre ok declarative Statements ets 24. are nok propasitions git / fr fora AUth values Ca pnot be determing, 3,4 can ke 4+umed inte Proposition _ 7 ewe ase = values +0 the vanabies Se ; Letters are used 40 clerote propositional trains like pq T... The tnith value of a PTO Pasi ESteig pared loge eerie ice ear ere is fowe +Bepesitions cobich cannot be simplieres fu: i. are -termed as atamic Propasi+iavze The area of logic that +ermed as | deals w2i+h propesiHon + Rroposi+ional teulus OY Pro posit+icnal _ = logia, ——______, New Mone Med COMPound PropesiHo are formed from -€x'Sting prepositionc _| USINg logical San (oer ——_—__ oe — —— ————Negatian> Ler p pea PrepOsiHON . The negatior ot _ lee eee eee Statemen, “tris net tre aise that p” ee . a eee The negation of * michele PS runs Linu’ — iss 1S“ wichel's PC does nor run Linux — Truth +abie. os (2 Laid eee antes —P-and_q be propositions alee teene ————eenjunrctien of pand q denoted “by _PAg is the ——Prepasiticn “ 6 andl q* . Example: P+ Sun is Shining Us Iris raining PAW = he sun is Shining and i+ 'S raining oc The Sun iS shining tous it ic raining. ————Disjunchoo : let p and q be propositione dsjucc OF p and q denoted py PVq_ 1s the proprwiticon “por q". The digjumcHon pvgy is false wren both gy arip cve faise Truth Table P qu Pvay - : al + 7 - : v e T : 5 a T e e e Pi A Stidept (whe has taken Calculus Can fake this clasc Ys: RA student peho has taken introductory com per Sci€nce can tate this cl. eva: AP student whe has taken calculus or intreducioy Computer Science Can take +hie clas: Exclusive or = .e+ p and q be propositions The exclusive OY ,denoted byPOY, is the proposition +nat is +e when exactly one & p and 4 are true __Orhertwise fase. 7 vv POY . 7 _ — 1c E — THF at T T _ _— Example? P's f Student Gan have Salad with dinner — Y: A Student an have ith_dinner: PAY: PB stident an have Soup or Salad but net es {= __botp with dinner. \ ey | Conditional Statements - : y Implication/cordusion + Let Pand q we PrOPOSIMone > Tre corditi onal statement Pq jc the Propositiun The. conditional statement pq >> we p tren q* | is false when pis true and q is false otherwise © as it ic +vue SN a She vill Fied a job _ PIS called hypotnesis antecedent, premise _ + GIS Called conclusion , comeqguence. } EE Truth table 7 - ——— BS aa eee ae 7 eet area re e et i TF F a { EET T 7 7 et = FOF 7 a a = Example _p Maria leayne diccret mathe matics 4 — — QZ: Mavia finds a joe 3 - Pq + fe mavia learns discrete mathematics , tren _ atthe IF - eM cons+miction is used 10 many preqra—__ -mming languages __., Converse nbapositive and toverse . Statements can be formed starting from p=>q- Proposition G->p is caited converse of p32q New _condi+ionat OY — wp iS contmaposirive CP > Va iS cenverse. inverse Exaynpie VP: Tre home +eam twins 7 elt P&: Tr is raining . TF itis raining “then the home team wins Impress. P77 % * The home teom wins Whenever it is Yau ning anverse, 4 p > IF th ; _horre team wins. i+ is ing contrapairvng Sp» If the heme team cloes not win, i+ is not reir in Ieee wp 30%: TlIbIS Pot raining then the pome ne does Or win rai ittonas: Bi Equivalence or bi- implication = Ler The _bicandi Fional State ment “PI and only if gy, PRard q be propesitior Pe? q is the proposition P P= you can fake the fiight 4? you byy a ticker Pesy= you can + the flight 16 and only if _ You buy a ticeer- ____ Example > cons ivuct the truth table ef +he compound proposition (ev wa (PAM Y MP wy PV ey PAY (Pvva)—> (eae) ToT FF 7 T Te or eR eT ot £ a ee ee : _ ee tT TT e Fe Precedence of lagical operators - ae my Applications oF Propasitional lagic » ‘\ 2 TDarsiating english Sentences _ Trans lating eeaeae ———LOte_compaund Statement removes ambiguiry S ~—English languqge es Sentences iwhen translates i —logical pression helps to Analyze +NeiC truth va ————+3-System _specifiaui ore + Logi Ql EX PrESSiong can + Ore essential to specify hardvoare and Settware systems. > Boolean sear ches : logical connecti -————-&tensively in Searches Cf lage Collection of infor ~————+-Such_as indexes of wep pages. J+ 6 termed as Boolean searenes . _ i -— 2 gic _Puezies ; Legica) ~—————Puz2!08 9: sudpeu YES Are us = legic circuits . propesitional logic. can be applied to puiisvesnensens design of COmpurer harducare 7 a ~~ 2opasittonal equivalences Sree eeree eee eee Ee —————_Tau tology + -A_Compount Siateme nt that Is _aipays tre ——-—1$_callec) tautology. — | can tradiotion s _, false A_compound -ProPostHon +rgt S_calied a contradiction. IS loaye —oringency + A compound sre proposi+ion thar if nei, a seutology Nor a contrad fCHor iS called a contr aap Pv op pawp ats Fe a a cE: i FE c T F 4. wo nS Tauttology Contradiction Logical Equivalences The compourd propesitions P 99d gq are logicaliy ~ Syuivaient iF P<*e is q tautology Ib is denoted as P=4y. Oo Show that V(P Va) and rep A 4 are log aaliy eqesi valet Po&% pyy wlPvq) WP op wp avy <> wPrng fee T F F F fa ie iL oe fe + Ff Hd ie eee ea rf UU = ies Ee all iu ae a 7 OF Mm @D s@ th can be conctuded that YCva) and MPA VY ar€ logically equivaent. Also APVYa)es OPA OQ iS 4 +acitology Show thar pa and Seva are logicaly equivalent I ie VY op py wpva (P»V<> (w~pva) ase a F r ent ale iE a FE = eee eee ee T ei: Sones ali se e F T J T 7 41 Rea ber _ es From @«@ it car pe conctuded that Py and OPV gy are logically equivalent Show tak PyCVA) and (eva) ACPvr) are lagically equivalen._ ph gw VAY Ppyy pyr. PvCany) Cpva)a(evr) wees T Bi ee 2 oe bi) a aa Tee F Tes oo st. 1 ee E is 1 al T = a Fim 7 T iT oe + a ioe Ff F 7 & r a - fe oe F T F eS a Pp F F F e F eF. Tk e T 7 + ] = From +he truth table it can be © ncludeet thar PY (MAY and (PVG) A (Pyr> are je ne Qui valent Blcallg Lows of logic: ; 7 + -——__| Pat=ep pps Ky) laws / - — : __.© (ena) © (pve) 0 _Examplez = Show hat ors ) ard Pn 04, are eg ical equivAlent USING the oe 7 4 ekpoq) : : logical equivalences invelving apditional stateme P24 = OP vg P34 29a OP : Pv gy = Py PAg 2 9 (Pax) PADDY _ PW a (Por) = PCa —.. (Par) A @ er = (pvp) or —. (P2W V (Par = ps(qvyd _ ~ Por) v (vor) = (PAD or Logical equivalences involving biconditi onal Statements P< = (pay aA(V>P— ——— Per 4 = wp eraqg _ — Pa % = (PAY (wpa ra) + —— © (pe-v) = Pp Oy i 7 Example? Show that (PV (@PAW)) and wpAvY are — logically Equivalent using laws of logic w(Py (@PAg)) = Mp pA w(@PAW -- De Movgar's lav a a wp A (ewe van) ~~ pe Mergan’s jad — _— OP A Cevea) s- Doable negaticoo (MP AP) V COPADA) = distributive law =F _v (wpa wa) + Negatico jawe __ 2 (OPama) VP OB mutative tau a =) OPANOG we Identity law Using laws of logic, show tar (Pay) (PV® is a Ag nied by equiVaience of (PAD > Cevy) = (PAW) v (PVH) = Ganclitional Sraverment = }pvew) v (eve - Demorgans law (MP VP Vv @vva) - asseciative & commu ~ ive 1a PVP CAVED. commen slow. Sahsfiability> A compound PYOPOSi Hom 18S Gaticg; if there 1s an assignment of +rurh values to ibs variables that makes it true. klhen no such ~aSS'9N ments _ExiStS , Ce +he compound Pre poSitton is false for ay eSSignments truth valves to is ~Yonables, the Compound proposition iS unsetises, _betermine whether each of the Com pound Propesi CRV wer) A CaVMIA CrveP) let P=T, get yeT iZ _ them the compound proposition has truth value, CTVE) ACTVPACTVFE) = TATAT = T. v1 The Conditional starcoment is Sarisfiable _ Applications of saris fiability: Many problems 10 _ diverse Oras Such aS robotics, software resting | artificial inteuigence planning, Computer aided design, machine wisten, jategrated— Cireuing design Scheduling, Computer Net Werteing — and genetics can _ be Mmedelled in terms of eopesitHonal sarisFabil; | Predicates - consider the stateMents involving Variables, such as i PB Betas HUH S_ 7 - a Computer gz 1S under attack py an louder _ Ss computer 2 IS -FuncHoning properly _}e The truth value ct +hese staterme mis cannot be _ Known unt 2s specified. once x is Specifé 7 these statements become proposition = The. statement “9 1S greater than 3” has - vw —~_ a fewO parts > Suby ect property of phe subject = predicate. Lim i The ssatement_can_be denotecl as POA, Where P__ denotes the precticate. re " # iS greater Han 8” _ and x is the variable. par) is +ermed as valve See ropositional functien. Pat 2. one a _vatue iS __ assigned +o +he Variable x, the srereme dt POO) pe cmmes a proposition __ ee — Lexarnpte - Let “pee denote &>3 | Then PU) Is 423. Which is true —_____— = PC is a72 is false. ___ Exampie? let ACK) clenote tne Statement “computer ee TS under attack by an intruder’, suppose Thar eb the com puters 00 campus, only cSs2 and MATH! _ dare currently eder cate oy Jinteucters linet ___ Qre truth values of ACESID, ACcs2) ACMOETHIDE _ Acs) is Obtained by setting = GSI in the Sictema at AC® Because csi is not liSted as compute under attrace, ACcsD is false Because cs2. ; anc! MATH) are onthe (s+ of compiners under = attack , (oe KNoUD +hat __ACGS2) an MPTHI) are hue. examen) denote +e Statement “xeute” i Then —prtith value rf _propnasiticn tt QCL2) is J=2+ ds false Qala.) is 3=0+3 Is tue eee Quant CierS > consider tne Sraremenis: Au bird. fly Some flowers smell sweet _ None of the fruits cre biter. pee ____Few birds sing ee Af Hae Eee Hee “some, none, Few are used for quan +4 ication » Trerc are +00 +ypes of quantifiers . 0D oivers q) “Gulanti fiers: Cyhicn +elle Us that 7 predicated is +rue for every element unde, = — Consideration. _ OD) &XIstential Quant fiers E ——+1s one or more dement under consideration, for a h the predicate iS true Which tells us tha grass — The _arta OF logic that deals with Predi. quantifiers is A+es cing aauled the predicate —caleuius. Ee Universal quantifier: Many Mathematical Statements Hus true for au values ot avaiable in a particular AOMain, calied as_ universe of discourse’/Nomatn of discourse’ : Such statement ¢ using un versal — Be preseq ee avant Acation. the GOlVerSal quanti ercanon | lar demain is rhe proposi call values ce —Gssert Hoat gq ereper+ Pd 6 for a Partcu = —_+har —2£'!9 +e domai poe Z | ArION OF PC IS the “Statem eos: |‘ pce) for oi Walues of 3 in the comin’ Hy —.Nerarion vy xpad + JS calied universal quae Heor a 4 —Exampie: Let POO be +ne State ment A122: Wiha is the _ + ruth value pt the quanti Ficahon POD. here _ 26'S domain cee of ai) real _. Solution: Because Pod WS true for 2, the quant Ficarico numbers All ren) numbes VHPOCO is ue oe i Example: GCO41s tne SAME Ment 4 zee 9! 5 ig the truth Value of ane domain consists oF all req) NUM bess 2 4 GEO 1S Met true for every real number #, because + QS2 is false "Le 2=3 ig a counter example FOR NBO. 8 VRA@CO I6 face ~txampie. : Pc? is. Rox - ~ Tf x belongs +e domair_ot “eal numbers i MEPCH) IS false eo (h4Y 4 Yo, + Tt belongs +o domain of inte gess i Ate POD Ss true CO Existential quantifier + Many mathematical statements. PONE + ASsert thar there Is ar element with a certain —. Property. Such Statements arc expressed using — existential quantification. Wit exisrentiq) qualification. we form a propesition Hat js +rue if and oaniy if POO 1s tru at 1east one Valu win tne domain Tne existential quantifimtian af P@O is the propo- sition! There exists an element xin fhe clomain Such +hay poe” Notation * + XPCO - “Zils alledine existential quand Fier ___ Example > jet P00 dene 273 What is the a +ruth value of the quanti fication 32ePCx) , here se belongs to +ne domain pf al) real Numbers? __Solurion + ® 23 \s spmetimes tate _ fer inStance. when x=4 - The existential quanti ficarroo OF PGO _, Fx POO is +e sep _—_— Ex cnplec : (XD js sdaremernr acs 9e+!" iad IS ine truth value of the quanti Fcattion 4 2800. x belongs jo the domain of real Numbers 2 rehert Colm: Because Garris False fer every ea) number 14 QOO iS fave. Normal forms bE Well formed formula’ (wtf) Of PROPOSIHONA) Jo, also Galilea PHOPOS I HONA) For’ oy SDPPIY Foy & S109 CensisHog of propasitiena) Variable PNM ECHVES and parentheses used ia Proper Many Example C CPV4) A (WP var) A(WS vq)) is aq wofe _Oitt Propesitional variables PS E % Anexpression of the form Pvq VOUS 15 a 4 disjunction i 2 AO expression of the form PANMYaAsS 1S a 7 Conjunction I] = Conjunction is alse termed as preduct and disjunction is +ermed ac scum . “product of variables and thew nega. OS 9 [ fermula is called elemeniary product oPAw, AAT. Orauns -? 94M of variables and theic negatiens ina formula Jo allied elementary sum wpva, avup,_ PS a litera). 2 A variable or Negation of a variable is ed SHence an elemenany sum is _a disjunction co J re ra\s and _elemettary prmduct 1S @ conjucctes of \irerals Ss FE Disjunct) ve normal form CONF) > A formula cohich 5 ig equivalent tea gwen ftermula and consists a Sur Of elementary product iS called a digyuocr _nermal forrn CONP) # To bring any formula +o disjuactive norma) taum, first replace 2 ANd $2 __USINg A_and y_ and & "men se De Mergan'’s. law. whenever neces. FE Copjuretwe - Disjunctive Norma) Form is sum ob PICA Example: Optaio disjunctive norma) forms cf ~ bh Pa) a 9y 1. Cop va) anmq - - (MPAMa)y (HAVA)... ctistmbutive lavo 2 (png) «> (pva) This is equivalent +0 —— — [wera a ceva) | v Lew (pac) A ecevad) | fie a (eval v [ ceaad aber acai). Demterger oF aad — - —_ ao a DNF 3 awvr ee VDAC) oR a PAY) V (PAY v (rAWv CYAT) ONE a aa i . - FF _Conjuctive norma) forrn = A formula whiar is _ - egirivalent 40 a given formula and censists pf a Product of elementery sums iS Called a - 6Onjunchive norma) form of +ne given for | Example bP q Away 2 COP V4) AVG 2s (PAX) <> (PVA) - = Tt Hisense: = (eva) A Lepva) a (Pag) a | [evwcena) vcevad] A Leva) v w(paay| L cpaw vieva) | a [oteva) van] _ "(py ceva) (pycpvas) AC vPva) A \ (wp OPVROA) A (Wa vOPYOS) Br CNE _ principal ; itona Variables . Consider Tier 2 -ana_a_be— pape | four conjunctions given belo — ——__—_ Pag, PA OY WRAY, OPA OY. a four con crions Oe calied_ qminterne’ OF pq __These four conjunc ___ For a _given_ Formula ,. an equivalent formula consi ___ of dis} unchions of _minter S_anly is _Kneten as its ___ principal disjunctive normal form: Such rormal for is called sum-=of- products — canonical form. oneider the following rmeutP table: pap ay PAY PAMY OPAG OPA OH _ ee Ee + __ TRA TOF T FS uFTr Roof FUT — a = F Tt _ Now consider tne tritn alles for P>a, P<=>y Papacy meet pec. Perq — 2 | eee aes ene Hl T F & F - — F Tr 1 - Ee ee T T 7 — vewpanv(apAe) __.Example> obtain +he principal disjuoctive normal form _for (PAW) v CwPAr) VAD orm cPAa) = (pny) ACY VMR) _ = (PAMAN Vv CPAw vor), @ePar) = = (@PAD A (q.voq) |i = COpPAYAY) VCOPAT NOG) _ ae eee IL = (opayandy Cop ncoanr) _ cua) an) A (P vop) =_(arap>v (anv pop) = CPAVYAY vy (@p naar)

You might also like