REFERENCE

Words and symbols

Numbers, expressions and comparison

Notation and termMeaningExamples

Symbols and notation

Integers

the set of integers

Meaning

Numbers with no fractional part, including zero and negative numbers.

Example

… −2, −1, 0, 1, 2 …

The number 2.5 is not an integer.

ℤ⁺

Positive integers

the positive integers

Meaning

Integers strictly greater than zero.

Example

1, 2, 3, …

Zero is not positive.

Positive means greater than zero. The nonnegative integers are the distinct set {0,1,2,…}; state the starting index when using either set.

Natural numbers

the natural numbers; check the convention for zero

Meaning

The symbol ℕ has two common conventions: {1,2,3,…} or {0,1,2,…}. State which one is intended.

Example

1, 2, 3, … or 0, 1, 2, …

Epp avoids the ambiguous term natural numbers here and distinguishes positive from nonnegative integers. Do not infer the lecturer’s zero convention from the symbol alone.

Rational numbers

the set of rational numbers

Meaning

Numbers expressible as a/b, where a and b are integers and b ≠ 0.

Example

3/4; −2 = −2/1; 0 = 0/1

They can be positive, negative or zero. Only the denominator b must be nonzero. ℚ is a special style of Q; handwritten Q on the board denotes the same set.

Real numbers

the set of real numbers

Meaning

The numbers on the number line, including rational and irrational numbers.

Example

−1/2, 0, √2, −√2, π

Real numbers include all rational numbers and irrational numbers. Negative values and zero are allowed. ℝ is a special style of R; it denotes a different set from ℚ.

Intervals and endpoints

closed interval; open interval; nonnegative real numbers

Meaning

For real a<b, [a,b] includes both endpoints; (a,b) excludes both. A square bracket includes its finite endpoint and a round bracket excludes it.

Example

[0,∞)={x∈ℝ:x≥0}; (−1,2]={x∈ℝ:−1<x≤2}.

Infinity is not a real endpoint to include, so ∞ always has a round bracket in this notation. Intervals contain real values, not only integers.

[a,b]; (a,b); [0,∞)
=

Equality

is equal to

Meaning

An assertion that the expressions on the two sides have the same value.

Example

2 + 3 = 5

Equality names the relation; equals is how we read the sign.

Equality compares values; it does not update a variable. In pseudocode x:=x+1 is assignment, whereas x=x+1 is an equation.

Not equal

is not equal to

Meaning

The expressions have different values.

Example

2 ≠ 3

This negates equality.

Inequality

is less than; is greater than

Meaning

For real numbers, a<b says a is less than b; a>b says a is greater than b.

Example

2 < 5

Read this as: two is less than five.

a<b; a>b

At most / at least

is less than or equal to; is greater than or equal to

Meaning

a≤b means a is at most b; a≥b means a is at least b. Equality is included in both comparisons.

Example

n ≥ 2

The value 2 is allowed, as is any larger value.

a≤b; a≥b

Square

a squared

Meaning

The result of multiplying a number by itself.

Example

a² = a × a

Squaring a is different from multiplying a by 2.

2k

Multiplication

two times k

Meaning

A multiplication sign can be omitted between a number and a letter.

Example

2k = 2 × k

Juxtaposition denotes an ordinary product when the surrounding notation says the factors are numbers. A×B for sets denotes a Cartesian product instead.

Concepts and methods

Variable

Meaning

A letter representing an object whose value may vary.

Example

x + 2 = 5

Here x = 3 makes the equation true.

Constant

Meaning

A fixed value in the expression being considered.

Example

x + 3

The term 3 stays fixed while x may vary.

Expression

Meaning

A combination of numbers, variables, and operations representing a value.

Example

2x+1

An expression alone does not assert an equality. The statement 2x+1=7 is an equation.

Equation

Meaning

An equality involving a variable whose values are being considered or sought.

Example

x + 2 = 5

Solving it means finding all allowed values of x that make the equality true. Here x=3.

Sets

Notation and termMeaningExamples

Symbols and notation

Element / membership

is an element of

Meaning

The object belongs to the set.

Example

3 ∈ {2, 3, 4}

The number 3 is an element of this set.

In 3∈A, the left side is an element and A is a set. A⊆B compares two sets. Neither expression performs the assignment :=.

Not an element of

is not an element of

Meaning

The object does not belong to the set.

Example

5 ∉ {2, 3, 4}

The number 5 is not an element of this set.

Proper subset

is a proper subset of

Meaning

A is a subset of B, and A is different from B.

Example

{1} ⊊ {1, 2}

B has at least one element that is not in A.

Empty set

the empty set

Meaning

A set containing no elements.

Example

|∅| = 0

The set {∅} has one element: the empty set itself.

Union

Meaning

The set of elements belonging to at least one of the sets.

Example

{1,2} ∪ {2,3} = {1,2,3}

We list the shared element 2 only once.

Intersection

Meaning

The set of elements belonging to both sets.

Example

{1,2} ∩ {2,3} = {2}

The number 2 is common to both sets.

{a,b}

Set

the set containing a and b

Meaning

A collection of objects; order and repeated listings do not change a set.

Example

{1, 2} = {2, 1, 1}

Both sets have exactly the same elements.

A ∖ B

Set difference

A minus B; A set difference B

Meaning

The elements of A that are not elements of B.

Example

{1,2} ∖ {2,3} = {1}

The order of A and B matters.

Aᶜ

Complement

the complement of A in U

Meaning

The elements of a specified universal set U that are outside A.

Example

U={1,2,3}, A={1}: Aᶜ={2,3}

A complement depends on the chosen universal set.

All complements in a set identity must use the same fixed universe U. A prime mark is a complement only when that convention has been declared.

A × B

Cartesian product

A Cartesian product B

Meaning

The set of all ordered pairs (a,b) with a ∈ A and b ∈ B.

Example

{1} × {2,3} = {(1,2),(1,3)}

The order of the entries in a pair matters.

𝒫(A)

Power set

the power set of A

Meaning

The set of all subsets of A.

Example

𝒫({1}) = {∅,{1}}

If A has n elements, its power set has 2ⁿ elements.

If |A|=n for an integer n≥0, then |𝒫(A)|=2^n: each element is either included in a subset or not.

Formulas and rules

Universe and complement laws

complement in U; De Morgan’s laws for sets

Meaning

Fix a universe U and subsets A,B⊆U. Complement means outside the set but inside U; both De Morgan identities use this same universe.

Example

If U={1,2,3,4}, A={1,2}, B={2,3}, then (A∪B)ᶜ={4}=Aᶜ∩Bᶜ.

An element is outside the union exactly when it is outside both sets. Related laws are A∪Aᶜ=U, A∩Aᶜ=∅, and (Aᶜ)ᶜ=A.

Aᶜ=U∖A; (A∪B)ᶜ=Aᶜ∩Bᶜ; (A∩B)ᶜ=Aᶜ∪Bᶜ

Distributive and difference laws

intersection distributes over union; difference as intersection with a complement

Meaning

For A,B,C⊆U, set identities permit replacing a set expression by an equal one. The dual distributive law swaps ∩ and ∪ throughout.

Example

(A∩B)∪(A∩Bᶜ)=A∩(B∪Bᶜ)=A∩U=A.

Each equals sign needs a valid law. Alternatively, fix an arbitrary x∈U and show that membership in the left and right sides is equivalent.

A∩(B∪C)=(A∩B)∪(A∩C); A∖B=A∩Bᶜ

Logic and connectives

Notation and termMeaningExamples

Symbols and notation

True / false

true; false

Meaning

T and F denote true and false. The symbols ⊤ and ⊥ are truth and falsity constants in the stated logical notation.

Example

The statement 3 = 3 has truth value T.

In digital logic, 1 and 0 encode these values. They do not make the logical operation OR the same as ordinary integer addition: 1∨1=1.

T / F;/ ⊥

Binary numerals and circuit values

a numeral in base two; false/true when used as circuit values

Meaning

In a binary numeral each digit is 0 or 1 and the subscript 2 specifies place-value base two. In digital logic, 0 and 1 can instead encode false and true.

Example

(1011)₂=8+2+1=11. In a circuit, 1∧0=0 and 1∨1=1.

Distinguish arithmetic addition, 1+1=(10)₂, from OR. A binary numeral’s subscript is a base marker, not a sequence index.

(b_k…b_0)₂; 0/1
¬ ~

Negation / NOT

not

Meaning

Reverses the truth value of a statement.

Example

¬(2 < 3) is false.

Read negation as: it is not the case that…

Epp commonly writes ~p for negation. In a~b the same-looking mark may instead name a relation; read the whole construction.

Conjunction / AND

and

Meaning

True exactly when both statements are true.

Example

(2<3) ∧ (4<5) is true.

One false part makes the conjunction false.

Disjunction / OR

or, inclusively

Meaning

True when at least one statement is true, including when both are true.

Example

(2<3) ∨ (4<3) is true.

Logical OR is inclusive unless stated otherwise.

Exclusive OR / XOR

exclusive or

Meaning

True exactly when one of the two statements is true.

Example

T ⊕ T = F

Unlike inclusive OR, XOR is false when both parts are true.

Implication / if…then

if p, then q

Meaning

False exactly when the hypothesis is true and the conclusion is false.

Example

p → q is false when p=T and q=F.

An implication need not describe a causal connection.

It is false exactly when p is true and q is false. The arrow in f:A→B specifies a function’s source and target, not this truth condition.

⇔ ↔ iff

Biconditional / if and only if

p if and only if q

Meaning

True exactly when the two statements have the same truth value.

Example

n is even ⇔ ∃k∈ℤ: n=2k

If and only if requires both directions.

A biconditional is a formula evaluated under a valuation. P≡Q is the claim that formulas P and Q agree under every valuation. The word iff abbreviates if and only if.

Logical equivalence

is logically equivalent to

Meaning

Two formulas have the same truth value for every allowable assignment.

Example

¬(p ∧ q) ≡ ¬p ∨ ¬q

The sign ≡ also has a different use in modular arithmetic.

Logical ≡ is different from a≡b (mod m), which compares integer remainders. State the context before reading the sign.

Zero and one in a Boolean algebra

bottom and top; meet, join and complement

Meaning

In a declared Boolean algebra, 0 and 1 name its least and greatest elements, and ∧,∨,complement satisfy the Boolean laws. Their concrete meanings depend on the model.

Example

For subsets of a fixed U, the elements are sets: 0=∅, 1=U, meet is ∩, join is ∪, and complement is taken in U.

These are algebraic roles, not a claim that every set is a number. In propositional logic the analogous roles are false, true, AND, OR and NOT.

x∧0=0; x∨1=1; x∧xᶜ=0; x∨xᶜ=1

Formulas and rules

De Morgan’s laws for propositions

not both; neither

Meaning

For classical propositions p and q, negating a conjunction gives a disjunction of the negations, and negating a disjunction gives a conjunction of the negations.

Example

For real x, ¬(x>0 ∧ x<1) is equivalent to x≤0 ∨ x≥1.

Negate the complete parenthesized expression and each component, including the strictness of inequalities. ≡ says the two formulas agree under every truth assignment.

¬(p∧q)≡¬p∨¬q; ¬(p∨q)≡¬p∧¬q

Concepts and methods

Statement / proposition

Meaning

A declarative sentence that is either true or false, but not both.

Example

The statement 2 < 3 is true.

A question such as “How many?” is not a statement.

Truth table

Meaning

Lists every truth-value assignment to the input propositions and the resulting values of the formula; intermediate columns can show its parts.

Example

For ¬p: when p=T, ¬p=F; when p=F, ¬p=T.

A table with n independent propositional inputs has 2^n rows. T… is not a mathematical symbol for a truth table.

More examples

For p and q: TT, TF, FT, FF.

Tautology

Meaning

A formula that is true for every assignment of truth values.

Example

p ∨ ¬p

At least one of these two parts is always true.

Contradiction

Meaning

A formula that is false for every assignment of truth values.

Example

p ∧ ¬p

A statement and its negation cannot both be true.

Predicates and quantifiers

Notation and termMeaningExamples

Symbols and notation

Universal quantifier

for all; for every; for each

Meaning

Requires the condition to hold for every object in the domain.

Example

∀x∈{2,3,4}: x²>x

One counterexample is enough to refute a universal statement.

The domain and the predicate’s scope are part of the statement. Over an empty domain, ∀x∈D P(x) is true because there is no counterexample.

Existential quantifier

there exists; for some

Meaning

Asserts that at least one object satisfies the condition.

Example

∃x∈{2,3,4}: x²+2=11

The value 3 works. Existence does not require uniqueness.

The witness must belong to the stated domain. An existential statement over an empty domain is false; more than one witness is permitted.

Unique existence

there exists exactly one

Meaning

Asserts that exactly one object satisfies the condition.

Example

∃!x∈ℤ: x+1=3

The value is x=2; other possible values must also be ruled out.

∃!x∈D P(x)
P(x)

Predicate

P of x

Meaning

A condition involving a variable; substituting a value or quantifying the variable produces a statement.

Example

P(x): x > 2; P(3) is true.

P(x) does not mean P multiplied by x.

P(x,y) may have several free variables. Binding every free variable produces a closed formula. Alternatively, assigning values to the free variables lets you evaluate the predicate; the same free variable keeps the same value throughout that evaluation.

Free / bound variable

Meaning

An occurrence of a variable is bound when it lies in the scope of a quantifier that binds it; otherwise that occurrence is free.

Example

In (∀x∈D P(x)) ∧ Q(x), the x in P(x) is bound; the x in Q(x) is free.

The same printed variable name can have both kinds of occurrence. Parentheses delimit the quantifier’s scope; this formula still depends on the free x.

More examples

∀x P(x,y)

(∀x∈D P(x)) ∧ Q(x)

Quantifier order

for every x there exists y; there exists y for every x

Meaning

In ∀x∃y, the choice of y may depend on the previously chosen x.

Example

∀x∈ℤ ∃y∈ℤ (y>x) is true; ∃y∈ℤ ∀x∈ℤ (y>x) is false.

In the first statement choose y=x+1 after x is given. The second asks for one integer larger than every integer; choosing x=y disproves that possibility.

More examples

∀x∈ℤ ∃y∈ℤ: y>x

∀x∈ℤ ∃y∈ℤ (y>x); ∃y∈ℤ ∀x∈ℤ (y>x)

Formulas and rules

Negating quantifiers

not for every x P of x; there exists x for which P of x is false

Meaning

Negating a quantified statement switches ∀ and ∃ and negates the complete predicate in their scope. Keep the same domain.

Example

¬(∀x∈ℤ (x≥0)) ≡ ∃x∈ℤ (x<0). Also ¬(∃x∈ℤ (x²=−1)) ≡ ∀x∈ℤ (x²≠−1).

With several quantifiers, apply the rule successively without reordering variables. Negate the whole predicate: ¬(P∧Q) becomes ¬P∨¬Q, not ¬P∧¬Q.

More examples

¬(∀x P(x)) ≡ ∃x ¬P(x)

¬(∀x∈D P(x)) ≡ ∃x∈D ¬P(x); ¬(∃x∈D P(x)) ≡ ∀x∈D ¬P(x)

Concepts and methods

Domain of discourse

Meaning

The set of objects over which a variable ranges.

Example

∀x ∈ ℤ: x² ≥ 0

A domain can contain numbers, people, or other objects.

Definitions and proof methods

Notation and termMeaningExamples

Symbols and notation

Contrapositive

if not q, then not p

Meaning

The statement ¬q→¬p is equivalent to p→q and can be proved instead.

Example

For integer n: if n² is even, then n is even.

For the integer example, prove that an odd n has an odd square. The converse q→p and inverse ¬p→¬q are different statements and are not generally equivalent to p→q.

(p→q) ≡ (¬q→¬p)

Concepts and methods

Definition

Meaning

A precise specification of what a mathematical term means.

Example

n is even ⇔ ∃k∈ℤ: n=2k

Definitions justify steps in mathematical arguments.

Theorem

Meaning

A mathematical statement proved from accepted assumptions and results.

Example

The sum of two even integers is even.

Checking a few numbers does not replace a proof of the general statement.

Direct proof

Meaning

Starts from the hypotheses and uses justified steps to reach the conclusion.

Example

To prove that a sum of two even integers is even, write m=2a and n=2b with a,b∈ℤ. Then m+n=2(a+b), and a+b∈ℤ.

Assume the hypotheses, make justified deductions, then identify the required conclusion. The conditional being proved is not itself the proof.

More examples

2a + 2b = 2(a+b)

Counterexample

Meaning

An instance satisfying the hypotheses but violating a universal conclusion.

Example

“Every prime is odd” has counterexample 2.

The number 2 is prime and even, so the statement is false.

Proof by contradiction

Meaning

Assumes the negation of the desired statement and derives a contradiction.

Example

Suppose there is a greatest integer N.

Then N+1 is an even larger integer, contradicting the assumption.

Proof by cases

Meaning

Divides all possibilities into cases and proves the required result in every case.

Example

An integer n is either even or odd.

The cases must cover every possibility.

Proof cases must cover every possibility; they need not be disjoint. Disjointness is required for adding case counts without double counting, a different use of cases.

Divisibility and integer arithmetic

Notation and termMeaningExamples

Symbols and notation

a∤b

Does not divide

a does not divide b

Meaning

For integers a≠0 and b, a∤b means there is no integer k with b=ak.

Example

3∤10, since 10=3·3+1.

The operands are integers. This negates divisibility under the stated nonzero-divisor convention; it is not a fraction or an inequality.

gcd(a,b)

Greatest common divisor

the greatest common divisor of a and b

Meaning

The greatest positive integer dividing both given integers, which are not both zero.

Example

gcd(12,18)=6

The number 6 divides both; no larger positive integer does.

Congruence modulo m

a is congruent to b modulo m

Meaning

For integers a, b and positive integer m, a−b is divisible by m.

Example

17 ≡ 2 (mod 5)

The difference 17−2=15 is divisible by 5.

Here a,b are integers and m is a positive integer. Congruence is a relation: it says m divides a−b. In contrast, a mod m is the single remainder value.

a ≡ b (mod m)
a mod m

Modulo: remainder value

a modulo m

Meaning

For integer a and positive integer m, a mod m is the unique integer r with a=mq+r and 0≤r<m for some integer q.

Example

−17 mod 5=3 because −17=5(−4)+3.

This produces one number. The statement a≡b (mod m) instead says their remainders agree. Some programming languages use a different convention for a negative dividend.

Floor and ceiling

floor of x; ceiling of x

Meaning

For real x, ⌊x⌋ is the greatest integer ≤x; ⌈x⌉ is the least integer ≥x.

Example

⌊−2.3⌋=−3 and ⌈−2.3⌉=−2; for integer n, both ⌊n⌋ and ⌈n⌉ equal n.

The defining bounds are ⌊x⌋≤x<⌊x⌋+1 and ⌈x⌉−1<x≤⌈x⌉. Floor does not generally mean truncating toward zero.

⌊x⌋; ⌈x⌉

Integer quotient

n equals d q plus r; q is the integer quotient

Meaning

For integer n and positive integer d, the integer q in n=dq+r with 0≤r<d.

Example

17=5×3+2: q=3.

The remainder restriction makes q and r unique. The integer quotient is 3; the ordinary quotient 17/5 is 3.4.

n=dq+r, 0≤r<d, n,q,r∈ℤ, d∈ℤ⁺

Remainder

n equals d q plus r; r is the remainder

Meaning

For integer n and positive integer d, the integer r in n=dq+r with 0≤r<d.

Example

17=5×3+2: r=2.

The remainder is nonnegative and less than d. For example, −17=5×(−4)+3 has remainder 3.

n=dq+r, 0≤r<d, n,q,r∈ℤ, d∈ℤ⁺
n=2k, k∈ℤ

Even

n equals two k for some integer k

Meaning

An integer expressible as 2k for some integer k.

Example

6a²b = 2(3a²b)

Board example: a and b are integers, so 3a²b is an integer that serves as k.

Odd

n equals two k plus one for some integer k

Meaning

An integer expressible as 2k+1 for some integer k.

Example

For a,b∈ℤ, 10a+8b+1=2(5a+4b)+1 is odd.

Board example: the integer k is 5a+4b.

More examples

10a+8b+1 = 2(5a+4b)+1

n=2k+1, k∈ℤ

Concepts and methods

Prime

Meaning

An integer greater than 1 with exactly two positive divisors: 1 and itself.

Example

2 is prime.

The number 1 is not prime; 2 is the only even prime.

Composite

Meaning

An integer n>1 is composite if n=rs for integers r>1 and s>1.

Example

12=3·4 is composite; 1 is neither prime nor composite.

The number 1 is neither prime nor composite.

More examples

12 = 3 × 4

Factor

Meaning

A number being multiplied; in integer factorization, an integer divisor of the product.

Example

12 = 3 × 4

The factors 3 and 4 have product 12.

Sequences, induction and recursion

Notation and termMeaningExamples

Symbols and notation

Summation

the sum of a sub k, for k from m to n

Meaning

For integers m≤n, add the terms a_m,a_(m+1),…,a_n. The index k is bound locally by the summation; m and n are the limits.

Example

∑_{k=1}^{4} k²=1+4+9+16=30.

Renaming the bound index does not change the sum. ∑ is the summation operator; capital Σ can instead name an alphabet in formal-language notation.

More examples

∑ᵢ₌₁³ i = 1+2+3 = 6

∑_{k=m}^{n} a_k

Finite product

the product of a sub k for k from m to n

Meaning

For integer limits m≤n, multiply a_m,a_(m+1),…,a_n. The index k is local to the product.

Example

∏_{k=1}^{4}(k+1)=2·3·4·5=120.

The standard empty-product convention is 1; the corresponding empty sum is 0. ∏ denotes multiplication of terms, whereas ∑ denotes addition.

∏_{k=m}^{n} a_k
aₙ

Sequence

a sub n; the term with index n

Meaning

Objects arranged by their indices.

Example

aₙ=2n gives 2,4,6,… for n≥1.

The index identifies a position in the sequence.

State the index domain and its first value, for example n=0,1,2,… . The symbol a_n denotes one term, whereas (a_n) denotes the sequence; terms may repeat.

Formulas and rules

r²−Ar−B=0

Characteristic equation for a second-order recurrence

r squared minus A r minus B equals zero

Meaning

For a_n=Aa_(n−1)+Ba_(n−2), n≥2, with fixed real A,B and B≠0, substitution of r^n leads to this characteristic equation.

Example

a_n=3a_(n−1)−2a_(n−2) has roots 1 and 2, so a_n=C+D·2^n. With a₀=2,a₁=3, C=D=1.

For two distinct real roots r₁,r₂ use C r₁^n+D r₂^n. For a repeated nonzero real root r use (C+Dn)r^n. Determine C,D from two initial values; these displayed templates concern real roots.

Concepts and methods

Recurrence relation

Meaning

A rule expressing terms in terms of preceding terms.

Example

a₁=3 and a_n=a_(n−1)+2 for integers n≥2 define 3,5,7,9,… .

The initial value and the range where the rule applies belong to the definition. This recurrence is an example, not a universal symbol for recurrence relations.

More examples

a₁=2; aₙ=aₙ₋₁+2 for n≥2.

Recursive and explicit sequence formulas

recursive rule; explicit formula

Meaning

A recursive rule defines later terms using earlier ones and initial values. An explicit formula gives a_n directly in terms of n and fixed parameters.

Example

a₀=3, a_n=a_(n−1)+2 for n≥1 describes the same sequence as a_n=3+2n for n≥0.

Check an explicit candidate against both the recurrence and the initial values. Matching a few terms alone does not prove the formulas agree for every index.

Mathematical induction

Meaning

To establish P(n) for all integers n≥n₀, prove P(n₀), then prove P(k)→P(k+1) for an arbitrary integer k≥n₀.

Example

For n≥1, 1+…+n=n(n+1)/2. Base n=1: 1=1. If the formula holds at k, add k+1 to get (k+1)(k+2)/2.

The base starts the argument and the arbitrary step propagates it. A displayed P(k)→P(k+1) alone omits the base and is not a complete induction proof.

More examples

P(1); for every k≥1, P(k)⇒P(k+1).

Strong induction

strong mathematical induction

Meaning

To prove P(n) for integers n≥n₀, prove the starting case, then prove P(k+1) using the hypothesis that P(j) holds for every n₀≤j≤k.

Example

Every integer n≥2 is a product of primes. Base: 2. If n is composite, write n=ab with 2≤a,b<n and apply the hypothesis to both factors; if n is prime, it is already a one-factor product.

The smaller factors need not equal n−1, so access to all earlier cases is useful. State enough base cases for the recurrence or construction actually used.

Structural induction

Meaning

For recursively generated objects, prove the property for each base object and show that every permitted construction preserves it.

Example

For binary strings, z(w)+o(w)=|w|. It holds for ε; appending 0 or 1 increases the length and the corresponding symbol count by one.

Here z and o are declared counts of zeros and ones, not global operators. The recursive definition must generate every object under discussion.

Functions

Notation and termMeaningExamples

Symbols and notation

f: A → B

Function

f is a function from A to B

Meaning

Assigns exactly one element of B to each element of A.

Example

Let f:ℤ→ℤ be defined by f(x)=x+1. Then f(2)=3.

Every allowed input must have exactly one output.

More examples

f(x)=x+1

f(x)

Function evaluation

f of x

Meaning

For f:A→B and x∈A, f(x) is the unique output in B assigned to input x. It is an element of B, not generally a set.

Example

For f:ℤ→ℤ, f(x)=x², f(−3)=9; the image of the set {−3} is f({−3})={9}.

The declared function determines the operation; f(x) does not mean f multiplied by x. Distinguish an input element x from an input subset S in f(S).

Image / range

the image of S under f

Meaning

For f:A→B and S⊆A, the image f(S) consists of outputs reached by inputs in S. The range of f is f(A).

Example

For f:ℤ→ℤ, f(x)=x² and S={−2,2,3}, f(S)={4,9}.

Different inputs may produce the same output; the image is a set, so repeated outputs are listed once. This is different from the preimage f⁻¹(T).

More examples

For f:ℤ→ℤ with f(x)=2x, f(ℤ)=2ℤ.

f(S)={f(x):x∈S}

Preimage of a set

the preimage of T under f

Meaning

For any function f:A→B and T⊆B, f⁻¹(T) is the set of all inputs whose outputs lie in T. No bijectivity is required.

Example

For f:ℝ→ℝ, f(x)=x², f⁻¹({4})={−2,2} and f⁻¹({−1})=∅.

The result is a set and may be empty or have several elements. This use of f⁻¹ does not claim an inverse function exists.

f⁻¹(T)={x∈A:f(x)∈T}
f:A→B

Domain / codomain

f from domain A to codomain B

Meaning

In f:A→B, A is the domain of allowed inputs and B is the declared codomain. The image is the set of outputs actually attained.

Example

For f:ℤ→ℤ with f(x)=2x, both domain and codomain are ℤ, but f(ℤ) is the set of even integers.

Changing the codomain can change whether a function is onto. A/B is not notation for these two roles.

More examples

f:ℤ→ℤ, f(x)=2x

f⁻¹:B→A

Inverse function

the inverse function of f

Meaning

A bijection f:A→B has an inverse f⁻¹:B→A returning the unique input for each output. It satisfies f⁻¹(f(a))=a and f(f⁻¹(b))=b.

Example

f:[0,∞)→[0,∞), f(x)=x² has inverse f⁻¹(y)=√y. The same square rule on ℝ→ℝ is not bijective.

The domain and codomain restrictions make the inverse possible. f⁻¹(y) denotes inverse-function evaluation, not the reciprocal 1/f(y); a preimage f⁻¹(T) of a set remains meaningful without an inverse function.

Composition

g composed with f; first f, then g

Meaning

For f:A→B and g:B→C, the composite g∘f:A→C applies f first and then g to its output.

Example

On ℝ, let f(x)=x+1 and g(x)=x². Then (g∘f)(x)=(x+1)², whereas (f∘g)(x)=x²+1.

The inside function acts first. More generally composition is defined when every output of f used here lies in the domain of g; reversing the order can change the result or be undefined.

(g∘f)(x)=g(f(x))

Concepts and methods

Injection / one-to-one

Meaning

Different inputs always have different outputs.

Example

f:ℤ→ℤ, f(x)=2x

Equivalently, f(a)=f(b) implies a=b.

For f:A→B, the full condition is ∀x,y∈A (f(x)=f(y)→x=y). The arrow ↣ is an optional convention in some texts, not required notation for this property.

Surjection / onto

Meaning

Every element of the codomain is the output of at least one input.

Example

f:ℤ→ℤ, f(x)=x+1

For a target value y, the input y−1 works.

For f:A→B, onto means ∀b∈B ∃a∈A (f(a)=b). The codomain B matters. The arrow ↠ is an optional notation, not the definition.

Bijection

Meaning

A function f:A→B that is both injective and surjective. Every element of B has exactly one preimage in A.

Example

f:ℤ→ℤ, f(x)=x+1 is bijective: the unique input for y is x=y−1.

Specify the function and its domain/codomain. A bare ↔ usually marks a logical biconditional here; it is not a sufficient notation for a bijection.

More examples

f:ℤ→ℤ, f(x)=x+1

|A|=|B|

Cardinality and countability

A and B have the same cardinality

Meaning

Sets A and B have the same cardinality when a bijection A→B exists. A countably infinite set has a bijection with the positive integers; here countable means finite or countably infinite.

Example

The positive even integers are countably infinite via n↦2n from ℤ⁺. The real numbers are uncountable.

An infinite set can match a proper subset by a bijection, unlike a finite set. Uncountable means no such finite or integer-indexed enumeration covers the set.

Relations and orders

Notation and termMeaningExamples

Symbols and notation

R ⊆ A×B

Relation

R is a subset of A Cartesian product B

Meaning

A set of ordered pairs describing which objects are related.

Example

On ℤ, define aRb to mean a≤b.

A function is a special kind of relation.

The notation aRb means (a,b)∈R. A relation on A has R⊆A×A; reflexivity, symmetry and transitivity below concern that setting.

M[a,b]

Matrix of a finite relation

the entry in row a and column b

Meaning

For R⊆A×B on finite ordered sets, M[a,b]=1 if (a,b)∈R and 0 otherwise. State the row order A and column order B.

Example

For A=(1,2), B=(u,v), R={(1,v),(2,u)}, the matrix is [[0,1],[1,0]].

An entry represents a particular ordered pair. A multigraph adjacency matrix may count parallel edges and therefore have entries greater than 1; that is a different convention.

∀a∈A: aRa

Reflexive

every a is related to itself

Meaning

Every element of the underlying set is related to itself.

Example

The relation ≤ on ℤ is reflexive.

For every integer a, a≤a.

Symmetric

if a is related to b, then b is related to a

Meaning

Whenever a is related to b, b is related to a.

Example

The relation “has the same age as” is symmetric.

Reversing the pair preserves this relationship.

∀a,b∈A: (aRb→bRa)

Transitive

if a is related to b and b to c, then a is related to c

Meaning

Whenever aRb and bRc, it follows that aRc.

Example

a≤b and b≤c imply a≤c.

The requirement applies to every suitable triple of elements.

∀a,b,c∈A: ((aRb∧bRc)→aRc)

Antisymmetric

if a is related to b and b to a, then a equals b

Meaning

If aRb and bRa both hold, then a=b.

Example

The relation ≤ is antisymmetric.

Antisymmetric does not mean “not symmetric.”

Antisymmetric does not mean asymmetric or “not symmetric”. Equality on a set is both symmetric and antisymmetric.

∀a,b∈A: ((aRb∧bRa)→a=b)
a∼b

Equivalence relation

a is equivalent to b under the stated relation

Meaning

A relation that is reflexive, symmetric, and transitive.

Example

Having the same remainder modulo 3 is an equivalence relation on ℤ.

An equivalence relation partitions its underlying set into classes.

Equivalence class

the equivalence class of a

Meaning

For an equivalence relation ∼ on A, [a] is the set of all elements of A equivalent to a. The relation must be stated.

Example

On ℤ modulo 3, [1]={…,−5,−2,1,4,7,…} and [1]=[4].

Any two classes are equal or disjoint; the union of all equivalence classes is A. The brackets here do not mean a real interval or rounding down.

[a]={x∈A:x∼a}
a≼b

Partial order

a precedes or equals b in the stated partial order

Meaning

A relation that is reflexive, antisymmetric, and transitive.

Example

Set inclusion ⊆ is a partial order.

Some pairs of elements may be incomparable.

A partial order need not compare every pair. Under subset inclusion, {1} and {2} are incomparable. A total order additionally compares every pair.

Strict comparison associated with an order

a strictly precedes b

Meaning

Given a partial order ≼ on A, its strict version ≺ compares related elements that are different.

Example

For subset inclusion, {1}⊊{1,2} is a strict comparison. The sets {1} and {2} remain incomparable.

The strict relation is irreflexive and transitive. “Not a≺b” does not imply b≺a, because a partial order may have incomparable pairs.

a≺b ⇔ (a≼b ∧ a≠b)

Counting

Notation and termMeaningExamples

Symbols and notation

n!

Factorial

n factorial

Meaning

For integer n≥1, the product of the integers from 1 through n; by definition 0!=1.

Example

4! = 1×2×3×4 = 24

There are 24 ways to order four distinct objects.

Permutations: number of ordered selections

n permute k; number of ordered k-selections

Meaning

For integers n≥0 and 0≤k≤n, P(n,k) counts ordered selections of k distinct objects from n distinct objects, without repetition.

Example

P(5,2)=5·4=20 ordered pairs; choosing A then B differs from B then A.

P(n,k) is the number of choices, not one choice itself. At k=n this becomes n!; at k=0 there is one empty selection.

More examples

P(4,2)=4×3=12

P(n,k)=n!/(n−k)!

Combinations / binomial coefficient

n choose k; the binomial coefficient

Meaning

For integers n≥0 and 0≤k≤n, C(n,k), also written as n above k in parentheses, counts k-element subsets of an n-element set.

Example

C(5,2)=10. The subset {A,B} is the same choice as {B,A}.

Order is ignored and elements are not repeated. Dividing P(n,k) by k! removes the k! orders of every selected subset; C(n,0)=C(n,n)=1.

More examples

C(4,2)=6

C(n,k)=n!/[k!(n−k)!]

Formulas and rules

Combinations with repetition

nonnegative solutions summing to r; r plus k minus one choose r

Meaning

For integers k≥1 and r≥0, the number of unordered selections of r items from k types, with unlimited repetition, is C(r+k−1,r). Equivalently, count integer x_i≥0 summing to r.

Example

Four scoops from three flavours, order ignored and flavours reusable, give C(6,4)=15 choices.

A separator construction uses r identical stars and k−1 separators; the stars in compartment i give x_i. A positive minimum or an upper bound per type changes the model.

x₁+…+x_k=r; C(r+k−1,r)

Binomial theorem and Pascal’s identity

the binomial expansion

Meaning

For real a,b and integer n≥0, the binomial theorem expands (a+b)^n by choosing which k of the n factors contribute b.

Example

(a+b)³=a³+3a²b+3ab²+b³. Also C(5,2)=C(4,1)+C(4,2)=4+6.

Pascal’s identity is C(n,k)=C(n−1,k−1)+C(n−1,k) for n≥2 and 1≤k≤n−1; split subsets by whether they include a fixed element. Boundary values are C(n,0)=C(n,n)=1.

(a+b)^n=∑_{k=0}^{n} C(n,k)a^(n−k)b^k

Product rule

Meaning

For successive choices, multiply the numbers of options when each earlier choice has the same number of continuations.

Example

3 shirts × 2 pairs of trousers = 6 outfits.

Tutor example: every shirt can be paired with either pair of trousers.

Sum rule

Meaning

Adds the numbers of possibilities in mutually exclusive cases.

Example

Choose one of 3 red tickets or one of 2 blue tickets: 5 choices.

An option must not be counted twice.

Pigeonhole principle

Meaning

If N≥0 objects are placed into k≥1 boxes, with N and k integers, at least one box contains at least ⌈N/k⌉ objects.

Example

With 10 objects in 3 boxes, some box contains at least ⌈10/3⌉=4. The familiar n+1 objects in n boxes case gives at least two.

If every box contained fewer than that threshold, the total capacity would be too small. The expression n+1→n is a mnemonic, not a theorem statement.

More examples

4 people are assigned to 3 rooms.

Inclusion–exclusion

the size of the union equals the sum of the sizes minus the overlap

Meaning

For two finite sets A and B, add their sizes and subtract the overlap once to obtain the size of their union.

Example

|A∪B|=|A|+|B|−|A∩B|

This formula applies to two finite sets.

|A∪B|=|A|+|B|−|A∩B|

Probability

Notation and termMeaningExamples

Symbols and notation

Sample space

sample space S; also written Omega

Meaning

The set of possible outcomes of a random experiment.

Example

Rolling a six-sided die: Ω={1,2,3,4,5,6}.

This is a tutor example.

The current probability lessons and Epp use S; Ω is another common name. In Ω(g), the same Greek letter instead belongs to asymptotic growth notation.

S; Ω
A⊆S

Event

A is an event, a subset of S

Meaning

A set of outcomes for which the event occurs.

Example

An even die result: A={2,4,6}.

An event may contain several outcomes.

P(A)

Probability

the probability of event A

Meaning

A numerical measure of how likely an event is, between 0 and 1, assigned by the probability model.

Example

For a fair die, P({2,4,6})=3/6.

Counting favorable outcomes and dividing by the total requires finitely many equally likely outcomes.

The formula P(A)=|A|/|S| requires a finite sample space with equally likely outcomes; it is not a general definition for every model.

Random variable

a real-valued function on outcomes; the event X equals x

Meaning

A random variable assigns a real number X(ω) to each outcome ω. The notation {X=x} abbreviates the event {ω∈S:X(ω)=x}.

Example

For two coin tosses, let X count heads: X(TT)=0, X(HT)=X(TH)=1, X(HH)=2.

Different outcomes can give the same value. P(X=1) sums the probabilities of HT and TH; X itself is not an event.

X:S→ℝ; {X=x}

Formulas and rules

A finite probability model

probability is the sum of the outcome weights

Meaning

On a finite nonempty sample space S, assign each outcome ω a weight p_ω≥0 with total 1. The probability of event A⊆S is the sum of its outcome weights.

Example

If S={a,b,c} has weights 1/2,1/3,1/6, then P({a,b})=5/6, not 2/3.

This gives P(∅)=0, P(S)=1 and additivity for disjoint events. The counting shortcut |A|/|S| is valid only when every outcome has weight 1/|S|.

P(A)=∑_{ω∈A}p_ω; ∑_{ω∈S}p_ω=1

Expected value: finite case

the expected value of X

Meaning

For a random variable with finitely many possible real values, multiply each distinct value by its probability and sum over those values.

Example

For a fair six-sided die whose result is X, E(X)=(1+2+3+4+5+6)/6=3.5.

The expectation need not be an attainable value. The sum is over values of X, not over repeated copies of the same value; infinite distributions need additional convergence conditions not covered by this finite formula.

E(X)=∑_x xP(X=x)

Independent events

the probability of both equals the product of the probabilities

Meaning

Events A and B are independent when P(A∩B)=P(A)P(B). If P(B)>0, this is equivalent to P(A|B)=P(A).

Example

For two independent fair coin tosses, let A be a head on the first and B a head on the second: P(A∩B)=1/4=(1/2)(1/2).

Disjoint events with positive probabilities are not independent: their intersection has probability 0 but the product is positive. Independence is a property of the probability model, not just different event names.

P(A∩B)=P(A)P(B)

Bayes’ formula

the probability of B j given E

Meaning

Let B₁,…,B_m form a finite partition of the sample space, each with positive probability, and let P(E)>0. Bayes’ formula reverses conditioning using these prior weights and the likelihoods of E.

Example

Of 100 items, 10 are type A with 2 defective; the other 90 contain 9 defective. Select one item uniformly. Given it is defective, P(A|defective)=2/11.

The denominator is the total probability of E, summed over exhaustive disjoint cases. P(E|A)=2/10 here, which differs from P(A|E)=2/11.

P(B_j|E)=P(E|B_j)P(B_j)/∑_i P(E|B_i)P(B_i)

Graphs and trees

Notation and termMeaningExamples

Symbols and notation

G=(V,E)

Graph

G has vertex set V and edge set E

Meaning

A structure consisting of vertices and edges connecting vertices.

Example

V={A,B,C}, E={{A,B},{B,C}}

This example is a simple undirected graph.

For a simple undirected graph, each edge is a two-element vertex set. With loops or parallel edges, retain named edges and their endpoint information; the simple encoding alone is insufficient.

v ∈ V

Vertex / node

v is a vertex in V

Meaning

One of the objects in a graph.

Example

A station on a subway map can be represented by a vertex.

This is a tutor example.

e ∈ E

Edge

e is an edge in E

Meaning

A connection between vertices.

Example

An edge connects A and B: A—B.

In a directed graph, an edge has a direction.

deg(v)

Degree

the degree of v

Meaning

In a simple undirected graph, the number of edges incident with a vertex.

Example

In A—B—C, deg(B)=2.

In a graph allowing loops, a loop contributes 2 to the degree.

Bipartite graph

V is the disjoint union of A and B

Meaning

A graph whose vertices can be split into two disjoint sets so every edge joins the two sets.

Example

Students connected to the dishes they choose.

Every edge joins one vertex in A to one in B. The optional symbol A⊔B means disjoint union; the two equations above state that condition explicitly.

V=A∪B, A∩B=∅
M_ij

Adjacency matrix

the adjacency entry in row i, column j

Meaning

For a finite loop-free undirected multigraph with fixed vertex order, M_ij is the number of edges between vertices i and j. The diagonal is zero and M is symmetric.

Example

Two vertices (A,B) joined by two parallel edges have M=[[0,2],[2,0]].

For a simple graph entries are 0 or 1. A directed graph uses a row-to-column direction and need not give a symmetric matrix. Loop-diagonal conventions must be stated separately.

depth(v)

Root and depth

the depth of vertex v

Meaning

A rooted tree has a designated root. The depth of v is the number of edges on the unique path from the root to v; the root has depth zero.

Example

If r is the root and the path is r—a—v, then depth(a)=1 and depth(v)=2.

The parent is the preceding vertex on that root path; children are one level farther away. Depth counts edges, not vertices, and is not a vertex’s degree.

Weights, distance estimates and infinity

edge weight; tree weight; distance estimate; infinity

Meaning

w(e) is the weight of a named edge; in a simple graph this may be written w(u,v). w(T) sums a tree’s edge weights. During a shortest-path algorithm d(v) may denote a tentative distance, and ∞ means no finite route has been found yet.

Example

If d(u)=4 and an edge e from u to v has weight 3, relaxation proposes d(v):=min(d(v),7). An old estimate ∞ becomes 7.

A tentative estimate is not automatically the final shortest distance. Dijkstra’s algorithm requires nonnegative edge weights. ∞ is an extended sentinel here, not an ordinary real weight.

w(e); w(T); d(v);

Formulas and rules

Matrix powers count walks

the i j entry of M squared

Meaning

For the adjacency matrix of a finite simple graph, (M²)_ij counts walks of length two from i to j, summed over possible intermediate vertices k.

Example

In the path 1—2—3, (M²)_13=1 from 1—2—3, and (M²)_11=1 from 1—2—1.

These are walks, not necessarily paths: returning to a previous vertex is allowed. More generally (M^r)_ij counts length-r walks for nonnegative integer r; M⁰ is the identity matrix.

(M²)_ij=∑_k M_ik M_kj

Permutation matrix and relabelling

M H equals P transpose times M G times P

Meaning

For a vertex bijection f from G to H, put P_uv=1 when f(u)=v and 0 otherwise, with rows in G order and columns in H order. For the same adjacency convention, M_H=PᵀM_GP expresses preserved adjacency.

Example

If G order is (1,2,3), H order is (p,q,r), and f(1)=r,f(2)=p,f(3)=q, then P=[[0,0,1],[1,0,0],[0,1,0]].

Pᵀ swaps P’s row and column indices. Right multiplication reorders columns and left multiplication by Pᵀ reorders rows. Reversing the convention for P changes the displayed identity; the matrix does not name an edge bijection.

M_H=PᵀM_GP

Concepts and methods

Loops and parallel edges

loop; parallel edges; multigraph

Meaning

A loop has the same endpoint twice. Parallel edges are distinct edges with the same endpoints. For an undirected multigraph, retain each edge’s identity and endpoint pair.

Example

e₁=AB and e₂=AB are two edges, not one duplicated set entry. A loop e₃=AA contributes two to deg(A).

A simple undirected graph excludes both loops and parallel edges. The degree convention does not by itself specify how a matrix should record loops; state the matrix convention explicitly.

N(v)

Neighbours and connectedness

the set of neighbours of v

Meaning

In a simple undirected graph, N(v) is the set of vertices adjacent to v. The graph is connected when every pair of vertices is joined by a path.

Example

In the path A—B—C, N(B)={A,C}; the graph is connected even though A and C are not adjacent.

Adjacency means one edge; connectedness permits a longer path. In this simple graph deg(v)=|N(v)|; parallel edges and loops require separate degree conventions.

Path

Meaning

A trail with no repeated vertices. A trail is a walk with no repeated edges.

Example

A—B—C

This is the convention in Epp, 5th Metric edition, printed pages 679–680. A walk may repeat vertices and edges.

Cycle in a simple undirected graph

Cycle / simple circuit

Meaning

In a simple undirected graph, a closed sequence with at least three edges and no repeated vertices other than the start at the end.

Example

A—B—C—A forms a triangle.

Epp calls this a simple circuit. Its first and last vertices coincide; a path cannot repeat that vertex.

The at-least-three-edges restriction belongs to this simple-graph setting. Use the separate walk/trail/circuit entry for the source’s general multigraph convention.

Walk, trail and circuit

walk; trail; circuit

Meaning

A walk follows incident vertices and edges; repetition is allowed. A trail has no repeated edge. A circuit is a closed trail with at least one edge. A simple circuit has no repeated vertex except the common first/last vertex.

Example

Traversing one edge A—B and returning along that same edge is a walk, not a trail. With two distinct parallel edges between A and B, using one out and the other back is a circuit.

A path has no repeated vertex. A single vertex is a length-zero walk. Under Epp’s general convention a loop is a one-edge circuit; the at-least-three-edges cycle rule applies only to simple graphs.

Tree

Meaning

A nonempty connected undirected graph with no circuits. Equivalently, a connected simple undirected graph with no cycles.

Example

A—B—C is a tree.

A finite tree has |E|=|V|−1 and a unique path between every two vertices. Loops and parallel pairs would create circuits and are therefore excluded.

Graph isomorphism

an isomorphism from G to H

Meaning

An isomorphism relabels a graph while preserving its incidence structure. For the multigraphs here it consists of a vertex bijection f and an edge bijection g preserving both endpoints of every edge.

Example

If G has parallel edges e₁,e₂ between A,B and H has h₁,h₂ between x,y, use f(A)=x, f(B)=y and either pairing of the two edge names.

Matching vertex counts or degree lists is necessary but not sufficient in general. Distinct parallel edges must have distinct images even when their endpoint pairs coincide.

Spanning tree

a spanning tree of G

Meaning

A spanning tree of a connected undirected graph uses every vertex of G and a subset of its edges, while remaining connected and without circuits.

Example

In a triangle with edges AB=2, BC=3, AC=7, selecting AB and BC gives a spanning tree of total weight 5.

A finite spanning tree has |V|−1 edges. A minimum spanning tree minimizes total edge weight among spanning trees; it need not minimize the route from one fixed source to every vertex.

Algorithms and growth

Notation and termMeaningExamples

Symbols and notation

x:=e

Assignment and program state

x is assigned the current value of e

Meaning

Evaluate e using the current variable values, then replace the value stored in x. A state records the current values of the algorithm’s variables.

Example

Starting with x=3, the instruction x:=x+1 changes the state to x=4.

The right-hand x is read before the replacement. Assignment is an action; x=4 is a statement about a state, and 4∈A is set membership.

T(n)

Operation count

T of n; operation count for input size n

Meaning

T(n) counts a specified kind of operation for inputs of size n. State the operation and whether the model describes a particular case, worst case or average case.

Example

If iteration i makes i−1 comparisons, for i=1,…,n, then T(n)=∑_{i=1}^{n}(i−1)=n(n−1)/2. For n=4 there are 6 comparisons.

This is an exact count under that model; Θ(n²) describes its growth. It is not automatically a time in seconds or the count of every machine instruction.

Logarithm and repeated halving

logarithm of x to base b

Meaning

For real b>0, b≠1 and x>0, log_b x is the exponent y for which b^y=x. In growth analysis the base is usually a fixed b>1.

Example

log₂8=3. For n≥1, n/2^k≤1 exactly when k≥log₂n, so the least nonnegative integer k is ⌈log₂n⌉.

Changing between fixed bases greater than 1 multiplies the logarithm by a positive constant. Actual algorithms may round sizes; include that rounding in an exact operation count.

log_b x=y ⇔ b^y=x

Change in an input or output

delta x; change in x; delta y

Meaning

Δ denotes a finite change: the new value minus the old value. For a graph y=f(x), specify both inputs before comparing their outputs.

Example

For f(x)=x², moving from x=3 to x=4 gives Δx=1 and Δy=16−9=7.

The output change depends on the function and starting point. Δx is one quantity, not multiplication by an independently defined variable Δ.

Δx=x_new−x_old; Δy=f(x_new)−f(x_old)

Formulas and rules

Big O, big Omega and big Theta

f is big O of g; big Omega of g; big Theta of g

Meaning

For eventually nonnegative functions f(n) and eventually positive g(n) on integer inputs: O(g) means f(n)≤C g(n) for all n≥n₀; Ω(g) means c g(n)≤f(n) for all n≥n₀; Θ(g) requires both bounds. Suitable constants c,C>0 and a threshold n₀ must exist and be independent of n.

Example

For n≥1, 3n²≤3n²+2n+1≤6n², so 3n²+2n+1∈Θ(n²), using c=3,C=6,n₀=1.

Big O alone is an upper bound, not necessarily a tight order. The common shorthand f=O(g) means membership in a class of bounds, not equality with one function. Ω(g) is unrelated to the sample-space name Ω.

f∈O(g); f∈Ω(g); f∈Θ(g)

Concepts and methods

Loop invariant

Meaning

A statement true whenever execution reaches a specified point of every loop iteration. Prove initialization and preservation; combine it with the exit condition.

Example

Before each iteration, s=1+…+i. Initially i=0,s=0. The updates i:=i+1; s:=s+i preserve this relation.

At an exit with i=n, this gives the required sum. Proving an invariant alone does not prove termination; that requires a separate argument.

Formal languages and automata

Notation and termMeaningExamples

Symbols and notation

Alphabet, empty word and length

alphabet Sigma; epsilon, the empty word; length of w

Meaning

An alphabet Σ is a finite set of permitted symbols. A word or string is a finite sequence of them. ε is the empty word and |w| is the number of symbols in w.

Example

Over Σ={0,1}, |010|=3 and |ε|=0. The language {ε} contains one word; the empty language ∅ contains none.

Σ names a set here, whereas ∑ denotes summation. The bars in |w| denote string length, not absolute value or divisibility. A word’s order matters.

Σ; ε; |w|

Concatenation and Kleene star

u concatenated with v; language concatenation; Kleene star of L

Meaning

uv appends word v after u. For languages K,L, KL={uv:u∈K,v∈L}. L* contains concatenations of any finite number of words from L, including zero words.

Example

If K={a,b} and L={01}, then KL={a01,b01}. If L={01}, then L*={ε,01,0101,…}.

Zero concatenated words give ε, so ε belongs to every L*, even ∅*={ε}. The star applies to the preceding language or grouped regular expression; concatenation need not commute.

uv; KL; L*

DFA transition and acceptance

delta of state q and symbol a; initial state; accepting states

Meaning

A deterministic finite automaton has a finite state set Q, alphabet Σ, one initial state q₀, accepting states F⊆Q, and a transition δ(q,a) for each state-symbol pair. The transition gives the next state.

Example

To accept binary words with an even number of 1s, use states E,O, start E, accept E. Reading 1 toggles E↔O; reading 0 leaves the state unchanged.

A word is accepted if and only if the state after its entire input lies in F. ε is accepted exactly when q₀∈F. An accepting state is not necessarily a halt state.

δ:Q×Σ→Q; δ(q,a); q₀; F⊆Q
p∼q

Equivalent DFA states

states p and q are equivalent

Meaning

Two states of a DFA are equivalent when every finite continuation word is accepted from p exactly when it is accepted from q.

Example

If p and q are both accepting and each loops to itself on every alphabet symbol, they are equivalent: every continuation is accepted from both.

Include the empty continuation: an accepting state and a nonaccepting state are already distinguished by ε. The sign ∼ here is state equivalence, not propositional negation.

Language of questions and arguments

Notation and termMeaningExamples

Evaluate

Meaning

Find the value of an expression using the given values of its variables.

Example

Evaluate p∨q when p=F and q=T: the value is T.

The inputs are supplied and the requested result is a value. Solving instead asks which inputs satisfy a stated condition.

More examples

Evaluate 2x+1 at x=3: 2×3+1=7.

Solve

Meaning

For an equation, find all allowed values of its unknowns that make it true.

Example

Solve x+2=5: x=3.

Substitution checks the value: 3+2=5.

In this course solve can also mean finding an explicit sequence satisfying a recurrence and its initial values; read the object named after the verb.

Simplify

Meaning

Rewrite an expression in a simpler equivalent form, respecting its domain.

Example

Simplify (A∩B)∪(A∩Bᶜ), with A,B⊆U: it equals A.

Distribute A∩ over the union and use B∪Bᶜ=U. The rewritten expression has the same value under the stated universe; this is not solving for A.

More examples

2x+3x=5x

Prove

Meaning

Establish a statement using definitions, hypotheses, and previously established results.

Example

Prove that the sum of two even integers is even.

A few successful numerical examples do not prove a statement about all integers.

Prove is the instruction; proof is the completed argument. A proof-end square □ marks completion in some notation, not the command itself.

Disprove

Meaning

Show that a statement is false; one counterexample suffices for a universal statement.

Example

Disprove “Every prime is odd”: 2 is prime and even.

A counterexample must satisfy the hypotheses and violate the conclusion.

Disprove is the instruction; disproof is the argument. The negation sign ¬ is not a universal abbreviation of that instruction.

Assume / suppose

Meaning

Take a condition as the starting point of a particular argument.

Example

Assume n is even. Then n=2k for some integer k.

Identify its role: a hypothesis, a case assumption, or an assumption in a proof by contradiction.

Let

Meaning

Introduces a named object or specifies a definition for the argument.

Example

Let A={1,2,3}. Let n be an arbitrary integer.

The sentence tells you whether an object is fixed, arbitrary or defined. Assume/suppose instead explicitly introduces a hypothesis to reason from.

More examples

Let n ∈ ℤ.

s.t.

Such that

Meaning

Introduces a condition that the chosen object must satisfy.

Example

∃x ∈ ℤ s.t. x > 2

There exists an integer x such that x is greater than 2.

Satisfy

Meaning

Make a condition true when the object is substituted into it.

Example

The number 3 satisfies x+2=5.

Replacing x with 3 gives the true equality 3+2=5.

Therefore / hence / thus

therefore; hence; thus

Meaning

Signals that the following conclusion follows from the preceding reasoning.

Example

n=2k and k∈ℤ. Therefore n is even.

The word therefore does not itself prove the conclusion; the step needs justification.

This is a conclusion marker, not a logical connective and not a guarantee that the preceding reasoning is valid.

Equals / is equal to

Meaning

The verb phrase used to read the equality sign.

Example

Two plus three equals five: 2+3=5.

Equality names the relation, equation names an equality involving variables, and equals is the verb.

For all / for every / for each

Meaning

Spoken forms of ∀: the requirement applies to every object in the stated domain.

Example

For every integer x, x²≥0.

Include the domain when reading: integer says which objects are being considered.

There exists / for some

Meaning

Phrases asserting that at least one object has the required property.

Example

There exists an integer k such that 6=2k.

The value k=3 works. The phrase for some does not mean exactly one.

If and only if: both directions

Meaning

A connection requiring both “if P, then Q” and “if Q, then P.”

Example

P iff Q: (P→Q) and (Q→P).

If gives one direction. Iff includes both, so proving equivalence requires both directions.