Cookie policy · You can change your choice at any time on the page „Cookies“.

Accessibility

Text size
Read aloud

Your browser reads the text with the voice it has for this language.

Accessibility statement

Mathematics I: logic, sets, combinatorics and sequences

A first-year university lesson: statements and logical connectives, truth tables, set operations, mathematical induction, permutations and variations, arithmetic and geometric sequences – with worked examples and tests.

1. Logic

A statement is a sentence that is either true (⊤) or false (⊥). From two statements p and q the connectives ¬,∧,∨,⇒,⇔ build new statements.

The negation ¬p (“not p”) is true when p is false and vice versa.

p¬p
⊤⊥
⊥⊤

The conjunction p∧q (“p and q”) is true only when both are true; one false statement is enough to make it false.

pqp∧q
⊤⊤⊤
⊤⊥⊥
⊥⊤⊥
⊥⊥⊥

The disjunction p∨q (“p or q”) is false only when both are false.

pqp∨q
⊤⊤⊤
⊤⊥⊤
⊥⊤⊤
⊥⊥⊥

The implication p⇒q (“p implies q”) is false only when p is true and q is false.

pqp⇒q
⊤⊤⊤
⊤⊥⊥
⊥⊤⊤
⊥⊥⊤

The equivalence p⇔q (“p if and only if q”) is true when p and q have the same value.

pqp⇔q
⊤⊤⊤
⊤⊥⊥
⊥⊤⊥
⊥⊥⊤

A tautology is a formula that is true for all values of its statements. It is checked with a truth table.

Example 1. Show that (p⇒q)⇔(¬p∨q) is a tautology.

pq¬pp⇒q¬p∨q(p⇒q)⇔(¬p∨q)
⊤⊤⊥⊤⊤⊤
⊤⊥⊥⊥⊥⊤
⊥⊤⊤⊤⊤⊤
⊥⊥⊤⊤⊤⊤

The last column is always ⊤: the formula is a tautology, so an implication can be replaced by ¬p∨q.

Example 2. What is the formula ((p∧¬q)∨(¬p∧q))⇒(p∨q)?

pqp∧¬q¬p∧q(p∧¬q)∨(¬p∧q)p∨q⇒
⊤⊤⊥⊥⊥⊤⊤
⊤⊥⊤⊥⊤⊤⊤
⊥⊤⊥⊤⊤⊤⊤
⊥⊥⊥⊥⊥⊥⊤

It is a tautology too: when exactly one statement is true, “p or q” is true as well.

Laws

  • p∧q⇔q∧p – commutative law of conjunction
  • (p∧q)∧r⇔p∧(q∧r) – associative law of conjunction
  • p∨q⇔q∨p – commutative law of disjunction
  • (p∨q)∨r⇔p∨(q∨r) – associative law of disjunction
  • (p⇒q)⇔(¬q⇒¬p) – law of contraposition
  • ¬(p∧q)⇔¬p∨¬q, ¬(p∨q)⇔¬p∧¬q – De Morgan’s laws
Check yourself: p=⊤, q=⊥ → p⇒q?

Answer: ⊥.

2. Sets

Set operations

  1. A∪B={x∣x∈A∨x∈B} – union: the elements in at least one of the sets
  2. A∩B={x∣x∈A∧x∈B} – intersection: the common elements
  3. A∖B={x∣x∈A∧x∉B} – difference
  4. AΔB=(A∖B)∪(B∖A) – symmetric difference
  5. Ac=A―=CBA={x∣x∈B∧x∉A} – complement of A in B
  6. P(A)={X∣X⊆A} – power set: all subsets of A; if A has n elements, P(A) has 2n
  7. A×B={(x,y)∣x∈A∧y∈B} – Cartesian product: all ordered pairs

Example. Sets given by a property, written by listing:

  • {x∣x∈Z∧−2≤x≤7}={−2,−1,0,1,2,3,4,5,6,7}
  • \(\{x\mid x\in\mathbb N,\ x\text{ odd}\land x<10\}=\{1,3,5,7,9\}\)
  • {x∣x∈R∧x2−25=0}={−5,5}

For A={1,2,3,4} and B={3,4,5}:

  • A∪B={1,2,3,4,5}, A∩B={3,4}, A∖B={1,2}, AΔB={1,2,5}
  • P({1,2})={∅,{1},{2},{1,2}}, {1,2}×{a,b}={(1,a),(1,b),(2,a),(2,b)}

3. Mathematical induction

Many properties of natural numbers are proved by the principle of mathematical induction, in three steps:

  1. check: the statement holds for n=1;
  2. assumption: the statement holds for n=k;
  3. proof: then it also holds for n=k+1.

Example. Prove that 1+2+⋯+n=n(n+1)2.

1) For n=1: 1=1⋅22 ✓.

2–3) Let 1+2+⋯+k=k(k+1)2. Then 1+2+⋯+k+(k+1)=k(k+1)2+(k+1)=(k+1)(k+2)2, which is the formula for n=k+1 ✓.

4. Combinatorics

Factorial: n!=n⋅(n−1)⋯3⋅2⋅1, 1!=1, 0!=1; 3!=6, 5!=120.

Permutations (orderings) of n different elements: P(n)=n!

If among n elements there are groups of k1,k2,… equal ones, permutations with repetition: P(n;k1,k2,…)=n!k1!k2!⋯

Example. How many different words can be made from the letters of TEUTA (5 letters, T twice)?

P(5;2,1,1,1)=5!2!1!1!1!=1202=60

Example. How many six-digit numbers with different digits can be written with 0, 1, 2, 3, 4, 5? From all 6! orderings subtract those that start with 0 (5!):

6!−5!=5!(6−1)=120⋅5=600

Variations without repetition: ordered choices of k of n different elements: Vnk=n!(n−k)!=n(n−1)⋯(n−k+1)

Example. n=10, k=5: V105=10!5!=10⋅9⋅8⋅7⋅6=30240

Variations with repetition (each element may be chosen more than once): V―nk=nk

Example. With the digits 1 and 2 (n=2), two-digit (k=2) and three-digit (k=3) strings:

V―22=22=4: 11, 12, 21, 22; V―23=23=8: 111, 112, 121, 122, 211, 212, 221, 222.

If the order does not matter, these are combinations: Cnk=(nk)=n!k!(n−k)!.

5. Sequences

A sequence is a function on the natural numbers: a1,a2,a3,…; an is the general term.

Example. The first five terms of the sequences:

  • an=12n: 12,14,16,18,110
  • an=(−1)n12n: −12,14,−18,116,−132
  • an=3n+2n: 5,4,113,144,175
  • an=(−1)nn2n=(−1)nn: −1,2,−3,4,−5

An arithmetic sequence: each term is the previous one plus the same number d (common difference). For example 1,3,5,7,… (d=2), 4,10,16,22,… (d=6).

an=a1+(n−1)d – general term

Sn=n2(a1+an)=n2(2a1+(n−1)d) – sum of the first n terms

Example. A phone company earned 2000 € on 1 March, and every following day its earnings grew by 125 €. How much did it earn by the end of March?

Earnings on 31 March: a31=2000+30⋅125=5750 €

In total over 31 days: S31=312(2000+5750)=31⋅77502=120125 €

A geometric sequence: each term is the previous one times the same number q (common ratio). For example 2,4,8,16,32,… (q=2).

an=a1qn−1 – general term

Sn=a1qn−1q−1 – sum of the first n terms (q≠1)

Tests

Check yourself with the tests (10 problems each, with solutions):

  1. Mathematics I – foundations – test 1 – Logic: statements and truth tables
  2. Mathematics I – foundations – test 2 – Sets and mathematical induction
  3. Mathematics I – foundations – test 3 – Combinatorics: permutations and variations
  4. Mathematics I – foundations – test 4 – Sequences: arithmetic and geometric