Logic for Computer science Flashcards
Injective function
each value in the codomain
B that is actually mapped to by
𝑓 is associated with exactly one unique value in the domain A. if F(x1) = F(x2) then x1 = x2
Surjective Function
All elements in codomain are mapped by element in domain
Bijective function
All elements in domain is uniquely mapped to element in codmain. Every element in codomain is mapped by one element in domain.
In context of set equality are these sets equal {1,2,3} and {1,2,2,3}
Yes
S Subset T meaning
all element x in s also occur in t
S proper subset T meaning
S is subset of T and set s and t are not equal.
Power set of S meaning P(S)
set of all subsets of S
eg. P({1,2}) = {0,{1},{2},{1,2})
if S is finite what is P(S)
2^(Cardinality of S)
Cartesian product S X T
all possible combos,
S={1} T= {a,b}
S X T = {1,a} {1,b}
Criteria for Partial order
reflexive, transitive, anti- symmetric
reflexive
all x in a set, the element x is in relation with itself, xRx
transitive
for all elements x,y,z in a set, if xRy and yRz then xRz is mandatory
anti-symmetirc
for all x,y in a set, if we have xRy and yRx then (x1,y1) = (x2,y2)
In otherwords, if Rxy and x != y then we cannot have yRx
Total order
Is a partial order that is also connex-
connex
for every element x,y in a set, we need at least xRy or yRx
equivilance relation
needs to be reflexive, transitive and also symmetric
symmetric
for all x,y in a set if xRy then yRx is mandatory
When drawing self-complementary isomorphisim how many relations should you use
n^2/2
How to conduct structural induction
ensure it works for base cases first, then work for recursive cases
when defining an isomorphism, what to look at first
constants
Base rules for PL
constants 0 and 1
Variables Vi in PL
Recursvie rules
if ϕ ,Ψ in PL Then:
¬ϕ Ɛ PL (negation)
ϕ V Ψ ( disjunction) (and)
ϕ ^ Ψ ( conjunction) (or)
ϕ -> Ψ ( implication) 1 if phi = 0 or if psi = 1, 0 otherwise.
ϕ <–> Ψ( bi implication) 1 if phi = psi, 0 otherwise
satisfiable meaning in PL
phi is satosfiable if at least one assignment satisfises phi
(phi) = 1
contradiction, unsatisfiable meaning
phi = 0 for all assignemnets for phi
tautology meaning
phi is tautologoy if every assignemnet satisfises phi
phi = 1 for all assignements
well structured truth table
varaible columns sorted alphabetically in ascending order and indicies in ascending orders
rows from top to bottom are numbers 0 to 2^k-1.
semantic implication
how would you prove if two equations are semantical implied
phi implies(|=) psi
if phi = 1 then psi = 1
truth table x and y
0 0
0 1
1 0
1 1
then use these inputs on each of the pl formulas