DarthDemono's Notes for ELTE

Solutions Examples and Applications

27 min read

Solutions — Examples and Applications (Part 1)

Worked answers to every example in the list. Specific sets/numbers can vary in the real exam, but the method stays the same. Where a question says "give an example", any correct example works — one valid choice is shown.


Logic

Predicates M(x)\mathrm{M}(x): "xx is a mouse", C(x)\mathrm{C}(x): "xx likes cheese".

  • "Every mouse likes cheese."
∀x (M(x)⇒C(x))\forall x\,\big(\mathrm{M}(x) \Rightarrow \mathrm{C}(x)\big)
  • "Some mice like cheese."
∃x (M(x)∧C(x))\exists x\,\big(\mathrm{M}(x) \wedge \mathrm{C}(x)\big)

Watch the connective: "every … " uses ⇒\Rightarrow, "some …" uses ∧\wedge. Writing ∃x(M(x)⇒C(x))\exists x(\mathrm{M}(x)\Rightarrow\mathrm{C}(x)) would be wrong (it's true even if no mice exist).


Sets

Subset of A={1,2,3,4,5}A=\{1,2,3,4,5\}. Any of these works, e.g.

{1,3,5}⊆A.(also valid: ∅, {2}, A itself, …)\{1,3,5\} \subseteq A. \qquad (\text{also valid: } \varnothing,\ \{2\},\ A \text{ itself, …})

Operations on A={1,2,a}A=\{1,2,a\} and B={a,b}B=\{a,b\}.

Operation Result
Union A∪BA\cup B {1,2,a,b}\{1,2,a,b\}
Intersection A∩BA\cap B {a}\{a\}
Difference A∖BA\setminus B {1,2}\{1,2\}
Difference B∖AB\setminus A {b}\{b\}
Symmetric difference A △ BA\,\triangle\,B {1,2,b}\{1,2,b\}
Cartesian product A×BA\times B {(1,a),(1,b),(2,a),(2,b),(a,a),(a,b)}\{(1,a),(1,b),(2,a),(2,b),(a,a),(a,b)\}

Complement. U={a,b,c,d,e,f,g,h}U=\{a,b,c,d,e,f,g,h\}, A={a,c,e}A=\{a,c,e\}:

A‾=U∖A={b,d,f,g,h}.\overline{A} = U\setminus A = \{b,d,f,g,h\}.

Power set of A={0,2,4}A=\{0,2,4\} (all 23=82^3=8 subsets):

P(A)={ ∅, {0}, {2}, {4}, {0,2}, {0,4}, {2,4}, {0,2,4} }.\mathcal{P}(A)=\big\{\,\varnothing,\ \{0\},\ \{2\},\ \{4\},\ \{0,2\},\ \{0,4\},\ \{2,4\},\ \{0,2,4\}\,\big\}.

Number of subsets of A={a,b,c,d,e,f}A=\{a,b,c,d,e,f\}. A set with nn elements has 2n2^n subsets:

26=64.2^{6}=64.

Relations

Partition of A={1,2,a,b,c,d,e,f,g,h}A=\{1,2,a,b,c,d,e,f,g,h\}. A partition splits AA into non‑empty, pairwise disjoint blocks whose union is AA. One example:

{ {1,2}, {a,b,c}, {d,e,f,g,h} }.\big\{\ \{1,2\},\ \{a,b,c\},\ \{d,e,f,g,h\}\ \big\}.

Binary relation from A={1,2,3,4,5}A=\{1,2,3,4,5\} to B={a,c,d,e,f,g}B=\{a,c,d,e,f,g\}. Any subset of A×BA\times B, e.g.

R={(1,a),(2,c),(3,e),(5,g)}.R=\{(1,a),(2,c),(3,e),(5,g)\}.

Domain, range, inverse of R={(0,4),(1,3),(1,4),(3,1),(3,4),(5,2)}R=\{(0,4),(1,3),(1,4),(3,1),(3,4),(5,2)\}.

  • Domain (first coordinates): dom⁡R={0,1,3,5}\operatorname{dom}R=\{0,1,3,5\}
  • Range (second coordinates): rng⁡R={1,2,3,4}\operatorname{rng}R=\{1,2,3,4\}
  • Inverse (reverse every pair):
R−1={(4,0),(3,1),(4,1),(1,3),(4,3),(2,5)}.R^{-1}=\{(4,0),(3,1),(4,1),(1,3),(4,3),(2,5)\}.

Restriction / image / inverse image. R={(1,2),(1,4),(2,2),(2,4),(3,1),(5,2),(5,5)}R=\{(1,2),(1,4),(2,2),(2,4),(3,1),(5,2),(5,5)\}, A={1,4,5}A=\{1,4,5\}.

  • Restriction R∣AR|_A = pairs of RR whose first coordinate is in AA:
R∣A={(1,2),(1,4),(5,2),(5,5)}.R|_A=\{(1,2),(1,4),(5,2),(5,5)\}.
  • Image R(A)R(A) = second coordinates of pairs whose first coordinate is in AA:
R(A)={2,4,5}.R(A)=\{2,4,5\}.
  • Inverse image R−1(A)R^{-1}(A) = first coordinates of pairs whose second coordinate is in AA: pairs with second coord in {1,4,5}\{1,4,5\} are (1,4),(3,1),(5,5)(1,4),(3,1),(5,5), so
R−1(A)={1,3,5}.R^{-1}(A)=\{1,3,5\}.

Extension / restriction of R={(1,3),(2,1),(3,1),(5,3)}R=\{(1,3),(2,1),(3,1),(5,3)\}.

  • An extension S⊇RS\supseteq R (add at least one pair), e.g.
S={(1,3),(2,1),(3,1),(5,3),(4,4)}.S=\{(1,3),(2,1),(3,1),(5,3),(4,4)\}.
  • A restriction S⊆RS\subseteq R (drop at least one pair), e.g.
S={(1,3),(2,1)}.S=\{(1,3),(2,1)\}.

Relations on A={1,2,3,4,5}A=\{1,2,3,4,5\} with a given property. (One example each.)

  • Reflexive (contains every (x,x)(x,x)):
R={(1,1),(2,2),(3,3),(4,4),(5,5)}.R=\{(1,1),(2,2),(3,3),(4,4),(5,5)\}.
  • Irreflexive (contains no (x,x)(x,x)):
R={(1,2),(2,3)}.R=\{(1,2),(2,3)\}.
  • Symmetric (if (x,y)(x,y) then (y,x)(y,x)):
R={(1,2),(2,1),(3,3)}.R=\{(1,2),(2,1),(3,3)\}.
  • Antisymmetric (if (x,y)(x,y) and (y,x)(y,x) then x=yx=y):
R={(1,2),(2,3),(1,1)}.R=\{(1,2),(2,3),(1,1)\}.
  • Strictly antisymmetric (if (x,y)(x,y) then never (y,x)(y,x) — so it must be irreflexive too):
R={(1,2),(1,3),(2,3)}.R=\{(1,2),(1,3),(2,3)\}.
  • Transitive (if (x,y)(x,y) and (y,z)(y,z) then (x,z)(x,z)):
R={(1,2),(2,3),(1,3)}.R=\{(1,2),(2,3),(1,3)\}.

The empty relation ∅\varnothing satisfies irreflexive, symmetric, antisymmetric, strictly antisymmetric and transitive simultaneously — handy if you ever get stuck, though it's good to show a non‑trivial example.

Equivalence relation ∼\sim on a set XX (reflexive, symmetric, transitive). Example:

X=Z,x∼y  ⟺  x−y is even (i.e. x≡y mod 2).X=\mathbb{Z}, \qquad x\sim y \iff x-y \text{ is even (i.e. } x\equiv y \bmod 2).

(Finite alternative: X={1,2,3}X=\{1,2,3\}, ∼ ={(1,1),(2,2),(3,3),(1,2),(2,1)}\sim\,=\{(1,1),(2,2),(3,3),(1,2),(2,1)\}.)

Partial order ⪯\preceq on a set XX (reflexive, antisymmetric, transitive). Example:

X=R,x⪯y  ⟺  x≤y.X=\mathbb{R}, \qquad x\preceq y \iff x\le y.

(Or: X=P(S)X=\mathcal{P}(S) for any set SS, with ⪯ = ⊆\preceq\,=\,\subseteq.)

Function from A={1,2,3,4}A=\{1,2,3,4\} to B={a,b,c,d,e,f}B=\{a,b,c,d,e,f\} (each element of AA assigned exactly one value). Example:

f={(1,a),(2,b),(3,c),(4,d)}.f=\{(1,a),(2,b),(3,c),(4,d)\}.

Injective / surjective / bijective, A={1,2,3,4}A=\{1,2,3,4\}, B={a,b,c,d}B=\{a,b,c,d\}.

  • Injective (distinct inputs → distinct outputs):
f={(1,a),(2,b),(3,c),(4,d)}.f=\{(1,a),(2,b),(3,c),(4,d)\}.
  • Surjective (every element of BB is hit). Since ∣A∣=∣B∣=4|A|=|B|=4, the same map works:
f={(1,a),(2,b),(3,c),(4,d)}.f=\{(1,a),(2,b),(3,c),(4,d)\}.
  • Bijective (both injective and surjective):
f={(1,a),(2,b),(3,c),(4,d)}.f=\{(1,a),(2,b),(3,c),(4,d)\}.

Because ∣A∣=∣B∣|A|=|B|, the simplest injection is already a bijection. If ∣B∣>∣A∣|B|>|A| no surjection exists; if ∣B∣<∣A∣|B|<|A| no injection exists.

Composition R∘SR\circ S, where R={(1,2),(1,4),(2,3),(2,4)}R=\{(1,2),(1,4),(2,3),(2,4)\}, S={(1,2),(1,3),(4,1)}S=\{(1,2),(1,3),(4,1)\}.

Convention: (x,z)∈R∘S  ⟺  ∃y: (x,y)∈S ∧ (y,z)∈R(x,z)\in R\circ S \iff \exists y:\ (x,y)\in S \ \wedge\ (y,z)\in R — apply SS first, then RR.

  • (1,2)∈S(1,2)\in S and (2,3),(2,4)∈R⇒(1,3),(1,4)(2,3),(2,4)\in R \Rightarrow (1,3),(1,4)
  • (1,3)∈S(1,3)\in S, but no pair (3,⋅)∈R⇒(3,\cdot)\in R \Rightarrow nothing
  • (4,1)∈S(4,1)\in S and (1,2),(1,4)∈R⇒(4,2),(4,4)(1,2),(1,4)\in R \Rightarrow (4,2),(4,4)
R∘S={(1,3),(1,4),(4,2),(4,4)}\boxed{R\circ S=\{(1,3),(1,4),(4,2),(4,4)\}}

Complex numbers

z=−3−5iz=-3-5i, w=−1+4iw=-1+4i.

  • z+w=(−3−1)+(−5+4)i=−4−iz+w=(-3-1)+(-5+4)i = -4 - i
  • zw=(−3−5i)(−1+4i)=3−12i+5i−20i2=3−7i+20=23−7izw=(-3-5i)(-1+4i)= 3 -12i +5i -20i^2 = 3 -7i +20 = 23 - 7i

z=2−5iz=2-5i.

  • ∣z∣=22+(−5)2=4+25=29|z|=\sqrt{2^2+(-5)^2}=\sqrt{4+25}=\sqrt{29}
  • z‾=2+5i\overline{z}=2+5i

z=3(cos⁡30∘+isin⁡30∘)z=3(\cos 30^\circ+i\sin 30^\circ), w=5(cos⁡12∘+isin⁡12∘)w=5(\cos 12^\circ+i\sin 12^\circ).

Multiply moduli, add arguments; divide moduli, subtract arguments:

  • zw=3⋅5 (cos⁡(30∘+12∘)+isin⁡(30∘+12∘))=15(cos⁡42∘+isin⁡42∘)zw = 3\cdot 5\,\big(\cos(30^\circ+12^\circ)+i\sin(30^\circ+12^\circ)\big)= 15(\cos 42^\circ+i\sin 42^\circ)
  • zw=35 (cos⁡(30∘−12∘)+isin⁡(30∘−12∘))=35(cos⁡18∘+isin⁡18∘)\dfrac{z}{w} = \dfrac{3}{5}\,\big(\cos(30^\circ-12^\circ)+i\sin(30^\circ-12^\circ)\big)= \tfrac{3}{5}(\cos 18^\circ+i\sin 18^\circ)

z=2(cos⁡15∘+isin⁡15∘)z=2(\cos 15^\circ+i\sin 15^\circ).

  • Power (De Moivre): z4=24(cos⁡(4⋅15∘)+isin⁡(4⋅15∘))=16(cos⁡60∘+isin⁡60∘)z^4 = 2^4\big(\cos(4\cdot 15^\circ)+i\sin(4\cdot 15^\circ)\big)= 16(\cos 60^\circ+i\sin 60^\circ)

  • Cube roots: z3=23(cos⁡15∘+360∘k3+isin⁡15∘+360∘k3)\sqrt[3]{z}=\sqrt[3]{2}\left(\cos\dfrac{15^\circ+360^\circ k}{3}+i\sin\dfrac{15^\circ+360^\circ k}{3}\right), k=0,1,2k=0,1,2:

kk argument root
00 5∘5^\circ 23(cos⁡5∘+isin⁡5∘)\sqrt[3]{2}(\cos 5^\circ+i\sin 5^\circ)
11 125∘125^\circ 23(cos⁡125∘+isin⁡125∘)\sqrt[3]{2}(\cos 125^\circ+i\sin 125^\circ)
22 245∘245^\circ 23(cos⁡245∘+isin⁡245∘)\sqrt[3]{2}(\cos 245^\circ+i\sin 245^\circ)

Combinatorics

First four rows of Pascal's triangle (rows 00–33):

        1
      1   1
    1   2   1
  1   3   3   1

Counts for A={1,2,…,10}A=\{1,2,\ldots,10\}, n=10n=10 (factorials may be left un‑evaluated):

Type Formula Value
Permutations without repetition n!n! 10!10!
44‑variations without repetition n!(n−4)!=10!6!\dfrac{n!}{(n-4)!}=\dfrac{10!}{6!} 10⋅9⋅8⋅710\cdot 9\cdot 8\cdot 7
44‑variations with repetition n4n^4 10410^4
44‑combinations without repetition (n4)=10!4! 6!\dbinom{n}{4}=\dfrac{10!}{4!\,6!} 210210
44‑combinations with repetition (n+4−14)=(134)\dbinom{n+4-1}{4}=\dbinom{13}{4} 715715

Permutations with repetition, repetition numbers k1=2, k2=1, k3=4, k4=4k_1=2,\ k_2=1,\ k_3=4,\ k_4=4 (total n=2+1+4+4=11n=2+1+4+4=11):

11!2! ⋅1! ⋅4! ⋅4!.\frac{11!}{2!\,\cdot 1!\,\cdot 4!\,\cdot 4!}.

Binomial expansion of (x+y)5(x+y)^5 (coefficients are row 5: 1,5,10,10,5,11,5,10,10,5,1):

(x+y)5=x5+5x4y+10x3y2+10x2y3+5xy4+y5.(x+y)^5 = x^5 + 5x^4y + 10x^3y^2 + 10x^2y^3 + 5xy^4 + y^5.

Inclusion–exclusion principle for four sets:

∣A∪B∪C∪D∣= ∣A∣+∣B∣+∣C∣+∣D∣−(∣A∩B∣+∣A∩C∣+∣A∩D∣+∣B∩C∣+∣B∩D∣+∣C∩D∣)+(∣A∩B∩C∣+∣A∩B∩D∣+∣A∩C∩D∣+∣B∩C∩D∣)−∣A∩B∩C∩D∣. \begin{aligned} |A\cup B\cup C\cup D| =\ & |A|+|B|+|C|+|D| \\ &-\big(|A\cap B|+|A\cap C|+|A\cap D|+|B\cap C|+|B\cap D|+|C\cap D|\big)\\ &+\big(|A\cap B\cap C|+|A\cap B\cap D|+|A\cap C\cap D|+|B\cap C\cap D|\big)\\ &-|A\cap B\cap C\cap D|. \end{aligned}

Graphs

Edge count from degrees. A 55‑vertex graph GG with degrees 7,7,6,3,37,7,6,3,3.

By the handshake lemma, the sum of all vertex degrees equals twice the number of edges:

∑vdeg⁡(v)=2∣E∣.\sum_{v}\deg(v) = 2|E|.
7+7+6+3+3=26⇒∣E∣=262=13.7+7+6+3+3 = 26 \quad\Rightarrow\quad |E| = \frac{26}{2} = 13.

Note: a simple graph on 55 vertices can have max degree 44, so degree 77 means GG has multiple edges and/or loops (a multigraph). The handshake lemma still applies regardless.


End of answer key.