Logic and Discrete Mathematics Exam Help
I601 Logic and Discrete Math Revision Questions
- 1 Propositions, logical operations and compound propositional statements
- 2 Classification of compound propositions
- 3 Algebra of propositions
- 4 Conjunctive and Disjunctive Normal Form of propositional statements
- 5 Predicates and quantifiers
- 6 Logical equivalences for quantifiers
- 7 Propositional calculus (PC)
- 8 Semantics of predicate calculus
- 9 Sequent predicate calculus LK
- 10 Proof techniques
- 11 Proofs by contraposition and contradiction
- 12 Mathematical induction (ordinary and strong)
- 13 Recursively defined functions
- 14 Elementary set theory, basic definitions and set operations
- 15 Power set and Cartesian product
- 16 Cardinality. Countable sets
- 17 Countability of rational numbers
- 18 Uncountable sets
- 19 Binary relations
- 20 Composition of relations, powers of relations
- 21 Functions
- 22 Basic counting techniques
- 23 Combinations and permutations
- 24 Binomial coefficients
- 25 Permutations of multisets
- 26 Distributing n identical objects among k groups. Combinations with repetitions
- 27 Recurrence equations
- 28 Fibonacci sequence
- 29 Method of characteristic roots for solving of recurrence equations
- 30 Graphs, vertices, edges, paths, cycles and connectedness
- 31 Eulerian and Hamiltonian graphs, travelling-salesman problem
- 32 The shortest path problem
- 33 Basic definitions and properties of trees
- 34 Minimum spanning tree problem
- 35 Isomorphism of labelled graphs
- 36 Counting of unlabelled trees
- 37 Planar graphs. Euler’s formula
- 38 Homeomorphic graphs
- 39 Platonic solids and planar graphs
- 40 Colouring of graphs
- 41 Colouring of planar graphs with 6 and 5 colours
Propositions, logical operations and compound propositional statements
A proposition is a declarative sentence that is either true or false, but not both. A proposition can also be considered a result of logical operators (logical connectives, AND, OR, XOR, NAND, IF THEN, IFF). New compositions, called compound propositions are formed from existing propositions using logical operators.
Classification of compound propositions
A proposition is satisfiable if truth table contains True at least once.
A proposition is a tautology if is always true (truth table consists of value True).
If the truth table is always false.
A proposition is satisfiable but not a tautology.
If two propositions, p and q, have the same value in all possible cases are called logically equivalent, p ≡ q, if p↔q.
|p ∧ T ≡ p
p ∨ F ≡ p
|p ∨ T ≡ T
p ∧ F ≡ F
|p ∨ p ≡ p
|¬(¬p) ≡ p||Double negation law|
|p ∨ q ≡ q ∨ p
|(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
|p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
|¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q
|De Morgan's laws|
|p ∨ (p ∧ q) ≡ p
p ∧ (p ∨ q) ≡ p
|p ∨ ¬p ≡ T
p ∧ ¬p ≡ F
The negative version of the positive logical proposition, p∨q≡¬p∧¬q.
The mirror opposite of a logical proposition.
Algebra of propositions
Laws of Algebra of propositions The table can be found here: Table: Laws of Algebra of Propositions (you can just add this picture and delete this all:D)
About Truth Table:
To be T they have to be: Λ == both True V == at least 1 True p → q == p ≡ False or q ≡ True p ↔ q == both False or True
p V p ≡ p p Λ p ≡ p p → p ≡ T p ↔ p ≡ T p V T ≡ T p Λ T ≡ p p → T ≡ T p ↔ T ≡ p p V F ≡ p p Λ F ≡ F p → F ≡ ~p p ↔ F ≡ ~p T → p ≡ p F → p ≡ T
p V q ≡ q V p p Λ q ≡ q Λ p p → q ≠ q → p p ↔ q ≡ q ↔ p
p V ~p ≡ T p Λ ~p ≡ F p → ~p ≡ ~p p ↔ ~p ≡ F ~p → p ≡ p
~(~p) ≡ p
p V (q V r) ≡ (p V q) V r p Λ (q Λ r) ≡ (p Λ q) Λ r
p V (q Λ r) ≡ (p V q) Λ (p V r) p Λ (q V r) ≡ (p Λ q) V (p Λ r)
p V (p Λ q) ≡ p p Λ (p V q) ≡ p
~(p V q) ≡ ~p Λ ~q ~(p Λ q) ≡ ~p V ~q
Equivalence of Contrapositive:
p → q ≡ ~q → ~p
p → q ≡ ~p V q p ↔ q ≡ (p → q) Λ (q → p)
Conjunctive and Disjunctive Normal Form of propositional statements
A formula in conjunctive normal form (CNF) is a conjunction of clauses.
Example of CNF: (p ∨ ¬q ∨ r) ∧ (¬p ∨ ¬r) ∧ q
Similarly, one defines formulas in disjunctive normal form (DNF) by swapping the words ’conjunction’ and ’disjunction’ in the definitions above.
Example of DNF: (¬p ∧ q ∧ r) ∨ (¬q ∧ ¬r) ∨ (p ∧ r)
Transformation into CNF : Every propositional formula can be converted into an equivalent formula that is in CNF.
Example: Transform the following formula into CNF: ¬(p → q) ∨ (r → p) 1) Express implication by disjunction and negation: ¬(¬p ∨ q) ∨ (¬r ∨ p) 2) Push implication by disjunction and negation: (¬¬p ∧ ¬q) ∨ (¬r ∨ p); (p ∧ ¬q) ∨ (¬r ∨ p) 3) Convert to CNF by associative and distributive laws: (p ∨ ¬r ∨ p) ∧ (¬q ¬r ∨ p) 4) Optionally simplify by commutative and idempotent laws: (p ∨ ¬r) ∧ (¬q (p ∨ ¬r) and by commutative and absorption laws: p ∨ ¬r
Predicates and quantifiers
A predicate or propositional function is a description of the property (or properties) a variable or subject may have. A proposition may be created from a propositional function by either assigning a value to the variable or by quantification. Propositional logic cannot adequately express the meaning of all statements in mathematics and in natural language.
Example: Having assumptions: • Every computer connected to the school network is functioning properly. • ELVIS is one of the computers connected to the school network. No rules of propositional logic allows us to conclude the truth of the statement ELVIS is functioning properly
Extends propositional logic by • Individuals a, b, ... , ELVIS, ...
• (Individual) variables x,y,...
• Predicates(= propositional functions) P(x), Q(x), R(x,y), ...
• Quantifiers ∀,∃
A propositional function is a generalisation of proposition: • its argument stands for en element from its domain;
• its value is True or False depending on the property of its argument(s).
Bound and free variables
• The quantifiers are said to bind the variable x in the expressions ∀xP(x) and ∃xP(x). Variables in the scope of some quantifier are called bound variables. All other variables in the expression are called free variables.
• A propositional function that does not contain any free variables is a proposition and has a truth value.
Logical equivalences for quantifiers
Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. We use the notation S ≡ T to indicate that two statements S and T involving predicates and quantifiers are logically equivalent.
Propositional calculus (PC)
Propositional Logic, or the Propositional Calculus, is a formal logic for reasoning about propositions, that is, atomic declarations that have truth values.
Derivation in classical logic
Classical propositional logic is a kind of propostional logic in which the only truth values are true and false and the four operators not, and, or, and if-then, are all truth functional. Therefore, by conversing the previous sentence we get, that propositional calculus uses more than four logical operators.
Semantics of predicate calculus
Validity and satisfiability of predicate statements
An assertion in predicate calculus is logically valid (or simply valid) if it is true in every interpretation, that is if and only if it is true :
- for all domains
- for every propositional functions substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic.
An assertion in predicate calculus is satisfiable iff it is true:
- for some domain
- for some propositional functions that can be substituted for the predicates in the assertion
Valid assertions in predicate logic play a role similar to tautologies in propositional logic. Example: link
Sequent predicate calculus LK
A way of deducing if a logic statement is true or not. Please see yourself to the interactive tutorial of the Sequent Calculus (LK).
A theorem is a statement that can be shown to be true. Theorem is true with a sequence of statements that form an argument, called a proof. To construct proofs, methods are needed to derive new statements from old ones. Rules of interference are the means used to draw conclusions from other assertions, tie together the steps of a proof.