first commit

This commit is contained in:
2025-11-26 15:29:50 +01:00
commit e1a4e65d59
21 changed files with 21288 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,268 @@
#import "@local/dtu-template:0.5.1":*
#show: dtu-math-assignment.with(
course: "01001",
course-name: "Mathematics 1a (Polytechnical Foundation)",
title: "Hjemmeopgave 3",
due-date: datetime(day: 23, month: 11, year: 2025),
author: "Rasmus Rosendahl-Kaa (S255955)",
semester: "2025 Fall",
)
#set math.vec(delim: "[")
#set math.mat(delim: "[")
#set text(lang: "da")
= Problem A
Lad $W$ være udspændt af følgende vektorer i $RR^3$:
$
bold(v)_1 = vec(-1,1,0), quad bold(v)_2 = vec(5,4,3), quad bold(v)_3 = vec(7,11,6)
$
Angiv en ordnet basis for $W$
#solution()[
For at finde den ordnede basis $W$, opstiller vi en totalmatrix, $T$ bestående af $v_1, v_2 "og" v_3$:
$ T=mat(-1,5,7;1,4,11;0,3,6) $
Herefter finder vi den reducerede trappeform for matricen, hvor de søjler med pivotelementer, være de vektorer i den ordnede basis.
$ T limits(->)_(R_1<-R_1+R_2) mat(-1,5,7;0,9,18;0,3,6)->_(R_3<-R_2-1/3 dot R_2)
mat(-1,5,7;0,9,18;0,0,0) ->_(R_2<-1/9 dot R_2) mat(-1,5,7;0,1,2;0,0,0)
->_(R_1<-R_1-5 dot R_2) \ mat(-1,0,-7;0,1,2;0,0,0) ->_(R_1<-(-1) dot R_1) mat(1,0,7;0,1,2;0,0,0)
$
Her kan det ses, at der er to pivotelementer i søjlerne 1 og 2, $W$ bestå af $v_1 "og" v_2$:
$ W= (v_1, v_2) $
]
= Problem B
Lad $C_infinity (RR)$ være det reelle vektorrum fra Eksempel 10.4.5 i lærebogen. Der defineres en
funktion $L: C_infinity (RR) arrow C_infinity (RR)$ ved $L(f) = f' +f-1$ hvor udtrykket $f'$ betegner den afledte funktion af $f$. Er $L$ en lineær afbildning?
#solution()[
For at $L$ skal være en linær afbildning, skal den opfylde følgende (Definition 11.0.1):
/ 1): $L(f+g) = L(f) + L(g)$ for alle $f, g in C_infinity (RR)$
/ 2): $L(c dot f) = c dot L(f)$ for alle $c in RR "og" f in C_infinity (RR)$
For at teste det første krav, kan vi betragte funktionerne $f, g in C_infinity (RR)$:
$ L(f+g) = (f+g)' + (f+g) - 1 $
Man ved at $(f+g)' = f'+g'$ så:
$ L(f+g)=f'+g'+f+g-1 $
Det skal være lig med $L(f) + L(g)$, som regnes:
$ L(f) + L(g) = (f'+f-1) + (g'+g-1) = f'+g'+f+g-2 $
Da $-1 eq.not -2$, er $L$ *ikke* en lineær afbildning, da den ikke opfylder første krav.
Andet krav behøves ikke at regnes, da vi nu allerede ved, at det ikke kan være en lineær afbildning
]
= Problem C
Lad $F: CC^2 arrow CC^2$ være defineret som følger:
$
F(vec(v_1,v_2)) = mat(1,1;-4,5) dot vec(v_1,v_2), quad v_1v_2 in CC
$
Der gives ordnede baser
$
beta = (vec(1,2),vec(-2,1)) "og" gamma = (vec(1,1), vec(0,1)) op("for") CC^2
$
Beregn afbildningsmatricen $amat(F,beta,gamma)$.
#solution()[
Per Lemma 11.3.3, kan vi definere afbildningsmatricen som følgende:
$ amat(F, beta, gamma)=mat([F(mat(1;1))]_beta,[F(mat(0;1))]_beta) $
$F(mat(1;1)) "og" F(mat(0;1))$ beregnes:
$ F(mat(1;1)) = mat(1,1;-4,5) dot mat(1;1) = mat(1 dot 1 + 1 dot 1;-4 dot 1 + 5 dot 1) = mat(2;1) $
$ F(mat(0;1)) = mat(1,1;-4,5) dot mat(0;1) = mat(1 dot 0 + 1 dot 1;-4 dot 0 + 5 dot 1) = mat(1;5) $
De kan sættes ind i afbildningsmatricen:
$ amat(F,beta,gamma) = mat(mat(2;1)_beta, mat(1;5)_beta) $
Beta-koordinaterne,$mat(2;1)_beta "og" mat(1;5)_beta$, udregnes:
$ mat(2;1) = 4/5 dot mat(1;2) - 3/5 dot mat(-2;1)\
mat(2;1)_beta = mat(4/5;-3/5)
$
$ mat(1;5) = 11/5 dot mat(1;2) + 3/5 dot mat(-2;1)\
mat(1;5)_beta = mat(11/5;3/5) $
Derfor afbildningsmatricen $amat(F,beta,gamma) = mat(4/5,11/5;-3/5,3/5)$
]
= Problem D
Der vælges følgende ordnede basis for det reelle vektorrum $RR^(2 times 2)$:
$
beta = (mat(1,0;0,0), mat(0,1;0,0), mat(0,0;1,0), mat(0,0;0,1))
$
Givet den lineære afbildning $M: RR^(2 times 2) arrow RR^(2 times 2)$ defineret ved
$
M(bold(A)) = mat(1,2;-1,-2) dot bold(A), quad bold(A) in RR^(2 times 2)
$
Beregn afbildningsmatricen $amat(M,beta,beta)$.
#solution()[
Afbildningsmatricen defineres:
$ amat(M,beta,beta) = mat([M(mat(1,0;0,0))]_beta, [M(mat(0,1;0,0))]_beta, [M(mat(0,0;1,0))]_beta, [M(mat(0,0;0,1))]_beta) $
De fire funktioner kan udregnes:
$
M(mat(1,0;0,0)) &= mat(1,2;-1,-2) dot mat(1,0;0,0)\
&= mat(1 dot 1 + 2 dot 0,1dot 0 + 2 dot 0;-1 dot 1 - 2 dot 0,-1 dot 0 - 2 dot 0)\
&= mat(1,0;-1,0)
$
$
M(mat(0,1;0,0)) &= mat(1,2;-1,-2) dot mat(0,1;0,0)\
&= mat(1 dot 0 + 2 dot 0,1dot 1 + 2 dot 0;-1 dot 0 - 2 dot 0,-1 dot 1 - 2 dot 0)\
&= mat(0,1;0,-1)
$
$
M(mat(0,0;1,0)) &= mat(1,2;-1,-2) dot mat(0,0;1,0)\
&= mat(1 dot 0 + 2 dot 1,1dot 0 + 2 dot 0;-1 dot 0 - 2 dot 1,-1 dot 0 - 2 dot 0)\
&= mat(2,0;-2,0)
$
$
M(mat(0,0;0,1)) &= mat(1,2;-1,-2) dot mat(0,0;0,1)\
&= mat(1 dot 0 + 2 dot 0,1dot 0 + 2 dot 1;-1 dot 0 - 2 dot 0,-1 dot 0 - 2 dot 1)\
&= mat(0,2;0,-2)
$
kan Beta-koordinaterne \ $[mat(1,0;-1,0)]_beta, [mat(0,1;0,-1)]_beta, [mat(2,0;-2,0)]_beta, [mat(0,2;0,-2)]_beta$ udregnes
$
mat(1,0;-1,0) &= 1 dot mat(1,0;0,0) + 0 dot mat(0,1;0,0) - 1 dot mat(0,0;1,0) + 0 dot mat(0,0;0,1)\
[mat(1,0;-1,0)]_beta &= mat(1;0;-1;0)
$
$
mat(0,1;0,-1) &= 0 dot mat(1,0;0,0) + 1 dot mat(0,1;0,0) + 0 dot mat(0,0;1,0) - 1 dot mat(0,0;0,1)\
[mat(0,1;0,-1)]_beta &= mat(0;1;0;-1)
$
$
mat(2,0;-2,0) &= 2 dot mat(1,0;0,0) + 0 dot mat(0,1;0,0) - 2 dot mat(0,0;1,0) + 0 dot mat(0,0;0,1)\
[mat(2,0;-2,0)]_beta &= mat(2;0;-2;0)
$
$
mat(0,2;0,-2) &= 0 dot mat(1,0;0,0) + 2 dot mat(0,1;0,0) + 0 dot mat(0,0;1,0) - 2 dot mat(0,0;0,1)\
[mat(0,2;0,-2)]_beta &= mat(0;2;0;-2)
$
Derfor afbildningsmatricen være:
$ amat(M,beta,beta) = mat(1,0,2,0;0,1,0,2;-1,0,-2,0;0,-1,0,-2) $
]
= Problem E
Givet følgende matrix
$
bold(A) = mat(2,0,0;2,1,-1;2,-1,1) in RR^(3 times 3)
$
Bestem matricens egenværdier samt ordnede baser for de tilhørende egenrum.
#solution()[
For at finde egenværdierne findes først det karakteristiske polynomium:
$ P_(bold(A))(Z) &= det(bold(A) - Z dot I_3)\
&=det(mat(2,0,0;2,1,-1;2,-1,1) - Z dot mat(1,0,0;0,1,0;0,0,1))\
&=det(mat(2-Z,0,0;2,1-Z,-1;2,-1,1-Z))\
$
Første række vælges til at udregne determinanten, da der er to nuller:
$
P_(bold(A))(Z) &= (2-Z) dot det(mat(1-Z,-1;-1,1-Z))\
&= (2-Z) dot ((1-Z) dot (1-Z)- 1)\
&= (2-Z) dot ((1-Z)^2 -1)\
&= (2-Z) dot (Z^2-2Z+1-1)\
&= (2-Z) dot Z dot (Z-2)\
$
$(2-Z)$ kan omskrives som $-(Z-2)$ for at det formen, vi kan aflæse rødderne:\
$P_(bold(A)(Z)) = -(Z-2)(Z-0)(Z-2) = -1 dot (Z-0)(Z-2)^2$
Egenværdierne kan aflæses som rødderne i det karakteristiske polynomium, som være:
- $lambda_1 = 0$
- $lambda_2 = 2$
Egenrummet er defineret som $E_lambda = ker(bold(A)-lambda dot I_n)$ (Lemma 12.2.3).
For $lambda_1$:
$
E_0 = ker(A-0 dot I_3) = ker(mat(2,0,0;2,1,-1;2,-1,1))
$
Den reducerede trappeform findes:
$
&mat(2,0,0;2,1,-1;2,-1,1)->_(R_1<-1/2 dot R_1)mat(1,0,0;2,1,-1;2,-1,1)->_(R_3<-R_3+R_2)\
&mat(1,0,0;2,1,-1;4,0,0)->_(R_3<-R_3-4 R_1)mat(1,0,0;2,1,-1;0,0,0)->_(R_2<-R_2-2R_1)\
&mat(1,0,0;0,1,-1;0,0,0)
$
Der er én variabel da $v_1=0$. $v_3$ sættes lig med t: $v_2-v_3=0 => v_2=t$
fås:
$
mat(v_1;v_2;v_3)=t dot mat(0;1;1) space space t in RR
$
Derfor er:
$
E_0="span"{mat(0;1;1)}
$
For $lambda_2$:
$
E_2 &= ker(A-2 dot I_3) = ker(mat(2-2,0,0;2,1-2,-1;2,-1,1-2))\
&= ker(mat(0,0,0;2,-1,-1;2,-1,-1))
$
Den reducerede trappeform findes:
$
&mat(0,0,0;2,-1,-1;2,-1,-1)->_(R_1<->R_3)mat(2,-1,-1;2,-1,-1;0,0,0)->_(R_2<-R_2-R_1)\
&mat(2,-1,-1;0,0,0;0,0,0)->_(R_1<-1/2R_1)mat(1,-1/2,-1/2;0,0,0;0,0,0)
$
Der er to variabler. $v_2$ sættes lig med u og $v_3$ sættes lig med t: $v_1-1/2v_2-1/2v_3=0 => v_1=1/2u+1/2t$
fås:
$
mat(v_1;v_2;v_3)=u dot mat(1/2,1,0) + t dot mat(1/2;0;1) space space u,t in RR
$
Derfor er:
$
E_2="span"{mat(1/2;1;0),mat(1/2;0;1)}
$
Samlet fås at der er to egenværdier, $lambda_1=0, lambda_2=2$ med de ordnede baser for
deres tilhørende egenrum:\
$E_0=(mat(0;1;1))$\
$E_2=(mat(1/2;1;0),mat(1/2;0;1))$
]
= Problem F
Om et inhomogent lineært ligningssystem over $RR$ med fire ligninger og to ubekendte oplyses
at
$
bold(v)_p = vec(1,-1) in RR^2
$
er en partikulær løsning. Er vektoren $3 dot bold(v)_p$ en løsning til systemet?
#solution()[
Man kan skrive det lineære ligningssystems (jeg vil kalde det $bold(A)$)
løsning (jeg vil kalde den $b$) som en lineærkombination af systemet:
$ A dot v_p = b $
Hvis $3 dot v_p$ også er en løsning, får vi at:
$ A dot (3 dot v_p) = b $
Da $A dot v_p = b$, kan vi sætte det ind for $b$:
$ A dot (3 dot v_p) = A dot (v_p) $
For at dette skulle være sandt, skulle $3 dot v_p = v_p$, hvilket ikke er sandt.\
Derfor kan det konkluderes at vektoren $3 dot v_p$ *ikke* er en løsning.
]
= Problem G
lad $V$ være det reelle vektorrum $RR^(3 times 3)$. Angiv et underum af $V$ af dimension $5$ og gør rede for dit svar.
#solution()[
For at et vektorrum, $W$ kan være et underrum af $V$, skal følgende være sandt (Lemma 10.4.2):
$u+c dot v in W$ for alle $u,v in W$ og alle $c in RR$
Da vektorrummet $V$ er det reelle vektorrum $RR^(3 times 3)$, vil ethvert vektorrum også i $RR^(3 times 3)$ altid være et vektorrum for $W$. Det er grund af, at enhver skalarmultiplikation eller vektoraddition, man vil lave, altid vil give et vektorrum, der også er i $RR^(3 times 3)$ da du ikke kan gange/lægge to reelle tal sammen og et ikke-reelt tal.
Det vil sige, at ethvert vektorrum $W in RR^(3 times 3)$ med dimension 5 vil være et underrum af $V$.
Da dimensionen af et vektorrum er antallet af lineært uafhængige elementer i dens base, kan man vælge en base med 5 lineært uafhængige elementer. Jeg vælge:
$
beta=(mat(1,0,0;0,0,0;0,0,0),mat(0,1,0;0,0,0;0,0,0),mat(0,0,1;0,0,0;0,0,0),mat(0,0,0;0,1,0;0,0,0),mat(0,0,0;0,0,0;0,1,0))
$
Vektorrummet kan dermed defineres som:
$
mat(a,b,c;0,d,0;0,e,0) = a dot mat(1,0,0;0,0,0;0,0,0) + b dot mat(0,1,0;0,0,0;0,0,0) +\ c dot mat(0,0,1;0,0,0;0,0,0) + d dot mat(0,0,0;0,1,0;0,0,0) + e dot mat(0,0,0;0,0,0;0,1,0)
$
det vil sige, at vektorrummet:
$
W = {mat(a,b,c;0,d,0;0,e,0)|a,b,c,d,e in RR}
$
være et underrum i $V$ og have dimensionen $dim(W)=5$.
]

Binary file not shown.

View File

@@ -0,0 +1,8 @@
#import "@local/dtu-template:0.5.1":*
#import "@local/academ:0.2.2":*
#import "@preview/cetz-plot:0.1.3":*
hej
hvordan går det?
det går sku meget godt, hvad med dig, ja det gør det faktisk. det torr jeg

Binary file not shown.

View File

@@ -0,0 +1,92 @@
#import "@local/academ:0.2.2"
#image("Opgaveliste.png")
#image("opgave4.1-1.png")
#image("opgave5.png")
#academ.solution[
When $a | b$ then we know that $b = a c$ where _c_ is an integer. We can do the same for $b | a$, so $a = b c$. When looking at the equations for a and b, we can conclude that c must be 1, because if it was bigger, the other equation would not hold. If b is 2a, then a must be $1/2 b$ but then c would not be an integer.
It is the same thing for if a or b is negative, as then it would be that $c=-1$
]
#image("opgave4.1-9.png")
#academ.solution[
When a devides b we know that _b_ must be a multiple of _a_. We also know that an even number multiplied by an integer will always give an even number, so if b is even, then a cannot be odd. And then if a is odd, then b must also be odd.
]
#image("opgave4.1-17.png")
#image("opgave4.1-21.png")
#image("opgave4.1-29.png")
#academ.solution[
a) 1=228 *div* 119, 109 = 228 *mod* 119
b) 40 = 9009 *div* 223, 89 = 9009 *mod* 223
c) -31 = -10101 *div* 333, 222 = -10101 *mod* 333
d) -21 = -765432 *div* 38721, 38259 = -765432 *mod* 38721
]
#image("opgave4.1-1.png")
#image("opgave4.1-41.png")
#academ.solution[
When $n | m$ we know that m is a multiple of n. And when we say $a equiv b (mod m)$ we basically say that a and b is the same distance away from a multiple of m. But since we also know that m is a multiple of n, this means that a and b must be the same distance away from a multiple of n as well.
]
#image("opgave4.1-43.png")
#academ.solution[
a) This is false when $m=c$. Example: $a=19, b=18, c=5,m=5$.
We would then have $ 19 dot 5 mod 5 = 18 dot 5 mod 5 <=> 95 mod 5 = 90 mod 5 <=> 0 = 0 $
Which is true. But then:
$ 19 mod 5 = 18 mod 5 <=> 4 = 3$
Which is false.
~
b) $a=-13, b=-23, c=5, d=15, m=10$.
Proof:
$
-13 mod 10 = -23 mod 10 <=> 7 = 7\
\
5 mod 10 = 15 mod 10 <=> 5 = 5\
\
(-13)^(5) mod 10 = (-23)^(15) mod 10 <=> -371293 mod 10 approx -2.666352 dot 10^(20) <=>\
7 = 3
$
]
#image("opgave4.1-44.png")
#academ.solution[
When you look at a table of a number of $n^2$ and $n^2-(n-1)^2$ you can see an interesting pattern:
#table(
columns: 3,
align: horizon,
table.header(
[$n$],[$n^2$],[$n^2-(n-1)^2$],
),
[2], [4], [3],
[3], [9], [5],
[4], [16], [7],
[5], [25], [9],
[6], [36], [11],
[7], [49], [13],
[8], [64], [15],
[9], [81], [17],
)
On this table you can see that the difference between each $n^2$ grows by 2 for each _n_. This means that the difference is $n^2$ and $(n-1)^2$ is always $4 dot x plus.minus 1$. So as we can see, $n^2$ is always either a multiple of 4, or _a multiple of 4_ plus 1.
]
#image("opgave4.1-45.png")
#academ.solution[
As seen on the table, $n^2$ is always either a multiple of 4, or _a multiple of 4_ +1. _m_ is always 1 below a multiple of 4, which makes it never be equal to the sum of the squares of two integers. This is because the sum of the squares of two integers will always either be 4k (when the squares of the two integers both are a multiple of 4), $4k+1$ (when one of the squares are a multiple of 4, and the other is a multiple + 1), or $4k+2$ (when both of the squares are a multiple of 4 + 1). So the sum of the squares of two integers will never equal $4k+3$
]
#image("opgave4.1-47.png")
#academ.solution[
This is true because $a equiv a^k (mod m)$. We know this as when you for when you take $a^k$, the result will still be a multiple of a. So that means that you could rewrite $a^k$ as $a dot a^(k-1) dot a^(k-2) dots$. So if we call the $a^(k-1) dot a^(k-2) dots$ _l_, we can write $a=m dot c + d$ and $a dot l = m dot c dot l + d$.
]
#image("opgave4.1-51.png")
Dette er korrekt. eller er det

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,952 @@
#import "@local/dtu-template:0.5.1":*
#import "@preview/cetz:0.4.2"
#show: dtu-note.with(
course: "01017",
course-name: "Discrete Mathematics",
title: "Lecture - November 20, 2025",
date: datetime(day: 20, month: 11, year: 2025),
author: "Sebastian Faber Steffensen (s255609)",
semester: "2025 Fall",
)
= Sections 9.5 and 9.6: Relations and Partial Orders
== Introduction to Relations
#definition(
title: "Relation",
)[
Consider a set $S$ and a relation $R$ on $S$. We write $(S, R)$ to denote this structure.
For $a, b in S$, we say "$a$ is related to $b$" and write $a R b$ if the ordered pair $(a, b)$ is in the relation $R$.
In essence, a relation is just a set of ordered pairs: $R subset.eq S times S$.
]
#example(title: "Finite Relation")[
Let $S = {1, 2, 3}$ and suppose $R$ contains the pairs $(1,2)$, $(2,3)$, $(3,2)$, and $(2,2)$.
We can represent this as:
$
R = {(1,2), (2,3), (3,2), (2,2)}
$
This relation can be visualized as a directed graph:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions
let node1 = (0, 0)
let node2 = (2, 0)
let node3 = (4, 0)
// Draw nodes
circle(node1, radius: 0.3, fill: white, stroke: black + 1pt, name: "n1")
content(node1, [1])
circle(node2, radius: 0.3, fill: white, stroke: black + 1pt, name: "n2")
content(node2, [2])
circle(node3, radius: 0.3, fill: white, stroke: black + 1pt, name: "n3")
content(node3, [3])
// Draw edges with arrows
// (1,2) - arrow from 1 to 2
line("n1.east", "n2.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// (2,3) - arrow from 2 to 3
line("n2.east", "n3.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// (3,2) - arrow from 3 to 2 (curved to avoid overlap)
bezier("n3.north", "n2.north", (3, 0.8), (2.5, 0.8), mark: (end: ">", fill: black), stroke: black + 1pt)
// (2,2) - self-loop at 2
arc(
(name: "n2", anchor: 90deg),
start: 0deg,
delta: 360deg,
radius: 0.5,
mark: (end: ">", fill: black),
stroke: black + 1pt,
)
})
]
]
=== Common Sets
Throughout this section, we use the following standard sets:
$
ZZ, ZZ_+, NN, QQ, QQ_+, RR, CC
$
We also work with power sets $cal(P)(S)$, which denote the set of all subsets of $S$.
=== Common Relations
Examples of relations include:
$
=, <=, <, >=, >, in, subset.eq, subset, supset.eq, supset, equiv, divides
$
== Equivalence Relations
#definition(
title: "Equivalence Relation",
)[
A relation $R$ on a set $S$ is an *equivalence relation* if and only if $R$ satisfies the following three properties:
+ *Reflexive:* $forall a in S, a R a$
+ *Symmetric:* $forall a, b in S$, if $a R b$ then $b R a$
+ *Transitive:* $forall a, b, c in S$, if $a R b$ and $b R c$ then $a R c$
]
#example(
title: "Classifying Relations",
)[
Let's classify common relations by their properties:
*Reflexive Relations:*
$
=, <=, >=, subset.eq, supset.eq, equiv
$
*Symmetric Relations:*
$
=, equiv
$
*Transitive Relations:*
$
=, <=, >=, subset.eq, supset.eq, equiv, divides
$
Note: The relation $divides$ on $ZZ_+$ is reflexive and transitive, but not symmetric (e.g., $2 divides 4$ but $4 divides.not 2$).
]
#example(title: "Transitivity Visualization")[
If $a R b$ and $b R c$, then by transitivity we must have $a R c$:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions in a triangle
let node-a = (1, 1.5)
let node-b = (0, 0)
let node-c = (2, 0)
// Draw nodes
circle(node-a, radius: 0.3, fill: white, stroke: black + 1pt, name: "na")
content(node-a, [$a$])
circle(node-b, radius: 0.3, fill: white, stroke: black + 1pt, name: "nb")
content(node-b, [$b$])
circle(node-c, radius: 0.3, fill: white, stroke: black + 1pt, name: "nc")
content(node-c, [$c$])
// Draw edges with arrows
// aRb - arrow from a to b
line("na.south-west", "nb.north-east", mark: (end: ">", fill: black), stroke: black + 1pt)
// bRc - arrow from b to c
line("nb.east", "nc.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// aRc - arrow from a to c (transitivity)
line("na.south-east", "nc.north-west", mark: (end: ">", fill: black), stroke: black + 1pt)
})
]
]
=== Equivalence Classes
#definition(
title: "Equivalence Class",
)[
If $tilde$ is an equivalence relation on $S$, the *equivalence class* of an element $a in S$ is denoted $[a]_tilde$ and defined as:
$
[a]_tilde = {x in S | x tilde a}
$
This is the set of all elements related to $a$.
]
#example(title: "Congruence Modulo 4")[
Consider the equivalence relation of congruence modulo 4 on $ZZ$:
$
[0]_(mod 4) &= {dots.c, -8, -4, 0, 4, 8, dots.c} \
[1]_(mod 4) &= {dots.c, -7, -3, 1, 5, 9, dots.c} \
[2]_(mod 4) &= {dots.c, -6, -2, 2, 6, 10, dots.c} \
[3]_(mod 4) &= {dots.c, -5, -1, 3, 7, 11, dots.c}
$
These four equivalence classes partition the integers.
]
#theorem(title: "Properties of Equivalence Classes")[
Let $tilde$ be an equivalence relation on $S$. For any $a, b in S$, the following are equivalent:
+ $a tilde b$
+ $[a]_tilde = [b]_tilde$
+ $[a]_tilde inter [b]_tilde eq.not emptyset$
]
#proof(
)[
We prove the cycle of implications: $(1) arrow.r.double (2) arrow.r.double (3) arrow.r.double (1)$.
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions in a line
let node1 = (0, 0)
let node2 = (4, 0)
let node3 = (8, 0)
// Draw nodes as rectangles with content
rect(
(node1.at(0) - 1, node1.at(1) - 0.3),
(node1.at(0) + 1, node1.at(1) + 0.3),
fill: white,
stroke: black + 1pt,
name: "n1",
)
content(node1, [$a tilde b$])
rect(
(node2.at(0) - 1, node2.at(1) - 0.3),
(node2.at(0) + 1, node2.at(1) + 0.3),
fill: white,
stroke: black + 1pt,
name: "n2",
)
content(node2, [$[a]_tilde = [b]_tilde$])
rect(
(node3.at(0) - 1.2, node3.at(1) - 0.3),
(node3.at(0) + 1.2, node3.at(1) + 0.3),
fill: white,
stroke: black + 1pt,
name: "n3",
)
content(node3, [$[a]_tilde inter [b]_tilde eq.not emptyset$])
// Draw arrows: 1 → 2 → 3 → 1
// Arrow from n1 to n2
line("n1.east", "n2.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// Arrow from n2 to n3
line("n2.east", "n3.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// Arrow from n3 to n1 (curved above to avoid covering text)
bezier("n3.south", "n1.south", (7, -1.5), (1, -1.5), mark: (end: ">", fill: black), stroke: black + 1pt)
})
]
*(3) $arrow.r.double$ (1):* Suppose $[a]_tilde inter [b]_tilde eq.not emptyset$. Then there exists some $x in [a]_tilde inter [b]_tilde$.
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw two overlapping circles for Venn diagram
// Circle for [a]
circle((0.5, 0), radius: 1, fill: rgb(100, 150, 255, 100), stroke: black + 1pt, name: "a")
content((0, 0), [$[a]_tilde$])
// Circle for [b]
circle((1.5, 0), radius: 1, fill: rgb(255, 150, 100, 100), stroke: black + 1pt, name: "b")
content((2, 0), [$[b]_tilde$])
// Mark the intersection point with x
content((1, 0), [$x$], fill: white, frame: "circle", stroke: none, padding: 0.15)
})
]
By definition, $x tilde a$ and $x tilde b$. By symmetry, $a tilde x$. By transitivity, $a tilde x$ and $x tilde b$ implies $a tilde b$.
]
#theorem(
title: "Partition Property",
)[
Let $tilde$ be an equivalence relation on a set $S$. The equivalence classes of $tilde$ form a partition of $S$.
That is:
+ Every element $a in S$ belongs to exactly one equivalence class $[a]_tilde$.
+ The equivalence classes are pairwise disjoint: if $[a]_tilde eq.not [b]_tilde$, then $[a]_tilde inter [b]_tilde = emptyset$.
+ The union of all equivalence classes equals $S$.
]
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw the outer set S
circle((0, 0), radius: 2.5, stroke: black + 2pt, name: "S")
content((0, -2.8), [$S$])
// Draw disjoint partition subsets that perfectly fill S
circle((-1.2, 1), radius: 0.65, fill: rgb(100, 150, 255, 150), stroke: black + 1pt)
circle((0.5, 1.3), radius: 0.55, fill: rgb(255, 150, 100, 150), stroke: black + 1pt)
circle((1.5, 0.5), radius: 0.6, fill: rgb(150, 255, 150, 150), stroke: black + 1pt)
circle((1.6, -0.8), radius: 0.55, fill: rgb(255, 255, 100, 150), stroke: black + 1pt)
circle((0.6, -1.5), radius: 0.6, fill: rgb(255, 150, 255, 150), stroke: black + 1pt)
circle((-0.8, -1.4), radius: 0.65, fill: rgb(150, 255, 255, 150), stroke: black + 1pt)
circle((-1.6, -0.3), radius: 0.7, fill: rgb(255, 200, 150, 150), stroke: black + 1pt)
circle((0, 0.2), radius: 0.5, fill: rgb(200, 150, 255, 150), stroke: black + 1pt)
circle((-0.3, -0.5), radius: 0.45, fill: rgb(150, 255, 200, 150), stroke: black + 1pt)
})
]
== Partial Orders (Posets)
#definition(title: "Partially Ordered Set (Poset)")[
A relation $R$ on a set $S$ is a *partial order* if $R$ satisfies:
+ *Reflexive:* $forall a in S, a R a$
+ *Antisymmetric:* $forall a, b in S$, if $a R b$ and $b R a$ then $a = b$
+ *Transitive:* $forall a, b, c in S$, if $a R b$ and $b R c$ then $a R c$
We call $(S, R)$ a *partially ordered set* or *poset*.
]
#note-box()[
The key difference between equivalence relations and partial orders is:
- Equivalence relations require *symmetry*
- Partial orders require *antisymmetry*
]
#example(title: "Examples of Partial Orders")[
The following are partial orders:
$
=, <=, >=, subset.eq, supset.eq, divides "(on" ZZ_+)
$
For instance, $(ZZ_+, divides)$ is a poset because:
- $forall a in ZZ_+$: $a divides a$ (reflexive)
- If $a divides b$ and $b divides a$, then $a = b$ (antisymmetric)
- If $a divides b$ and $b divides c$, then $a divides c$ (transitive)
]
=== Notation and Terminology
For a partial order $R$ on $S$, we often use the notation $prec.eq$ instead of $R$, and write $a prec.eq b$ instead of $a R b$.
#note-box(
)[
Different authors may use different symbols such as $<=$ or $subset.sq.eq$ for general partial orders. The symbol $prec.eq$ is commonly used when the specific ordering is understood from context.
]
#definition(title: "Comparable Elements")[
Two elements $a, b in S$ are *comparable* if either $a prec.eq b$ or $b prec.eq a$.
If $a$ and $b$ are not comparable, we say they are *incomparable*.
]
#definition(title: "Total Order (Chain)")[
A partial order $(S, prec.eq)$ is a *total order* or *chain* if every pair of elements is comparable.
That is, for all $a, b in S$, either $a prec.eq b$ or $b prec.eq a$.
]
#definition(title: "Well-Ordered Set")[
A poset $(S, prec.eq)$ is *well-ordered* if every non-empty subset of $S$ has a smallest element (minimum).
]
#example(title: "Incomparable Elements")[
Consider the poset shown below:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions as a square
let bl = (0, 0) // bottom left
let br = (2, 0) // bottom right
let tl = (0, 2) // top left
let tr = (2, 2) // top right
// Draw nodes
circle(bl, radius: 0.3, fill: white, stroke: black + 1pt, name: "bl")
content(bl, [$a$])
circle(br, radius: 0.3, fill: white, stroke: black + 1pt, name: "br")
content(br, [$b$])
circle(tl, radius: 0.3, fill: white, stroke: black + 1pt, name: "tl")
content(tl, [$c$])
circle(tr, radius: 0.3, fill: white, stroke: black + 1pt, name: "tr")
content(tr, [$d$])
// Draw arrows
// b.l points to t.l and t.r
line("bl.north", "tl.south", mark: (end: ">", fill: black), stroke: black + 1pt)
line("bl.north-east", "tr.south-west", mark: (end: ">", fill: black), stroke: black + 1pt)
// b.r points to t.r, and t.l
line("br.north", "tr.south", mark: (end: ">", fill: black), stroke: black + 1pt)
line("br.north-west", "tl.south-east", mark: (end: ">", fill: black), stroke: black + 1pt)
// Annotations
content((1, 2.7), [*Maximal elements*])
content((1, -0.7), [*Minimal elements*])
})
]
In this poset:
- $a$ and $b$ are *incomparable* (neither $a prec.eq b$ nor $b prec.eq a$)
- $c$ and $d$ are *incomparable*
- Both $a$ and $b$ are *minimal elements*
- Both $c$ and $d$ are *maximal elements*
]
=== Minimal and Maximal Elements
#definition(title: "Minimal and Maximal Elements")[
Let $(S, prec.eq)$ be a poset.
- An element $a in S$ is *minimal* if there is no element $x in S$ such that $x prec.eq a$ and $x eq.not a$.
- An element $a in S$ is *maximal* if there is no element $x in S$ such that $a prec.eq x$ and $x eq.not a$.
]
#definition(title: "Minimum and Maximum Elements")[
Let $(S, prec.eq)$ be a poset.
- An element $a in S$ is the *minimum* (or *least element*) if $forall x in S, a prec.eq x$.
- An element $a in S$ is the *maximum* (or *greatest element*) if $forall x in S, x prec.eq a$.
]
#note-box()[
Key differences:
- A poset can have multiple minimal/maximal elements
- A poset has at most one minimum/maximum element
- Every minimum is minimal, but not every minimal element is a minimum
]
#example(title: "Ordinal Numbers")[
Consider the ordinal numbers with their natural ordering:
#cetz.canvas({
import cetz.draw: *
let y = 0 // Same y-coordinate for all lines
// First number line: 1, 2, 3, ...
line((0, y), (5, y), stroke: black + 1pt, mark: (end: ">", fill: black))
// Nodes on first line
circle((0.5, y), radius: 0.15, fill: black)
content((0.5, y - 0.4), [1])
circle((1.5, y), radius: 0.15, fill: black)
content((1.5, y - 0.4), [2])
circle((2.5, y), radius: 0.15, fill: black)
content((2.5, y - 0.4), [3])
content((5.3, y), [$dots.c$])
// Second number line: ω, ω+1, ω+2, ...
line((6, y), (11, y), stroke: black + 1pt, mark: (end: ">", fill: black))
// Nodes on second line
circle((6.5, y), radius: 0.15, fill: black)
content((6.5, y - 0.4), [$omega$])
circle((7.5, y), radius: 0.15, fill: black)
content((7.5, y - 0.4), [$omega + 1$])
circle((8.5, y), radius: 0.15, fill: black)
content((8.5, y - 0.4), [$omega + 2$])
content((11.3, y), [$dots.c$])
// Third number line: 2ω, 2ω+1, ...
line((12, y), (17, y), stroke: black + 1pt, mark: (end: ">", fill: black))
// Nodes on third line
circle((12.5, y), radius: 0.15, fill: black)
content((12.5, y - 0.4), [$1w$])
circle((13.5, y), radius: 0.15, fill: black)
content((13.5, y - 0.4), [$2u + 1$])
circle((14.5, y), radius: 0.15, fill: black)
content((14.5, y - 0.4), [$dots.c$])
content((17.3, y), [$dots.c$])
})
This is a well-ordered set where every subset has a minimum element.
]
#theorem(title: "Existence of Minimal Elements")[
Every finite partially ordered set has at least one minimal element.
]
#proof(
)[
Let $(S, prec.eq)$ be a finite poset. Pick any element $x_1 in S$.
- If $x_1$ is minimal, we are done.
- Otherwise, there exists $x_2 prec.eq x_1$ with $x_2 eq.not x_1$.
- If $x_2$ is minimal, we are done.
- Otherwise, continue this process.
Since $S$ is finite, this process must terminate, yielding a minimal element.
Geometrically, we can think of placing elements on a vertical line where if $x prec.eq y$, then $x$ is below $y$:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw x and y nodes vertically
circle((0, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "x")
content((0, 0), [$x$])
circle((0, 2), radius: 0.3, fill: white, stroke: black + 1pt, name: "y")
content((0, 2), [$y$])
// Arrow from x to y
line("x.north", "y.south", mark: (end: ">", fill: black), stroke: black + 1pt)
})
]
The bottommost element in such a representation is minimal.
]
=== Topological Sorting
#definition(
title: "Topological Sort",
)[
A *topological sort* of a finite poset $(S, prec.eq)$ is a total ordering of the elements that is compatible with the partial order.
That is, we arrange elements in a sequence $a_1, a_2, dots.c, a_n$ such that if $a_i prec.eq a_j$ in the partial order, then $i <= j$ in the sequence.
]
#example(title: "Topological Sort")[
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw nodes in a line
circle((0, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "a")
content((0, 0), [$a$])
circle((2, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "b")
content((2, 0), [$b$])
circle((4, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "c")
content((4, 0), [$c$])
circle((6, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "d")
content((6, 0), [$d$])
// Arrows between nodes
line("a.east", "b.west", mark: (end: ">", fill: black), stroke: black + 1pt)
line("b.east", "c.west", mark: (end: ">", fill: black), stroke: black + 1pt)
line("c.east", "d.west", mark: (end: ">", fill: black), stroke: black + 1pt)
// Annotation
content((3, -1), [Topological sort])
})
]
This represents a compatible total ordering $a prec.eq b prec.eq c prec.eq d$.
]
=== Lexicographic Ordering
#definition(
title: "Lexicographic Order",
)[
Given two partially ordered sets $(S_1, prec.eq_1)$ and $(S_2, prec.eq_2)$, we can define the *lexicographic ordering* $prec.eq$ on $S_1 times S_2$ as follows:
$(a_1, a_2) prec.eq (b_1, b_2)$ if and only if either:
- $a_1 prec.eq_1 b_1$, or
- $a_1 = b_1$ and $a_2 prec.eq_2 b_2$
]
#example(title: "Alphabetical Ordering")[
The lexicographic order generalizes alphabetical ordering. With letters ordered as $A < B < C < dots.c < Z$:
$
"ANNA" < "ANNI" < "JOHN"
$
This is because:
- "ANNA" vs "ANNI": First three letters match, but N < N is false and the fourth letter A < I
- "ANNI" vs "JOHN": First letter A < J
]
== Hasse Diagrams
#definition(
title: "Hasse Diagram",
)[
A *Hasse diagram* is a visual representation of a finite poset that simplifies the traditional directed graph by:
+ Removing all self-loops (reflexivity is implicit)
+ Removing all transitive edges (transitivity is implicit)
+ Removing all arrows (direction is upward by convention)
+ Positioning elements so that if $x prec.eq y$, then $x$ is below $y$
]
#example(title: "Poset ${1,2,3,4}$ with $<=$")[
First, the complete directed graph:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw nodes vertically
circle((0, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "n1")
content((0, 0), [1])
circle((0, 1.5), radius: 0.3, fill: white, stroke: black + 1pt, name: "n2")
content((0, 1.5), [2])
circle((0, 3), radius: 0.3, fill: white, stroke: black + 1pt, name: "n3")
content((0, 3), [3])
circle((0, 4.5), radius: 0.3, fill: white, stroke: black + 1pt, name: "n4")
content((0, 4.5), [4])
// 1 points to 2 (direct)
line("n1.north", "n2.south", mark: (end: ">", fill: black), stroke: black + 1pt)
// 1 points to 3 (transitive)
bezier("n1.east", "n3.east", (0.8, 1.5), mark: (end: ">", fill: black), stroke: black + 1pt)
// 1 points to 4 (transitive)
bezier("n1.east", "n4.east", (1.2, 2.25), mark: (end: ">", fill: black), stroke: black + 1pt)
// 2 points to 3 (direct)
line("n2.north", "n3.south", mark: (end: ">", fill: black), stroke: black + 1pt)
// 2 points to 4 (transitive)
bezier("n2.east", "n4.east", (0.8, 3.0), mark: (end: ">", fill: black), stroke: black + 1pt)
// 3 points to 4 (direct)
line("n3.north", "n4.south", mark: (end: ">", fill: black), stroke: black + 1pt)
// Self-loops
arc(
(name: "n1", anchor: 180deg),
start: 90deg,
delta: 270deg,
radius: 0.4,
mark: (end: ">", fill: black),
stroke: black + 1pt,
)
arc(
(name: "n2", anchor: 180deg),
start: 90deg,
delta: 270deg,
radius: 0.4,
mark: (end: ">", fill: black),
stroke: black + 1pt,
)
arc(
(name: "n3", anchor: 180deg),
start: 90deg,
delta: 270deg,
radius: 0.4,
mark: (end: ">", fill: black),
stroke: black + 1pt,
)
arc(
(name: "n4", anchor: 180deg),
start: 90deg,
delta: 270deg,
radius: 0.4,
mark: (end: ">", fill: black),
stroke: black + 1pt,
)
})
]
The corresponding Hasse diagram (with redundant information removed):
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Draw nodes vertically
circle((0, 0), radius: 0.3, fill: white, stroke: black + 1pt, name: "n1")
content((0, 0), [1])
circle((0, 1.5), radius: 0.3, fill: white, stroke: black + 1pt, name: "n2")
content((0, 1.5), [2])
circle((0, 3), radius: 0.3, fill: white, stroke: black + 1pt, name: "n3")
content((0, 3), [3])
circle((0, 4.5), radius: 0.3, fill: white, stroke: black + 1pt, name: "n4")
content((0, 4.5), [4])
// Simple edges (no transitive or reflexive edges) using curves
bezier("n1.east", "n2.east", (0.6, 0.75), stroke: black + 1pt)
bezier("n2.east", "n3.east", (0.6, 2.25), stroke: black + 1pt)
bezier("n3.east", "n4.east", (0.6, 3.75), stroke: black + 1pt)
})
]
The Hasse diagram is much cleaner while preserving all ordering information.
]
#example(title: "Power Set Hasse Diagrams")[
*Hasse diagram for* $(cal(P)({1,2}), subset.eq)$:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions as a diamond (square rotated 45 degrees)
let bottom = (0, 0)
let left = (-1.5, 1.5)
let right = (1.5, 1.5)
let top = (0, 3)
// Draw nodes
circle(bottom, radius: 0.3, fill: white, stroke: black + 1pt, name: "empty")
content(bottom, [$emptyset$])
circle(left, radius: 0.3, fill: white, stroke: black + 1pt, name: "n1")
content(left, [${1}$])
circle(right, radius: 0.3, fill: white, stroke: black + 1pt, name: "n2")
content(right, [${2}$])
circle(top, radius: 0.3, fill: white, stroke: black + 1pt, name: "n12")
content(top, [${1,2}$])
// Draw edges (using curves for aesthetics)
bezier("empty.north-west", "n1.south-east", (-0.7, 0.75), stroke: black + 1pt)
bezier("empty.north-east", "n2.south-west", (0.7, 0.75), stroke: black + 1pt)
bezier("n1.north-east", "n12.south-west", (-0.7, 2.25), stroke: black + 1pt)
bezier("n2.north-west", "n12.south-east", (0.7, 2.25), stroke: black + 1pt)
})
]
*Hasse diagram for* $(cal(P)({1,2,3}), subset.eq)$:
#align(center)[
#cetz.canvas({
import cetz.draw: *
// Define node positions as a 3D cube (isometric view)
// Bottom: empty set
let empty = (0, 0)
// Layer 1: single elements (arranged in triangle)
let n1 = (-2, 1.5)
let n2 = (2, 1.5)
let n3 = (0, 2.2)
// Layer 2: pairs (arranged in triangle)
let n12 = (0, 3)
let n13 = (-2, 3.5)
let n23 = (2, 3.5)
// Top: full set
let n123 = (0, 5)
// Draw shaded faces to break optical illusion
// Right face: n2, n12, n123, n23
line(n2, n12, n123, n23, close: true, fill: rgb(200, 200, 255, 100), stroke: none)
// Left face: n1, n12, n123, n13
line(n1, n12, n123, n13, close: true, fill: rgb(255, 200, 200, 100), stroke: none)
// Floor face: empty, n1, n12, n2
line(empty, n1, n12, n2, close: true, fill: rgb(200, 255, 200, 100), stroke: none)
// Draw nodes - bottom layer
circle(empty, radius: 0.3, fill: white, stroke: black + 1pt, name: "empty")
content(empty, [$emptyset$])
circle(n1, radius: 0.3, fill: white, stroke: black + 1pt, name: "n1")
content(n1, [${1}$])
circle(n2, radius: 0.3, fill: white, stroke: black + 1pt, name: "n2")
content(n2, [${2}$])
circle(n3, radius: 0.3, fill: white, stroke: black + 1pt, name: "n3")
content(n3, [${3}$])
// Draw nodes - top layer
circle(n12, radius: 0.3, fill: white, stroke: black + 1pt, name: "n12")
content(n12, [${1,2}$])
circle(n13, radius: 0.3, fill: white, stroke: black + 1pt, name: "n13")
content(n13, [${1,3}$])
circle(n23, radius: 0.3, fill: white, stroke: black + 1pt, name: "n23")
content(n23, [${2,3}$])
circle(n123, radius: 0.3, fill: white, stroke: black + 1pt, name: "n123")
content(n123, [${1,2,3}$])
// Draw edges from empty set to single elements
line("empty.north-west", "n1.south-east", stroke: black + 1pt)
line("empty.north-east", "n2.south-west", stroke: black + 1pt)
line("empty.north", "n3.south", stroke: black + 1pt)
// Draw edges from single elements to pairs
line("n1.north-east", "n12.south-west", stroke: black + 1pt)
line("n1.north", "n13.south", stroke: black + 1pt)
line("n2.north-west", "n12.south-east", stroke: black + 1pt)
line("n2.north", "n23.south", stroke: black + 1pt)
line("n3.north-west", "n13.south-east", stroke: black + 1pt)
line("n3.north-east", "n23.south-west", stroke: black + 1pt)
// Draw edges from pairs to full set
line("n12.north", "n123.south", stroke: black + 1pt)
line("n13.north-east", "n123.south-west", stroke: black + 1pt)
line("n23.north-west", "n123.south-east", stroke: black + 1pt)
})
]
Notice how the structure forms a cube, reflecting the Boolean lattice structure of power sets.
]
= Exercises
== Section 9.5
=== 11
_Show that the relation $R$ consisting of all pairs $(x, y)$ such that $x$ and $y$ are bit strings of length three or more that agree in their first three bits is an equivalence relation on
the set of all bit strings of length three or more_
#solution[
For this we need to show $R$ is reflexive, symmetric and transitive.
+ *Reflexive:* Every bit string in $R$ of length three or more, agrees with itself in the first three bits. Hence $(x,x) in R$ for all $x$.
+ *Symmetric:* For all $a$ and $B$ in $R$ of length three of more that agrees with their first three bits, $a$ agress with $b$ in its first three digits, and also vice verca (because the first three digits are the same).
+ *Transistive:* Same as before, if $a$ and $b$ agree in their first three digits and so does $b$ and $c$, then so does $a$ and $c$ because they must have the same first three digits.
]
=== 30
_What are the equivalence classes of these bit strings for the equivalence relation in Exercise 11?_
/ a): 010
/ b): 1011
/ c): 11111
/ d): 01010101
#solution[
/ a): It would consist of all bit strings starting with $010$. So like $0100001, 010110, 010111, "etc."$
/ b): It would consist of all bit strings starting with $101$.
/ c): It would consist of all bit strings starting with $111$
/ d): Same as a) because here its first three digits are $010$
]
=== 35
_What is the congruence class $[n]_5$ (that is, the equivalence class of $n$ with respect to congruence modulo $5$) when $n$ is:_
/ a): 2?
/ b): 3?
/ c): 6?
/ d): -3?
#solution[
/ a): ${dots, -8, -3, 2, 7, 12, dots}$
/ b): ${dots, -7, -2, 3, 8, 13, dots}$
/ c): ${dots, -9, -4, 1, 6, 11}$
/ d): Samme som a)?
]
=== 45
_Which of these are partitions of the set $ZZ times ZZ$ of ordered pairs of integers?
/ a): the set of pairs $(x, y)$, where $x$ or $y$ is odd; the set of pairs $(x, y)$, where $x$ is even; and the set of pairs $(x, y)$, where $y$ is even
/ b): the set of pairs $(x, y)$, where both $x$ and $y$ are odd; the set of pairs $(x, y)$, where exactly one of $x$ and $y$ is odd; and the set of pairs $(x, y)$, where both $x$ and $y$ are even
/ c): the set of pairs $(x, y)$, where $x$ is positive; the set of pairs $(x, y)$, where $y$ is positive; and the set of pairs $(x, y)$, where both $x$ and $y$ are negative
/ d): the set of pairs $(x, y)$, where $3 divides y$ and $3 divides y$; the set of pairs $(x, y)$, where $3 divides x$ and $3 divides.not y$; the set of pairs $(x, y)$, where $3 divides.not x$ and $3 divides y$; and the set of pairs $(x, y)$, where $3 divides.not x$ and $3 divides.not y$
/ e): the set of pairs $(x, y)$, where $x > 0$ and $y > 0$; the set of pairs $(x, y)$, where $x > 0$ and $y ≤ 0$; the set of pairs $(x, y)$, where $x ≤ 0$ and $y > 0$; and the set of pairs $(x, y)$, where $x ≤ 0$ and $y ≤ 0$
/ f): the set of pairs $(x, y)$, where $x eq.not 0 $and $y eq.not 0$; the set of pairs $(x, y)$, where $x = 0$ and $y eq.not 0$; and the set of pairs $(x, y)$, where $x eq.not 0$ and $y eq.not 0$
_
#solution[
For them to be partitions, they need to uphold:
+ Every element $a in S$ belongs to exactly one equivalence class $[a]_tilde$.
+ The equivalence classes are pairwise disjoint: if $[a]_tilde eq.not [b]_tilde$, then $[a]_tilde inter [b]_tilde = emptyset$.
+ The union of all equivalence classes equals $S$.
/ a): Not this one as there is an intersection between the sets (when $x$ is even, and $y$ is odd. This set is in the first two)
/ b): This is a partition, as there is no overlap between them (you have three sets containing only even x and y, only odd x and y, and all the other cases where one of x and y is odd).
/ c): Not this one, as the set of pairs where $x$ is positive can contain positive $y$, so there's overlap.
/ d): This is a partition, same reason as b).
/ e): This is a partition, same reason as b)
]
=== 1
=== 7
== Section 9.6
=== 3
_ Is $(S, R)$ a poset if $S$ is the set of all people in the world
and $(a, b) in R$, where $a$ and $b$ are people, if
/ a): $a$ is taller than $b$?
/ b): $a$ is not taller than $b$?
/ c): $a = b$ or $a$ is an ancestor of $b$?
/ d): $a$ and $b$ have a common friend?
_
#solution[
For this to be true it needs to follow:
+ *Reflexive:* $forall a in S, a R a$
+ *Antisymmetric:* $forall a, b in S$, if $a R b$ and $b R a$ then $a = b$
+ *Transitive:* $forall a, b, c in S$, if $a R b$ and $b R c$ then $a R c$
/ a): This isn't reflective as $a$ is not taller than $a$
/ b): This is reflective, for the reason as in a). This wouldn't be antisymmetric as people can exist that are the exact same height.
/ c): This is reflective. This is also antisymmetric as the only way for $a R b$ and $b R a$ is if the first condition of $a = b$ is met. This would also be transitive as if $a$ is an ancestor of $b$, who is an ancestor of $c$, then $a$ is also an ancestor of $c$.
/ d): This is reflective as your friends are all common friends with yourself. This wouldn't be antisymmetric as when you have a common friend with someone, they also have that same common friend with you
]
=== 19
_Find the lexicographic ordering of the bit strings $0, 01, 11, 001, 010, 011, 0001, "and" 0101$ based on the ordering $0 < 1$._
#solution[
$0<0001<001<01<010<0101<011<11$
]
=== 33
_Answer these questions for the poset $({3, 5, 9, 15, 24, 45}, divides)$.
/ a): Find the maximal elements.
/ b): Find the minimal elements.
/ c): Is there a greatest element?
/ d): Is there a least element?
/ e): Find all upper bounds of ${3, 5}$.
/ f): Find the least upper bound of ${3, 5}$, if it exists.
/ g): Find all lower bounds of ${15, 45}$.
/ h): Find the greatest lower bound of ${15, 45}$, if it exists.
_
#solution[
The poset would include ${(3, 9), (3, 15), (3,24), (3,45), (5,15), (5,45), (9,45)}$
/ a): 24 and 45. They can't divide any number.
/ b): 3 and 5. They arent divisible by any number.
/ c): No. The closest would be 45, but it isnt divisible by 24.
/ d): No. The closest would be 3, but it doesnt divide 5.
/ e): $(15, 45)$
/ f): 15
/ g): $(3,5, 15)$
/ h): 15
]
=== 1
=== 15
=== 20