Presentation is loading. Please wait.

Presentation is loading. Please wait.

Welcome to Wk02 MATH225 Applications of Discrete Mathematics and Statistics http://media.dcnews.ro/image/201109/w670/statistics.jpg.

Similar presentations


Presentation on theme: "Welcome to Wk02 MATH225 Applications of Discrete Mathematics and Statistics http://media.dcnews.ro/image/201109/w670/statistics.jpg."— Presentation transcript:

1 Welcome to Wk02 MATH225 Applications of Discrete Mathematics and Statistics

2 Now, for something profound…

3 TRUTH

4 Question on a true/false test:
Truth Question on a true/false test: US presidents are named “Barack” T ___ F ___

5 Question on a true/false test:
Truth Question on a true/false test: US presidents are named “George” T ___ F ___

6 Question on a true/false test:
Truth Question on a true/false test: US presidents are male T ___ F ___

7 Question on a true/false test:
Truth Question on a true/false test: US presidents are at least 35 years old T ___ F ___

8 So, it is easier to be “false” than to be “true”
Truth So, it is easier to be “false” than to be “true”

9 Truth So, it is easier to be “false” than to be “true” To be “true” a statement must be true in all cases

10 Truth So, it is easier to be “false” than to be “true” To be “true” a statement must be true in all cases If not, it is “false”

11 Truth We know what truth is

12 We know what truth is but it is a little hard to define it

13 Logical Statements Most of the definitions of formal logic have been developed so that they agree with natural or intuitive logic

14 Logical Statements They are used by people who need to think and communicate clearly and unambiguously

15 Logical Statements They are used by people who need to think and communicate clearly and unambiguously No misunderstandings or misinterpretations!

16 Logical Statements In any mathematical theory, new terms are defined by using those that have been previously defined

17 Logical Statements But a few initial terms necessarily remain undefined

18 Logical Statements In logic, the words “true” and “false” are the initial undefined terms

19 Logical Statements Could you come up with a definition of “true”?

20 Logical Statements A statement (or proposition) is a sentence that is true or false but not both

21 Logical Statements A statement (or proposition) is a sentence that is true or false but not both (Sentence is another initial undefined term…)

22 Is it a statement/proposition? “Two plus two equals four”
Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Two plus two equals four”

23 Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Two plus two equals four” Yes, because it is true

24 Is it a statement/proposition? “Two plus two equals five”
Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Two plus two equals five”

25 Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Two plus two equals five” Yes, because it is false

26 Is it a statement/proposition? “He is a CTU student”
Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “He is a CTU student”

27 Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “He is a CTU student” No, because it cannot be given a truth value

28 Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Alfred Hitchcock was a brilliant director”

29 Logical Statements IN-CLASS PROBLEMS Is it a statement/proposition? “Alfred Hitchcock was a brilliant director” No, because it cannot be given a truth value

30 Questions?

31 Logical Statements Universal statements/ propositions contain variations of the words “for all”

32 Logical Statements Universal statements/ propositions contain variations of the words “for all” Ex: All males have a Y chromosome

33 Logical Statements Existential statements/ propositions contain versions of the word “some”

34 Logical Statements Existential statements/ propositions contain versions of the words “there is” Ex: Some males carry pocketknives

35 Logical Statements Statements are usually labeled with a variable name like “p” “q” “r”

36 Logical Statements Statements are usually labeled with a variable name like “p” “q” “r” “mind your ps and qs!”

37 Compound Statements Statements using “and”, “or”, “not”, “if then” and “if and only if” are compound statements (otherwise they are simple statements)

38 Compound Statements Most important mathematical concepts can only be defined using phrases that are universal (“all”), existential (“there is”) and conditional (“if-then”)

39 Compound Statements Types of compound statements:  means “AND” called the conjuction

40 Compound Statements Types of compound statements:  means “AND” called the conjuction  for sets

41 Compound Statements a ≤ x ≤ b means a ≤ x and x ≤ b

42 Compound Statements Types of compound statements:  means “OR” called the disjunction

43 Compound Statements Types of compound statements:  means “OR” called the disjunction  for sets

44 Compound Statements x ≤ a means x < a or x = a

45 Compound Statements  a pyramid upon the sand (“and”)  points down to the ore (“or”) below

46 Compound Statements  and  both mean “and”  and  both mean “or”

47 Compound Statements To evaluate the “truth” of compound statements, we use truth tables

48 Compound Statements A truth table has one column for each input variable and one final column showing all of the possible results of the logical operation

49 Compound Statements Example: p: Ann is on the softball team q: Paul is on the softball team Are these statements?

50 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Find p  q

51 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Find p  q (p or q) p q p  q

52 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What values can p have? p q p  q

53 Compound Statements Example: p: Ann is on the softball team q: Paul is on the softball team What values can p have? p q p  q T F

54 Compound Statements Example: p: Ann is on the softball team q: Paul is on the softball team What values can q have? p q p  q

55 Compound Statements Example: p: Ann is on the softball team q: Paul is on the softball team What values can q have? p q p  q T F

56 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What combinations of values can you have for p and q? p q p  q

57 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What combinations of values can you have for p and q? p q p  q T

58 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What combinations of values can you have for p and q? p q p  q T F

59 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What combinations of values can you have for p and q? p q p  q T F

60 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team What combinations of values can you have for p and q? p q p  q T F

61 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p true and q true? p q p  q T F

62 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p true and q true? p q p  q T F

63 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p true and q false? p q p  q T F

64 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p true and q false? p q p  q T F

65 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p false and q true? p q p  q T F

66 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p false and q true? p q p  q T F

67 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p false and q false? p q p  q T F

68 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Is p  q (p or q) true for p false and q false? p q p  q T F

69 Compound Statements Example: p: Ann is on the softball team q: Paul is on the softball team This truth table shows when p  q is true p q p  q T F

70 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team Find p  q

71 Compound Statements IN-CLASS PROBLEMS Example: p: Ann is on the softball team q: Paul is on the softball team This truth table shows when p  q is true p q p  q T F

72 Compound Statements In a conjunction (), both statements must be true for the conjunction to be true In a disjunction (), both statements must be false for the disjunction to be false

73 Questions?

74 Compound Statements Types of compound statements: ~ or ¬ means “NOT” called the negation

75 Compound Statements Types of compound statements: ~ or ¬ means “NOT” called the negation Ac for sets

76 Compound Statements The negation of a statement is a statement that exactly expresses what it would mean for the statement to be false

77 Compound Statements A statement p has a negation ~p (“not p”)

78 Compound Statements ~p will have the opposite truth value than p

79 Compound Statements ~p will have the opposite truth value than p If p is true, then ~p is false

80 Compound Statements ~p will have the opposite truth value than p If p is true, then ~p is false If p is false, then ~p is true

81 Compound Statements Truth table for ~p p ~p T F

82 Questions?

83 Compound Statements The statements p, q, r are connected by ~, ,  These symbols are called “logical connectives”

84 Compound Statements We can build compound sentences out of component statements and the terms “not” “and” and “or”

85 Compound Statements We can build compound sentences out of component statements and the terms “not” “and” and “or” This is called a statement/ propositional form

86 Compound Statements Remember, if we want these sentences to be statements, they must be either true or false

87 Compound Statements We define compound sentences to be statements by specifying their truth values in terms of the statements that compose them

88 Compound Statements The truth table for a given statement form displays all possible combinations of truth values and component statement variables

89 Compound Statements Remember PEMDAS?

90 Compound Statements There is also an order or operations for compound statements

91 Compound Statements PEMDAS for compound statements: “~ before  or ”

92 Compound Statements PEMDAS for compound statements: “squiggle before arrows”

93 Compound Statements PEMDAS for compound statements: “~ before  or ” Example: ~ p  q = (~ p)  q

94 Compound Statements The order of operations can be overridden through the use of parentheses

95 Compound Statements The order of operations can be overridden through the use of parentheses ~ (p  q) is the negation of the conjunction of p and q

96 Compound Statements The symbols  and  are considered coequal in order of operation

97 Compound Statements p  q  r is ambiguous It must be written as either: (p  q)  r or p  (q  r) to have meaning

98 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write x ≤ 3 in terms of p,q and r

99 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write x ≤ 3 in terms of p,q and r q  r

100 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write 0 < x < 3 in terms of p,q and r

101 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write 0 < x < 3 in terms of p,q and r p  q

102 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write 0 < x ≤ 3 in terms of p,q and r

103 Compound Statements IN-CLASS PROBLEMS Suppose x is a particular real number p: 0<x q: x<3 r: x=3 Write 0 < x ≤ 3 in terms of p,q and r p  (q  r)

104 Questions?

105 Logical Equivalence 6 is greater than 2 2 is less than 6 Are these two statements two different ways of saying the same thing?

106 Logical Equivalence 6 is greater than 2 2 is less than 6 Are these two statements two different ways of saying the same thing? Yep because of the definition of the words “greater than” and “less than”

107 Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing?

108 Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing? Yep, but not because of definitions of words

109 Logical Equivalence Dogs bark and cats meow Cats meow and dogs bark Are these two statements two different ways of saying the same thing? Yep, because of the logical form of the statements

110 Logical Equivalence Any two statements whose logical forms are related in the same way would either both be true or both be false

111 Logical Equivalence p q pq p and q qp q and p T F

112 Logical Equivalence Two statement forms are called logically equivalent if and only if they have identical truth values in their truth table

113 Logical Equivalence Two statement forms are called logically equivalent if and only if they have identical truth values in their truth table Written: p ≡ q

114 Logical Equivalence Test for logical equivalence: 1) What are the statements? 2) Construct a truth table 3) If the truth values are the same for each statement, then they are logically equivalent 4) If not, then not…

115 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p?

116 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~(~p)

117 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~p ~(~p)

118 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~p ~(~p) T F

119 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~p ~(~p) T F

120 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~p ~(~p) T F

121 Logical Equivalence IN-CLASS PROBLEMS Double negative property: ~(~p) ≡ p Is ~(~p) logically equivalent to p? p ~p ~(~p) T F p and ~(~p) always have the same truth values

122 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q?

123 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q

124 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q T F

125 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq T F

126 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq T F

127 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) T F

128 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) T F

129 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) ~p ~q T F

130 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) ~p ~q T F

131 Is ~(pq) logically equivalent to ~p  ~q?
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) ~p ~q ~p~q T F

132 ~(pq) and ~p~q don’t have
Logical Equivalence IN-CLASS PROBLEMS Is ~(pq) logically equivalent to ~p  ~q? p q pq ~(pq) ~p ~q ~p~q T F ~(pq) and ~p~q don’t have the same truth values

133 Questions?

134 Conditional Statements
Types of compound statements: Conditional statements/ propositions contain versions of the words “if-then”

135 Conditional Statements
Types of compound statements: Conditional statements/ propositions contain versions of the words “if-then” Ex: If a human has a Y chromosome, it is genetically male

136 Conditional Statements
Types of compound statements: Conditional statements/ propositions contain versions of the words “if-then” denoted symbolically by “p → q”

137 Conditional Statements
In a conditional statement p → q p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent)

138 Conditional Statements
The truth of statement q depends on the truth of statement p

139 Conditional Statements
Logically equivalent conditional statements have the same truth value in their truth tables

140 Conditional Statements
IN-CLASS PROBLEMS Is this a statement? If Lisa is in France, then she is in Europe

141 Conditional Statements
IN-CLASS PROBLEMS Is this statement conditional? If Lisa is in France, then she is in Europe

142 Conditional Statements
IN-CLASS PROBLEMS If Lisa is in France, then she is in Europe Think of it as: p: Lisa is in France q: She is in Europe If p then q or p → q

143 Conditional Statements
IN-CLASS PROBLEMS Is this a statement? If Lisa is not in Europe, then she is not in France

144 Conditional Statements
IN-CLASS PROBLEMS Is this statement conditional? If Lisa is not in Europe, then she is not in France

145 Conditional Statements
IN-CLASS PROBLEMS If Lisa is not in Europe, then she is not in France Think of it as: ~q: Lisa is not in Europe ~p: She is not in France If ~q then ~p or ~q → ~p

146 Conditional Statements
IN-CLASS PROBLEMS Are these statements equivalent? If Lisa is in France, then she is in Europe p → q If Lisa is not in Europe, then she is not in France ~q → ~p

147 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p

148 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

149 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

150 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

151 Conditional Statements
For conditional statements, p → q is false only when p is true but q is false Otherwise it is true

152 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

153 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

154 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F

155 Conditional Statements
IN-CLASS PROBLEMS in France in Europe p→q not in Europe not in France ~q→~p T F p→q and ~q→~p have the same truth values

156 Conditional Statements
Note: while p→q and ~q→~p are logically equivalent, p→q and ~p→~q aren’t

157 Conditional Statements
Contrapositive (or transposition) of a conditional statement/ proposition: The contrapositive of p→q is ~q→~p

158 Conditional Statements
A conditional statement/ proposition is logically equivalent to its contrapositive

159 Contrapositive Statements
IN-CLASS PROBLEMS What is the contrapositive to: If Howard can swim across the lake, then Howard can swim to the island

160 Contrapositive Statements
IN-CLASS PROBLEMS What is the contrapositive to: If Howard can swim across the lake, then Howard can swim to the island If Howard cannot swim to the island, then Howard cannot swim across the lake

161 Contrapositive Statements
IN-CLASS PROBLEMS What is the contrapositive to: If today is Easter, then tomorrow is Monday

162 Contrapositive Statements
IN-CLASS PROBLEMS What is the contrapositive to: If today is Easter, then tomorrow is Monday If tomorrow is not Monday, then today is not Easter

163 Questions?

164 Biconditional Statements
Types of compound statements: Biconditional statements/ propositions contain versions of the words “if and only if” denoted symbolically by “p ↔ q”

165 Biconditional Statements
Types of compound statements: Biconditional statements/ propositions contain versions of the words “if and only if” Sometimes written: iff

166 Biconditional Statements
IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if it is sunny

167 Biconditional Statements
IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if it is sunny nope

168 Biconditional Statements
IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if and only if it is sunny

169 Biconditional Statements
IN-CLASS PROBLEMS Is it biconditional? I wear my sunglasses if and only if it is sunny yep

170 Biconditional Statements
IN-CLASS PROBLEMS Truth table: Sunglasses? Sunny? Sunglasses iff sunny

171 Biconditional Statements
IN-CLASS PROBLEMS Truth table: Sunglasses? Sunny? Sunglasses iff sunny T F

172 Biconditional Statements
IN-CLASS PROBLEMS Truth table: Sunglasses? Sunny? Sunglasses iff sunny T F

173 Biconditional Statements
For biconditional statements, p ↔ q is true whenever the two statements have the same truth value Otherwise it is false

174 Questions?

175 Truth Tables in Circuits
In designing digital circuits, the designer often begins with a truth table describing what the circuit should do

176 Truth Tables in Circuits
Suppose we were given the task of designing a flame detection circuit for a toxic waste incinerator

177 Truth Tables in Circuits
The intense heat of the fire is intended to neutralize the toxicity of the waste introduced into the incinerator

178 Truth Tables in Circuits
Combustion-based techniques are commonly used to neutralize medical waste, which may be infected with deadly viruses or bacteria

179 Truth Tables in Circuits
So long as a flame is maintained in the incinerator, it is safe to inject waste into it to be neutralized

180 Truth Tables in Circuits
If the flame were to be extinguished, it would be unsafe to inject waste into the combustion chamber, as it would exit the exhaust un-neutralized, and pose a health threat to anyone in close proximity to the exhaust

181 Truth Tables in Circuits
What we need in this system is a sure way of detecting the presence of a flame, and permitting waste to be injected only if a flame is “proven” by the flame detection system

182 Truth Tables in Circuits

183 Truth Tables in Circuits
Our task, now, is to design the circuitry of the logic system to open the waste valve if and only if there is good flame proven by the sensors

184 Truth Tables in Circuits
Do we want the valve to be opened if only one out of the three sensors detects flame? Two out of three? All three?

185 Truth Tables in Circuits
Design the system so that the valve is opened if and only if all three sensors detect a good flame

186 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open?

187 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire

188 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire

189 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire

190 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire No Yes

191 Truth Tables in Circuits
This functionality could be generated with a three-input AND gate: the output of the circuit will be “on” if and only if input A AND input B AND input C are all “fire”

192 Truth Tables in Circuits
It would be nice to have a system that minimized shutting the system down unnecessarily, yet still provide sensor redundancy

193 Truth Tables in Circuits
Two out of three might do this!

194 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire

195 Truth Tables in Circuits
Sensor A Sensor B Sensor C Open? No fire Fire no yes

196 Truth Tables in Circuits
We might want to know when one of the sensors did not agree with the other two

197 Truth Tables in Circuits
Sensor A Sensor B Sensor C Only two agree? No fire Fire

198 Truth Tables in Circuits
Sensor A Sensor B Sensor C Only two agree? No fire Fire yes no

199 Questions?

200 Beach Trip Logic problems are found in Crossword Puzzle books They use the skills we learned in this class!


Download ppt "Welcome to Wk02 MATH225 Applications of Discrete Mathematics and Statistics http://media.dcnews.ro/image/201109/w670/statistics.jpg."

Similar presentations


Ads by Google