Discrete Structures Prepositional Logic 2 Dr Muhammad Humayoun
- Slides: 58
Discrete Structures Prepositional Logic 2 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore. mhumayoun@ciitlahore. edu. pk https: //sites. google. com/a/ciitlahore. edu. pk/dstruct/ Some of the material is taken from Dr. Muhammad Atif’s slides 1
Recap • 2
Special Definitions • 3
Example • 4
Conditional Inverse Contrapositive 5
Biconditionals Definition 6 Let p and q be propositions. The biconditional statement p ↔ q is the proposition “p if and only if q. ” The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called biimplications. 7
Truth Table • p ↔ q has exactly the same truth value as (p → q) ∧ (q → p) 8
Common ways to express p ↔ q • “p is necessary and sufficient for q” • “if p then q, and conversely” • “p iff q” 9
Example p: “You can take the flight” q: “You buy a ticket” p ↔ q: You can take the flight if and only if you buy a ticket You can take the flight iff you buy a ticket The fact that you can take the flight is necessary and sufficient for buying a ticket 10
Precedence of Logical Operators 12
Logic and Bit Operations • Boolean values can be represented as 1 (true) and 0 (false) • A bit string is a series of Boolean values. Length of the string is the number of bits. – 10110100 is eight Boolean values in one string • We can then do operations on these Boolean strings – Each column is its own boolean operation 14
1. 2 Applications of Propositional Logic • • • Translating English sentences (Formalization) System Specifications Boolean Searches Logic circuits … 15
Translating English Sentences • 16
System Specifications • 18
Consistency • System specifications should be consistent, – They should not contain conflicting requirements that could be used to derive a contradiction • When specifications are not consistent, there would be no way to develop a system that satisfies all specifications 19
Determine whether these system specifications are consistent: 1. The diagnostic message is stored in the buffer or it is retransmitted. 2. The diagnostic message is not stored in the buffer. 3. If the diagnostic message is stored in the buffer, then it is retransmitted. 20
Boolean Searches • Logical connectives are used extensively in searches of large collections of information, such as indexes of Web pages. • Because these searches employ techniques from propositional logic, they are called Boolean searches. 25
• Finding Web pages about universities in New Mexico: • New AND Mexico AND Universities – ‘New Mexico’ Universities – New Universities in Mexico • “New Mexico” AND Universities • (New AND Mexico OR Arizona) AND Universities – ‘New Mexico’ Universities – Arizona Universities • (Mexico AND Universities) NOT New 26
Quiz • Let x = “ ”ﻟڑک Then x + “ ﻟڑکﺎ = ”ﺍ Write Boolean search capturing this pattern 27
Logic Puzzles • An island has two kinds of inhabitants, – Knights, who always tell the truth – Knaves, who always lie. • You encounter two people A and B. • What are A and B if – A says “B is a knight” – B says “The two of us are opposite types? 28
Logic Circuits • 33
34
35
1. 3 Propositional Equivalence • An important type of step used in a mathematical argument is the replacement of a statement with another statement with the same truth value • Propositional Equivalence is extensively used in the construction of mathematical arguments. 36
Tautology and Contradiction • 37
38
Logical Equivalences • Compound propositions that have the same truth values in all possible cases are called logically equivalent. • The compound propositions p and q are called logically equivalent if p ↔ q is a tautology. • The notation p ≡ q denotes that p and q are logically equivalent. 39
Standard equivalences • 41
Standard equivalences • 42
Standard Equivalences • 43
Standard equivalences • 44
Standard equivalences • 45
Distributive Law • 46
47
De Morgan’s Law • 48
Generalization • 49
50
Absorption laws • 51
Negation laws • 52
Implication • 53
More Implication Laws • 54
Bi-implications • 55
Using Logical Equivalence • 56
Using Logical Equivalence • 57
Do Exercises 58
- Dua e sabah
- Attahiyat in roman english
- Discrete structures
- Discrete structures
- Webhandin unl
- Discrete structures
- Discrete computational structures
- What are ps and qs
- Discrete structures
- Applications of propositional logic in discrete mathematics
- Discrete math set theory
- Negation math
- Discrete math propositional logic
- How are the whale flipper and the human arm different
- Digital logic structures
- Nested decision structures in python
- Majority circuit
- Concurrent vs sequential
- Combinational logic sequential logic 차이
- First order logic vs propositional logic
- Cryptarithmetic problem logic+logic=prolog
- If x = 0 and y = 1, which output line is enabled?
- First order logic vs propositional logic
- Software project wbs example
- First order logic vs propositional logic
- What are subject verb agreement
- Is when a preposition word
- Unit 13 lesson 3
- Prepositional and appositive phrases
- Can simple sentences have prepositional phrases
- Prepositional phrase as subject complement
- Types of phrases
- Prepositional openers
- Combining phrases
- Commas in addresses
- Simple subject
- Prepostional phrase
- Whats a prepositional phrase
- Diagram sentences
- Subject object agreement
- Whats a prepositional phrases
- Prepositional phrase
- Function of preposition
- Prepositional phrase meaning
- Literal phrasal verbs
- Group preposition
- Phrase란
- Diagramming prepositional phrases
- Adjectival prepositional phrase
- Prepositional phrase quiz
- Combining sentences with prepositional phrases
- Lesson 18 prepositional phrases answers
- The preposition song
- Expanded noun phrase with prepositional phrase
- Prepositions and conjunctions
- Lesson 21 participles and participial phrases
- Prepositional poem example
- Prepositional phrase as adjective and adverb
- Participial and prepositional phrases