discrete maths Flashcards

(48 cards)

1
Q

propositional logic

A

a sentence declaring a fact that is either true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

compound proposition

A

compound propositions are formed for other propositions using logical operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

negation (¬)

A

it is not the case that

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

conjunction (n)

A

the proposition that two propositions are both true else false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

disjunction (v)

A

the proposition that either or both propositions are true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

truth tables

A

gives the truth values of a compound proposition for all combinations of inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

short circuit evaluation

A

in python some boolean operators will only execute the second condition if the first does not determine the value of the expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

exclusive or (⊕)

A

the proposition that either of the propositions are true not both

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

implication (=>)

A

the proposition of if a hypothesis then conclusion, only false if hyp true and con false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

contrapositive

A

p => q is the logical equivalent of ¬q => ¬p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

converse

A

p => q is not the logical equivalent of q => p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

biconditional (<=>)

A

the proposition that both propositions have equivalent values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

truthologies

A

a compound proposition that is always true ie p v ¬p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

contraditions

A

a compound proposition that is always false ie p n ¬p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

logical equivalence (≡)

A

compound statements are logically equivalent if they share identical truth tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

known logical equivalence rules

A

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, ¬(¬𝑝) ≡ 𝑝

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

ℕ, ℤ, ℚ, ℝ,

A

ℕ = 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))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

set notation - enumeration

A

listing all members of the set ie. A ∈ {1,2,3,4,…,n}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

set notation - set builder

A

set is defined using variables and logical statements ie A ∈ {x: x > 0} where x is an integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

𝕌

A

a set containing all the related values without any repititions

21
Q

compliment

A

𝐴 = 𝕌 − 𝐴

22
Q

power set - 𝒫(𝑆)

A

a set containing all possible combinations of the elements of s from cardinality of 0 to |s|

23
Q

Cartesian product

A

A * B, { 𝑎, 𝑏 : 𝑎 ∈ 𝐴 𝑎𝑛𝑑 𝑏 ∈ 𝐵}

24
Q

partition of a set

A

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)

25
functions
mapping a to b such that each member of a is matched to a single member of b
26
injective function
|A| <= |B|, not all elements of B will necessarily be mapped to a member of A
27
surjective function
|A| >=|B|, Elements of B may map to more than one element of A
28
bijective function
|A| =|B|, both injective and surjective
29
א
smallest cardinality of an infinate set
30
permutations
a set of objects from a sequence where order maters, a sequence n has n! combinations to find p(n,r) where n is the length of the whole set and r is the length of the subset to be found there are: 𝑛^𝑟 permutations with repartitions and 𝑛! / (𝑛 − 𝑟 !) without repartitions
31
combinations
a set of objects from a sequence where order does not matter to find c(n,r): n! / (r!(n-r)!) combinations without repartitions and c(n+r-1, n-1)
32
Permutations with indistinguishable objects
when a set contains members that appear the same the permutations is n! / (n1! * n2! * ... * nk!)
33
product rule
|A1 * A2 * ... * An| = |A1| * |A2| * ... * |An| 𝑃 (𝐴 ∩ 𝐵) = 𝑃( 𝐴| 𝐵) 𝑃( 𝐵) = 𝑃( 𝐵|𝐴) 𝑃(𝐴)
34
sum rule
for S {s1, s2, ..., sn}, |S| = |s1| + |s2| + ... + |sn| 𝑃 (𝐴 ∪ 𝐵) = 𝑃( 𝐴) + 𝑃 (𝐵) − 𝑃( 𝐴 ∩ 𝐵)
35
probability with equally likely outcomes
P(E) = |E| / |S| where S is the sample space (all possible outcomes) and E is a subset of S
36
probability of compliment
p(¬E) = 1-p(E)
37
independent
P(A and B) = P(A) * P(B)
38
disjointed(mutualy exclusive)
p(A or B) = P(A) + P(B)
39
conditional probability
P(A|B) = P(A and B) / P(B)
40
pigeon-hole principle
to put n+1 items in n boxes, at least one box must have more than one items in it
41
fisher yates shuffel
unbiased shuffle that produces a random permutation of the set, runs in o(n), for each item generates a random number from 0<= j< i and swaps the original item and the random index
42
direct proof
hypothesis -> deduction -> conclusion
43
proof by case
case1: hypothesis _> deduction -> conclusion case2: hypothesis -> deduction -> conclusion ect
44
proof by counter example
one counter example -> disproof of universal statement
45
proof by contradiction
suppose not: ¬p derive contradiction conclude: ¬p is false therefore p is true
46
proof by contraposition
write statement into p=> q suppose ¬q derive ¬p conclude: ¬q=>¬p and it is equivalent to p=>q
47
proof by induction
prove that when the variable is 1 is true hypothesis variable = k is valid sub in k + 1 then simplify and substitute n back in for k + 1
48
alternative shuffle
similar to fisher yates but generates index from 0 < j < len(set), produces an uneven sample space, as |set|^|set| does not devide exactly by |set|