Mada za sehemu hiiLogicMada 5
Logic concerns with the study of analysis of methods of reasoning which lead to certain conclusion or statement.
If it rains today we shall play football. It rained we did not play football
Consider the following sentences
- The medians of a triangle meet at a point
- The diagonals of any quadrilateral are parallel
- The median of a triangle meet at a point and the diagonals of a quadrilateral are parallel
- Is a compound sentence
Other connecting words are: or, but, while
2 × 3 = 5 has a truth value "false"
2 × 2 = 4 has a truth value "true"
The number 23 is prime. "True"
A proposition is any statement which is free from ambiguity and having a property, it is either true or false but not both nor neither.
Consider the following sentences
- Birds have no wings (proposition)
- The sun rises from the west (proposition)
- 8 = 6 + 2 (proposition)
- The grass is green (proposition)
- I am feeling hungry (not proposition)
A truth table is a matrix whose entries are truth values
| P | Q | P ∧ Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
E.g. T F or F T
A conjunction is a compound proposition connected by the word "and"
E.g. the sun rises from the west and 8 = 6 + 2
The above proposition has a truth value false
The proposition having "and" but, if both of the sentence are true, then only truth value will be true.
The word "but" carries the same meaning as the word "and"
Find the components or simple sentence of the following conjunctions
a) 3 < 5 and there are infinitely many prime numbers
- 3 < 5
- There are infinitely many prime numbers
b) 4 is divisible by 2 and 4 is a prime number
- 4 is divisible by 2
- 4 is a prime number
c) 2 < 3 and 5 < 3
- 2 < 3
- 5 < 3
d) The sun rises from the west and is irrational
- The sun rises from the west
- is irrational
e) 2 is an odd number and it is false that 5 is even
Let P and Q be any general proposition
Required to find the truth table for P and Q
Now P and Q is written as
has truth value only when both P and Q are true
Truth table for
| P | Q | |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Mwalimu
Unasoma somo hili? Niulize nikuelezee chochote kilichomo.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu mada hii.
Ingia ili kuuliza