discrete maths Flashcards

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
Q

functions

A

mapping a to b such that each member of a is matched to a single member of b

26
Q

injective function

A

|A| <= |B|, not all elements of B will necessarily be mapped to a member of A

27
Q

surjective function

A

|A| >=|B|, Elements of B may map to more than one element of A

28
Q

bijective function

A

|A| =|B|, both injective and surjective

29
Q

Ũ

A

smallest cardinality of an infinate set

30
Q

permutations

A

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
Q

combinations

A

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
Q

Permutations with indistinguishable objects

A

when a set contains members that appear the same the permutations is n! / (n1! * n2! * â€Ķ * nk!)

33
Q

product rule

A

|A1 * A2 * â€Ķ * An| = |A1| * |A2| * â€Ķ * |An|
𝑃 (ðī âˆĐ ðĩ) = 𝑃( ðī| ðĩ) 𝑃( ðĩ) = 𝑃( ðĩ|ðī) 𝑃(ðī)

34
Q

sum rule

A

for S {s1, s2, â€Ķ, sn}, |S| = |s1| + |s2| + â€Ķ + |sn|
𝑃 (ðī ∊ ðĩ) = 𝑃( ðī) + 𝑃 (ðĩ) − 𝑃( ðī âˆĐ ðĩ)

35
Q

probability with equally likely outcomes

A

P(E) = |E| / |S| where S is the sample space (all possible outcomes) and E is a subset of S

36
Q

probability of compliment

A

p(ÂŽE) = 1-p(E)

37
Q

independent

A

P(A and B) = P(A) * P(B)

38
Q

disjointed(mutualy exclusive)

A

p(A or B) = P(A) + P(B)

39
Q

conditional probability

A

P(A|B) = P(A and B) / P(B)

40
Q

pigeon-hole principle

A

to put n+1 items in n boxes, at least one box must have more than one items in it

41
Q

fisher yates shuffel

A

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
Q

direct proof

A

hypothesis -> deduction -> conclusion

43
Q

proof by case

A

case1: hypothesis _> deduction -> conclusion
case2: hypothesis -> deduction -> conclusion
ect

44
Q

proof by counter example

A

one counter example -> disproof of universal statement

45
Q

proof by contradiction

A

suppose not: ÂŽp
derive contradiction
conclude: ÂŽp is false therefore p is true

46
Q

proof by contraposition

A

write statement into p=> q
suppose ÂŽq
derive ÂŽp
conclude: ÂŽq=>ÂŽp and it is equivalent to p=>q

47
Q

proof by induction

A

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
Q

alternative shuffle

A

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|