discrete maths Flashcards
(48 cards)
propositional logic
a sentence declaring a fact that is either true or false
compound proposition
compound propositions are formed for other propositions using logical operators
negation (¬)
it is not the case that
conjunction (n)
the proposition that two propositions are both true else false
disjunction (v)
the proposition that either or both propositions are true
truth tables
gives the truth values of a compound proposition for all combinations of inputs
short circuit evaluation
in python some boolean operators will only execute the second condition if the first does not determine the value of the expression
exclusive or (⊕)
the proposition that either of the propositions are true not both
implication (=>)
the proposition of if a hypothesis then conclusion, only false if hyp true and con false
contrapositive
p => q is the logical equivalent of ¬q => ¬p
converse
p => q is not the logical equivalent of q => p
biconditional (<=>)
the proposition that both propositions have equivalent values
truthologies
a compound proposition that is always true ie p v ¬p
contraditions
a compound proposition that is always false ie p n ¬p
logical equivalence (≡)
compound statements are logically equivalent if they share identical truth tables
known logical equivalence rules
Commutative, 𝑝 Ʌ 𝑞 ≡ 𝑞 Ʌ 𝑝, 𝑝 V 𝑞 ≡ 𝑞 V 𝑝
Associative, (𝑝 Ʌ 𝑞) Ʌ 𝑟 ≡ 𝑝 Ʌ (𝑞 Ʌ 𝑟), (𝑝 V 𝑞) V 𝑟 ≡ 𝑝 V (𝑞 V 𝑟)
Distributive, 𝑝 V (𝑞 Ʌ 𝑟) ≡ (𝑝 V 𝑞) Ʌ (𝑝 V 𝑟), 𝑝 Ʌ (𝑞 V 𝑟) ≡ (𝑝 Ʌ 𝑞) V (𝑝 Ʌ 𝑟)
Identity, 𝑝 Ʌ T ≡ 𝑝, 𝑝 V F ≡ 𝑝
Negation, 𝑝 V ¬𝑝 ≡ T, 𝑝 Ʌ ¬𝑝 ≡ F
Idempotent, 𝑝 Ʌ 𝑝 ≡ 𝑝, 𝑝 V 𝑝 ≡ 𝑝
De Morgan, ¬(𝑝 V 𝑞) ≡ ¬𝑝 Ʌ ¬𝑞, ¬(𝑝 Ʌ 𝑞) ≡ ¬𝑝 V ¬𝑞
Double negation, ¬(¬𝑝) ≡ 𝑝
ℕ, ℤ, ℚ, ℝ,
ℕ = natural numbers (numbers used for counting)
ℤ = integers (whole numbers)
ℚ = rational numbers (numbers that can be written as p/q)
ℝ = complex numbers ( numbers in the form a +ib where i=sqrt(-1))
set notation - enumeration
listing all members of the set ie. A ∈ {1,2,3,4,…,n}
set notation - set builder
set is defined using variables and logical statements ie A ∈ {x: x > 0} where x is an integer
𝕌
a set containing all the related values without any repititions
compliment
𝐴 = 𝕌 − 𝐴
power set - 𝒫(𝑆)
a set containing all possible combinations of the elements of s from cardinality of 0 to |s|
Cartesian product
A * B, { 𝑎, 𝑏 : 𝑎 ∈ 𝐴 𝑎𝑛𝑑 𝑏 ∈ 𝐵}
partition of a set
a set containing subsets which total to = the original set, there are no empty subsets and each combination of subsets are disjointed (no common member)