commit allerede lavet opgaver

This commit is contained in:
2025-11-26 15:37:45 +01:00
parent e1a4e65d59
commit ed10a5c1b9
51 changed files with 1038 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,97 @@
#import "@preview/cetz:0.4.0"
#import "@preview/cetz-venn:0.1.4"
#image("Opgaver 18-09-25-image.png")
#image("Opgave 2.2-27.png")
a) ${4,6}$
b) ${0,1,2,3,4,5,6,7,8,9,10}$
c) ${4,5,6,7,8,10}$
d) ${0,2,4,5,6,7,8,9,10}$
#image("opgave 2.2-29.png")
#cetz.canvas({
cetz-venn.venn3(
name: "venn1",
ab-fill: blue.lighten(60%),
stroke: black + 1pt
)
import cetz.draw: *
content("venn1.a", [A], size: 14pt)
content("venn1.b", [B], size: 14pt)
content("venn1.c", [C], size: 14pt)
content((0, -3), [$A inter (B - C)$: Only the AB region (excluding ABC)], size: 12pt)
})
#cetz.canvas({
cetz-venn.venn3(
name: "venn2",
ab-fill: green.lighten(60%),
ac-fill: green.lighten(60%),
abc-fill: green.lighten(40%),
stroke: black + 1pt
)
import cetz.draw: *
content("venn2.a", [A], size: 14pt)
content("venn2.b", [B], size: 14pt)
content("venn2.c", [C], size: 14pt)
content((0, -3), [$(A inter B) union (A inter C)$: All regions where A overlaps with B or C], size: 12pt)
})
#cetz.canvas({
cetz-venn.venn3(
name: "venn3",
a-fill: orange.lighten(60%),
ab-fill: orange.lighten(50%),
ac-fill: orange.lighten(50%),
abc-fill: orange.lighten(40%),
stroke: black + 1pt
)
import cetz.draw: *
content("venn3.a", [A], size: 14pt)
content("venn3.b", [B], size: 14pt)
content("venn3.c", [C], size: 14pt)
content((0, -3), [$(A union B) inter (A union C) = A union (B inter C)$ (distributive law)], size: 12pt)
})
#image("Opgave 2.2-35.png")
We can use De morgans laws, which states: $dash(A union B)= dash(A) inter dash(B)$. We use that on the 3 parentheses.
$
dash((A union B)) inter dash((B union C)) inter dash((A union C))<=>\
(dash(A)inter dash(B)) inter (dash(B) inter dash(C)) inter (dash(A) inter dash(C)) <=> \
"We know because of the distributive laws, that in our case, the parenthases dont matter, so:"\
dash(A) inter dash(B) inter dash(B) inter dash(C) inter dash(A) inter dash(C) <=> \
"We can remove dupplicates:"\
dash(A)inter dash(B) inter dash(C)
$
#image("Opgave 2.2-47-prerequisits.png")
#image("Opgave 2.2-47.png")
Yes. If A contained an element that B did not, it would mean $A plus.circle B$ now contains elements not in $B plus.circle C$ because A has an extra element not in C, so it is in $A plus.circle C$, but since B does not contain it, it is not in $B plus.circle C$. A and B must also contain the same elements of C, since if they did not, no matter what $A plus.circle C = B plus.circle C$ would not be true.
#image("opgave 2.3-9g.png")
$floor(1/2+ceil(3/2))<=>\ floor(1/2+2)=floor(2.5)=2$
#image("opgave 2.3-21.png")
a) $f(x)=2|x|+x$ - It will always be a positive even integer minus x.
b) $f(x)=|x|$ - All positive integers are mapped to an integer, but they are all mapped to two.
c) $underbracket(f\: ZZ arrow ZZ^+, f(x) = cases(2x "if" x > 0, -2x + 1 "if" x <= 0))$
d) $f(x)=x^2$
#image("opgave 2.3-27.png")
a) For a strictly decreasing function we know: $x>y=>f(x)>f(y) space forall x,y in A$, which means that two for two different x and y, f(x) and f(y) must be different.
b) $f(x)=cases(x "if" x>=0,-1 "if" x<=0)$
#image("opgave 2.3-73.png")
#image("opgave 2.3-73a.png")
If one of $f_(A)(x) "or" f_(B)(x)$ is 0, then $f_(A inter B)(x)$ must be 0 because of the $inter$. $f_(A)(x) dot f_(B)(x)$ must also be 0 because then you are multiplying with 0, which will always be 0.

View File

@@ -0,0 +1,169 @@
=== Union of 2 sets
Def: Let A and B be sets. The Union of A and B, denoted by $A union B$, is the set that contains every element in either A or B or both.
$ A union B={x|x in A or x in B} $
The order of the operation doesn't matter
#image("union-of-a-and-b.png", width: 50%)
=== Intersections
Def: Let A and B be sets. The intersection of A and B, denoted by $A inter B$, is the set containing those elements, that are in both A and B.
$ A inter B = {x|x in A and x in B} $
The order of the operation doesn't matter
#image("intersection.png",width: 50%)
=== Disjoint
Def. A and B are disjoint if $A inter B =nothing$, aka they don't have any elements in common.
=== Size of elements in two sets
If A and B are finite sets, then: $ |A union B| = |A| + |B| - |A inter B| $
To get size of the elements in the sets, you need to add their size together, and then subtract all the elements they have in common.
=== Difference
Def: Let A and B be sets. The Difference of A and B, denoted $A-B$, is the set containing those elements of A that are not in B. $ A-B={x|x in A and x in.not B} $
Sometimes also denoted $A\\B$
#image("difference-a-b.png",width: 50%)
If $A-B=nothing$. Either $A=B$ or $A subset B$ (A is a subset of B).
=== Complement
Everything that is not in the set. But you need a universal set (in the pictures, the rectangle is the universal set).
Def: Let U be the universal set. The complement of the set A, denoted by $macron(A)$, is the containing all the elements of U that are not in A. $macron(A)=U-A$
#image("complement.png",width: 50%)
Example.
$
U=NN,space space space A&={1,3,5,7,...}\
dash(A)&={0,2,4,6,...}\
U=ZZ, space space space dash(A)&={...,-2,-1,0,2,4,...}
$
=== Set identities
#image("set-identities.png",width: 75%)
Prove: $dash(A union B) = dash(A) union dash(B)$
$ x in dash(A union B) <=>\
x in.not A union B <=> \
x in.not A and x in.not B <=>\
x in dash(A) and x in dash(B) <=> \
x in dash(A) union dash(B) $
If x is in the complement of the union of A and B, then it must not be in the union of A and B. In other words, it is not in either A or B. This can be written as x being in the complement of A and the complement of B. This can be then be written as x is in the union of the complement of A and the complement of B.
Prove: $dash(A union (B inter C))=(dash(C) union dash(B)) inter dash(A)$
$
dash(A union (B inter C)) <=>\
dash(A) inter (dash(B union C)) <=>\
dash(A) inter (dash(B) union dash(C))
$
== Unions and intersections of an arbitrary number of sets
$union_(i=1)^(arrow.ccw.half)A_i={x|exists space i in {1,dots,b} text("such that") x in A_i}$
$inter_(i=1)^(arrow.ccw.half)A_i={x|forall space i in {1,dots,n} text("such that") x in A_i}$
$union_(i=1)^(infinity)A_i={x|exists space i in ZZ^+ text("such that") x in A_i}$
$inter_(i=1)^(infinity)A_i={x|forall space i in ZZ^+ text("such that") x in A_i}$
Example:
$A_i={1,2,3,dots,i}, A_1={1}, A_2={1,2}$
$union^(infinity)_(i=1)A_i=ZZ^+, inter_(i=1)^(infinity)A_i={1}$
= Functions
Def: Let A and B be nonempty sets. A function _f_ from A to B is an assignment of exactly one element of B to each element of A. We write $f(a)=b$ if b is the element of B that _f_ assigns to _a_.
We write $f: A->B$ to denote that _f_ is a function from A to B.
$(a,f(a))in A times B$
Def: Let $f:A->B$
*Domain* of _f_ is A
*Codomain* of _f_ is B
If $f(a)=b$, then b is the *image* of _a_ under _f_, and _a_ is a *preimage* of _b_. For every _a_ it matches a single _b_.
*Range/Image* of _f_ the set of all images
Example: $A={a,b,c,d}, space B={1,2,3,4}, space f:A->B$
$f(a)=1,space f(b)=2,space f(c)=3,space f(d)=4$
*Real-valued function* means that $text("codomain")=RR$ (real number)
*Integer-valued function* means that $text("codomain")=ZZ$ (integers)
== Sum
Def: let $f_1 text("and") f_2$ be realvalued functions from A, then $f_1+f_2 text("and") f_1f_2$ are functions from A to $RR$ defined as: $ (f_1+f_2)(x)=f_1(x)+f_2(x)\ f_1f_2(x)=f_1(x)f_2(x) $
*Example:*
$f_1,f_2:RR->RR space f_1(x)=x^2, space f_2(x)=x-x^2$
$ (f_1+f_2)(x)=x\ f_1f_2(x)=x^3-x^4 $
*Def:* Let $f:A->B$. IF $S subset.eq A$, then the image of S under f, denoted $f(S)$ is the set ${b in B|exists a in S text("such that") f(a)=b}$
Example: $f:RR->RR space f(x)=x^2$
$S={-1,0,1}\ f(S)={0,1}$
== Injectivity and Surjectivity
#image("Different correspondence.png")
=== Injectivity
Def: A function $f:A->B$ is one-to-one/injective/an injection if $f(x)=f(y)=>x=y, forall x,y in A$. Two elements in the domain, cannot match to the same element in the codomain.
$x!=y=>f(x)=>f(y)$.
*Example*
$f:ZZ->ZZ space f(x)=x^2$
This is not injective as for example both -1 and 1 give the same answer.
$f:NN->ZZ space f(x)=x^2$ would be injective as you now only have positive x.
~
*Def:* Let $f:A->B text("such that") A,B subset.eq RR$. Then _f_ is increasing if $x<=y=>f(x)<=f(y) space forall x,y in A$.
It would be strictly increasing if $x<y=>f(x)<f(y) space forall x,y in A$. And this would be the same for decreasing, only the opposite of course.
A strictly increasing function implies that the function is injective
=== Surjectivity
Def: A function $f:A->B$ is surjective/onto/a surjection if $forall b in B, exists a in A "such that" f(a)=b$. For every element in the codomain, there exists an element in the domain that matches to it.
Example: $f:ZZ->ZZ space f(x)=x-1$
Let $k in ZZ, "then" k+1 in ZZ "and" f(k+1)=k+1-1=k$.
$f:NN->NN space f(x)=2x$ would not be surjective because the uneven numbers in the codomain would not have an element in the domain matched to them. $f:ZZ->ZZ space f(x)=2x$ would be surjective because for every real number, half that number would still be a real number, so every element in the codomain would have an element in the domain that matches it.
=== Bijection
Def: A function is a bijection/one-to-one correspondence if it is both injective and surjective
Suppose $f:A->B$
To show that f is _injective_: show if $f(x)=f(y), "then" x=y space("for arbitrary" x,y in A)$
To show that it's not _injective_: Find a particular $x,y in A "such that" x!=y "and" f(x)=f(y)$
To show that f is _surjective_: Consider arbitrary $b in B, "and show" exists a in A "such that" f(a)=b$
To show that it's not _surjective_: Find a particular $b in B "such that" exists.not a in A "with" f(a)=b$
== Inverse
Def: Let $f:A->B$ be a bijection. The inverse function of _f_, denoted $f^(-1)$, is the function from B to A that assigns to $b in B$ the unique element $a in A "such that" f(a)=b$. Note: $f^(-1)!=1/f$.
== Composition
Let $f:A->B, space g:B->C$
$ g compose f: A->C\ f compose g(a)=g(f(a)) $
=== Floor function
Largest integer that is less than or equal to x
=== Ceiling function
Smallest integer that is greater than or equal to x

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB