* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Find the truth value of X ∧ ((Y ⇒ W) ⇔ Z) if X is true, Y is false, and
Modal logic wikipedia , lookup
Analytic–synthetic distinction wikipedia , lookup
Intuitionistic logic wikipedia , lookup
Foundations of mathematics wikipedia , lookup
Meaning (philosophy of language) wikipedia , lookup
Natural deduction wikipedia , lookup
Law of thought wikipedia , lookup
Interpretation (logic) wikipedia , lookup
Propositional calculus wikipedia , lookup
Propositional formula wikipedia , lookup
Laws of Form wikipedia , lookup
1) Find the truth value of X ∧ ((Y ⇒ W) ⇔ Z) if X is true, Y is false, and W is true and Z is true. What is the truth value of this expression if the brackets are removed? If X is true, Y is false, W is true and Z is true then the expression becomes: 𝑋 ∧ ((𝑌 ⇒ 𝑊) ⟺ 𝑍) 𝑡 ∧ ((𝑓 ⇒ 𝑡) ⟺ 𝑡) This is equivalent to: 𝑡 ∧ (𝑡 ⟺ 𝑡) Which is equivalent to: 𝑡∧𝑡 Giving: 𝑡 So the given sentence is t in this situation. To begin with, I worked out the brackets first. This was (𝑓 ⇒ 𝑡) which tells me false implies true. Thereafter, I worked out the second half of the brackets which gave((𝑓 ⇒ 𝑡) ⇔ 𝑡), which is equivalent to(𝑡 ⇔ 𝑡). Furthermore, (𝑡 ⇔ 𝑡) can only be true if and only if both parts are true. Finally, I worked out the last part of the expression,𝑡 ∧ 𝑡, which could only be true if both parts were true which resulted in the truth value t. Without brackets the order of precedence changes which can affect the outcome of the expression. 𝑋∧𝑌 ⇒𝑊 ⟺𝑍 𝑡∧𝑓 ⇒𝑡 ⇔𝑡 𝑓⇒𝑡⇔𝑡 𝑡⇔𝑡 𝑡 Furthermore, the given sentence is still t in this situation. When finding the truth value of the expression without brackets I considered the order of precedence. To begin with, I replaced the letters with their truth value. Thereafter, I started with 𝑡 ∧ 𝑓 which resulted in false as both parts have to be true. I proceeded onto the next part of the expression by finding the second highest precedence which was𝑓 ⇒ 𝑡. This meant that false was implying true giving𝑡 ⇔ 𝑡. Finally, 𝑡 ⇔ 𝑡 implies it can be true if and only if both parts are true. 2) Consider the following propositions: 𝐴 ∧ (¬𝐵 ⇒ ¬𝐴) ∧ (𝐵 ⇒ 𝐶) ⇒ 𝐵 ∧ 𝐶 2a) Interpreting these symbols as the atomic sentences A: Logic is part of mathematics B: Mathematics is hard C: I enjoy logic interpret the above proposition as an argument in natural English. Logic is a part of mathematics and mathematics is not hard therefore logic is not part of mathematics. In addition, mathematics is hard implying I enjoy logic. Therefore, mathematics is hard and I enjoy logic. 2b) By means of a truth table, find out whether the argument is valid. A truth table is used to determine whether the expression is a tautology, contingency or a contradiction. Additionally, the truth table is also used to help identify logical equivalencies. Propositions are logically equivalent if they have the same truth value. A 𝑡 𝑡 𝑡 𝑡 𝑓 𝑓 𝑓 𝑓 1 ∧ (¬𝐵 ⇒ 𝑓 𝑓 𝑡 𝑓 𝑓 𝑡 𝑓 𝑡 𝑡 𝑓 𝑡 𝑡 𝑓 𝑡 𝑡 𝑓 𝑡 𝑡 𝑓 𝑓 𝑡 𝑓 𝑓 𝑡 10 2 8 ¬𝐴 𝑓 𝑓 𝑓 𝑓 𝑡 𝑡 𝑡 𝑡 3 ∧ (B 𝑓 𝑓 𝑓 𝑓 𝑡 𝑡 𝑓 𝑡 𝑓 𝑓 𝑓 𝑓 𝑓 𝑡 𝑓 𝑡 11 4 ⇒ 𝑡 𝑡 𝑡 𝑓 𝑡 𝑡 𝑡 𝑓 9 C) 𝑡 𝑓 𝑡 𝑓 𝑡 𝑓 𝑡 𝑓 5 ⇒ B 𝑡 𝑓 𝑡 𝑓 𝑡 𝑡 𝑡 𝑡 𝑡 𝑓 𝑡 𝑓 𝑡 𝑡 𝑡 𝑡 13 6 ∧ C 𝑓 𝑡 𝑓 𝑓 𝑡 𝑡 𝑓 𝑓 𝑓 𝑡 𝑓 𝑓 𝑡 𝑡 𝑓 𝑓 12 7 𝐶𝑜𝑙𝑢𝑚𝑛 8: 2 ⇒ 3 𝐶𝑜𝑙𝑢𝑚𝑛 9: 4 ⇒ 5 𝐶𝑜𝑙𝑢𝑚𝑛 10: 1 ∧ 8 𝐶𝑜𝑙𝑢𝑚𝑛 11: 10 ∧ 9 𝐶𝑜𝑙𝑢𝑚𝑛 12: 6 ∧ 7 𝐶𝑜𝑙𝑢𝑚𝑛 13: 11 ⇒ 12 The order of columns follow the rules of precedence bearing in mind that the expressions within the parentheses “()”comes first. Thereafter, ∧ 𝑡ℎ𝑒𝑛 ⇒. Since column 13 has only truth value t, 𝐴 ∧ (¬𝐵 ⇒ ¬𝐴) ∧ (𝐵 ⇒ 𝐶) ⇒ 𝐵 ∧ 𝐶 is tautology. This expression is a tautology because it only contains the truth value t. Whereas, if the truth value was both t and f then the expression would be a contingency or if the truth value was just f then the expression would be a contradiction. 3) Consider the following collection of statements: I sit on a stool. If I sit on a stool, and I work too long, I will get a sore back. If I do not take proper rests, I will work too long. 3a) Choose symbols to represent the atomic sentences in the above argument, and hence express the statements in terms of propositional calculus. I have chosen the following atomic sentences: S: I sit on a stool W: I will work too long B: I will get a sore back R: I take proper rests Giving: 𝑆 ⇒ (𝑆 ∧ 𝑊 ⇒ 𝐵) ⇒ (¬𝑅 ⇒ 𝑊) 3b) Construct a formal proof (table of assertions and justifications) showing that the statement If I will not get a sore back, I take proper rests follows from these hypotheses. I am required to construct a formal proof table to show that the statement “If I will not get a sore back, I take proper rests” follows from the hypotheses. 𝑆, (𝑆 ∧ 𝑊 ⇒ 𝐵), ¬𝑅 ⇒ 𝑊 ⊢ ¬𝐵 ⇒ 𝑅 By the deduction theorem, this is equivalent to: 𝑆, (𝑆 ∧ 𝑊 ⇒ 𝐵), ¬𝑅 ⇒ 𝑊, ¬𝐵 ⊢ 𝑅 Let 𝐻1 : 𝑆 𝐻2 : 𝑆 ∧ 𝑊 ⇒ 𝐵 𝐻3 : ¬𝑅 ⇒ 𝑊 𝐻4 : ¬𝐵 𝐶: 𝑅 I need to prove C. To do this I need to construct the proof tableau. 1 2 3 4 5 6 Assertion ¬𝐵 𝑆∧𝑊 ⇒𝐵 ¬(𝑆 ∧ 𝑊) ¬𝑆 ∨ ¬𝑊 𝑆 ¬𝑊 7 8 ¬𝑅 ⇒ 𝑊 𝑅 Justification 𝐻4 𝐻2 1,2 Modus Tollens 3 De Morgans Law 𝐻1 4,5 Disjunctive Syllogism 𝐻3 6,7 Modus Tollens The proof tableau proves that R, the required conclusion, follows from the hypotheses 𝐻1 , 𝐻2 , 𝐻3 𝑎𝑛𝑑 𝐻4 . 3c) How many rows would be required by a truth table to show this? There would be sixteen rows required by the truth table to show the different possible combinations of truth and false. For every letter there are two possibilities. In this situation, I have used four letters. I worked this out by using the number of possibilities per letter, two, to the power of letters I have, four, giving sixteen. 4) I am cataloguing my collection of 24 toy cars. 9 of them are big, 10 are red, and 13 are scratched. 3 are big and red, 2 are big and scratched, and 4 are red and scratched. How many are red, but not big or scratched? There is a collection of 24 toy cars, 9 are big, 10 are red and 13 are scratched. 3 are big and red, 2 are big and scratched and 4 are red and scratched. I am required to find out how many toy cars are red, but not big or scratched. To begin with I have created a list of letters to represent red, big and scratched so I can put them into propositional calculus to make my working out clearer: R: Red B: Big S: Scratched I have represented how many toy cars there are in total by using the following expression: |𝑅 ∪ 𝐵 ∪ 𝑆| = 24. This expression represents the union between |R|, |B| and |S|. We must note that we cannot represent this expression as |𝑅 + 𝐵 + 𝑆| as |10+9+13| doesn’t equal to 24. The cardinality of a set is the number of elements it has. For example: if R is a set then its cardinality is represented as |R| which is the number of elements of R. Below is a list of all the cardinalities: |𝑅 ∪ 𝐵 ∪ 𝑆| = 24 |𝑅| = 10 |𝑆| = 13 |𝐵| = 9 |𝐵 ∩ 𝑅| = 3 |𝐵 ∩ 𝑆| = 2 |𝑅 ∩ 𝑆| = 4 I have inserted the known values into an expression: |𝑅 ∪ 𝐵 ∪ 𝑆| = |𝑅| + |𝑆| + |𝐵| − |𝐵 ∩ 𝑅| − |𝐵 ∩ 𝑆| − |𝑅 ∩ 𝑆| + |𝑅 ∪ 𝐵 ∪ 𝑆| As seen above I have added in |𝑅 ∪ 𝐵 ∪ 𝑆| at the end of the expression because I have deducted the big and red cars |𝐵 ∩ 𝑅|, the big and scratched cars |𝐵 ∩ 𝑆| and the red and scratched |𝑅 ∩ 𝑆|. This has been added in at the end because we had deducted the cars that are red, big and scratched twice. Giving: 24 = 10 + 13 + 9 − 3 − 2 − 4 + 𝑥 24 = 32 − 9 + 𝑥 24 = 23 + 𝑥 𝑥 = 24 − 23 𝑥=1 In the venn diagram below I have shown the expressions used to show I have deducted the necessary numbers from the union. For example: this will make sure the big and scratched cars are deducted from the red cars. R S 10 − 𝑥 − (4 − 𝑥) − (3 − 𝑥) 13 − 𝑥 − (4 − 𝑥) − (2 − 𝑥) 4−𝑥 𝑥 2−𝑥 3−𝑥 9−𝑥 − (2 − 𝑥) − (3 − 𝑥) B Which gives: R 4 S 8 3 1 2 1 5 B As seen in the venn diagrams, I have deducted the number of big and scratched cars from the red cars which has given me the total number of just red cars. Therefore, there are 4 red toy cars that are not big and scratched. 5a) Use a hybrid truth/membership table to show that if A ⊆ B, then A ∩ C ⊆ B ∩ C. The membership table is seen as a tabular venn diagram. With a membership table we are able to use it to our advantage to list all possible regions in the universe. ‘I’ in the table represents that it is included in the given set. Also, ‘O’ represents that it is outside the given set. I am going to show that if 𝐴 ⊆ 𝐵 ⇒ 𝐴 ∩ 𝐶 ⊆ 𝐵 ∩ 𝐶 by the use of a hybrid/membership table. M T A ⊆ I 𝑡 I 𝑡 I 𝑓 I 𝑓 O 𝑓 O 𝑓 O 𝑓 O 𝑓 1 9 M T B ⇒ I 𝑡 I 𝑡 O 𝑡 O 𝑡 I 𝑡 I 𝑡 O 𝑡 O 𝑡 2 11 M A I I I I O O O O 3 M ∩ I O I O O O O O 7 M T C ⊆ I 𝑡 O 𝑡 I 𝑓 O 𝑡 I 𝑡 O 𝑡 I 𝑡 O 𝑡 4 10 M B I I O O I I O O 5 M ∩ I O O O I O O O 8 M C I O I O I O I O 6 𝐶𝑜𝑙𝑢𝑚𝑛 7: 3 ∩ 4 𝐶𝑜𝑙𝑢𝑚𝑛 8: 5 ∩ 6 𝐶𝑜𝑙𝑢𝑚𝑛 9: 1 ∧ 2 𝐶𝑜𝑙𝑢𝑚𝑛 10: 7 ∧ 8 𝐶𝑜𝑙𝑢𝑚𝑛 11: 9 ⇒ 10 M represents the proposition is a membership. For example: A I O B O I T represents the proposition has a truth value. For example: A B T F F T Column 11 only shows the truth value t. we can see that the proposition 𝐴 ⊆ 𝐵 ⇒ 𝐴 ∩ 𝐶 ⊆ 𝐵 ∩ 𝐶 is a tautology. The membership hybrid table also shows that A is a subset B which implies A intersect C which is a subset of B intersect C. 5b) Give an example of a situation where the relationship A ∩ C ⊆ B ∩ C holds, even though A is not a subset of B, where A, B and C are subsets of the universal set {1, 2, 3, 4}. A set is a collection of real or conceptual objects, also known as elements of a set. As seen below I have defined the sets by listing the elements in brackets e.g. {,}. I have created the sets: 𝑢: {1,2,3, 4} 𝑎: {1,4} 𝑏: {1,2,3} 𝑐: {1,2} When we show the intersection between 𝐴 ∩ 𝐶 𝑎𝑛𝑑 𝐵 ∩ 𝐶 we get: 𝐴 ∩ 𝐶 = {1} 𝐵 ∩ 𝐶 = {1,2} This shows that 𝐴 ∩ 𝐶 is a subset of 𝐵 ∩ 𝐶 as they both contain {1} but A is not a subset of B because A doesn’t carry {2,3}. However, sets A,B and C are subsets of the universal set. 6) a[1 . . . n] is an array of integers, and N is the set {1, 2, . . . , n − 1}. 6a) Express the statement ∀i ∈ N|a[i] > a[i + 1] in normal English. A predicate is a proposition known to have some information missing. It can express a property of an object, if one bit of information is missing, or a relationship, if two bits are missing, this is sometimes called the arity of the predicate. The use of letters is readable but less concise. In computing, predicates can be used to describe what a programme can do. The statement ∀i ∈ N|a[i] > a[i + 1] in normal english states the array a[1…n] is in decreasing order. 6b) Give the negation of this statement in formal language. The negation of this statement means the inverse, giving: ¬(∀𝑖 ∈ 𝑁|𝑎[𝑖] > 𝑎[𝑖 + 1] ≡ ∃𝑖 ∈ 𝑁|¬(𝑎[𝑖] > 𝑎[𝑖 + 1] ≡ ∃𝑖 ∈ 𝑁|¬(¬𝑎[𝑖] > 𝑎[𝑖 + 1] ≡ ∃𝑖 ∈ 𝑁|𝑎[𝑖] < ¬𝑎[𝑖 + 1]