LEC 1oral pathology by lecture 23jn yh.pptx

SamanArshad11 29 views 59 slides Oct 03, 2024
Slide 1
Slide 1 of 59
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59

About This Presentation

a


Slide Content

Lecture no 1 Topics covered Logic and Truth tables Math-161 Discrete Mathematics Instructor: Dr. Tayyab Hussain

Associate Professor PhD Applied Mathematics QAU Pak ORCID link https://orcid.org/0000-0003-4695-7556 Google Scholar https://scholar.google.com/citations?user=S-sfgxkAAAAJ&hl=en Instructor: Dr. Tayyab Hussain

Text Book: Discrete Mathematics and its Applications by Kenneth H Rosen 6 th or 7 th edition Reference Book: Discrete Mathematics with Applications by Susanna S. Epp 4 th edition

Marks Division Total absolute score 100% One MID Exam 30 % Six Quizzes 10-15 % Including double weightage Two/Three Assignment/Project 5-10 % Final Three hour exam 50 % Contact Email: [email protected] Contact hours: Tue 1550-1640 Wed 1210-1300

Importance of Mathematics Mathematics is an essential tool for the engineering students , and it serves as a communication language for scientific community A child joining a school at the kindergarten level is first introduced with two subjects one is the language (like English, Arabic, Chinese etc.) and other is the mathematics, why?

Importance of Mathematics To develop his/her communication skills to improve his/her interaction among peers and mathematics is taught to enable him to understand the scientific knowledge . A simple example can explain the point; Newton’s second law of motion says that “the rate of change of momentum of a body is directly proportional to the external force applied to the body” , this statement can be easily interpreted by one simple equation F=ma , where F is force, m is mass and a is acceleration.

A person from any region can easily understand the Einstein’s equation in simple form i.e., , which shows that the left-hand side is the energy, and the right-hand side is mass. This equation means that energy can be converted to mass and mass can be converted to energy under some constraints. Other than serving as a communication language for engineers/scientists , mathematics also serves as a course which builds the abstract vision of children.   Importance of Mathematics

Consider a scenario where student is being told that x=2 and y=4 and ask student what x is? the response will be 2. This shows that student is able to visualize in his/her mind about some abstract variable x and assign it a value 2. Now ask again, what is the value of x+y ? we will get a response 6. Abstract idea generation which doesn’t exist in real world, Interacting with ideas in mind and generation of new results. Importance of Mathematics

What does an engineer require to do is Analyze the problem, develop an idea, solution that doesn’t exist, interact with idea, communicate your idea and generate new solution. I aim to convey the very spirit of mathematics, the field which once showed mankind that two seemingly different problems such as finding instantaneous velocity, and finding the slope of tangent line to a given curve are the same, if only we can recognize the pattern that links them. I like to end it with the statement . “ Mathematics is the language of Nature and Nature did spread the puzzles around. You want to solve it? learn Math .” Importance of Mathematics

Discrete Vs Continuous Approach Calculus, Differential equations, Graphs, Derivatives, Integration. Continuous function Discrete function Why it is important to study discrete approach???...   A B 1 a 3 b 10 c

Discrete Mathematics and Applications How many ways are there to choose a valid password on a computer system? Discrete Math Topic: Combinatorics – This involves calculating the number of possible combinations or permutations of characters for passwords, based on length, types of characters allowed (letters, numbers, symbols), and restrictions. What is the probability of winning a lottery? Discrete Math Topic: Probability Theory – This question involves calculating the probability of a specific outcome from a set of possible outcomes, given the number of participants and possible winning combinations.

Discrete Mathematics and Applications Is there a link between two computers in a network? Discrete Math Topic: Graph Theory – Networks of computers can be modeled as graphs, where each computer is a vertex, and a connection between them is an edge. Determining whether there is a path between two vertices (computers) involves analyzing this graph. How can I identify spam e-mail messages? Discrete Math Topic: Boolean Logic/Set Theory – Spam filters often use logical rules (e.g., certain keywords in subject lines) that are represented through Boolean expressions or classifications based on sets of emails with similar features.

Discrete Mathematics and Applications How can I encrypt a message so that no unintended recipient can read it? Discrete Math Topic: Cryptography (Number Theory) – Encryption relies heavily on concepts from number theory and modular arithmetic, where discrete math helps create secure communication channels through methods such as RSA encryption. What is the shortest path between two cities using a transportation system? Discrete Math Topic: Graph Theory (Shortest Path Algorithms) – Finding the shortest path between two points (cities) is a classic problem in graph theory, typically solved using algorithms like Dijkstra's or Bellman-Ford.

Discrete Mathematics and Applications How can a list of integers be sorted so that the integers are in increasing order? Discrete Math Topic: Sorting Algorithms – Sorting algorithms such as bubble sort, quicksort, and merge sort involve step-by-step processes that are analyzed using discrete mathematics to prove their efficiency and correctness. How many steps are required to do such a sorting? Discrete Math Topic: Algorithm Analysis (Big O Notation) – This involves analyzing the time complexity of algorithms to determine how the number of steps grows with the size of the input (e.g., O(n log n) for efficient sorting algorithms).

Discrete Mathematics and Applications How can it be proved that a sorting algorithm correctly sorts a list? Discrete Math Topic: Proof Techniques (Induction) – Mathematical induction or other proof techniques from discrete math can be used to prove that a sorting algorithm always produces a correctly sorted list. How to develop a logic of a circuit that allows desired output? Discrete Math Topic: Boolean Algebra and Logic Circuits – Logic circuits are built from Boolean logic gates, and discrete math is used to optimize these circuits or prove their correctness.

Discrete Mathematics and Applications How many valid Internet addresses are there? Discrete Math Topic: Combinatorics/Set Theory – The number of possible IP addresses (either IPv4 or IPv6) can be computed using combinatorics, based on the total number of bits used for addressing. In summary, discrete mathematics is essential for modeling, analyzing, and solving problems in various areas of computer science, such as algorithms, networks, security, probability, and logic.

A Proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. EXAMPLE 1 All the following declarative sentences are propositions. 1. Washington, D.C., is the capital of the United States of America. 2. Toronto is the capital of Canada. 3. 1 + 1 = 2. 4. 2 + 2 = 3. Propositions 1 and 3 are true, whereas 2 and 4 are false. Some sentences that are not propositions are given in Example 2. EXAMPLE 2 Consider the following sentences. 1. What time is it? 2. Read this carefully. 3. x + 1 = 2. 4. x + y = z .

Propositional variables (or statement variables ), variables that represent propositions, just as letters are used to denote numerical variables. conventional letters used for propositional variables are p, q, r, s, . . . . The truth value of a proposition is denoted by T False value is denoted by F. Negation of p: negation of p , denoted by¬ p (also denoted by p ), is the statement “It is not the case that p .” The truth value of the negation of p , ¬ p , is the opposite of the truth value of p .

EXAMPLE 3 Find the negation of the proposition “ Michael’s PC runs Linux ” and express this in simple English. Solution: The negation is “ It is not the case that Michael’s PC runs Linux. ” This negation can be more simply expressed as “ Michael’s PC does not run Linux .” EXAMPLE 4 Find the negation of the proposition “ Vandana’s smartphone has at least 32GB of memory ” and express this in simple English. Solution: The negation is “ It is not the case that Vandana’s smartphone has at least 32GB of memory .” This negation can also be expressed as “ Vandana’s smartphone does not have at least 32GB of memory ” or even more simply as “ Vandana’s smartphone has less than 32GB of memory .”

Conjunction of propositions: The conjunction of p and q , denoted by p ∧ q , is the proposition “ p and q .” The conjunction p ∧ q is true when both p and q are true and is false otherwise.

EXAMPLE 5 Find the conjunction of the propositions p and q? where p is the proposition “ Rebecca’s PC has more than 16 GB free hard disk space ” and q is the proposition “ The processor in Rebecca’s PC runs faster than 1 GHz .” Solution: The conjunction of these propositions, p ∧ q , is the proposition “ Rebecca’s PC has more than 16 GB free hard disk space, and the processor in Rebecca’s PC runs faster than 1 GHz .” This conjunction can be expressed more simply as “ Rebecca’s PC has more than 16 GB free hard disk space, and its processor runs faster than 1 GHz. ” For this conjunction to be true, both given conditions must be true. It is false, when one or both of these conditions are false.

Disjunction of propositions: Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “ p or q .” The disjunction p ∨ q is false when both p and q are false and is true otherwise.

EXAMPLE 6 What is the disjunction of the propositions p and q where p and q are the same propositions as in Example 5 ? Solution: The disjunction of p and q , p ∨ q , is the proposition “ Rebecca’s PC has at least 16 GB free hard disk space, or the processor in Rebecca’s PC runs faster than 1 GHz .”

Exclusive or of propositions: Let p and q be propositions. The exclusive or of p and q , denoted by p ⊕ q , is the proposition that is true when exactly one of p and q is true and is false otherwise. Conditional statement: Let p and q be propositions. The conditional statement p → q is the proposition “if p , then q .” The conditional statement p → q is false when p is true and q is false, and true otherwise. In the conditional statement p → q , p is called the hypothesis (or antecedent or premise )and q is called the conclusion (or consequence ).

Ways to express this conditional statement: “if p , then q ” “ p implies q ” “if p , q ” “ p only if q ” “ p is sufficient for q ” “a sufficient condition for q is p ” “ q if p ” “ q whenever p ” “ q when p ” “ q is necessary for p ” “ q follows from p ” “ q unless ¬ p ” “a necessary condition for p is q ” “If you get 100% on the final, then you will get an A.” If you manage to get a 100% on the final, then you would expect to receive an A. If you do not get 100% you may or may not receive an A depending on other factors. However, if you do get 100%, but the professor does not give you an A, you will feel cheated.

EXAMPLE 7 Let p be the statement “ Maria learns discrete mathematics ” and q the statement “ Maria will find a good job .” Express the statement p → q as a statement in English. Solution: p → q represents the statement “ If Maria learns discrete mathematics, then she will find a good job .” There are many other ways to express this conditional statement in English. Among the most natural of these are: “ Maria will find a good job when she learns discrete mathematics .” “ For Maria to get a good job, it is sufficient for her to learn discrete mathematics .” and “ Maria will find a good job unless she does not learn discrete mathematics .”

EXAMPLE 8 What is the value of the variable x after the statement if 2 + 2 = 4 then x := x + 1 if x = 0 before this statement is encountered? (The symbol := stands for assignment. The statement x := x + 1 means the assignment of the value of x + 1 to x .) Solution: Because 2 + 2 = 4 is true, the assignment statement x := x + 1 is executed. Hence, x has the value 0 + 1 = 1 after this statement is encountered.

Converse: The converse of p → q is q → p . Contrapositive: The contrapositive of p → q is the proposition ¬ q →¬ p . Inverse: The inverse of p → q is ¬ p →¬ q . Equivalent: When two compound propositions always have the same truth value we call them equivalent, so that a conditional statement and its contrapositive are equivalent. The converse and the inverse of a conditional statement are also equivalent

EXAMPLE 9 What are the contrapositive, the converse, and the inverse of the conditional statement “ The home team wins whenever it is raining?” Solution: p → q , the original statement can be rewritten as “ If it is raining, then the home team wins.” Consequently, the contrapositive of this conditional statement is “ If the home team does not win, then it is not raining.” The converse is “ If the home team wins, then it is raining .” The inverse is “ If it is not raining, then the home team does not win .” Only the contrapositive is equivalent to the original statement.

Biconditional : 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 bi-implications .

EXAMPLE 10 Let p be the statement “ You can take the flight ,” and let q be the statement “ You buy a ticket .” Then p ↔ q is the statement “ You can take the flight if and only if you buy a ticket .” This statement is true if p and q are either both true or both false, that is, if you buy a ticket and can take the flight or if you do not buy a ticket and you cannot take the flight. It is false when p and q have opposite truth values, that is, when you do not buy a ticket, but you can take the flight (such as when you get a free trip) and when you buy a ticket but you cannot take the flight (such as when the airline bumps you).

EXAMPLE 11 Construct the truth table of the compound proposition (p ∨¬ q) → (p ∧ q).

Precedence of Logical Operators

Logic and Bit Operations A bit is a symbol with two possible values namely 0 and 1 corresponding to True and False in Logics. Variable is called a Boolean variable if its value is either true or false. Computer bit operations correspond to the logical connectives. Bit operators are OR, AND and XOR. Information is often represented using Bit strings. A bit string is a sequence of zero or more bits. The length of this string is the number of bits in the string.

EXAMPLE 13 Find the bitwise OR , bitwise AND , and bitwise XOR of the bit strings 01 1011 0110 and 11 0001 1101. Solution: 01 1011 0110 11 0001 1101 11 1011 1111 bitwise OR 01 0001 0100 bitwise AND 10 1010 1011 bitwise XOR

Applications Of Propositional Logics EXAMPLE 1 How can this English sentence be translated into a logical expression? “ You can access the Internet from campus only if you are a computer science major or you are not a freshman .” Solution: let a , c , and f represent “ You can access the Internet from campus ,” “ You are a computer science major ,” and “ You are a freshman ,” respectively. Noting that “ only if ” is one way a conditional statement can be expressed, this sentence can be represented as If you can access the Internet from campus, then either you are a computer science major or you are not a freshman.  

EXAMPLE 2 How can this English sentence be translated into a logical expression? “ You can not ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old .” Solution: Let q , r , and s represent “ You can ride the roller coaster ,” “ You are under 4 feet tall ,” and “ You are older than 16 years old ,” respectively. Then the sentence can be translated to (r ∧¬ s) →¬ q.

Differenc b/w “only if” and “if” The difference in logic between "if" and "only if" lies in the direction of the implication in propositional logic. “ If " Statement: "A if B" Logic: B→A (This means B being true guarantees that A will be true) Or B is a sufficient condition for A (if B is true, A will be true). ) “ Only if " Statement: "A only if B" Logic: A→B (This means A cannot happen unless B is true . So A being true forces B to be true) Or B is a necessary condition for A (A cannot happen unless B is true).

EXAMPLE 3 Express the specification “ The automated reply can not be sent when the file system is full ” using logical connectives. Solution: One way to translate this is to let p denote “ The automated reply can be sent ” and q denote “ The file system is full.” Then ¬ p represents “ It is not the case that the automated reply can be sent,” which can also be expressed as “ The automated reply cannot be sent.” Consequently, our specification can be represented by the conditional statement q →¬ p .

EXAMPLE 4 Determine whether these system specifications are consistent: “ The diagnostic message is stored in the buffer or it is retransmitted.” “ The diagnostic message is not stored in the buffer.” “ If the diagnostic message is stored in the buffer, then it is retransmitted.” Solution: p denote “ The diagnostic message is stored in the buffer ” q denote “ The diagnostic message is retransmitted.” The specifications can then be written as p ∨ q , ¬ p , and p → q . An assignment of truth values that makes all three specifications true must have p false to make ¬p true . Because we want p ∨ q to be true but p must be false, q must be true . Because p → q is true when p is false and q is true , we conclude that these specifications are consistent, because they are all true when p is false and q is true.

Logic Gates

1.1

1.2
Tags