algodeck

Math

a = a property

Reflexive

#math

If a = b and b = c then a = c property

Transitive

#math

If a = b then b = a property

Symmetric

#math

Logarithm definition

Inverse function to exponentiation

#math

Median of a sorted array

If odd: middle value

If even: average of the two middle values (1, 2, 3, 4 => (2 + 3) / 2 = 2.5)

#math

n-choose-k problems

From a set of n items, choose k items with 0 <= k <= n

P(n, k)

Order matters: n! / (n - k)! // How many permutations

Order does not matter: n! / ((n - k)! k!) // How many combinations

#math

Probability: P(a ∩ b) // inter

P(a ∩ b) = P(a) * P(b)

#math

Probability: P(a ∪ b) // union

P(a ∪ b) = P(a) + P(b) - P(a ∩ b)

#math

Probability: Pb(a) // probability of a knowing b

Pb(a) = P(a ∩ b) / P(b)

#math