mirror of
https://github.com/2martens/uni.git
synced 2026-05-07 03:46:25 +02:00
Compare commits
45 Commits
ad_blatt_4
...
gdb_blatt_
| Author | SHA1 | Date | |
|---|---|---|---|
| 81ab70be51 | |||
| 0fffc90b0a | |||
| 1d73f91c43 | |||
| 3fa88e27c0 | |||
| 7099956376 | |||
| 7e451ae325 | |||
| 209596e423 | |||
| 6a532d59e0 | |||
| 599b0032cc | |||
| 9460a78c84 | |||
| 19c73063e5 | |||
| dacea16e20 | |||
| 1f3c4a224c | |||
| 07b2f40077 | |||
| f7f0ddff76 | |||
| 3d3fad0958 | |||
| d4bbd0819f | |||
| c2b78301f7 | |||
| 54cfa7594d | |||
| 210e0402d8 | |||
| 57d70e469c | |||
| f4af6e159c | |||
| 1d4cd3392a | |||
| e6025ac530 | |||
| 7dd2da6e74 | |||
| dad77a8dff | |||
| d013e0533e | |||
| 5bdf5a2487 | |||
| f5e1a36683 | |||
| 6507d7a749 | |||
| eb6256a57f | |||
| a324b8291d | |||
| 6afc457d64 | |||
| f768bb15bf | |||
| f589ab47c7 | |||
| 2b0d06f6ea | |||
| 300490a93b | |||
| abf82e25d7 | |||
| d7c4eed8f1 | |||
| 36556eb9b4 | |||
| a051729612 | |||
| 3b2a28a11d | |||
| 9913b6fc95 | |||
| 7818e3b603 | |||
| 88562703a2 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,6 +26,7 @@
|
||||
*.pdf
|
||||
*.pdfsync
|
||||
*.ps
|
||||
*.pyg
|
||||
*.snm
|
||||
*.synctex.gz
|
||||
*.toc
|
||||
|
||||
300
ad/AD-Gruppe_8_Koehler_Krabbe_Martens_Blatt5.tex
Normal file
300
ad/AD-Gruppe_8_Koehler_Krabbe_Martens_Blatt5.tex
Normal file
@ -0,0 +1,300 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{bytefield}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usepackage{algorithm}
|
||||
\usepackage{algorithmic}
|
||||
\usepackage{minted}
|
||||
\usetikzlibrary{automata,matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{(\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
|
||||
\begin{document}
|
||||
\author{Reinhard Köhler (6425686), Tronje Krabbe (6435002), \\
|
||||
Jim Martens (6420323)}
|
||||
\title{Hausaufgaben zum 4. Dezember}
|
||||
\subtitle{Gruppe 8}
|
||||
\maketitle
|
||||
|
||||
\section{} %1
|
||||
Dieser folgende Pseudocode beschreibt eine leichte Abänderung, die vorzeitig abbricht, wenn sich nach einem kompletten Durchlauf aller Kanten nichts geändert hat. Nach $m$ Durchläufen hat der Algorithmus alle kürzeste Pfade mit maximal $m$ Kanten entdeckt. In einem weiteren Durchlauf wird sich dann nichts mehr ändern, da keine neuen kürzesten Pfade mehr gefunden werden können, wodurch die geänderte Variante abbricht. Um die Abbruchbedingung zu erreichen muss $m$ nicht bekannt sein, da nach $m+1$ Durchläufen die Abbruchbedingung immer gegeben ist.
|
||||
\begin{minted}{python}
|
||||
function BellmanFord(G,s)
|
||||
InitializeSingleSource(G,s)
|
||||
for i = 1, ... |V| - 1
|
||||
changed = false
|
||||
for all edges (u,v) in E
|
||||
changedTmp = Relax(u,v)
|
||||
if (!changed)
|
||||
changed = changedTmp
|
||||
if (!changed)
|
||||
break
|
||||
for all edges (u,v) in E
|
||||
if v.dist > u.dist + w(u,v)
|
||||
return false
|
||||
return true
|
||||
\end{minted}
|
||||
% \begin{verbatim}
|
||||
% function BellmanFord(G,s)
|
||||
% InitializeSingleSource(G,s)
|
||||
% for i = 1, ... |V| - 1
|
||||
% changed = false
|
||||
% for all edges (u,v) in E
|
||||
% changedTmp = Relax(u,v)
|
||||
% if (!changed)
|
||||
% changed = changedTmp
|
||||
% if (!changed)
|
||||
% break
|
||||
% for all edges (u,v) in E
|
||||
% if v.dist > u.dist + w(u,v)
|
||||
% return false
|
||||
% return true
|
||||
% \end{verbatim}
|
||||
\section{} %2
|
||||
\begin{minted}{python}
|
||||
function DAG-SP(G,s)
|
||||
sort vertices topologically
|
||||
InitializeSingleSource(G,s)
|
||||
for each u in V in topological sort order
|
||||
for each v in Adj(u)
|
||||
Relax(u,v)
|
||||
\end{minted}
|
||||
% \begin{verbatim}
|
||||
% function DAG-SP(G,s)
|
||||
% sort vertices topologically
|
||||
% InitializeSingleSource(G,s)
|
||||
% for each u in V in topological sort order
|
||||
% for each v in Adj(u)
|
||||
% Relax(u,v)
|
||||
% \end{verbatim}
|
||||
\section{} %3
|
||||
Wir wissen, dass der Dijkstra-Algorithmus für rein positive Kantengewichte funktioniert. Es bleibt also nur zu zeigen, dass die kürzesten Wege zu den Knoten korrekt berechnet werden, die eine Kante von dem Startknoten entfernt sind. Ferner ist bekannt, dass Dijkstra zuerst den Knoten besucht, der am billigsten zu erreichen ist. Damit geht der Algorithmus die Kante mit dem kleinsten Gewicht zu erst (einschließlich negative Gewichte). Der somit erreichte Knoten kann also gar nicht billiger zu erreichen sein, da jeder andere Pfad dorthin aus mindestens zwei Kanten besteht, die zusammen bestenfalls das gleiche Gewicht haben wie die gegangene Kante.
|
||||
|
||||
Dies ist so, da die erste Kante vom Startknoten zu einem anderen Knoten minimal so klein sein kann, wie die zuerst gegangene Kante, da andernfalls die zuerst gegangene Kante nicht das geringste Gewicht gehabt hätte. Die zweite Kante muss mindestens 0 als Gewicht haben, womit nur ein gleich großes oder größeres Gesamtgewicht entstehen kann, als durch die zuerst gegangene Kante verwendet wurde.
|
||||
\section{} %4
|
||||
\subsection{} %a
|
||||
In einem Baum gibt es keine Zyklen. Daher gibt es genau einen direkten Weg (ohne Umwege mit mehrmaligem Besuchen eines Knotens) zu jedem Knoten von dem Wurzelknoten aus. Demnach müssen einfach vom Wurzelknoten aus alle Knoten besucht werden. Dabei wird ähnlich wie in der Breitensuche vorgegangen, indem zunächst alle Knoten, die direkt mit dem Wurzelknoten per Kante verbunden sind, besucht werden und anschließend alle Knoten, die zwei Kanten vom Wurzelknoten entfernt sind, etc. Dabei wird eine Variable zu Beginn auf 0 gesetzt und bei jedem Knoten wird geschaut, ob seine Entfernung zum Wurzelknoten größer ist als diese Variable. Wenn dem so ist, dann wird die Variable entsprechend angepasst. Nach einmaligem Besuchen jedes Knotens hat man damit die längste Entfernung eines Knotens von dem Wurzelknoten ermittelt.
|
||||
|
||||
In Pseudocode sieht das dann so aus:
|
||||
|
||||
\begin{minted}{python}
|
||||
function berechneDurchmesser(G)
|
||||
longestPath = 0
|
||||
current = G.root
|
||||
queue.enqueue(current.getChilds())
|
||||
while (!empty(queue))
|
||||
current = queue.dequeue()
|
||||
parent = current.parent
|
||||
distance = parent.getDistance() + w(parent,current)
|
||||
current.setDistance(distance)
|
||||
if (distance > longestPath)
|
||||
longestPath = distance
|
||||
|
||||
childs = current.getChilds()
|
||||
if (!empty(childs))
|
||||
queue.enqueue(current.getChilds())
|
||||
\end{minted}
|
||||
% \begin{verbatim}
|
||||
% function berechneDurchmesser(G)
|
||||
% longestPath = 0
|
||||
% current = G.root
|
||||
% queue.enqueue(current.getChilds())
|
||||
% while (!empty(queue))
|
||||
% current = queue.dequeue()
|
||||
% parent = current.parent
|
||||
% distance = parent.getDistance() + w(parent,current)
|
||||
% current.setDistance(distance)
|
||||
% if (distance > longestPath)
|
||||
% longestPath = distance
|
||||
|
||||
% childs = current.getChilds()
|
||||
% if (!empty(childs))
|
||||
% queue.enqueue(current.getChilds())
|
||||
% \end{verbatim}
|
||||
\subsection{} %b
|
||||
\begin{minted}{python}
|
||||
def Durchmesser(G):
|
||||
laengsterWeg = 0
|
||||
for v1 in G.kanten:
|
||||
for v2 in G.kanten with v1 != v2:
|
||||
P = findeKuerzestenWeg(v1, v2)
|
||||
if P.laenge() > laengsterWeg:
|
||||
laengsterWeg = P.laenge()
|
||||
return laengsterWeg
|
||||
\end{minted}
|
||||
% \begin{verbatim}
|
||||
% Diam(G)
|
||||
% longestPath = 0
|
||||
% for each v1 in G.vertices
|
||||
% for each v2 in G.vertices with v1 != v2
|
||||
% find shortest path P from v1 to v2
|
||||
% if P.length > longestPath
|
||||
% longestPath = P.length
|
||||
% return longestPath
|
||||
% \end{verbatim}
|
||||
|
||||
Die Laufzeit dieses Algorithmus beträgt $\mathcal{O}(|V|^3)$.
|
||||
\section{} %5
|
||||
\subsection{} %a
|
||||
Man konstruiert einen vollständigen Graphen aus der Matrix, in welchem die Knoten Währungen repräsentieren, und als Kantengewichte die Werte verwendet werden.
|
||||
Gibt es nun in diesem Graphen einen Zyklus, in dem das Produkt aller Kantengewichte ungleich 1 ist, existiert Währungsarbitrage. Ansonsten ist dies nicht der Fall.
|
||||
\subsection{} %b
|
||||
Nein, unsere Lösung kann nicht zu negativen Zyklen führen, denn dafür müssten negative Werte in der Matrix vorhanden sein.
|
||||
Würden solche Zyklen existieren, bedeuteten sie, man verliere all sein Geld bei einem Tausch, und müsste außerdem eine Strafe zahlen.
|
||||
\section{} %6
|
||||
\begin{tikzpicture}[shorten >=1pt,node distance=1.1cm]
|
||||
\node[state] (s) {s};
|
||||
\node[state] (a) [above right=1.5 and 1.0 of s] {A};
|
||||
\node[state] (b) [below right=1.5 and 1.0 of s] {B};
|
||||
\node[state] (d) [above right=1.0 and 1.0 of a] {D};
|
||||
\node[state] (c) [right=of a] {C};
|
||||
\node[state] (f) [below right=1.0 and 1.25 of a] {F};
|
||||
\node[state] (e) [right=1.0 of c] {E};
|
||||
\node[state] (g) [right=of f] {G};
|
||||
|
||||
\path[every node/.style={font=\scriptsize},->]
|
||||
(s) edge node [above] {30} (a)
|
||||
(s) edge node [below] {18} (b)
|
||||
(a) edge node [above] {21} (c)
|
||||
(a) edge node [above] {38} (d)
|
||||
(a) edge node [below] {22} (f)
|
||||
(c) edge node [right] {22} (f)
|
||||
(c) edge node [above] {20} (e)
|
||||
(f) edge node [above] {9} (g)
|
||||
(b) edge node [left] {30} (a);
|
||||
\end{tikzpicture}
|
||||
|
||||
Da dies ein gerichteter Graph ohne Zyklen ist und auch keine negativen Kantengewichte vorkommen, kann der Dijkstra-Algorithmus angewendet werden. Da von 9 bis 17 Uhr Fahrer bezahlt werden müssen, kommen nur die Pfade in Betrachtung, die zu einer Senke führen. Senken sind D, E und G. Derjenige dieser Knoten welcher als erster vom Algorithmus gefunden wird (über den eindeutig bestimmbaren Weg), ist auch der kürzeste Pfad vom Startknoten aus, der die Bedingungen erfüllt.
|
||||
|
||||
Es ergibt sich folgende Abfolge:
|
||||
\begin{verbatim}
|
||||
S = {s}
|
||||
d(s) = 0
|
||||
while 1.
|
||||
U = {A, B}
|
||||
for all u in U -> u = A
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = s
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 0 + 30
|
||||
for all u in U -> u = B
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = s
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 0 + 18
|
||||
u* = B
|
||||
d(u*) = 18
|
||||
S = {s, B}
|
||||
while 2.
|
||||
U = {A}
|
||||
for all u in U -> u = A
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = s
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 0 + 30
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = B
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 18 + 30
|
||||
u* = A
|
||||
d(u*) = 30
|
||||
S = {S, B, A}
|
||||
while 3.
|
||||
U = {D, C, F}
|
||||
for all u in U -> u = D
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 38
|
||||
for all u in U -> u = C
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 21
|
||||
for all u in U -> u = F
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 22
|
||||
u* = C
|
||||
d(u*) = 51
|
||||
S = {s, B, A, C}
|
||||
while 4.
|
||||
U = {D, F, E}
|
||||
for all u in U -> u = D
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 38
|
||||
for all u in U -> u = F
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 22
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = C
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 51 + 22
|
||||
for all u in U -> u = E
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = C
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 51 + 20
|
||||
u* = F
|
||||
d(u*) = 52
|
||||
S = {s, B, A, C, F}
|
||||
while 5.
|
||||
U = {D, E, G}
|
||||
for all u in U -> u = D
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 38
|
||||
for all u in U -> u = E
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = C
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 51 + 20
|
||||
for all u in U -> u = G
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = F
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 52 + 9
|
||||
u* = G
|
||||
d(u*) = 61
|
||||
S = {s, B, A, C, F, G}
|
||||
while 6.
|
||||
U = {D, E}
|
||||
for all u in U -> u = D
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = A
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 30 + 38
|
||||
for all u in U -> u = E
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = C
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 51 + 22
|
||||
u* = D
|
||||
d(u*) = 68
|
||||
S = {s, B, A, C, F, G, D}
|
||||
while 7.
|
||||
U = {E}
|
||||
for all u in U -> u = E
|
||||
for all pre(u) in S that are predecessors of u -> pre(u) = C
|
||||
d'(u, pre(u)) = d(pre(u)) + w(pre(u), u)
|
||||
d'(u, pre(u)) = 51 + 20
|
||||
u* = E
|
||||
d(u*) = 71
|
||||
S = {s, B, A, C, F, G, D, E}
|
||||
\end{verbatim}
|
||||
|
||||
Wie zu sehen ist wird die Senke G zuerst erreicht. Folgt man dem Weg zu G, so ergibt sich, dass der kürzeste Pfad von s über A und F nach G führt. Weniger Kosten als 61 sind daher nicht möglich.
|
||||
\end{document}
|
||||
206
ad/AD-Gruppe_8_Koehler_Krabbe_Martens_Blatt6.tex
Normal file
206
ad/AD-Gruppe_8_Koehler_Krabbe_Martens_Blatt6.tex
Normal file
@ -0,0 +1,206 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{bytefield}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage{textcomp}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usepackage{algpseudocode}
|
||||
\usepackage{algorithm}
|
||||
%\usepackage{algorithmic}
|
||||
%\usepackage{minted}
|
||||
\usetikzlibrary{automata,matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{(\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
|
||||
\begin{document}
|
||||
\author{Reinhard Köhler (6425686), Tronje Krabbe (6435002), \\
|
||||
Jim Martens (6420323)}
|
||||
\title{Hausaufgaben zum 15. Januar}
|
||||
\subtitle{Gruppe 8}
|
||||
\maketitle
|
||||
|
||||
\section{} %1
|
||||
\subsection{} %a
|
||||
\begin{tabular}{c|c|c|c|c|c|c|c|c}
|
||||
EXTRACT & 1 & 2 & 3 & 4 & 5 & 6 & 7 &\\
|
||||
\hline
|
||||
- & 0 & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & $\infty$ & (v.dist) \\
|
||||
& - & - & - & - & - & - & - & (v.$\pi$) \\
|
||||
\hline
|
||||
1 & 0 & 4 & $\infty$ & $\infty$ & $\infty$ & 5 & $\infty$ & \\
|
||||
& - & 1 & - & - & - & 1 & - & \\
|
||||
\hline
|
||||
2 & 0 & 4 & 14 & $\infty$ & $\infty$ & 5 & 7 & \\
|
||||
& - & 1 & 2 & - & - & 1 & 2 & \\
|
||||
\hline
|
||||
6 & 0 & 4 & 14 & $\infty$ & 14 & 5 & 7 & \\
|
||||
& - & 1 & 2 & - & 6 & 1 & 2 & \\
|
||||
\hline
|
||||
7 & 0 & 4 & 13 & $\infty$ & 10 & 5 & 7 & \\
|
||||
& - & 1 & 7 & - & 7 & 1 & 2 & \\
|
||||
\hline
|
||||
5 & 0 & 4 & 12 & 15 & 10 & 5 & 7 & \\
|
||||
& - & 1 & 5 & 5 & 7 & 1 & 2 & \\
|
||||
\hline
|
||||
3 & 0 & 4 & 12 & 14 & 10 & 5 & 7 & \\
|
||||
& - & 1 & 5 & 3 & 7 & 1 & 2 & \\
|
||||
\hline
|
||||
4 & 0 & 4 & 12 & 14 & 10 & 5 & 7 & \\
|
||||
& - & 1 & 5 & 3 & 7 & 1 & 2 &
|
||||
\end{tabular}
|
||||
|
||||
Der kürzeste Pfad von 1 nach 4 verläuft über 2, 7, 5 und 3 nach 4. Insgesamt kostet der Pfad 14.
|
||||
\subsection{} %b
|
||||
In $G_{2}$ ist 3 die Quelle.
|
||||
|
||||
\begin{tabular}{c|c|c|c|c|c|c|c|c}
|
||||
EXTRACT & 3 & 1 & 2 & 4 & 5 &\\
|
||||
\hline
|
||||
- & 0 & $\infty$ & $\infty$ & $\infty$ & $\infty$ & (v.dist) \\
|
||||
& - & - & - & - & - & (v.$\pi$) \\
|
||||
\hline
|
||||
3 & 0 & $\infty$ & 9 & 4 & $\infty$ & \\
|
||||
& - & - & 3 & 3 & - & \\
|
||||
\hline
|
||||
4 & 0 & 5 & 8 & 4 & 6 & \\
|
||||
& - & 4 & 4 & 3 & 4 & \\
|
||||
\hline
|
||||
1 & 0 & 5 & 8 & 4 & 6 & \\
|
||||
& - & 4 & 4 & 3 & 4 & \\
|
||||
\hline
|
||||
5 & 0 & 1 & 8 & 4 & 6 & \\
|
||||
& - & 5 & 4 & 3 & 4 & \\
|
||||
\end{tabular}
|
||||
|
||||
Durch die negative Kante von 5 nach 1, würde sich der kürzeste Pfad von 1 von 5 auf 1 ändern, was jedoch nicht geht, da 1 bereits besucht wurde. Daher liefert Dijkstra für das Single-Source-Shortest-Path Problem in $G_{2}$ ein falsches Ergebnis.
|
||||
\section{} %2
|
||||
\begin{algorithm}
|
||||
\caption{Relax}
|
||||
\begin{algorithmic}[1]
|
||||
\Procedure{Relax}{$u,v$}
|
||||
\State $maxWeight \gets max(u.maxWeight, w(u,v))$
|
||||
\If{$maxWeight < v.maxWeight$}
|
||||
\State $v.maxWeight \gets w(u,v)$
|
||||
\State $v.\pi \gets u$
|
||||
\EndIf
|
||||
\EndProcedure
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
|
||||
\begin{algorithm}
|
||||
\caption{Initialize single source}
|
||||
\begin{algorithmic}[1]
|
||||
\Procedure{InitializeSingleSource}{$G,s$}
|
||||
\ForAll{$v \in V$}
|
||||
\State $v.maxWeight \gets \infty$
|
||||
\State $v.\pi \gets NIL$
|
||||
\EndFor
|
||||
\State $s.maxWeight \gets 0$
|
||||
\EndProcedure
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
|
||||
\begin{algorithm}
|
||||
\caption{Dijkstra für leichtest mögliche schwerste Kanten}
|
||||
\begin{algorithmic}[1]
|
||||
\Procedure{Dijkstra}{$G,w,s$}
|
||||
\State $\Call{InitializeSingleSource}{G,s}$
|
||||
\State $Q \gets (V, V.maxWeight)$\Comment{ordered by the maximum weight (edge with highest weight) per path in ascending order}
|
||||
\While{$Q \neq \emptyset$}
|
||||
\State $u \gets \Call{Extract}{Q}$
|
||||
\ForAll{v adjacent to u}
|
||||
\State $\Call{Relax}{u,v}$ and update the keys in Q accordingly
|
||||
\EndFor
|
||||
\EndWhile
|
||||
\EndProcedure
|
||||
\end{algorithmic}
|
||||
\end{algorithm}
|
||||
\section{} %3
|
||||
\subsection{} %a
|
||||
Es sei $B(k)$ die in der Aufgabenstellung formulierte Behauptung in Abhängigkeit von $k$.
|
||||
|
||||
\textbf{Behauptung}\\ $B(k)$ gilt für alle $k \in \mathbb{N}_{\geq 0}$.
|
||||
|
||||
\textbf{Induktionsanfang}\\ Zu Zeigen: Es gilt $B(0)$.
|
||||
|
||||
$A^0$ ist die Einheitsmatrix $E$. Ein Eintrag in $E$ ist genau dann 1, wenn er auf der Hauptdiagonalen liegt, andernfalls ist er 0.
|
||||
Das bedeutet, dass es über 0 Kanten jeweils genau einen Pfad von einem Knoten $i$ zu einem Knoten $j$ gibt, wenn $i = j$ gilt. Bei 0 Kanten sind
|
||||
dies genau die Pfade, die in einem beliebigen Graphen möglich sind, da ein Weg zu einem anderen Knoten über mindestens eine Kante gehen würde.
|
||||
Die Matrix $A^0$ ist also korrekt und $B(0)$ gilt.
|
||||
|
||||
\textbf{Induktionsschritt} Wir nehmen an, dass $B(k)$ gilt. Zu zeigen ist, dass daraus $B(k+1)$ folgt.
|
||||
|
||||
Sei $X$ eine Matrix, die erfüllt, dass jeder Eintrag $X[i,j]$ die Anzahl der verschiedenen Pfade vom Knoten $i$ über $k+1$ Kanten zum Knoten $j$ repräsentiert.
|
||||
Nun ist zu zeigen, dass $X=A^{k+1}$ gilt.
|
||||
|
||||
Wir betrachten nun einen beliebigen Eintrag $L[i,j]$. Um einen solchen Eintrag zu berechnen, summieren wir zunächst die Anzahlen aller Möglichkeiten,
|
||||
über $k$ Kanten vom Knoten $i$ zu einem beliebigen Knoten $h$ zu gelangen. Laut Induktionsannahme finden wir genau diese in der Matrix $A$,
|
||||
im Eintrag $A^k[i,h]$. Die Summe aller dieser Möglichkeiten ist wie folgt definiert:
|
||||
|
||||
$$\sum_{h=1}^{n}{A^k[i,h]}$$
|
||||
|
||||
Jetzt wollen wir eine Möglichkeit nur betrachten, wenn eine Kante $(h,j)$ existiert.
|
||||
Also betrachten wir nur noch die Möglichkeiten, über $k+1$ Kanten vom Knoten $i$ zum Knoten $j$ zu gelangen. Wir definieren das $n$-Tupel $Z$:
|
||||
|
||||
$$ Z=(z_0, z_1, \cdots, z_n), z_h = \left\{
|
||||
\begin{array}{l}
|
||||
1: (h,j) \in G \\
|
||||
0: (h,j) \notin G
|
||||
\end{array}\right.$$
|
||||
|
||||
Wir definieren nun die Einträge der Matrix $X$, in denen jeweils alle korrekten Möglichkeiten aufsummiert werden:
|
||||
|
||||
$$\sum_{h=1}^{n}{A^k[i,h] \cdot z_h} $$
|
||||
|
||||
Nun entspricht ein Eintrag der Adjazenzmatrix $A$ an der Stelle $A[h,j]$ laut ihrer Definition genau dem Eintrag $z_h$ in dem $j$ zugehörigen Tupel $Z$.
|
||||
Wir können also genauso schreiben:
|
||||
|
||||
$$ \sum_{h=1}^{n}{A^k[i,h] \cdot A[h,j]}$$
|
||||
|
||||
Dies ist nach der Definition der Matrixmultiplikation äquivalent mit:
|
||||
|
||||
$$ X = A^k \cdot A = A^{k+1} $$
|
||||
|
||||
Es wurde also gezeigt, dass $X = A^{k+1}$ gilt, und somit jede Matrix, die unsere Forderungen erfüllt, $A^{k+1}$ sein muss.
|
||||
Demnach gilt $B(k) \Rightarrow B(k+1)$.
|
||||
|
||||
Damit ist die Induktion abgeschlossen und die Behauptung bewiesen.$\square$
|
||||
\subsection{} %b
|
||||
\subsection{} %c
|
||||
\section{} %4
|
||||
\subsection{} %a
|
||||
Wäre die Last in $W$ aboslut gleich verteilt, hätte natürlich jede Kante die gleiche Last.
|
||||
$ \sum_{p \in W} l(p) $ ist die Summe aller Pfadlängen, also die Anzahl aller verwendeten Kanten.
|
||||
Diese Anzahl wird in einem optimierten Pfadsystem gleichmäßig verteilt, also ergibt sich
|
||||
$ \frac{1}{|E|} \sum_{p \in W} l(p) $ als untere Grenze von $ c(W) $.
|
||||
|
||||
Ist $ W $ jedoch nicht optimal, ist $ c(W) $ natürlich größer. Somit gilt
|
||||
$ c(W) \ge \frac{1}{|E|} \sum_{p \in W} l(p) $.
|
||||
\newpage
|
||||
\subsection{} %b
|
||||
$ c(W) $ ist die größte Kantenlast unter Berücksichtigung aller Kanten in allen Pfaden in $N$. $ c(W^*) $ ist die größte Kantenlast
|
||||
unter Berücksichtigung aller Kanten in allen kürzesten Pfaden in $N$. Dies bedeutet, dass $ c(W) $ die absolute Maximalkantenlast ist,
|
||||
während $ c(W) $ nicht unbedingt alle Kanten berücksichtigt, deswegen auch nicht unbedingt gleich $ c(W) $ ist.
|
||||
|
||||
\end{document}
|
||||
@ -58,7 +58,11 @@
|
||||
RID INT(10) NOT NULL,
|
||||
OID INT(10) NOT NULL,
|
||||
Platz INT(3) NOT NULL,
|
||||
CONSTRAINT pk_platzierung PRIMARY KEY (RID, OID)
|
||||
CONSTRAINT pk_platzierung PRIMARY KEY (RID, OID),
|
||||
CONSTRAINT fk_rennfahrer FOREIGN KEY (RID)
|
||||
REFERENCES Rennfahrer (RID) ON DELETE CASCADE,
|
||||
CONSTRAINT fk_rennort FOREIGN KEY (OID)
|
||||
REFERENCES Rennort (OID) ON DELETE CASCADE
|
||||
);
|
||||
\end{verbatim}
|
||||
\subsection{} %b
|
||||
@ -173,14 +177,16 @@
|
||||
anfänglicher Operatorbaum:\\
|
||||
\begin{tikzpicture}[shorten >=1pt,node distance=1.1cm,on grid]
|
||||
\node (proj) {$\pi_{Person.PNR, Person.Vorname, Person.Nachname}$};
|
||||
\node (sel) [below=2.0 of proj] {$\sigma_{Obst.Sorte\text{ LIKE 'K\%'}}$};
|
||||
\node (join) [below=2.0 of sel] {$\underset{Person.Lieblingsobst = Obst.ONR}{\bowtie}$};
|
||||
\node (person) [below left=2.0 and 2.0 of join] {Person};
|
||||
\node (obst) [below right=2.0 and 2.0 of join] {Obst};
|
||||
\node (sel) [below=2.0 of proj] {$\sigma_{Obst.Sorte\text{ LIKE 'K\%'}}$};
|
||||
\node (sel2) [below=2.0 of sel] {$\sigma_{Obst.ONR=Person.Lieblingsobst}$};
|
||||
\node (catProd) [below=2.0 of sel2] {x};
|
||||
\node (person) [below left=2.0 and 2.0 of catProd] {Person};
|
||||
\node (obst) [below right=2.0 and 2.0 of catProd] {Obst};
|
||||
\path (proj) edge node [right] {400} (sel)
|
||||
(sel) edge node [right] {2000} (join)
|
||||
(join) edge node [left] {2000} (person)
|
||||
(join) edge node [right] {25} (obst);
|
||||
(sel) edge node [right] {2000} (sel2)
|
||||
(sel2) edge node [right] {50000} (catProd)
|
||||
(catProd) edge node [left] {2000} (person)
|
||||
(catProd) edge node [right] {25} (obst);
|
||||
\end{tikzpicture}
|
||||
|
||||
optimierter Operatorbaum:\\
|
||||
@ -196,5 +202,5 @@
|
||||
(sel) edge node [right] {25} (obst);
|
||||
\end{tikzpicture}
|
||||
|
||||
Der zweite Operatorbaum ist klar performanter, da die Selektion der Obstsorte bereits vor dem Join stattfindet.
|
||||
Der zweite Operatorbaum ist klar performanter, da die Selektion der Obstsorte bereits vor dem Join stattfindet und das kartesische Produkt und die zweite Selektion zu einem Join verbunden wurde.
|
||||
\end{document}
|
||||
150
gdb/G62B5_Dittrich-Lindemann-Martens.tex
Normal file
150
gdb/G62B5_Dittrich-Lindemann-Martens.tex
Normal file
@ -0,0 +1,150 @@
|
||||
\documentclass[ngerman]{gdb-aufgabenblatt}
|
||||
\RequirePackage[utf8]{inputenc}
|
||||
\renewcommand{\Aufgabenblatt}{5}
|
||||
\renewcommand{\Ausgabedatum}{Mi. 11.12.2013}
|
||||
\renewcommand{\Abgabedatum}{Do. 09.01.2014}
|
||||
\renewcommand{\Gruppe}{Tim Dittrich, Sebastian Lindemann, Jim Martens}
|
||||
|
||||
% define how the sections are rendered
|
||||
\def\thesection{Aufgabe \arabic{section}:}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
|
||||
\usetikzlibrary{positioning}
|
||||
\usetikzlibrary{shadows}
|
||||
|
||||
\begin{document}
|
||||
\section{Referentielle Aktionen}
|
||||
\subsection{} %a
|
||||
Bei einem sicheren Schema ist das Ergebnis der Referentiellen Aktionen unabhängig von der Reihenfolge.
|
||||
\subsection{} %b
|
||||
\begin{tikzpicture}
|
||||
\node[entity] (benutzer) {Benutzer};
|
||||
\node[entity] (websites) [left=4.0 of benutzer] {Websites};
|
||||
\node[entity] (rubriken) [right=4.0 of benutzer] {Rubriken};
|
||||
\node[entity] (rubrikZuordnung) [below=9.0 of benutzer] {RubrikZuordnung};
|
||||
\node (websitesBenutzer) [above=0.5 of websites, align=left] {EingestelltVon $\rightarrow$ \\ Benutzer.UID};
|
||||
\node (benutzerWebsites) [below left=1.5 and 0.5 of benutzer, align=left] {Homepage $\rightarrow$ \\ Websites.WID};
|
||||
\node (rubrikenBenutzer) [above left=0.4 and 0.2 of rubriken,align=left] {Verwalter $\rightarrow$ \\ Benutzer.UID};
|
||||
\node (rubrikZuordnungWebsites) [above left=0.7 and 0.7 of rubrikZuordnung, align=left] {WID $\rightarrow$ \\ Websites.WID};
|
||||
\node (rubrikZuordnungRubriken) [above right=0.7 and 1.5 of rubrikZuordnung, align=left] {RID $\rightarrow$ \\ Rubriken.RID};
|
||||
\node (rubrikZuordnungBenutzer) [above right=4.0 and -1.6 of rubrikZuordnung, align=left] {ZugeordnetVon $\rightarrow$ \\ Benutzer.UID};
|
||||
\path[->] (websites) edge[bend left] node [above, align=left] {ON DELETE \\ RESTRICT} (benutzer)
|
||||
(benutzer) edge[bend left] node [below, align=left] {ON DELETE \\ SET NULL} (websites)
|
||||
(rubriken) edge node [above, align=left] {ON DELETE \\ CASCADE} (benutzer)
|
||||
(rubrikZuordnung) edge[bend left] node [left=0.5, align=left] {ON DELETE \\ CASCADE} (websites)
|
||||
(rubrikZuordnung) edge[bend right] node [right=0.5, align=left] {ON DELETE \\ RESTRICT} (rubriken)
|
||||
(rubrikZuordnung) edge node [left, align=left] {ON DELETE \\ CASCADE} (benutzer);
|
||||
\end{tikzpicture}
|
||||
\subsection{} %c
|
||||
Vorausgesetzt man hat einen Benutzer, der keine Website eingestellt hat, und möchte diesen löschen. Dieser Benutzer ist ein Verwalter einer Rubrik. Außerdem hat der Benutzer eine Website und eine Rubrik zugeordnet. Wenn der Benutzer gelöscht wird und anschließend die Rubrikzuordnung gelöscht wird, dann können die vom Benutzer verwalteten Rubriken einfach gelöscht werden. Werden hingegen zuerst die Rubriken gelöscht, dann scheitert der Vorgang am ON DELETE RESTRICT von Rubrikzuordnung zu Rubriken.
|
||||
|
||||
Daher ist das Schema nicht sicher bezüglich referentieller Aktionen.
|
||||
\subsection{} %d
|
||||
Dieses Problem könnte durch das Ändern des ON DELETE RESTRICT zwischen Rubriken und Rubrikzuordnung zu ON DELETE CASCADE behoben werden.
|
||||
\section{Änderbarkeit von Sichten}
|
||||
\subsection{} %a
|
||||
\subsubsection{} %i
|
||||
\begin{verbatim}
|
||||
CREATE VIEW EnterpriseCrew AS
|
||||
SELECT BNr, Name, Rang
|
||||
FROM Besatzungsmitglieder BM,
|
||||
Raumschiffe RS
|
||||
WHERE BM.Schiff = RS.RNr
|
||||
AND RS.Name = 'Enterprise';
|
||||
\end{verbatim}
|
||||
Die Sicht erlaubt Änderungsoperationen.
|
||||
\subsubsection{} %ii
|
||||
\begin{verbatim}
|
||||
CREATE VIEW Captains AS
|
||||
SELECT Name
|
||||
FROM Besatzungsmitglieder
|
||||
WHERE Rang = 'Captain';
|
||||
\end{verbatim}
|
||||
Die Sicht erlaubt keine Änderungsoperationen, da der primäre Schlüssel nicht enthalten ist und damit Änderungen nicht eindeutig zugeordnet werden können.
|
||||
\subsubsection{} %iii
|
||||
\begin{verbatim}
|
||||
CREATE VIEW WarpFed AS
|
||||
SELECT RNr, Fraktion, Baujahr
|
||||
FROM Raumschiffe
|
||||
WHERE Geschwindigkeit >= 1;
|
||||
\end{verbatim}
|
||||
Die Sicht erlaubt Änderungsoperationen.
|
||||
\subsection{} %b
|
||||
\subsubsection{} %i
|
||||
Die SQL-Anweisung kann auf der Sichtdefinition Fö(r)derationsschiffe\footnote{Es heißt "`Vereinige Föderation der Planeten"'. Demnach ist hier das erste r obsolet.} durchgeführt werden. Die betroffenen Tupel bleiben auf jeden Fall in der Sicht Föderationsschiffe sichtbar.
|
||||
\subsubsection{} %ii
|
||||
Die SQL-Anweisung kann auf der Sichtdefinition GalaxyKlasse nicht durchgeführt werden. Dies liegt an der CHECK OPTION für Föderationsschiffe. Die Fraktion des einzufügenden Tupels ist Bajoraner, aber Föderationsschiffe erfordert Föderation, womit die Bedingung für diese Sicht nicht gegeben ist. Da GalaxyKlasse indirekt auf Föderationsschiffe aufbaut, wird die Änderungsoperation auch dort abgelehnt.
|
||||
\subsubsection{} %iii
|
||||
Die SQL-Anweisung kann auf der Sichtdefinition Forschungsschiffe durchgeführt werden. Die betroffenen Tupel bleiben auf jeden Fall in Föderationsschiffe, Forschungsschiffe und in GalaxyKlasse sichtbar.
|
||||
\subsubsection{} %iv
|
||||
Die SQL-Anweisung kann auf der Sichtdefinition NebulaKlasse nicht durchgeführt werden. Dies liegt an der CHECK OPTION für NebulaKlasse. Durch die Änderung würden alle betroffenen Tupel nicht mehr die Bedingung Baujahr > 2365 erfüllen, weswegen die Operation abgelehnt wird.
|
||||
\subsubsection{} %v
|
||||
Die SQL-Anweisung kann auf der Sichtdefinition GalaxyKlasse durchgeführt werden. Zwar erfüllt das einzufügende Tupel nicht die Bedingung von GalaxyKlasse (Geschwindigkeit = 9.8), aber GalaxyKlasse weist keine CHECK OPTION auf. Da das Tupel die Bedingung von Föderationsschiffe erfüllt, macht die dort definierte CHECK OPTION keine Probleme. Nach dem Einfügen ist das Tupel in Föderationsschiffe, Forschungsschiffe und NebulaKlasse sichtbar.
|
||||
\section{Serialisierbarkeit und Anomalien}
|
||||
\subsection{} %a
|
||||
S\ts{1}: A = 305, B = 195 \\
|
||||
S\ts{2}: A = 195, B = 5 \\
|
||||
S\ts{3}: A = 300, B = 5 \\
|
||||
S\ts{4}: A = 190, B = 5 \\
|
||||
S\ts{5}: A = 115, B = 5 \\
|
||||
S\ts{6}: A = 300, B = 5
|
||||
\subsection{} %b
|
||||
S\ts{1}: Transaktion 2 kann A erst lesen, nachdem Transaktion 1 dort geschrieben hat. \\
|
||||
S\ts{2}: Transaktion 1 kann erst A beschreiben, nachdem Transaktion 2 A beschrieben hat. \\
|
||||
S\ts{3}: Transaktion 1 kann B erst lesen, nachdem Transaktion 2 B beschrieben hat. Transaktion 1 kann A erst lesen, nachdem Transaktion 2 A beschrieben hat. \\
|
||||
S\ts{4}: Transaktion 1 kann B erst lesen, nachdem Transaktion 2 B beschrieben hat. Transaktion 2 kann A erst beschreiben, nachdem Transaktion 1 A gelesen hat. \\
|
||||
S\ts{5}: Es existieren nur indirekte Abhängigkeiten. So kann Transaktion 2 B erst beschreiben, nachdem Transaktion 1 B gelesen hat. Außerdem kann Transaktion 2 erst A beschreiben, nachdem Transaktion 1 A beschrieben hat. \\
|
||||
S\ts{6}: Es existieren nur indirekte Abhängigkeiten. So kann Transaktion 1 B erst lesen, nachdem Transaktion 2 B beschrieben hat. Außerdem kann Transaktion 1 A erst lesen, nachdem Transaktion 2 A beschrieben hat.
|
||||
\subsection{} %c
|
||||
S\ts{1}: Der Schedule ist seriell. \\
|
||||
S\ts{2}: Der Schedule ist nicht serialisierbar, weil Transaktion 2 in A schreibt, nachdem Transaktion 1 aus A gelesen hat und bevor Transaktion 1 in A schreibt. Außerdem liest Transaktion 2 bevor Transaktion 1 in A schreibt. Somit erhält eine der beiden Leseoperationen einen anderen Wert, wenn entweder T\ts{1} vor T\ts{2} oder T\ts{2} vor T\ts{1} gilt. \\
|
||||
S\ts{3}: Der Schedule ist serialisierbar zu T\ts{2} vor T\ts{1}.\\
|
||||
S\ts{4}: Der Schedule ist nicht serialisierbar, da Transaktion 1 B liest, nachdem Transaktion 2 B beschrieben hat und Transaktion 2 A beschreibt, nachdem Transaktion 1 A gelesen hat. In jedem der beiden Fälle T\ts{1} vor T\ts{2} oder T\ts{2} vor T\ts{1} würde mindestens eine Leseoperation einen anderen Wert erhalten. \\
|
||||
S\ts{5}: Der Schedule ist nicht serialisierbar, da Transaktion 1 A beschreibt, nachdem Transaktion 2 A beschrieben hat und Transaktion 2 B beschreibt, nachdem Transaktion 1 B gelesen hat. In jedem der beiden Fälle T\ts{1} vor T\ts{2} oder T\ts{2} vor T\ts{1} würde mindestens eine Leseoperation einen anderen Wert erhalten.\\
|
||||
S\ts{6}: Der Schedule ist seriell.
|
||||
\section{Transaktionen}
|
||||
\[S = w_{1}(x)r_{2}(y)r_{3}(z)w_{3}(y)r_{2}(z)w_{3}(z)w_{1}(z)r_{2}(y)c_{3}c_{1}c_{2}\]
|
||||
|
||||
\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{1cm}|p{1cm}|p{1cm}|p{3cm}|}
|
||||
\hline
|
||||
Zeitschritt & T\ts{1} & T\ts{2} & T\ts{3} & x & y & z & Bemerkung\\
|
||||
\hline
|
||||
0 & & & & NL & NL & NL & \\
|
||||
\hline
|
||||
1 & lock(x,X) & & & X\ts{1} & NL & NL & \\
|
||||
\hline
|
||||
2 & write(x) & lock(y,R) & & X\ts{1} & R\ts{2} & NL & \\
|
||||
\hline
|
||||
3 & & read(y) & lock(z,R) & X\ts{1} & R\ts{2} & R\ts{3} & \\
|
||||
\hline
|
||||
4 & & & read(z) & X\ts{1} & R\ts{2} & R\ts{3} & \\
|
||||
\hline
|
||||
5 & & lock(z,R) & lock(y,X) & X\ts{1} & R\ts{2} & R\ts{2,3} & T\ts{3} wartet auf Freigabe von y \\
|
||||
\hline
|
||||
6 & & read(z) & & X\ts{1} & R\ts{2} & R\ts{2,3} & \\
|
||||
\hline
|
||||
7 & lock(z,X) & & & X\ts{1} & R\ts{2} & R\ts{2,3} & T\ts{1} wartet auf Freigabe von z \\
|
||||
\hline
|
||||
8 & & read(y) & & X\ts{1} & R\ts{2} & R\ts{2,3} & \\
|
||||
\hline
|
||||
9 & & unlock(y) & & X\ts{1} & X\ts{3} & R\ts{2,3} & Benachrichtigung von T\ts{3}\\
|
||||
\hline
|
||||
10 & & unlock(z) & write(y) & X\ts{1} & X\ts{3} & R\ts{3} & \\
|
||||
\hline
|
||||
11 & & commit & lock(z,X) & X\ts{1} & X\ts{3} & X\ts{3} & \\
|
||||
\hline
|
||||
12 & & & write(z) & X\ts{1} & X\ts{3} & X\ts{3} & \\
|
||||
\hline
|
||||
13 & & & unlock(z) & X\ts{1} & X\ts{3} & X\ts{1} & Benachrichtigung von T\ts{1} \\
|
||||
\hline
|
||||
14 & write(z) & & unlock(y) & X\ts{1} & NL & X\ts{1} & \\
|
||||
\hline
|
||||
15 & unlock(x) & & commit & NL & NL & X\ts{1} & \\
|
||||
\hline
|
||||
16 & unlock(z) & & & NL & NL & NL & \\
|
||||
\hline
|
||||
17 & commit & & & NL & NL & NL & \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{document}
|
||||
284
mk/bib.bib
284
mk/bib.bib
@ -1,190 +1,110 @@
|
||||
% This file was created with JabRef 2.9b2.
|
||||
% This file was created with JabRef 2.10b2.
|
||||
% Encoding: UTF-8
|
||||
|
||||
@ARTICLE{Aagren2001,
|
||||
author = {Ågren, Per-Olof},
|
||||
title = {Is online democracy in the EU for professionals only?},
|
||||
journal = {Communications of the ACM},
|
||||
year = {2001},
|
||||
volume = {44},
|
||||
pages = {36-38},
|
||||
number = {1},
|
||||
month = {January},
|
||||
abstract = {A directive of the EU protects the privacy very harsh. This directive
|
||||
forbids mentioning anything privacy related of any person without
|
||||
their declared consent. This makes e-democracy in the form of e.g.
|
||||
bulletin boards close to impossible as it isn't really possible to
|
||||
discuss a statement of a person without identifying the person.
|
||||
|
||||
|
||||
As it is a directive the EU member states have to interpret the directive
|
||||
into national law. Sweden has made a law that follows the directive
|
||||
to the letter. That resulted in 296 reports of violation of this
|
||||
law between October 1998 and August 2000. Another law in Sweden restricts
|
||||
e-democracy in another way. The person who initiates a bulletin board
|
||||
is responsible for all its content. This constraint leads to a situation
|
||||
where fear stops people from engaging in e-democracy. Fear to violate
|
||||
such rules.
|
||||
|
||||
|
||||
The EU directive allows processing of personal data only for journalistic,
|
||||
artistic and literary purposes which results in the opinion of the
|
||||
EU parliament that enough freedom of expression in virtual forums
|
||||
is achieved when authors, journalists and artists are free to engage
|
||||
in political discussions. That way democratic debate becomes a purely
|
||||
professional activity and thereby reflects a very thin democracy
|
||||
model.},
|
||||
issue = {1},
|
||||
journaltitle = {Communications of the ACM},
|
||||
owner = {jim},
|
||||
quality = {1},
|
||||
timestamp = {2013.10.28}
|
||||
|
||||
@Article{Aagren2001,
|
||||
Title = {Is online democracy in the EU for professionals only?},
|
||||
Author = {Ågren, Per-Olof},
|
||||
Journal = {Communications of the ACM},
|
||||
Year = {2001},
|
||||
|
||||
Month = {January},
|
||||
Number = {1},
|
||||
Pages = {36-38},
|
||||
Volume = {44},
|
||||
|
||||
Abstract = {A directive of the EU protects the privacy very harsh. This directive forbids mentioning anything privacy related of any person without their declared consent. This makes e-democracy in the form of e.g. bulletin boards close to impossible as it isn't really possible to discuss a statement of a person without identifying the person.
|
||||
|
||||
As it is a directive the EU member states have to interpret the directive into national law. Sweden has made a law that follows the directive to the letter. That resulted in 296 reports of violation of this law between October 1998 and August 2000. Another law in Sweden restricts e-democracy in another way. The person who initiates a bulletin board is responsible for all its content. This constraint leads to a situation where fear stops people from engaging in e-democracy. Fear to violate such rules.
|
||||
|
||||
The EU directive allows processing of personal data only for journalistic, artistic and literary purposes which results in the opinion of the EU parliament that enough freedom of expression in virtual forums is achieved when authors, journalists and artists are free to engage in political discussions. That way democratic debate becomes a purely professional activity and thereby reflects a very thin democracy model.},
|
||||
Issue = {1},
|
||||
Journaltitle = {Communications of the ACM},
|
||||
Owner = {jim},
|
||||
Quality = {1},
|
||||
Timestamp = {2013.10.28}
|
||||
}
|
||||
|
||||
@ARTICLE{Mohen2001,
|
||||
author = {Mohen, Joe and Glidden, Julia},
|
||||
title = {The case for internet voting},
|
||||
journal = {Communications of the ACM},
|
||||
year = {2001},
|
||||
volume = {44},
|
||||
pages = {72-85},
|
||||
number = {1},
|
||||
month = {January},
|
||||
abstract = {The internet voting is explored with the example of the Arizona presidential
|
||||
preference elections. That election allowed for the first time ever
|
||||
to vote from every place around the world (as long as you were a
|
||||
registered Democrat in Arizona). It also included the option to vote
|
||||
by mail, offering the same convenience as voting by Internet. But
|
||||
you were able to vote traditionally in a polling station either.
|
||||
|
||||
|
||||
A massive campaign was started to increase the awareness of the election.
|
||||
Many third parties were invited to monitor the voting process.
|
||||
|
||||
|
||||
To authenticate the voters each registered Democrat received a randomly
|
||||
generated seven digit PIN. In addition they were given two challenge
|
||||
questions (date of birth or last four digits of a social security
|
||||
number) which were randomly selected from a strictly confidential
|
||||
field of five. To prevent overvoting, the system voided ballots from
|
||||
reuse once they were cast. They were also voided when a voter requested
|
||||
a mail-in ballot or disclosed that his/her name or address was incorrect.
|
||||
In the latter case the voter had to vote in person in one of the
|
||||
polling stations.
|
||||
|
||||
|
||||
Moreover voters had to explicetly state their voting eligibility.
|
||||
A false information is a 6 class felony, worthy of jail time. Digital
|
||||
signature were used to identify the specific voting servers being
|
||||
used.
|
||||
|
||||
|
||||
The votes were encrypted and then saved encrypted in a database of
|
||||
election.com. But election.com didn't have the private key. Only
|
||||
once election was over, the encrypted set of data was given to the
|
||||
third party that was able to decrypt the votes. A single bit of error
|
||||
in the encrypted data would have led to not accepting that vote.
|
||||
It is remarkable that no single vote has been rejected.
|
||||
|
||||
|
||||
Internet voting can only be one element of a legally binding election.
|
||||
To give everyone the same opportunity to vote, the Internet voting
|
||||
took place four days prior to Election Day. On the Election Day itself
|
||||
Internet voting was not allowed. The goal was to prevent anyone from
|
||||
waiting till the last second to vote via computer.
|
||||
|
||||
|
||||
Internet voting is most useful on the small level where people able
|
||||
to sabotage the electronic voting process mostly don't bother. Still
|
||||
the PC from which the voting is performed is a security risk. Of
|
||||
the whole 96 hours available for Internet voting, the site wasn't
|
||||
available for one hour only due to a router problem. For each server
|
||||
there were backups to prevent data loss.
|
||||
|
||||
|
||||
Learned lessions:
|
||||
|
||||
|
||||
Many voters have an around-the-clock lifestyle and want to be among
|
||||
the first to vote online. Therefore even more servers are required
|
||||
to process the peak at the beginning.
|
||||
|
||||
|
||||
Current browsers are required.
|
||||
|
||||
|
||||
Internet voting at polling stations offers no extra value and increases
|
||||
the cost of elections.
|
||||
|
||||
|
||||
When should Internet voting be used? In what manner and at what cost?
|
||||
These questions should be answered by politicians and the people
|
||||
who vote them, not technology developers and vendors.},
|
||||
issue = {1},
|
||||
journaltitle = {Communications of the ACM},
|
||||
owner = {jim},
|
||||
quality = {1},
|
||||
timestamp = {2013.10.28}
|
||||
@Article{Mohen2001,
|
||||
Title = {The case for internet voting},
|
||||
Author = {Mohen, Joe and Glidden, Julia},
|
||||
Journal = {Communications of the ACM},
|
||||
Year = {2001},
|
||||
|
||||
Month = {January},
|
||||
Number = {1},
|
||||
Pages = {72-85},
|
||||
Volume = {44},
|
||||
|
||||
Abstract = {The internet voting is explored with the example of the Arizona presidential preference elections. That election allowed for the first time ever to vote from every place around the world (as long as you were a registered Democrat in Arizona). It also included the option to vote by mail, offering the same convenience as voting by Internet. But you were able to vote traditionally in a polling station either.
|
||||
|
||||
A massive campaign was started to increase the awareness of the election. Many third parties were invited to monitor the voting process.
|
||||
|
||||
To authenticate the voters each registered Democrat received a randomly generated seven digit PIN. In addition they were given two challenge questions (date of birth or last four digits of a social security number) which were randomly selected from a strictly confidential field of five. To prevent overvoting, the system voided ballots from reuse once they were cast. They were also voided when a voter requested a mail-in ballot or disclosed that his/her name or address was incorrect. In the latter case the voter had to vote in person in one of the polling stations.
|
||||
|
||||
Moreover voters had to explicetly state their voting eligibility. A false information is a 6 class felony, worthy of jail time. Digital signature were used to identify the specific voting servers being used.
|
||||
|
||||
The votes were encrypted and then saved encrypted in a database of election.com. But election.com didn't have the private key. Only once election was over, the encrypted set of data was given to the third party that was able to decrypt the votes. A single bit of error in the encrypted data would have led to not accepting that vote. It is remarkable that no single vote has been rejected.
|
||||
|
||||
Internet voting can only be one element of a legally binding election. To give everyone the same opportunity to vote, the Internet voting took place four days prior to Election Day. On the Election Day itself Internet voting was not allowed. The goal was to prevent anyone from waiting till the last second to vote via computer.
|
||||
|
||||
Internet voting is most useful on the small level where people able to sabotage the electronic voting process mostly don't bother. Still the PC from which the voting is performed is a security risk. Of the whole 96 hours available for Internet voting, the site wasn't available for one hour only due to a router problem. For each server there were backups to prevent data loss.
|
||||
|
||||
Learned lessions:
|
||||
|
||||
Many voters have an around-the-clock lifestyle and want to be among the first to vote online. Therefore even more servers are required to process the peak at the beginning.
|
||||
|
||||
Current browsers are required.
|
||||
|
||||
Internet voting at polling stations offers no extra value and increases the cost of elections.
|
||||
|
||||
When should Internet voting be used? In what manner and at what cost? These questions should be answered by politicians and the people who vote them, not technology developers and vendors.},
|
||||
Issue = {1},
|
||||
Journaltitle = {Communications of the ACM},
|
||||
Owner = {jim},
|
||||
Quality = {1},
|
||||
Timestamp = {2013.10.28}
|
||||
}
|
||||
|
||||
@ARTICLE{Watson2001,
|
||||
author = {Watson, Richard T. and Mundy, Bryan},
|
||||
title = {A strategic perspective of electronic democracy},
|
||||
journal = {Communications of the ACM},
|
||||
year = {2001},
|
||||
volume = {44},
|
||||
pages = {27-30},
|
||||
number = {1},
|
||||
month = {January},
|
||||
abstract = {E-Democracy can be introduced via a three phase structure. During
|
||||
initiation the citizens must get one portal that gives them access
|
||||
to all levels of government (from local residence to U.S. president
|
||||
or alike in other countries). This portal would give them all relevant
|
||||
info based upon their postal code. All they need to remember is the
|
||||
URL of the portal and their postal code which reduces searching effort
|
||||
significantly.
|
||||
|
||||
|
||||
Another important aspect is web-based payment. Around $3 trillion
|
||||
exchanges hands between governments and U.S. citizens each year.
|
||||
But the overwhelming majority happens via traditional checks, cash
|
||||
and money orders. Less than 0.5% are web-enabled. Web-bases payment
|
||||
allows for reduced travel to all the different agencies as many actions
|
||||
require physical presence nowadays. By reducing this travel the environment
|
||||
can profit from e-payment as well.
|
||||
|
||||
|
||||
In the second phase most governments adopt to the principles of e-government.
|
||||
Most payments are handled via the Web and governments become more
|
||||
efficient via two approaches. Small governments opt for an application
|
||||
service provider (ASP) solution whereas large governments implement
|
||||
in-house systems.
|
||||
|
||||
|
||||
Political decision making becomes more and more transparent. Citizens
|
||||
can find out what steps a certain peace of legislation takes from
|
||||
the first thoughts to signing the bill by the president. They can
|
||||
find out about all stakeholders of the process and who is involved.
|
||||
This gives citizens an inside perspective about the law making process
|
||||
and allows for increased citizen influence over the politicians.
|
||||
|
||||
|
||||
The final third phase is the customization and creates a one-to-one
|
||||
relation between government and citizen. Via a personal profile a
|
||||
citizen can manage all financial transactions with every government
|
||||
level. A change of address will be one transaction that notifies
|
||||
everyone involved. Even further it is possible to show the citizen
|
||||
how much of the paid taxes are used e.g. for education or national
|
||||
parks.
|
||||
|
||||
|
||||
This involvement into the process creates a much bigger attachment
|
||||
for democracy and the decision making process and abstracts away
|
||||
everything that one doesn't have to know.},
|
||||
issue = {1},
|
||||
journaltitle = {Communications of the ACM},
|
||||
owner = {jim},
|
||||
quality = {1},
|
||||
timestamp = {2013.10.28}
|
||||
@Article{Spirakis2010,
|
||||
Title = {The impact of electronic government on democracy: e-democracy through e-participation},
|
||||
Author = {Spirakis, Grigorios and Spiraki, Christina and Nikolopoulos, Konstantinos},
|
||||
Journal = {Electronic Government, An International Journey},
|
||||
Year = {2010},
|
||||
Number = {1},
|
||||
Pages = {75-88},
|
||||
Volume = {7},
|
||||
|
||||
Owner = {jim},
|
||||
Timestamp = {2013.12.30}
|
||||
}
|
||||
|
||||
@Article{Watson2001,
|
||||
Title = {A strategic perspective of electronic democracy},
|
||||
Author = {Watson, Richard T. and Mundy, Bryan},
|
||||
Journal = {Communications of the ACM},
|
||||
Year = {2001},
|
||||
|
||||
Month = {January},
|
||||
Number = {1},
|
||||
Pages = {27-30},
|
||||
Volume = {44},
|
||||
|
||||
Abstract = {E-Democracy can be introduced via a three phase structure. During initiation the citizens must get one portal that gives them access to all levels of government (from local residence to U.S. president or alike in other countries). This portal would give them all relevant info based upon their postal code. All they need to remember is the URL of the portal and their postal code which reduces searching effort significantly.
|
||||
|
||||
Another important aspect is web-based payment. Around $3 trillion exchanges hands between governments and U.S. citizens each year. But the overwhelming majority happens via traditional checks, cash and money orders. Less than 0.5% are web-enabled. Web-bases payment allows for reduced travel to all the different agencies as many actions require physical presence nowadays. By reducing this travel the environment can profit from e-payment as well.
|
||||
|
||||
In the second phase most governments adopt to the principles of e-government. Most payments are handled via the Web and governments become more efficient via two approaches. Small governments opt for an application service provider (ASP) solution whereas large governments implement in-house systems.
|
||||
|
||||
Political decision making becomes more and more transparent. Citizens can find out what steps a certain peace of legislation takes from the first thoughts to signing the bill by the president. They can find out about all stakeholders of the process and who is involved. This gives citizens an inside perspective about the law making process and allows for increased citizen influence over the politicians.
|
||||
|
||||
The final third phase is the customization and creates a one-to-one relation between government and citizen. Via a personal profile a citizen can manage all financial transactions with every government level. A change of address will be one transaction that notifies everyone involved. Even further it is possible to show the citizen how much of the paid taxes are used e.g. for education or national parks.
|
||||
|
||||
This involvement into the process creates a much bigger attachment for democracy and the decision making process and abstracts away everything that one doesn't have to know.},
|
||||
Issue = {1},
|
||||
Journaltitle = {Communications of the ACM},
|
||||
Owner = {jim},
|
||||
Quality = {1},
|
||||
Timestamp = {2013.10.28}
|
||||
}
|
||||
|
||||
|
||||
@ -8,5 +8,7 @@ Feedback zu Vortrag Elektronische Demokratie
|
||||
* Vergleich basierend auf mehreren Quellen
|
||||
* Definition der Begriffe
|
||||
* miteinbeziehen des Publikums bei einem so populären Thema
|
||||
|
||||
|
||||
* mehr Strukturierung im Vortrag (eigenes Feedback) -> sonst zu schnell fertig und zu viel Ausgedachtes
|
||||
* Überblick mithilfe von unterschiedlichen Quellen zur Verfügung stellen
|
||||
* Klare Differenzierung zwischen E-Democracy und E-Government
|
||||
* sinnvolle Beispiele (was hat Star Citizen/Crowdfunding auch nur annähernd mit der vorgestellten Elektronischen Demokratie zu tun?)
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
|
||||
% Abstract gives a brief summary of the main points of a paper:
|
||||
\section*{Abstract}
|
||||
Demokratie ist eine wichtige Errungenschaft der Menschheit. Das Internet ist das technologische Gegenstück, das wohl einen ähnlichen tiefgreifenden Einfluss in die Gesellschaft genommen hat. Elektronische Demokratie befasst sich mit der Frage die Demokratie auf das Internet auszudehnen. Dieses Vorhaben hat naturgemäß Vor- und Nachteile, mit denen sich in diesem Paper befasst wird.
|
||||
Elektronische Demokratie bietet viele Chancen zur Verbesserung der vorhandenen Interaktion mit Regierungen in Demokratien. Allerdings birgt sie auch einige Risiken, die jedoch nicht unüberwindbar sind.
|
||||
|
||||
% Lists:
|
||||
\setcounter{tocdepth}{2} % depth of the table of contents (for Seminars 2 is recommended)
|
||||
@ -189,76 +189,52 @@
|
||||
\section{Einleitung}
|
||||
\label{sec:introduction}
|
||||
|
||||
Es ist so ziemlich jedem bekannt was Demokratie ist. Demokratie bezeichnet die Herrschaft des Volkes und ist die Regierungsform in vielen Ländern, wie unter anderem die USA, Kanada, Frankreich und Deutschland. In jedem dieser Länder ist sie ein wenig anders organisiert, aber ihr Markenkern ist derselbe. Durch das Aufkommen vom Internet hat sich die Bezahlkultur längst gewandelt. Viele Menschen bestellen sich Waren aus dem Internet von Firmen wie Amazon und bekommen die Waren dann an die Tür geliefert.
|
||||
Elektronische Demokratie hat viele Bedeutungen. Die wohl eingängigste ist das Verlagern des Wahlvorganges selber auf Computer oder sogar das Internet.\cite{Mohen2001} Solch ein Vorgehen ist mit vielen Hürden verbunden, da sichergestellt werden muss, dass die Wahl nicht gefälscht werden kann, keine versehentliche doppelte Stimmabgabe möglich ist und nur Wahlberechtigte abstimmen können. Ein solches Vorgehen wird von Mohen\cite{Mohen2001} anhand einer Fallstudie aus Arizona beschrieben. Diese Art des elektronischen Wählens wird auch E-Voting genannt.\cite{Spirakis2010}
|
||||
|
||||
Diese Form des webbasierten Bezahlens nennt sich "`E-Commerce"'. Was passiert aber, wenn die Demokratie auf eben jenes Internet erweitert wird? Dabei sind nicht losgelöste Abstimmungen gemeint, sondern die Erweiterung der Demokratie in den Staaten auf das Internet. In welcher Form kann dies geschehen? Ist es überhaupt vernünftig?
|
||||
Allerdings ist dies nur ein Aspekt von elektronischer Demokratie (E-Democracy). E-Democracy hat weitaus mehr Bedeutungen. Watson\cite{Watson2001} beschreibt eine strategische Perspektive zur Umsetzung von elektronischer Demokratie. Für ihn gehört zu E-Democracy ebenso auch E-Government und E-Politics.
|
||||
|
||||
Es gibt reichlich Fragen zu diesem Thema. Im Rahmen dieses Papers wird eine Begriffserklärung für elektronische Demokratie versucht, um dann auf Basis dieses Begriffes ein Konzept von Watson\cite{Watson2001} kritisch zu diskutieren und abschließend zu einem Fazit zu kommen.
|
||||
Eine weitere Sicht auf E-Democracy wird durch Spirakis\cite{Spirakis2010} vorgenommen. Dabei wird der Einfluss von E-Government auf die Demokratie in den Fokus genommen und Literatur in drei Teilen analysiert: (a) der Definition und Bedeutung von E-Government, (b) der Informationspolitik und (c) E-Democracy durch Information und E-Participation.
|
||||
|
||||
\section{Begriffserklärung}
|
||||
\label{sec:definition}
|
||||
In diesem Paper werden Erkenntnisse von Spirakis vorgestellt und schließlich die Chancen und Risiken von E-Democracy anhand von Spirakis beleuchtet. Abschließend wird ein Fazit gezogen.
|
||||
|
||||
\section{Erkenntnisse Spirakis}
|
||||
\label{sec:erkenntnisseSpirakis}
|
||||
|
||||
Elektronische Demokratie ist also die irgendwie geartete Erweiterung der bestehenden analogen Demokratie auf das Internet. Aber wie läuft das eigentlich genau ab?
|
||||
\subsection*{Definition von E-Government}
|
||||
E-Government beschreibt die Nutzung von Informations- und Kommunikationstechnologien (IKT) während der Transformation von Regierungen zur Verbesserung der Barrierefreiheit, Effektivität und Verantwortung. Laut des Europäischen Kommittees des norwegischen Parlaments kann diese Transformation mit Veränderungen der Organisation und neuen Fähigkeiten einhergehen, sodass die öffentlichen Dienste verbessert werden, die demokratische Teilhabe vergrößert und die Implementation von öffentlichen Richtlinien gestärkt wird.\cite{Spirakis2010}
|
||||
|
||||
Diese Frage wird zum Teil durch Watson\cite{Watson2001} geklärt. Er erläutert eine strategische Perspektive zur Einführung von elektronischer Demokratie. Diese Einführung findet in Form eines 3-Phasen-Modells statt.
|
||||
Die Kernpunkte seines Konzeptes sind die Bündelung der Informationen über die einzelnen Regierungen in einem Land (von der Rathausebene bis hin zur Bundesebene) auf einer zentralen Internetseite und das Verwalten aller Amtsgeschäfte aus Bürgersicht über diese Internetseite. Diese beiden Punkte spiegeln Transparenz, Zugänglichkeit und Komfort wieder.
|
||||
|
||||
Kurz zusammengefasst bedeutet elektronische Demokratie also unter anderem, dass das Abwickeln der Amtsgeschäfte vereinheitlicht und damit vereinfacht wird und die Bürger alle Informationen an zentraler Stelle finden können und nicht erst zig Seiten und Amtsstellen abklappern müssen.
|
||||
|
||||
Diese Sicht auf elektronische Demokratie ist mit Sicherheit nicht abschließend. Es gibt auch noch den Punkt des elektronischen Wählens, wie ihn Mohen\cite{Mohen2001} anhand einer Fallstudie aus Arizona (USA) beschreibt.
|
||||
|
||||
Daran wird deutlich, dass elektronische Demokratie weit mehr ist als das, was Watson in seinem Artikel beschreibt.
|
||||
|
||||
\section{Kritische Diskussion}
|
||||
\label{sec:critDisc}
|
||||
\subsection*{Bedeutung von E-Government}
|
||||
|
||||
Die von Watson\cite{Watson2001} erläuterte strategische Perspektive klingt auf den ersten Blick sehr verlockend. Allerdings hat auch diese Idee ihre negativen Auswirkungen. In der folgenden Diskussion werden die Vor- und Nachteile von Watsons Idee gegenübergestellt. Die Pro-Argumente werden dabei aus Watsons Idee übernommen, schließlich stellt er diese Perspektive nicht vor weil sie in seinen Augen unzureichend ist, wohingegen die Contra-Argumente aus meiner Perspektive dargelegt werden. Daraus kann jedoch nicht meine Position zu dieser Idee gefolgert werden.
|
||||
E-Government bietet wichtige Vorteile auf nationaler Ebene, wie z.B. effektiven Zugang zu den öffentlichen Diensten, Kostenreduzierung öffentlicher Dienste und erhöhte Zugangsmöglichkeiten von Bürgern für Informationen bezüglich dem nationalen Budget und anderen Regierungstätigkeiten.\cite{Spirakis2010}
|
||||
|
||||
Der erste Schritt Watsons ist die Schaffung eines zentralen Portals, von wo aus die Bürger je nach Postleitzahl zu allen relevanten Stellen verlinkt werden.
|
||||
\subsection*{Informationspolitik}
|
||||
|
||||
Der Vorteil dieses zentralen Einstiegspunktes ist offensichtlich. Die Bürger müssen sich nur noch eine URL und ihre Postleitzahl merken, um alle notwendigen Informationen zu finden.
|
||||
Es gibt keine eindeutige Definition von "`Informationspolitik"' und im Paper von Spirakis\cite{Spirakis2010} zeichnet sich auch nicht einmal eine Richtung ab. Da der Begriff der Informationspolitik bei Watson so in der Form nicht auftaucht, wird hier nicht weiter darauf eingegangen.
|
||||
|
||||
Einen direkten Nachteil gibt es dort nicht, denn die darunter liegenden Websites der einzelnen Regierungen und staatlichen Stellen existieren weiterhin. Durch den single-point-of-entry wird jedoch das Auffinden der zuständigen Stellen erheblich erleichtert.
|
||||
\subsection*{Elektronische Demokratie}
|
||||
|
||||
Elektronische Demokratie beinhaltet technische Innovationen, die eine Verbesserung und Stärkung demokratischer Institutionen mit oder ohne Benutzung des Internets erlauben. E-Democracy ist ein Mechanismus basierend auf IKT, der es Bürgern erlaubt aktiv am Entscheidungsprozess für öffentliche Angelegenheiten mitzuwirken.\cite{Spirakis2010}
|
||||
|
||||
Im zweiten Schritt haben die meisten Regierungen die Prinzipien von "`E-Government"' übernommen. Damit haben Bürger die Möglichkeit den Großteil ihrer Finanztransaktionen mit staatlichen Stellen über das Internet abzuwickeln. Kleine Regierungen und staatliche Stellen benutzen dabei dritte Dienstleister, um diesen Service anzubieten, wohingegen größere Regierungen und staatliche Stellen eigene Lösungen benutzen.
|
||||
Das Modell von E-Democracy beinhaltet vier Schritte. Im ersten Schritt machen die meisten Regierungsorganisationen Informationen im Internet verfügbar. Durch den zweiten Schritt entwickelt sich eine Kommunikation in beide Richtungen: von der Regierung zu den Bürgern und umgekehrt. Der dritte Schritt meint den Wandel von Kommunikation zu Zusammenarbeit. Schließlich zeigt der vierte Schritt den Einfluss der Bürger auf das Resultat des Entscheidungsprozesses.\cite{Spirakis2010}
|
||||
|
||||
\section{Chancen und Risiken von E-Democracy}
|
||||
\label{sec:chanceRisk}
|
||||
|
||||
E-Democracy hat wie jede Sache Chancen und Risiken. Inwieweit diese umgesetzt werden können bzw. eintreffen hängt von dem jeweiligen staatlichen Gebilde und dessen Rahmenbedingungen ab.\cite{Spirakis2010}
|
||||
|
||||
Der Vorteil ist die starke Vereinfachung der Interaktion mit dem Staat. Durch die Einsparung von physischen Besuchen bei den Ämtern sparen Bürger Zeit und Kosten und das Regieren wird effizienter.
|
||||
Dabei ist keine Sache perfekt, auch nicht Demokratie. Es gibt einen andauernden Prozess neuer Herausforderungen für Bürger und Regierungen. Die womöglich wichtigste Herausforderung ist die aktive Teilnahme der Bürger am politischen Prozess, denn traditionelle repräsentative Demokratien beschränken die Aktivität der Bürger meist auf das Wählen.\cite{Spirakis2010}
|
||||
|
||||
Der Nachteil ist, dass damit viele Mitarbeiter im staatlichen Dienst ebenfalls obsolet werden. Es werden keine Mitarbeiter mehr benötigt, die Überweisungen entgegen nehmen oder vor Ort Informationen an Bürger weitergeben.
|
||||
E-Democracy ermöglicht die aktivere Teilnahme von Bürgern am politischen Geschehen und verbessert die Kommunikation und schlussendlich die Zusammenarbeit zwischen Bürgern und Regierung, sowie Bürgern und Bürgern. Dies geschieht sowohl auf nationaler als auch auf subnationaler Ebene. Allerdings ist eine wichtige Voraussetzung für E-Democracy, dass die demokratischen Prinzipien, wie Meinungsfreiheit, Menschenrechte und Gesetz eingehalten werden. Denn E-Democracy kann nur ein Instrument oder Werkzeug für den politischen Entscheidungsprozess sein. Diese Einschränkungen sind nötig, damit das volle Potenzial ausgeschöpft werden kann.\cite{Spirakis2010}
|
||||
|
||||
Auf Seiten der Effizienz wird die politische Entscheidungsfindung zunehmend transparenter. Bürger können am Prozess teilhaben und herausfinden, wie zukünftige Gesetze entstehen. Dabei erfahren sie auch welche politischen Interessensgruppen, Industrievertreter, Lobbyisten und Politiker diese zukünftigen Gesetze entwerfen. Darüber hinaus können sie erfahren warum bestimmte Gruppen versuchen politische Vorteile zu bekommen.
|
||||
Allerdings gibt es auch einige Risiken oder Nachteile von E-Democracy. So basiert es auf Informatik, der damit verbundenen Software und der Möglichkeit von Bürgern auf diese elektronischen Dienste zuzugreifen. Wird in Betracht gezogen, dass Teile der Bevölkerung arm und schlecht gebildet sind, dann ergibt sich ein großer Nachteil, denn diese Bevölkerungsgruppen sind von E-Democracy ausgeschlossen. Die Kosten von Computern und anderen notwendigen technischen Geräten, sowie die Verfügbarkeit einer Internetverbindung sind Hauptfaktoren bei der Implementation von E-Democracy. Desweiteren ist die Technologieabdeckung auf die Welt bezogen längst nicht homogen. Viele isolierte Gebiete haben keinen Anschluss an das Internet oder neue Technologien im Allgemeinen. Dies birgt ein großes Risiko bei der Umsetzung von E-Democracy.\cite{Spirakis2010}
|
||||
|
||||
Für Bürger ist diese Steigerung an Transparenz ganz klar ein Vorteil. Durch einen transparenten Gesetzesfindungsprozess können einseitige Lobbyinteressen viel schwieriger durchgesetzt werden. Bürger haben zeitig die Möglichkeit zu intervenieren, wenn Gesetze nicht ihren Wünschen entsprechen. Damit wird den Bürgern effektiv auch eine Möglichkeit gegeben eine Lobby zu sein.
|
||||
|
||||
Bedenkenswert sind die dafür nötigen impliziten Schritte. Dafür müssen Sitzungsprotokolle von Ausschüssen sowie die Telefonate und Schriftwechsel aller Politiker veröffentlicht werden. Dies stellt einen gravierenden Einschnitt in die Privatsphäre dar und erfordert in vielen Demokratien weitgehende Änderungen. Somit ist dieses Vorhaben trotz der hehren Ziele wohl vorerst nicht erreichbar. Gerade vor dem Hintergrund des sog. NSA-Skandals ist eine solche Transparenz des Gesetzgebungsverfahrens wohl auf absehbare Zeit unrealistisch.
|
||||
Fairerweise muss gesagt werden, dass auch Watson auf diesen Missstand hinweist.
|
||||
|
||||
Der letzte Schritt bzw. die letzte Phase ist die Errichtung einer eins-zu-eins Beziehung zwischen Staat und Bürger. Alle Bürger haben ein elektronisch verwaltetes Konto über das alle Finanz- oder sonstigen Transaktionen mit dem Staat abgewickelt werden. Eine Adressänderung wäre somit eine einzige Transaktion, die dann alle beteiligten staatlichen Stellen automatisch benachrichtigen würde.
|
||||
Desweiteren bekommen Bürger in dieser Phase eine detaillierte Auflistung wofür ihre Zahlungen verwendet werden. So könnte eingesehen werden, wie viel der Steuern bspw. für Bildung ausgegeben werden.
|
||||
|
||||
Diese Phase bietet eine weitere Vereinfachung der Interaktion mit dem Staat, was ein klarer Vorteil ist. Durch die individuelle Auflistung der Verwendung der Steuern und Abgaben für jeden Bürger wird die Bedeutung eben jener Abgaben deutlich. Es ist für jeden Bürger ersichtlich was er mit seinen Abgaben unterstützt. Damit wird die Verbindung zwischen Steuerzahlungen und Wertschaffung explizit und nachvollziehbar.
|
||||
|
||||
Es gibt aber auch hier einige Bedenken. Wenn jeder Bürger alle offiziellen Tätigkeiten über ein zentrales Profil abwickelt, dann wird Identitätsdiebstahl sehr viel einfacher. Auch sind die Daten von Bürgern weitaus gefährdeter. Wenn die Datenbank mit den Daten gehackt wird, dann besteht Zugriff auf alle Daten aller Bürger, die dann meistbietend verkauft werden könnten.
|
||||
|
||||
Außerdem erlaubt dies auch für den Staat Einblicke in Sachverhalte, die ihn nichts angehen. Durch die Kombination aller staatlichen Interaktion in einem einzigen Konto, können viel leichter Profile über Personen erstellt werden. Geheimdienste hätten so auf einen Schlag alle interessanten Informationen an einem Platz.
|
||||
|
||||
Der letzte Schritt in Watsons Idee umfasst eine weitere Individualisierung. So können Bürger auswählen welche Themenfelder sie interessieren und darüber auf dem Laufen gehalten werden. Wenn sich jemand für Trends in der Verwaltung von Nationalparks interessiert, könnte er sich eines elektronischen Lobbyagenten oder Lobbybots bedienen, um dieses Themengebiet zu beobachten und den politischen Prozess zu beeinflussen.
|
||||
|
||||
Der Vorteil ist auch hier klar erkennbar. Bürger können sich aus der Fülle an Informationen die Bereiche herausnehmen, die für sie interessant sind und sich somit spezialisieren. Dies ermöglicht aktive Teilhabe am politischen Prozess ohne selber aktiv in der Politik zu sein. Damit ist die Integration der Bevölkerung in die Gesetzesfindung weitaus besser als vorher.
|
||||
|
||||
Der Vorteil ist hier der Nachteil zugleich. Denn durch die Möglichkeit der Präferenz ist es umso leichter zu ermitteln wer sich für welche Themen interessiert. Damit können oben genannte Profile weiter verfeinert werden und in Verbindung mit anderen Daten von Bürgern zu ernsthaften Problemen führen. Geheimdienste könnten diese Informationen in Verbindung mit gespeicherten Emails dazu nutzen Bürger aufgrund ihrer politischen Partizipation zu verfolgen.
|
||||
|
||||
Wenn ein Bürger sich zum Beispiel für Außenpolitik interessiert (als Präferenz in dem zentralen Konto) und sich gleichzeitig in Gesprächen mit Freunden positiv gegenüber suspekten Staaten äußert (bspw. Iran im Falle der USA), könnten die Geheimdienste vermuten, dass dieser Bürger eventuell ein Spion des Irans (in diesem Beispiel) ist. Ein komplett unschuldiger Bürger kann somit in das Fadenkreuz von entsprechenden Diensten kommen, nur wegen politischer Partizipation und einer Meinung, die nicht der offiziellen Linie der Regierung entspricht.
|
||||
|
||||
Alleine die Möglichkeit eines solchen Beispiels ist schon sehr bedenklich in einer Demokratie.
|
||||
\section{Auswertung}
|
||||
\section{Fazit}
|
||||
\label{sec:concl}
|
||||
|
||||
In der Diskussion um die Vor- und Nachteile von Watsons 3-Phasen-Konzepts ist deutlich geworden, dass es unter guten Umständen sehr helfen kann die Demokratie zu verbessern. Es ist aber auch deutlich geworden, dass eben jenes Konzept in der Lage ist die Demokratie noch weiter zu gefährden.
|
||||
E-Democracy bietet riesige Chancen für die positive Entwicklung einer Gesellschaft, indem sich Regierungen und Bürger auf Augenhöhe begegnen und als Partner ansehen und nicht als Gegner.
|
||||
Dafür ist es aber nötig, dass alle Bürger Zugang zu E-Democracy haben, was durch deren Abhängigkeit von Computertechnologie zur Zeit noch sehr schwierig ist. Mit der Entwicklung eines kostengünstigen Systems für E-Democracy kann dies jedoch behoben werden.
|
||||
|
||||
Abschließend kann daher hier weder behauptet werden, dass dieses Konzept sofort umgesetzt werden sollte, noch dass es keinen weiteren Gedanken verdient. Das Konzept zeigt eine Möglichkeit der Veränderung auf, die in Teilen heute (12 Jahre später) bereits vorhanden ist. In jedem Falle kann es als Diskussionsgrundlage für Veränderungen in der Umsetzung von Demokratie dienen.
|
||||
|
||||
Es ist in Zukunft unvermeidbar mehr und mehr die Demokratie auch über das Internet verfügbar zu machen. Entsprechende Änderungen müssen aber sorgsam und mit Rücksicht auf integrale Prinzipien der Demokratie durchgeführt werden.
|
||||
Von zentraler Wichtigkeit ist, dass die demokratischen Prinzipien auch für E-Democracy gelten.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% hier werden - zum Ende des Textes - die bibliographischen Referenzen
|
||||
@ -267,7 +243,7 @@
|
||||
% Insbesondere stehen die eigentlichen Informationen in der Datei
|
||||
% ``bib.bib''
|
||||
%
|
||||
%\clearpage
|
||||
\clearpage
|
||||
\bibliography{bib}
|
||||
\bibliographystyle{ieeetr}
|
||||
\addcontentsline{toc}{section}{Literatur}% Add to the TOC
|
||||
|
||||
216
optimierung/Uebungsblatt10.tex
Normal file
216
optimierung/Uebungsblatt10.tex
Normal file
@ -0,0 +1,216 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\usepackage{multirow}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
% ensures that paragraphs are separated by empty lines
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
% define how the sections are rendered
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
% some matrix magic
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
|
||||
\begin{document}
|
||||
\author{Jan Branitz (6326955), Jim Martens (6420323),\\
|
||||
Stephan Niendorf (6242417)}
|
||||
\title{Hausaufgaben zum 6. Januar}
|
||||
\maketitle
|
||||
\section{} %1
|
||||
\begin{tikzpicture}[node distance=2cm]
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [right=of s] {b};
|
||||
\node (c) [below right=of s] {c};
|
||||
\node (d) [right=of c] {d};
|
||||
\node (e) [right=of b] {e};
|
||||
\node (t) [right=of e] {t};
|
||||
\node (sCap) [below=0.1 of s] {(-, $\infty$)};
|
||||
\node (aCap) [above=0.1 of a] {(s, +, 3)};
|
||||
\node (bCap) [below=0.1 of b] {(s, +, 5)};
|
||||
\node (cCap) [below=0.1 of c] {(s, +, 6)};
|
||||
\node (tCap) [above=0.1 of t] {(a, +, 3)};
|
||||
\path[->] (s) edge[line width=2pt] node [above left] {0(3)} (a)
|
||||
(s) edge node [below] {0(5)} (b)
|
||||
(s) edge node [below left] {0(6)} (c)
|
||||
(a) edge[line width=2pt] node [above right] {0(5)} (t)
|
||||
(a) edge node [left] {0(4)} (b)
|
||||
(b) edge node [below] {0(2)} (e)
|
||||
(b) edge node [below left] {0(6)} (d)
|
||||
(c) edge node [below] {0(4)} (d)
|
||||
(d) edge node [below right] {0(5)} (t)
|
||||
(e) edge node [below] {0(3)} (t);
|
||||
\end{tikzpicture}
|
||||
|
||||
\begin{tikzpicture}[node distance=2cm]
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [right=of s] {b};
|
||||
\node (c) [below right=of s] {c};
|
||||
\node (d) [right=of c] {d};
|
||||
\node (e) [right=of b] {e};
|
||||
\node (t) [right=of e] {t};
|
||||
\node (sCap) [below=0.1 of s] {(-, $\infty$)};
|
||||
\node (bCap) [below=0.1 of b] {(s, +, 5)};
|
||||
\node (cCap) [below=0.1 of c] {(s, +, 6)};
|
||||
\node (dCap) [below=0.1 of d] {(b, +, 5)};
|
||||
\node (eCap) [below=0.1 of e] {(b, +, 2)};
|
||||
\node (tCap) [above=0.1 of t] {(d, +, 5)};
|
||||
\path[->] (s) edge node [above left] {3(3)} (a)
|
||||
(s) edge[line width=2pt] node [below] {0(5)} (b)
|
||||
(s) edge node [below left] {0(6)} (c)
|
||||
(a) edge node [above right] {3(5)} (t)
|
||||
(a) edge node [left] {0(4)} (b)
|
||||
(b) edge node [below] {0(2)} (e)
|
||||
(b) edge[line width=2pt] node [below left] {0(6)} (d)
|
||||
(c) edge node [below] {0(4)} (d)
|
||||
(d) edge[line width=2pt] node [below right] {0(5)} (t)
|
||||
(e) edge node [below] {0(3)} (t);
|
||||
\end{tikzpicture}
|
||||
|
||||
\begin{tikzpicture}[node distance=2cm]
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [right=of s] {b};
|
||||
\node (c) [below right=of s] {c};
|
||||
\node (d) [right=of c] {d};
|
||||
\node (e) [right=of b] {e};
|
||||
\node (t) [right=of e] {t};
|
||||
\node (sCap) [below=0.1 of s] {(-, $\infty$)};
|
||||
\node (eCap) [below=0.1 of e] {(b, +, 2)};
|
||||
\node (cCap) [below=0.1 of c] {(s, +, 6)};
|
||||
\node (dCap) [below=0.1 of d] {(c, +, 4)};
|
||||
\node (tCap) [above=0.1 of t] {(e, +, 2)};
|
||||
\node (bCap) [below=0.1 of b] {(d, -, 4)};
|
||||
\path[->] (s) edge node [above left] {3(3)} (a)
|
||||
(s) edge node [below] {5(5)} (b)
|
||||
(s) edge[line width=2pt] node [below left] {0(6)} (c)
|
||||
(a) edge node [above right] {3(5)} (t)
|
||||
(a) edge node [left] {0(4)} (b)
|
||||
(b) edge[line width=2pt] node [below] {0(2)} (e)
|
||||
(b) edge[line width=2pt] node [below left] {5(6)} (d)
|
||||
(c) edge[line width=2pt] node [below] {0(4)} (d)
|
||||
(d) edge node [below right] {5(5)} (t)
|
||||
(e) edge[line width=2pt] node [below] {0(3)} (t);
|
||||
\end{tikzpicture}
|
||||
|
||||
\begin{tikzpicture}[node distance=2cm]
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [right=of s] {b};
|
||||
\node (c) [below right=of s] {c};
|
||||
\node (d) [right=of c] {d};
|
||||
\node (e) [right=of b] {e};
|
||||
\node (t) [right=of e] {t};
|
||||
\node (sCap) [below=0.1 of s] {(-, $\infty$)};
|
||||
\node (cCap) [below=0.1 of c] {(s, +, 4)};
|
||||
\node (dCap) [below=0.1 of d] {(c, +, 2)};
|
||||
\node (bCap) [below=0.1 of b] {(d, -, 2)};
|
||||
\path[->] (s) edge node [above left] {3(3)} (a)
|
||||
(s) edge node [below] {5(5)} (b)
|
||||
(s) edge node [below left] {2(6)} (c)
|
||||
(a) edge node [above right] {3(5)} (t)
|
||||
(a) edge node [left] {0(4)} (b)
|
||||
(b) edge node [below] {2(2)} (e)
|
||||
(b) edge node [below left] {3(6)} (d)
|
||||
(c) edge node [below] {2(4)} (d)
|
||||
(d) edge node [below right] {5(5)} (t)
|
||||
(e) edge node [below] {2(3)} (t);
|
||||
\end{tikzpicture}
|
||||
\section{} %2
|
||||
\subsection{} %a
|
||||
\begin{alignat*}{9}
|
||||
\text{minimiere}\; & 67w &+& 120k &+& 100h &+& 60f &+& 97b &+& 124n &+& 22s &+& 62m && \\
|
||||
\multicolumn{18}{l}{\text{unter den Nebenbedingungen}} && \\
|
||||
& 8w &+& 25k &+& 30h &+& 22f &+& 3b &+& 8n &+& 6s && &\geq &\, 75 \\
|
||||
& w &+& 35k &+& 8h &+& f && &+& 33n &+& 13s &+& 98m &\geq &\, 90 \\
|
||||
& 54w && && && &+& 42b &+& 4n &+& 63s && &\geq &\, 300 \\
|
||||
\multicolumn{16}{r}{$w, k, h, f, b, n, s, m$} \,&\geq &\, 0
|
||||
\end{alignat*}
|
||||
\subsection{} %b
|
||||
In das verlinkte Tool wird folgendes eingegeben:
|
||||
\begin{verbatim}
|
||||
Minimize p = 67w + 120k + 100h + 60f + 97b + 124n + 22s + 62m subject to
|
||||
8w + 25k + 30h + 22f + 3b + 8n + 6s + 0m >= 75
|
||||
w + 35k + 8h + f + 0b + 33n + 13s + 98m >= 90
|
||||
54w + 0k + 0h + 0f + 42b + 4n + 63s + 0m >= 300
|
||||
w >= 0
|
||||
k >= 0
|
||||
h >= 0
|
||||
f >= 0
|
||||
b >= 0
|
||||
n >= 0
|
||||
s >= 0
|
||||
m >= 0
|
||||
\end{verbatim}
|
||||
Die Ausgabe ist:
|
||||
\begin{verbatim}
|
||||
Optimal Solution: p = 6801/28; w = 0, k = 0, h = 0, f = 87/56,
|
||||
b = 0, n = 0, s = 381/56, m = 0
|
||||
\end{verbatim}
|
||||
\subsection{} %c
|
||||
In das verlinkte Tool wird folgendes eingegeben:
|
||||
\begin{verbatim}
|
||||
Minimize p = 3x1 + 24x2 + 13x3 + 9x4 + 20x5 + 19x6 subject to
|
||||
110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6 >= 2000
|
||||
4x1 + 32x2 + 13x3 + 8x4 + 4x5 + 14x6 >= 55
|
||||
2x1 + 12x2 + 54x3 + 285x4 + 22x5 + 80x6 >= 800
|
||||
x1 <= 4
|
||||
x2 <= 3
|
||||
x3 <= 2
|
||||
x4 <= 8
|
||||
x5 <= 2
|
||||
x6 <= 2
|
||||
x1 >= 0
|
||||
x2 >= 0
|
||||
x3 >= 0
|
||||
x4 >= 0
|
||||
x5 >= 0
|
||||
x6 >= 0
|
||||
\end{verbatim}
|
||||
Die Ausgabe ist:
|
||||
\begin{verbatim}
|
||||
Optimal Solution: p = 185/2; x1 = 4, x2 = 0, x3 = 0, x4 = 9/2, x5 = 2, x6 = 0
|
||||
\end{verbatim}
|
||||
\subsection{} %d
|
||||
In das verlinkte Tool wird folgendes eingegeben:
|
||||
\begin{verbatim}
|
||||
Maximize p = 8a1 + 3a2 + 6b1 + 3b2 + 9c1 + 5c2 subject to
|
||||
a1 + a2 <= 400
|
||||
b1 + b2 <= 480
|
||||
c1 + c2 <= 230
|
||||
a1 + b1 + c1 <= 420
|
||||
a2 + b2 + c2 <= 250
|
||||
a1 >= 0
|
||||
a2 >= 0
|
||||
b1 >= 0
|
||||
b2 >= 0
|
||||
c1 >= 0
|
||||
c2 >= 0
|
||||
\end{verbatim}
|
||||
Die Ausgabe ist:
|
||||
\begin{verbatim}
|
||||
Optimal Solution: p = 4550; a1 = 400, a2 = 0, b1 = 0, b2 = 40,
|
||||
c1 = 20, c2 = 210
|
||||
\end{verbatim}
|
||||
\end{document}
|
||||
105
optimierung/Uebungsblatt11.tex
Normal file
105
optimierung/Uebungsblatt11.tex
Normal file
@ -0,0 +1,105 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\usepackage{multirow}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
% ensures that paragraphs are separated by empty lines
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
% define how the sections are rendered
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
% some matrix magic
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
|
||||
\begin{document}
|
||||
\author{Jan Branitz (6326955), Jim Martens (6420323),\\
|
||||
Stephan Niendorf (6242417)}
|
||||
\title{Hausaufgaben zum 13. Januar}
|
||||
\maketitle
|
||||
\section{} %1
|
||||
\subsection{} %a
|
||||
\subsubsection{} %i
|
||||
Die Knoten werden in der Reihenfolge a, b, f, c, d, g, e und t markiert.
|
||||
|
||||
\begin{tabular}{c|c}
|
||||
Knoten & Markierung \\
|
||||
\hline
|
||||
s & $(-, \infty)$ \\
|
||||
a & (s, +, 38) \\
|
||||
b & (s, +, 1) \\
|
||||
f & (s, +, 2) \\
|
||||
c & (a, +, 10) \\
|
||||
d & (a, +, 38) \\
|
||||
g & (f, +, 2) \\
|
||||
e & (c, +, 10) \\
|
||||
t & (c, +, 10)
|
||||
\end{tabular}
|
||||
|
||||
Es gibt keine Knoten, die unmarkiert bleiben.
|
||||
\subsubsection{} %ii
|
||||
%s, a, b, f, d, c, g, e, t
|
||||
Der Pfad $f_{0}$ führt von s über a und c nach t. Der verbesserte Fluss $f_{1}$ weist die folgenden Markierungen auf.
|
||||
|
||||
\begin{tabular}{c|c}
|
||||
Knoten & Markierung \\
|
||||
\hline
|
||||
s & $(-, \infty)$ \\
|
||||
a & (s, +, 28) \\
|
||||
b & (s, +, 1) \\
|
||||
f & (s, +, 2) \\
|
||||
d & (a, +, 28) \\
|
||||
c & (b, +, 1) \\
|
||||
g & (f, +, 2) \\
|
||||
e & (d, +, 1) \\
|
||||
t & (d, +, 7)
|
||||
\end{tabular}
|
||||
\subsection{} %b
|
||||
Die Knoten, die zu S gehören, sind markiert und die Knoten, die zu T gehören, sind nicht markiert.
|
||||
\subsection{} %c
|
||||
(i) ist wahr und (ii) ist falsch.
|
||||
\subsection{} %d
|
||||
In jedem Graphen gilt $m(G) \leq c(G)$ (siehe Skript Seite 121, 11.1), weswegen (ii) falsch ist. Solange mindestens zwei Knoten nicht zum Matching gehören (je mindestens einer in X und einer in Y), können diese im besten Fall durch eine neue Matchingkante dem Matching hinzugefügt werden. In diesem Fall ist die Matchingzahl $m(G)$ also mindestens um eins höher als ein unter den beschriebenen Voraussetzungen vorhandenes Matching.
|
||||
\section{} %2
|
||||
\subsection{} %a
|
||||
\begin{tabular}{c|l}
|
||||
Durchgang & Matching \\
|
||||
\hline
|
||||
1 & $M = \{\{x_{1}, y_{1}\}\}$ \\
|
||||
2 & $M = \{\{x_{1}, y_{1}\}, \{x_{2}, y_{2}\}\}$ \\
|
||||
3 & $M = \{\{x_{1}, y_{4}\}, \{x_{2}, y_{2}\}, \{x_{3}, y_{1}\}\}$ \\
|
||||
4 & $M = \{\{x_{1}, y_{4}\}, \{x_{2}, y_{3}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{2}\}\}$ \\
|
||||
5 & $M = \{\{x_{1}, y_{4}\}, \{x_{2}, y_{3}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{2}\}, \{x_{5}, y_{5}\}\}$ \\
|
||||
6 & $M = \{\{x_{1}, y_{4}\}, \{x_{2}, y_{3}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{2}\}, \{x_{5}, y_{5}\}, \{x_{6}, y_{6}\}\}$ \\
|
||||
\end{tabular}
|
||||
\subsection{} %b
|
||||
\begin{tabular}{c|l}
|
||||
Durchgang & Matching \\
|
||||
\hline
|
||||
1 & $M = \{\{x_{1}, y_{1}\}\}$ \\
|
||||
2 & $M = \{\{x_{1}, y_{1}\}, \{x_{2}, y_{2}\}\}$ \\
|
||||
3 & $M = \{\{x_{1}, y_{3}\}, \{x_{2}, y_{2}\}, \{x_{3}, y_{1}\}\}$ \\
|
||||
4 & $M = \{\{x_{1}, y_{3}\}, \{x_{2}, y_{2}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{4}\}\}$ \\
|
||||
5 & $M = \{\{x_{1}, y_{3}\}, \{x_{2}, y_{5}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{4}\}, \{x_{5}, y_{2}\}\}$ \\
|
||||
6 & $M = \{\{x_{1}, y_{3}\}, \{x_{2}, y_{5}\}, \{x_{3}, y_{1}\}, \{x_{4}, y_{4}\}, \{x_{5}, y_{2}\}, \{x_{6}, y_{6}\}\}$ \\
|
||||
\end{tabular}
|
||||
\end{document}
|
||||
138
optimierung/Uebungsblatt12.tex
Normal file
138
optimierung/Uebungsblatt12.tex
Normal file
@ -0,0 +1,138 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\usepackage{multirow}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
% ensures that paragraphs are separated by empty lines
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
% define how the sections are rendered
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
% some matrix magic
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
|
||||
\begin{document}
|
||||
\author{Jan Branitz (6326955), Jim Martens (6420323),\\
|
||||
Stephan Niendorf (6242417)}
|
||||
\title{Hausaufgaben zum 20. Januar}
|
||||
\maketitle
|
||||
\section{} %1
|
||||
\subsection{} %a
|
||||
\begin{tabular}{c|c|c|c|c|c|c|c|c}
|
||||
& s & a & b & c & d & e & f & S\\
|
||||
\hline
|
||||
0 & \underline{0} & 6s & 5s & 2s & $\infty$ & $\infty$ & $\infty$ & $\{s\}$ \\
|
||||
1 & \underline{0} & 6s & 4c & \underline{2}s & $\infty$ & 3c & 5c & $\{s,c\}$ \\
|
||||
2 & \underline{0} & 5e & 4c & \underline{2}s & $\infty$ & \underline{3}c & 4e & $\{s,c,e\}$ \\
|
||||
3 & \underline{0} & 5e & \underline{4}c & \underline{2}s & 8b & \underline{3}c & 4e & $\{s,c,e,b\}$ \\
|
||||
4 & \underline{0} & 5e & \underline{4}c & \underline{2}s & 8b & \underline{3}c & \underline{4}e & $\{s,c,e,b,f\}$ \\
|
||||
5 & \underline{0} & \underline{5}e & \underline{4}c & \underline{2}s & 7a & \underline{3}c & \underline{4}e & $\{s,c,e,b,f,a\}$ \\
|
||||
6 & \underline{0} & \underline{5}e & \underline{4}c & \underline{2}s & \underline{7}a & \underline{3}c & \underline{4}e & $\{s,c,e,b,f,a,d\}$ \\
|
||||
\end{tabular}
|
||||
|
||||
\begin{tikzpicture}
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [right=of s] {b};
|
||||
\node (c) [below right=of s] {c};
|
||||
\node (d) [right=of a] {d};
|
||||
\node (e) [right=of b] {e};
|
||||
\node (f) [right=of c] {f};
|
||||
|
||||
\path[->,line width=1pt] (s) edge node [below] {2} (c)
|
||||
(c) edge node [above] {1} (e)
|
||||
(c) edge node [left] {2} (b)
|
||||
(e) edge node [right] {1} (f)
|
||||
(e) edge node [below] {2} (a)
|
||||
(a) edge node [above] {2} (d);
|
||||
\end{tikzpicture}
|
||||
\subsection{} %b
|
||||
Als Graph G sei folgender Graph angenommen.
|
||||
|
||||
\begin{tikzpicture}
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [below right=of s] {b};
|
||||
\node (t) [below right=of a] {t};
|
||||
\path[->,line width=1pt] (s) edge node [above left] {-1} (a)
|
||||
(s) edge node [below] {1000} (t)
|
||||
(s) edge node [below left] {-999} (b)
|
||||
(a) edge node [above right] {2} (t)
|
||||
(b) edge node [below right] {1500} (t);
|
||||
\end{tikzpicture}
|
||||
|
||||
Als Konstante C werde 999 angenommen. Dadurch ergibt sich dieser modifizierte Graph $G'$.
|
||||
|
||||
\begin{tikzpicture}
|
||||
\node (s) {s};
|
||||
\node (a) [above right=of s] {a};
|
||||
\node (b) [below right=of s] {b};
|
||||
\node (t) [below right=of a] {t};
|
||||
\path[->,line width=1pt] (s) edge node [above left] {998} (a)
|
||||
(s) edge node [below] {1999} (t)
|
||||
(s) edge node [below left] {0} (b)
|
||||
(a) edge node [above right] {1001} (t)
|
||||
(b) edge node [below right] {2499} (t);
|
||||
\end{tikzpicture}
|
||||
|
||||
Wendet man nun Dijkstra auf diesen modifizierten Graphen an, dann ergibt sich diese Tabelle.
|
||||
|
||||
\begin{tabular}{c|c|c|c|c|c}
|
||||
& s & a & b & t & S\\
|
||||
\hline
|
||||
0 & \underline{0} & 998s & 0s & 1999s & $\{s\}$ \\
|
||||
1 & \underline{0} & 998s & \underline{0}s & 1999s & $\{s,b\}$ \\
|
||||
2 & \underline{0} & \underline{998}s & \underline{0}s & 1999s & $\{s,b,a\}$ \\
|
||||
3 & \underline{0} & \underline{998}s & \underline{0}s & \underline{1999}s & $\{s,b,a,t\}$
|
||||
\end{tabular}
|
||||
|
||||
Wie hier erkennbar ist, wird durch den Dijkstra-Algorithmus nach Addierung einer Konstante C ein falscher kürzester Pfad zurückgegeben, der im unveränderten Graphen G um 999 länger als der kürzeste Pfad ist.
|
||||
\section{} %2
|
||||
\subsection{} %a
|
||||
Reihenfolge bei Anwendung von Kruskal:
|
||||
|
||||
\[
|
||||
(a,e), (e,f), (b,e), (f,g), (g,h), (c,g), (d,g)
|
||||
\]
|
||||
|
||||
Es gibt unterschiedliche Möglichkeiten für die Reihenfolge, denn immer wenn es zwei Kanten mit gleichen Kantengewicht gibt, die beide keinen Kreis entstehen lassen, ist es egal welche genommen wird. Damit können auch unterschiedliche Bäume dabei entstehen.
|
||||
\subsection{} %b
|
||||
\subsubsection{} %i
|
||||
Reihenfolge der Hinzunahme von Kanten:
|
||||
|
||||
\[
|
||||
(a,b), (b,c), (c,g), (g,d), (g,f), (g,h)
|
||||
\]
|
||||
\subsubsection{} %ii
|
||||
Reihenfolge der Hinzunahme von Kanten:
|
||||
|
||||
\[
|
||||
(a,b), (f,g), (g,h), (d,g), (b,c), (c,g), (a,e)
|
||||
\]
|
||||
\subsubsection{} %iii
|
||||
Reihenfolge der weggelassenen Kanten:
|
||||
|
||||
\[
|
||||
(a,f), (b,f), (b,g), (e,f), (d,h), (c,d)
|
||||
\]
|
||||
\end{document}
|
||||
@ -117,8 +117,8 @@ Stephan Niendorf (6242417)}
|
||||
\frac{4}{5}x_{1} \,&=&&\, 20 + \frac{1}{50}x_{4} - x_{3} \\
|
||||
x_{1} \,&=&&\, 25 + \frac{1}{40}x_{4} - \frac{5}{4}x_{3} \\
|
||||
x_{2} \,&=&&\, 80 - \frac{1}{5}\left(25 + \frac{1}{40}x_{4} - \frac{5}{4}x_{3}\right) - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 80 - 5 + \frac{1}{200}x_{4} - \frac{1}{4}x_{3} - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 75 - \frac{3}{200}x_{4} - \frac{1}{4}x_{3} \\
|
||||
&=&&\, 80 - 5 - \frac{1}{200}x_{4} + \frac{1}{4}x_{3} - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 75 - \frac{1}{40}x_{4} + \frac{1}{4}x_{3} \\
|
||||
z \,&=&&\, 5600 + 26\left(25 + \frac{1}{40}x_{4} - \frac{5}{4}x_{3}\right) - \frac{7}{5}x_{4} \\
|
||||
&=&&\, 5600 + 650 + \frac{13}{20}x_{4} - \frac{65}{2}x_{3} - \frac{7}{5}x_{4} \\
|
||||
&=&&\, 6250 - \frac{3}{4}x_{4} - \frac{65}{2}x_{3}
|
||||
@ -127,7 +127,7 @@ Stephan Niendorf (6242417)}
|
||||
\underline{Ergebnis der 2. Iteration}:
|
||||
\begin{alignat*}{4}
|
||||
x_{1} \,&=&\, 25 \,&-&\, \frac{1}{40}x_{4} \,&-&\, \frac{5}{4}x_{3} \\
|
||||
x_{2} \,&=&\, 75 \,&-&\, \frac{3}{200}x_{4} \,&-&\, \frac{1}{4}x_{3} \\ \cline{1 - 7}
|
||||
x_{2} \,&=&\, 75 \,&-&\, \frac{1}{40}x_{4} \,&+&\, \frac{1}{4}x_{3} \\ \cline{1 - 7}
|
||||
z &=& 6250 \,&-&\, \frac{3}{4}x_{4} \,&-&\, \frac{65}{2}x_{3}
|
||||
\end{alignat*}
|
||||
|
||||
@ -242,8 +242,8 @@ Stephan Niendorf (6242417)}
|
||||
\frac{4}{5}x_{1} \,&=&&\, 20 - \frac{1}{50}t + \frac{1}{50}x_{4} - x_{3} \\
|
||||
x_{1} \,&=&&\, 25 - \frac{1}{40}t + \frac{1}{40}x_{4} - \frac{5}{4}x_{3} \\
|
||||
x_{2} \,&=&&\, 80 + \frac{1}{50}t - \frac{1}{5}\left(25 - \frac{1}{40}t + \frac{1}{40}x_{4} - \frac{5}{4}x_{3}\right) - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 80 + \frac{1}{50}t - 5 + \frac{1}{200}t - \frac{1}{200}x_{4} - \frac{1}{4}x_{3} - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 75 + \frac{1}{40}t - \frac{1}{40}x_{4} - \frac{1}{4}x_{3} \\
|
||||
&=&&\, 80 + \frac{1}{50}t - 5 + \frac{1}{200}t - \frac{1}{200}x_{4} + \frac{1}{4}x_{3} - \frac{1}{50}x_{4} \\
|
||||
&=&&\, 75 + \frac{1}{40}t - \frac{1}{40}x_{4} + \frac{1}{4}x_{3} \\
|
||||
z \,&=&&\, 5600 + \frac{7}{5}t + 26\left(25 - \frac{1}{40}t + \frac{1}{40}x_{4} - \frac{5}{4}x_{3}\right) - \frac{7}{5}x_{4} \\
|
||||
&=&&\, 5600 + \frac{7}{5}t + 650 - \frac{13}{20}t + \frac{13}{20}x_{4} - \frac{65}{2}x_{3} - \frac{7}{5}x_{4} \\
|
||||
&=&&\, 6250 + \frac{3}{4}t - \frac{3}{4}x_{4} - \frac{65}{2}x_{3}
|
||||
@ -251,8 +251,8 @@ Stephan Niendorf (6242417)}
|
||||
|
||||
\underline{Ergebnis der 2. Iteration}:
|
||||
\begin{alignat*}{4}
|
||||
x_{1} \,&=&\, 25 - \frac{1}{40}t \,&-&\, \frac{1}{40}x_{4} \,&-&\, \frac{5}{4}x_{3} \\
|
||||
x_{2} \,&=&\, 75 + \frac{1}{40}t \,&-&\, \frac{1}{40}x_{4} \,&-&\, \frac{1}{4}x_{3} \\ \cline{1 - 7}
|
||||
x_{1} \,&=&\, 25 - \frac{1}{40}t \,&+&\, \frac{1}{40}x_{4} \,&-&\, \frac{5}{4}x_{3} \\
|
||||
x_{2} \,&=&\, 75 + \frac{1}{40}t \,&-&\, \frac{1}{40}x_{4} \,&+&\, \frac{1}{4}x_{3} \\ \cline{1 - 7}
|
||||
z &=& 6250 + \frac{3}{4}t \,&-&\, \frac{3}{4}x_{4} \,&-&\, \frac{65}{2}x_{3}
|
||||
\end{alignat*}
|
||||
|
||||
|
||||
561
optimierung/Uebungsblatt9.tex
Normal file
561
optimierung/Uebungsblatt9.tex
Normal file
@ -0,0 +1,561 @@
|
||||
\documentclass[10pt,a4paper,oneside,ngerman,numbers=noenddot]{scrartcl}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{paralist}
|
||||
\usepackage{gauss}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage[locale=DE,exponent-product=\cdot,detect-all]{siunitx}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{matrix,fadings,calc,positioning,decorations.pathreplacing,arrows,decorations.markings}
|
||||
\usepackage{polynom}
|
||||
\usepackage{multirow}
|
||||
\polyset{style=C, div=:,vars=x}
|
||||
\pgfplotsset{compat=1.8}
|
||||
\pagenumbering{arabic}
|
||||
% ensures that paragraphs are separated by empty lines
|
||||
\parskip 12pt plus 1pt minus 1pt
|
||||
\parindent 0pt
|
||||
% define how the sections are rendered
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
% some matrix magic
|
||||
\makeatletter
|
||||
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
|
||||
\hskip -\arraycolsep
|
||||
\let\@ifnextchar\new@ifnextchar
|
||||
\array{#1}}
|
||||
\makeatother
|
||||
|
||||
\begin{document}
|
||||
\author{Jan Branitz (6326955), Jim Martens (6420323),\\
|
||||
Stephan Niendorf (6242417)}
|
||||
\title{Hausaufgaben zum 16. Dezember}
|
||||
\maketitle
|
||||
\section{} %1
|
||||
\subsection{} %a
|
||||
\begin{alignat*}{3}
|
||||
\text{maximiere}\; & 2x_{1} \,&+&\, 3x_{2} && \\
|
||||
\multicolumn{6}{l}{\text{unter den Nebenbedingungen}} && \\
|
||||
\;& x_{1} \,&-&\, 4x_{2} \,&\leq & 2 \\
|
||||
\;& x_{1} \,&&\, \,&\leq & 5 \\
|
||||
\;& \,&&\, x_{2} \,&\leq & 8 \\
|
||||
\multicolumn{4}{r}{$x_{1}, x_{2}$} \,&\geq &\, 0
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Eingangsdaten}:
|
||||
\begin{alignat*}{2}
|
||||
A &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} \\
|
||||
1 & -4 & 1 & 0 & 0 \\
|
||||
1 & 0 & 0 & 1 & 0 \\
|
||||
0 & 1 & 0 & 0 & 1
|
||||
\end{pmatrix} \\
|
||||
c^{T} &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} \\
|
||||
2 & 3 & 0 & 0 & 0
|
||||
\end{pmatrix} \\
|
||||
b &=& \begin{pmatrix}
|
||||
2 \\
|
||||
5 \\
|
||||
8
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Initialisierung}:
|
||||
\begin{alignat*}{2}
|
||||
x_{B}^{*} &=& \begin{pmatrix}
|
||||
x_{3}^{*} \\
|
||||
x_{4}^{*} \\
|
||||
x_{5}^{*}
|
||||
\end{pmatrix}
|
||||
=
|
||||
\begin{pmatrix}
|
||||
2 \\
|
||||
5 \\
|
||||
8
|
||||
\end{pmatrix} \\
|
||||
B &=& \begin{pmatrix}
|
||||
x_{3} & x_{4} & x_{5} \\
|
||||
1 & 0 & 0 \\
|
||||
0 & 1 & 0 \\
|
||||
0 & 0 & 1
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{1. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
y_{1} & & &=& 0 \\
|
||||
& y_{2} & &=& 0 \\
|
||||
& & y_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{2} \\ 1 & -4 \\ 1 & 0 \\ 0 & 1 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 0 & 0 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 2 & 3 \end{pmatrix}$. Also kommt jede Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} -4 \\ 0 \\ 1 \end{pmatrix}$; die Eingangsvariable ist $x_{2}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{3}
|
||||
d_{1} & & &=& -4 \\
|
||||
& d_{2} & &=& 0 \\
|
||||
& & d_{3} &=& 1
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}-4 \\ 0 \\ 1 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 2 \\ 5 \\ 8\end{pmatrix} - t \begin{pmatrix}-4 \\ 0 \\ 1 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 8$; für $t = 8$ gilt $\begin{pmatrix} 2 \\ 5 \\ 8\end{pmatrix} - t \begin{pmatrix}-4 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 34 \\ 5 \\ 0 \end{pmatrix}$, Ausgangsvariable ist $x_{5}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{3}^{*} \\ x_{4}^{*} \\ x_{2}^{*} \end{pmatrix} = \begin{pmatrix} 34 \\ 5 \\ 8 \end{pmatrix}$ und $B = \begin{pmatrix} x_{3} & x_{4} & x_{2} \\ 1 & 0 & -4 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$.
|
||||
|
||||
\underline{2. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 2 & 0 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{4}
|
||||
y_{1} && &-& 4y_{3} &=& 34 \\
|
||||
&& y_{2} && &=& 5 \\
|
||||
&& && y_{3} &=& 8
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 66 & 5 & 8 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{5} \\ 1 & 0 \\ 1 & 0 \\ 0 & 1 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 71 & 8 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 2 & 0 \end{pmatrix}$. Also kommt nur die erste Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix}$; die Eingangsvariable ist $x_{1}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{4}
|
||||
d_{1} && &-& 4d_{3} &=& 1 \\
|
||||
&& d_{2} && &=& 1 \\
|
||||
&& && d_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}1 \\ 1 \\ 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 34 \\ 5 \\ 8\end{pmatrix} - t \begin{pmatrix}1 \\ 1 \\ 0 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 5$; für $t = 5$ gilt $\begin{pmatrix} 34 \\ 5 \\ 8\end{pmatrix} - t \begin{pmatrix}1 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 29 \\ 0 \\ 8 \end{pmatrix}$, Ausgangsvariable ist $x_{4}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{3}^{*} \\ x_{1}^{*} \\ x_{2}^{*} \end{pmatrix} = \begin{pmatrix} 29 \\ 5 \\ 8 \end{pmatrix}$ und $B = \begin{pmatrix} x_{3} & x_{1} & x_{2} \\ 1 & 1 & -4 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$.
|
||||
|
||||
\underline{3. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 2 & 3 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{4}
|
||||
y_{1} && && &=& 0 \\
|
||||
y_{1} &+& y_{2} && &=& 2 \\
|
||||
-4y_{1} && &+& y_{3} &=& 3
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & 2 & 3 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{4} & x_{5} \\ 0 & 0 \\ 1 & 0 \\ 0 & 1 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 2 & 3 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 0 & 0 \end{pmatrix}$. Wegen $2 \geq 0, 3 \geq 0$ ist die aktuelle Lösung optimal. Die optimale Lösung lautet $x_{1}^{*} = 5, x_{2}^{*} = 8$ mit $z^{*} = 2x_{1}^{*} + 3x_{2}^{*} = 34$.
|
||||
\subsection{} %b
|
||||
\begin{alignat*}{4}
|
||||
\text{maximiere}\; & 3x_{1} \,&+&\, 2x_{2} \,&+&\, 2x_{3} && \\
|
||||
\multicolumn{8}{l}{\text{unter den Nebenbedingungen}} && \\
|
||||
\;& x_{1} \,&&\, \,&+&\, x_{3} \,&\leq & 8 \\
|
||||
\;& x_{1} \,&+&\, x_{2} \,&&\, \,&\leq & 7 \\
|
||||
\;& x_{1} \,&+&\, 2x_{2} \,&&\, \,&\leq & 12 \\
|
||||
\multicolumn{6}{r}{$x_{1}, x_{2}, x_{3}$} \,&\geq &\, 0
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Eingangsdaten}:
|
||||
\begin{alignat*}{2}
|
||||
A &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} \\
|
||||
1 & 0 & 1 & 1 & 0 & 0 \\
|
||||
1 & 1 & 0 & 0 & 1 & 0\\
|
||||
1 & 2 & 0 & 0 & 0 & 1
|
||||
\end{pmatrix} \\
|
||||
c^{T} &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} \\
|
||||
3 & 2 & 2 & 0 & 0 & 0
|
||||
\end{pmatrix} \\
|
||||
b &=& \begin{pmatrix}
|
||||
8 \\
|
||||
7 \\
|
||||
12
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Initialisierung}:
|
||||
\begin{alignat*}{2}
|
||||
x_{B}^{*} &=& \begin{pmatrix}
|
||||
x_{4}^{*} \\
|
||||
x_{5}^{*} \\
|
||||
x_{6}^{*}
|
||||
\end{pmatrix}
|
||||
=
|
||||
\begin{pmatrix}
|
||||
8 \\
|
||||
7 \\
|
||||
12
|
||||
\end{pmatrix} \\
|
||||
B &=& \begin{pmatrix}
|
||||
x_{4} & x_{5} & x_{6} \\
|
||||
1 & 0 & 0 \\
|
||||
0 & 1 & 0 \\
|
||||
0 & 0 & 1
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{1. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
y_{1} & & &=& 0 \\
|
||||
& y_{2} & &=& 0 \\
|
||||
& & y_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{2} & x_{3} \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ 1 & 2 & 0 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 0 & 0 & 0 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 3 & 2 & 2 \end{pmatrix}$. Also kommt jede Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}$; die Eingangsvariable ist $x_{1}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{3}
|
||||
d_{1} & & &=& 1 \\
|
||||
& d_{2} & &=& 1 \\
|
||||
& & d_{3} &=& 1
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}1 \\ 1 \\ 1 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 8 \\ 7 \\ 12\end{pmatrix} - t \begin{pmatrix}1 \\ 1 \\ 1 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 7$; für $t = 7$ gilt $\begin{pmatrix} 8 \\ 7 \\ 12\end{pmatrix} - t \begin{pmatrix}1 \\ 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 5 \end{pmatrix}$, Ausgangsvariable ist $x_{5}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{4}^{*} \\ x_{1}^{*} \\ x_{6}^{*} \end{pmatrix} = \begin{pmatrix} 1 \\ 7 \\ 5 \end{pmatrix}$ und $B = \begin{pmatrix} x_{4} & x_{1} & x_{6} \\ 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}$.
|
||||
|
||||
\underline{2. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 3 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{4}
|
||||
y_{1} && && &=& 0 \\
|
||||
y_{1} &+& y_{2} &+& y_{3} &=& 3 \\
|
||||
&& && y_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & 3 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{5} & x_{2} & x_{3} \\ 0 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 2 & 0 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 3 & 3 & 0 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 0 & 2 & 2 \end{pmatrix}$. Also kommt nur die dritte Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}$; die Eingangsvariable ist $x_{3}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{4}
|
||||
d_{1} &+& d_{2} && &=& 1 \\
|
||||
&& d_{2} && &=& 0 \\
|
||||
&& d_{2} &+& d_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}1 \\ 0 \\ 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 1 \\ 7 \\ 5\end{pmatrix} - t \begin{pmatrix}1 \\ 0 \\ 0 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 1$; für $t = 1$ gilt $\begin{pmatrix} 1 \\ 7 \\ 5\end{pmatrix} - t \begin{pmatrix}1 \\ 0 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 7 \\ 5 \end{pmatrix}$, Ausgangsvariable ist $x_{4}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{3}^{*} \\ x_{1}^{*} \\ x_{6}^{*} \end{pmatrix} = \begin{pmatrix} 1 \\ 7 \\ 5 \end{pmatrix}$ und $B = \begin{pmatrix} x_{3} & x_{1} & x_{6} \\ 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}$.
|
||||
|
||||
\underline{3. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 2 & 3 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{4}
|
||||
y_{1} && && &=& 2 \\
|
||||
y_{1} &+& y_{2} &+& y_{3} &=& 3 \\
|
||||
&& && y_{3} &=& 0
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 2 & 1 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{5} & x_{2} & x_{4} \\ 0 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 2 & 0 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 1 & 1 & 2 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 0 & 2 & 0\end{pmatrix}$. Also kommen nur die ersten beiden Spalten von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 0 \\ 1 \\ 2 \end{pmatrix}$; die Eingangsvariable ist $x_{2}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{4}
|
||||
d_{1} &+& d_{2} && &=& 0\\
|
||||
&& d_{2} && &=& 1 \\
|
||||
&& d_{2} &+& d_{3} &=& 2
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix} -1 \\ 1 \\ 1 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 1 \\ 7 \\ 5\end{pmatrix} - t \begin{pmatrix}-1 \\ 1 \\ 1 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 5$; für $t = 5$ gilt $\begin{pmatrix} 1 \\ 7 \\ 5\end{pmatrix} - t \begin{pmatrix} -1 \\ 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 6 \\ 2 \\ 0 \end{pmatrix}$, Ausgangsvariable ist $x_{6}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{3}^{*} \\ x_{1}^{*} \\ x_{2}^{*} \end{pmatrix} = \begin{pmatrix} 6 \\ 2 \\ 5 \end{pmatrix}$ und $B = \begin{pmatrix} x_{3} & x_{1} & x_{2} \\ 1 & 1 & 0 \\ 0 & 1 & 1 \\ 0 & 1 & 2 \end{pmatrix}$.
|
||||
|
||||
\underline{4. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 2 & 3 & 2 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{4}
|
||||
y_{1} && && &=& 2 \\
|
||||
y_{1} &+& y_{2} &+& y_{3} &=& 3 \\
|
||||
&& y_{2} &+& 2y_{3} &=& 2
|
||||
\end{alignat*}
|
||||
Es ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & y_{2} &+& y_{3} &=& 1 \\
|
||||
II & y_{2} &+& 2y_{3} &=& 2 \\
|
||||
II - I & && y_{3} &=& 1
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 2 & 0 & 1 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{5} & x_{6} & x_{4} \\ 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 0 & 1 & 2 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 0 & 0 & 0\end{pmatrix}$. Wegen $0 \geq 0, 1 \geq 0, 2 \geq 0$ ist die aktuelle Lösung optimal. Die optimale Lösung lautet $x_{1}^{*} = 2, x_{2}^{*} = 5, x_{3}^{*} = 6$ mit $z^{*} = 3x_{1}^{*} + 2x_{2}^{*} + 2x_{3}^{*} = 28$.
|
||||
\section{} %2
|
||||
\begin{alignat*}{5}
|
||||
\text{maximiere}\; & 5x_{1} \,&+&\, 6x_{2} \,&+&\, 9x_{3} \,&+&\, 8x_{4} && \\
|
||||
\multicolumn{10}{l}{\text{unter den Nebenbedingungen}} && \\
|
||||
\;& x_{1} \,&+&\, 2x_{2} \,&+&\, 3x_{3} \,&+&\, x_{4} \,&\leq & 5 \\
|
||||
\;& x_{1} \,&+&\, x_{2} \,&+&\, 2x_{3} \,&+&\, 3x_{4} \,&\leq & 3 \\
|
||||
\multicolumn{8}{r}{$x_{1}, x_{2}, x_{3}, x_{4}$} \,&\geq &\, 0
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Eingangsdaten}:
|
||||
\begin{alignat*}{2}
|
||||
A &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} \\
|
||||
1 & 2 & 3 & 1 & 1 & 0 \\
|
||||
1 & 1 & 2 & 3 & 0 & 1\\
|
||||
\end{pmatrix} \\
|
||||
c^{T} &=& \begin{pmatrix}
|
||||
x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} \\
|
||||
5 & 6 & 9 & 8 & 0 & 0
|
||||
\end{pmatrix} \\
|
||||
b &=& \begin{pmatrix}
|
||||
5 \\
|
||||
3
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{Initialisierung}:
|
||||
\begin{alignat*}{2}
|
||||
x_{B}^{*} &=& \begin{pmatrix}
|
||||
x_{5}^{*} \\
|
||||
x_{6}^{*}
|
||||
\end{pmatrix}
|
||||
=
|
||||
\begin{pmatrix}
|
||||
5 \\
|
||||
3
|
||||
\end{pmatrix} \\
|
||||
B &=& \begin{pmatrix}
|
||||
x_{5} & x_{6} \\
|
||||
1 & 0 \\
|
||||
0 & 1
|
||||
\end{pmatrix}
|
||||
\end{alignat*}
|
||||
|
||||
\underline{1. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 0 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{2}
|
||||
y_{1} & &=& 0 \\
|
||||
& y_{2} &=& 0
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{2} & x_{3} & x_{4} \\ 1 & 2 & 3 & 1 \\ 1 & 1 & 2 & 3 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 0 & 0 & 0 & 0\end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 5 & 6 & 9 & 8 \end{pmatrix}$. Also kommt jede Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 3 \\ 2 \end{pmatrix}$; die Eingangsvariable ist $x_{3}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{2}
|
||||
d_{1} & &=& 3 \\
|
||||
& d_{2} &=& 2
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}3 \\ 2 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 5 \\ 3 \end{pmatrix} - t \begin{pmatrix}3 \\ 2 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = \frac{3}{2}$; für $t = \frac{3}{2}$ gilt $\begin{pmatrix} 5 \\ 3 \end{pmatrix} - t \begin{pmatrix}3 \\ 2 \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ 0 \end{pmatrix}$, Ausgangsvariable ist $x_{6}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{5}^{*} \\ x_{3}^{*} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ \frac{3}{2} \end{pmatrix}$ und $B = \begin{pmatrix} x_{5} & x_{3} \\ 1 & 3 \\ 0 & 2 \end{pmatrix}$.
|
||||
|
||||
\underline{2. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 0 & 9 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
y_{1} && &=& 0 \\
|
||||
3y_{1} &+& 2y_{2} &=& 9
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 0 & \frac{9}{2} \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{2} & x_{6} & x_{4} \\ 1 & 2 & 0 & 1 \\ 1 & 1 & 1 & 3 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} \frac{9}{2} & \frac{9}{2} & \frac{9}{2} & \frac{27}{2} \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 5 & 6 & 0 & 8 \end{pmatrix}$. Also kommen nur die ersten drei Spalten von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$; die Eingangsvariable ist $x_{2}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{3}
|
||||
d_{1} &+& 3d_{2} &=& 2 \\
|
||||
&& 2d_{2} &=& 1
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix}\frac{1}{2} \\ \frac{1}{2}\end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} \frac{1}{2} \\ \frac{3}{2}\end{pmatrix} - t \begin{pmatrix}\frac{1}{2} \\ \frac{1}{2} \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 1$; für $t = 1$ gilt $\begin{pmatrix} \frac{1}{2} \\ \frac{3}{2}\end{pmatrix} - t \begin{pmatrix}\frac{1}{2} \\ \frac{1}{2} \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$, Ausgangsvariable ist $x_{5}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{2}^{*} \\ x_{3}^{*} \end{pmatrix} = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$ und $B = \begin{pmatrix} x_{2} & x_{3} \\ 2 & 3 \\ 1 & 2 \end{pmatrix}$.
|
||||
|
||||
\underline{3. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 6 & 9 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
2y_{1} &+& y_{2} &=& 6 \\
|
||||
3y_{1} &+& 2y_{2} &=& 9
|
||||
\end{alignat*}
|
||||
Daraus ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & 2y_{1} &+& y_{2} &=& 6 \\
|
||||
II & 3y_{1} &+& 2y_{2} &=& 9 \\
|
||||
II - I & y_{1} &+& y_{2} &=& 3 \\
|
||||
\Leftrightarrow & y_{1} && &=& 3 - y_{2} \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2(3 - y_{2}) &+& y_{2} &=& 6 \\
|
||||
\Leftrightarrow & 6 - 2y_{2} &+& y_{2} &=& 6 \\
|
||||
\Leftrightarrow & &-& y_{2} &=& 0 \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2y_{1} && &=& 6 \\
|
||||
\Leftrightarrow & y_{1} && &=& 3 \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & 3 \cdot 3 && &=& 9 \\
|
||||
\Leftrightarrow & 9 && &=& 9
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 3 & 0 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{6} & x_{5} & x_{4} \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 3 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 3 & 0 & 3 & 3 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 5 & 0 & 0 & 8\end{pmatrix}$. Also kommen nur die erste und die letzte Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 1 \\ 3 \end{pmatrix}$; die Eingangsvariable ist $x_{4}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{3}
|
||||
2d_{1} &+& 3d_{2} &=& 1\\
|
||||
d_{1} &+& 2d_{2} &=& 3
|
||||
\end{alignat*}
|
||||
Daraus ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & 2d_{1} &+& 3d_{2} &=& 1 \\
|
||||
II & d_{1} &+& 2d_{2} &=& 3 \\
|
||||
I - II & d_{1} &+& d_{2} &=& -2 \\
|
||||
\Leftrightarrow & d_{1} && &=& -2 - d_{2} \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & -2 - d_{2} &+& 2d_{2} &=& 3 \\
|
||||
\Leftrightarrow & && d_{2} &=& 5 \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2d_{1} &+& 3 \cdot 5 &=& 1 \\
|
||||
\Leftrightarrow & 2d_{1} && &=& - 14 \\
|
||||
\Leftrightarrow & d_{1} && &=& -7 \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & -7 &+& 2 \cdot 5 &=& 3 \\
|
||||
\Leftrightarrow & -7 &+& 10 &=& 3 \\
|
||||
\Leftrightarrow & && 3 &=& 3
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix} -7 \\ 5 \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} 1 \\ 1 \end{pmatrix} - t \begin{pmatrix}-7 \\ 5 \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = \frac{1}{5}$; für $t = \frac{1}{5}$ gilt $\begin{pmatrix} 1 \\ 1\end{pmatrix} - t \begin{pmatrix} -7 \\ 5 \end{pmatrix} = \begin{pmatrix} \frac{12}{5} \\ 0 \end{pmatrix}$, Ausgangsvariable ist $x_{3}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{2}^{*} \\ x_{4}^{*} \end{pmatrix} = \begin{pmatrix} \frac{12}{5} \\ \frac{1}{5} \end{pmatrix}$ und $B = \begin{pmatrix} x_{2} & x_{4} \\ 2 & 1 \\ 1 & 3 \end{pmatrix}$.
|
||||
|
||||
\underline{4. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 6 & 8 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
2y_{1} &+& y_{2} &=& 6 \\
|
||||
y_{1} &+& 3y_{2} &=& 8
|
||||
\end{alignat*}
|
||||
Es ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & 2y_{1} &+& y_{2} &=& 6 \\
|
||||
II & y_{1} &+& 3y_{2} &=& 8 \\
|
||||
II & y_{1} && &=& 8 - 3y_{2} \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2(8 - 3y_{2}) &+& y_{2} &=& 6 \\
|
||||
\Leftrightarrow & 16 - 6y_{2} &+& y_{2} &=& 6 \\
|
||||
\Leftrightarrow & &-& 5y_{2} &=& -10 \\
|
||||
\Leftrightarrow & && y_{2} &=& 2 \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & y_{1} &+& 3 \cdot 2 &=& 8 \\
|
||||
\Leftrightarrow & y_{1} && &=& 2
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 2 & 2 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{1} & x_{5} & x_{6} & x_{3} \\ 1 & 1 & 0 & 3 \\ 1 & 0 & 1 & 2 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 4 & 2 & 2 & 10 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 5 & 0 & 0 & 8\end{pmatrix}$. Also kommt nur die erste Spalte von $A_{N}$ als Eingangsspalte a infrage, wir wählen $a = \begin{pmatrix} 1 \\ 1 \end{pmatrix}$; die Eingangsvariable ist $x_{1}$.
|
||||
|
||||
\textbf{3. Schritt} (Lösung von $Bd = a$):\\
|
||||
Das Gleichungssystem $Bd = a$ lautet
|
||||
\begin{alignat*}{3}
|
||||
2d_{1} &+& d_{2} &=& 1\\
|
||||
d_{1} &+& 3d_{2} &=& 1
|
||||
\end{alignat*}
|
||||
Daraus ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & 2d_{1} &+& d_{2} &=& 1 \\
|
||||
II & d_{1} &+& 3d_{2} &=& 1 \\
|
||||
II & d_{1} && &=& 1 - 3d_{2} \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2(1 - 3d_{2}) &+& d_{2} &=& 1 \\
|
||||
\Leftrightarrow & 2 - 6d_{2} &+& d_{2} &=& 1 \\
|
||||
\Leftrightarrow & &-& 5d_{2} &=& -1 \\
|
||||
\Leftrightarrow & && d_{2} &=& \frac{1}{5} \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & d_{1} &+& 3 \cdot \frac{1}{5} &=& 1 \\
|
||||
\Leftrightarrow & d_{1} && &=& \frac{2}{5} \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2 \cdot \frac{2}{5} &+& \frac{1}{5} &=& 1 \\
|
||||
\Leftrightarrow & \frac{4}{5} &+& \frac{1}{5} &=& 1 \\
|
||||
\Leftrightarrow & && 1 &=& 1
|
||||
\end{alignat*}
|
||||
Es folgt $d = \begin{pmatrix} \frac{2}{5} \\ \frac{1}{5} \end{pmatrix}$.
|
||||
|
||||
\textbf{4. Schritt} (Bestimmung der Ausgangsvariablen):\\
|
||||
Die Ungleichung $x_{B}^{*} - td \geq 0$ lautet $\begin{pmatrix} \frac{12}{5} \\ \frac{1}{5} \end{pmatrix} - t \begin{pmatrix} \frac{2}{5} \\ \frac{1}{5} \end{pmatrix} \geq \begin{pmatrix} 0 \\ 0 \end{pmatrix}$. Das größte t, das dies erfüllt, ist $t = 1$; für $t = 1$ gilt $\begin{pmatrix} \frac{12}{5} \\ \frac{1}{5}\end{pmatrix} - t \begin{pmatrix} \frac{2}{5} \\ \frac{1}{5} \end{pmatrix} = \begin{pmatrix} 2 \\ 0 \end{pmatrix}$, Ausgangsvariable ist $x_{4}$.
|
||||
|
||||
\textbf{5. Schritt} (Update von $x_{B}^{*}$ und $B$):\\
|
||||
$x_{B}^{*} = \begin{pmatrix} x_{2}^{*} \\ x_{1}^{*} \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}$ und $B = \begin{pmatrix} x_{2} & x_{1} \\ 2 & 1 \\ 1 & 1 \end{pmatrix}$.
|
||||
|
||||
\underline{5. Iteration}
|
||||
|
||||
\textbf{1. Schritt} (Lösung von $y^{T}B = c_{B}^{T}$):\\
|
||||
Es gilt $c_{B}^{T} = \begin{pmatrix} 6 & 5 \end{pmatrix}$. Das Gleichungssystem $y^{T}B = c_{B}^{T}$ lautet
|
||||
\begin{alignat*}{3}
|
||||
2y_{1} &+& y_{2} &=& 6 \\
|
||||
y_{1} &+& y_{2} &=& 5
|
||||
\end{alignat*}
|
||||
Es ergibt sich dieses LGS:
|
||||
\begin{alignat*}{3}
|
||||
I & 2y_{1} &+& y_{2} &=& 6 \\
|
||||
II & y_{1} &+& y_{2} &=& 5 \\
|
||||
I - II & y_{1} && &=& 1 \\
|
||||
\intertext{Einsetzen in II}
|
||||
\Rightarrow & 1 &+& y_{2} &=& 5 \\
|
||||
\Leftrightarrow & && y_{2} &=& 4 \\
|
||||
\intertext{Einsetzen in I}
|
||||
\Rightarrow & 2 \cdot 1 &+& 4 &=& 6 \\
|
||||
\Leftrightarrow & && 6 &=& 6
|
||||
\end{alignat*}
|
||||
Also gilt $y^{T} = \begin{pmatrix} 1 & 4 \end{pmatrix}$.
|
||||
|
||||
\textbf{2. Schritt} (Bestimmung der Eingangsspalte a und gleichzeitig der Eingangsvariablen):\\
|
||||
Es gilt $A_{N} = \begin{pmatrix} x_{4} & x_{5} & x_{6} & x_{3} \\ 1 & 1 & 0 & 3 \\ 3 & 0 & 1 & 2 \end{pmatrix},\; y^{T}A_{N} = \begin{pmatrix} 13 & 1 & 4 & 11 \end{pmatrix}$ und $c_{N}^{T} = \begin{pmatrix} 8 & 0 & 0 & 9\end{pmatrix}$. Wegen $13 \geq 8, 1 \geq 0, 4 \geq 0, 11 \geq 9$ ist die aktuelle Lösung optimal. Die optimale Lösung lautet $x_{1}^{*} = 1, x_{2}^{*} = 2, x_{3}^{*} = 0, x_{4}^{*} = 0$ mit $z^{*} = 5x_{1}^{*} + 6x_{2}^{*} + 9x_{3}^{*} + 8x_{4}^{*} = 17$.
|
||||
|
||||
\end{document}
|
||||
197
se3/G08_B07_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
197
se3/G08_B07_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
@ -0,0 +1,197 @@
|
||||
#lang racket
|
||||
|
||||
#|
|
||||
SE 3 Funktional Blatt 7
|
||||
Abgebende: Jim 2martens, Britta 2noack, Jan-Simon 0giesel
|
||||
|#
|
||||
|
||||
; 1)
|
||||
|
||||
; allgemeine rekursive Version
|
||||
(define (produkt1 n f)
|
||||
(letrec ((rec (λ (xs r)
|
||||
(if [empty? xs]
|
||||
r
|
||||
(rec
|
||||
(cdr xs)
|
||||
(cons (* (car xs) f) r))))))
|
||||
(reverse (rec n '()))))
|
||||
|
||||
; endrekursive Version
|
||||
(define (produkt2 n f)
|
||||
(let ((revList (reverse n)))
|
||||
(letrec ((rec (λ (xs acc)
|
||||
(if (empty? xs)
|
||||
acc
|
||||
(rec
|
||||
(cdr xs)
|
||||
(cons (* (car xs) f) acc)
|
||||
)
|
||||
))))
|
||||
(rec revList '()))))
|
||||
|
||||
; Funktionen höherer Ordnung
|
||||
(define (produkt3 n f)
|
||||
(map (curryr * f) n))
|
||||
|
||||
; 2)
|
||||
|
||||
; 2.1
|
||||
; Eine Liste mit sieben Elementen, die je eine Leuchtdiode
|
||||
; repräsentieren. Jedes Element ist entweder #f oder #t.
|
||||
; -1-
|
||||
;| |
|
||||
;2 3
|
||||
;| |
|
||||
; -4-
|
||||
;| |
|
||||
;5 6
|
||||
;| |
|
||||
; -7-
|
||||
|
||||
; Die Leuchtdioden werden in dieser Reihenfolge in der Liste
|
||||
; angegeben.
|
||||
|
||||
; Die möglichen Zustände für die Zahlen 0-9 werden mithilfe
|
||||
; einer Liste von oben beschriebenen Listen realisiert.
|
||||
|
||||
(define zustandstabelle
|
||||
'((0 . (#t #t #t #f #t #t #t))
|
||||
(1 . (#f #f #t #f #f #t #f))
|
||||
(2 . (#t #f #t #t #t #f #t))
|
||||
(3 . (#t #f #t #t #f #t #t))
|
||||
(4 . (#f #t #t #t #f #t #f))
|
||||
(5 . (#t #t #f #t #f #t #t))
|
||||
(6 . (#t #t #f #t #t #t #t))
|
||||
(7 . (#t #f #t #f #f #t #f))
|
||||
(8 . (#t #t #t #t #t #t #t))
|
||||
(9 . (#t #t #t #t #f #t #t))))
|
||||
|
||||
(define (key->value key tabelle)
|
||||
(cdr (assoc key tabelle)))
|
||||
|
||||
; 2.2
|
||||
(require 2htdp/image)
|
||||
|
||||
; erzeugte ein senkrechtes Segment
|
||||
(define (zeichneSegmentSenkrecht active)
|
||||
(if active
|
||||
(rectangle 10 80 "solid" "Red")
|
||||
(rectangle 10 80 "solid" "DimGray")
|
||||
))
|
||||
|
||||
; erzeugt ein waagerechtes Segment
|
||||
(define (zeichneSegmentWaagerecht active)
|
||||
(if active
|
||||
(rectangle 80 10 "solid" "Red")
|
||||
(rectangle 80 10 "solid" "DimGray")
|
||||
))
|
||||
|
||||
; zeichnet die Segmente
|
||||
(define (zeichneSegmente zustand)
|
||||
(beside
|
||||
; Segmente 2 und 5
|
||||
(above
|
||||
(zeichneSegmentSenkrecht (cadr zustand))
|
||||
(rectangle 10 10 "solid" "Black")
|
||||
(zeichneSegmentSenkrecht (cadddr (cdr zustand)))
|
||||
)
|
||||
; Segmente 1, 4 und 7
|
||||
(above
|
||||
(zeichneSegmentWaagerecht (car zustand))
|
||||
(rectangle 80 80 "solid" "Black")
|
||||
(zeichneSegmentWaagerecht (cadddr zustand))
|
||||
(rectangle 80 80 "solid" "Black")
|
||||
(zeichneSegmentWaagerecht (cadddr (cdddr zustand)))
|
||||
)
|
||||
; Segmente 3 und 6
|
||||
(above
|
||||
(zeichneSegmentSenkrecht (caddr zustand))
|
||||
(rectangle 10 10 "solid" "Black")
|
||||
(zeichneSegmentSenkrecht (cadddr (cddr zustand)))
|
||||
)
|
||||
))
|
||||
|
||||
; zeigt eine Sieben-Segment-Anzeige
|
||||
(define (zeigeSiebenSegment zustand)
|
||||
(overlay
|
||||
(zeichneSegmente zustand)
|
||||
(rectangle 100 200 "solid" "Black")
|
||||
))
|
||||
|
||||
; 2.3
|
||||
(define (zeige-7segment t)
|
||||
(let ((zustand (floor (/ t 28))))
|
||||
(if (and [exact? zustand]
|
||||
[< zustand 10])
|
||||
(zeigeSiebenSegment (key->value zustand zustandstabelle))
|
||||
(zeigeSiebenSegment (key->value (- zustand 10) zustandstabelle)))))
|
||||
|
||||
(require 2htdp/universe)
|
||||
; zum Animieren auskommentieren
|
||||
;(animate zeige-7segment)
|
||||
|
||||
; 2.4
|
||||
; Für die Darstellung von 6 Anzeigen müssen 6 Zustands-
|
||||
; variablen eingeführt werden, die den Zustand für jede
|
||||
; der sechs Anzeigen repräsentieren.
|
||||
|
||||
; Dazu muss die eben definierte Funktion dahingehend
|
||||
; erweitert werden.
|
||||
|
||||
; Die Anzeigen seien von links nach rechts mit 1 bis 6 bezeichnet.
|
||||
; modT entspricht dem Rest der Division t durch 2419200.
|
||||
; Anzeige 6 schaltet auf 1, wenn modT 28 ist und auf 2 wenn modT 56 ist, etc.
|
||||
; Anzeige 5 schaltet auf 1, wenn Anzeige 1 auf 10 ist und
|
||||
; auf 2 wenn 6 auf 20 ist, etc.
|
||||
; Anzeige 4 schaltet auf 1, wenn Anzeige 5 auf 6 ist und
|
||||
; auf 2 wenn 5 auf 12 ist, etc.
|
||||
; Anzeige 3 schaltet auf 1, wenn Anzeige 4 auf 10 ist und
|
||||
; auf 2 wenn 4 auf 20 ist, etc.
|
||||
; Anzeige 2 schaltet auf 1, wenn Anzeige 3 auf 6 ist und
|
||||
; auf 2 wenn 3 auf 12 ist, etc.
|
||||
; Anzeige 1 schaltet auf 1, wenn Anzeige 2 auf 10 ist und
|
||||
; auf 2 wenn 2 auf 20 ist, etc.
|
||||
|
||||
(define trenner
|
||||
(underlay/xy
|
||||
(underlay/xy
|
||||
(rectangle 100 200 'solid 'black)
|
||||
40
|
||||
70
|
||||
(rectangle 20 20 'solid 'red)
|
||||
)
|
||||
40
|
||||
140
|
||||
(rectangle 20 20 'solid 'red)
|
||||
))
|
||||
|
||||
(define trenner2
|
||||
(rectangle 10 200 "solid" "Black"))
|
||||
|
||||
; diese Funktion wird bis 99h 59m 59s zählen und dann wieder bei 0
|
||||
; anfangen
|
||||
(define (zeigedauer t)
|
||||
(let* ((modT (modulo t 10080000)) ; 10080000 entspricht 100h
|
||||
(zustand6 (floor (/ modT 28)))
|
||||
(zustand5 (floor (/ zustand6 10)))
|
||||
(zustand4 (floor (/ zustand5 6)))
|
||||
(zustand3 (floor (/ zustand4 10)))
|
||||
(zustand2 (floor (/ zustand3 6)))
|
||||
(zustand1 (floor (/ zustand2 10))))
|
||||
(beside
|
||||
(zeigeSiebenSegment (key->value (modulo zustand1 10) zustandstabelle))
|
||||
trenner2
|
||||
(zeigeSiebenSegment (key->value (modulo zustand2 10) zustandstabelle))
|
||||
trenner
|
||||
(zeigeSiebenSegment (key->value (modulo zustand3 6) zustandstabelle))
|
||||
trenner2
|
||||
(zeigeSiebenSegment (key->value (modulo zustand4 10) zustandstabelle))
|
||||
trenner
|
||||
(zeigeSiebenSegment (key->value (modulo zustand5 6) zustandstabelle))
|
||||
trenner2
|
||||
(zeigeSiebenSegment (key->value (modulo zustand6 10) zustandstabelle)))
|
||||
))
|
||||
|
||||
; zum Animieren auskommentieren
|
||||
; (animate zeigedauer)
|
||||
222
se3/G08_B08_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
222
se3/G08_B08_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
@ -0,0 +1,222 @@
|
||||
#lang racket
|
||||
|
||||
#|
|
||||
SE 3 Funktional Blatt 8
|
||||
Abgebende: Jim 2martens, Britta 2noack, Jan-Simon 0giesel
|
||||
|#
|
||||
|
||||
; 1)
|
||||
|
||||
; 1.
|
||||
|
||||
; Wenn die Funktion mindestens eine Funktion als Parameter erwartet oder
|
||||
; eine Funktion zurückgibt.
|
||||
|
||||
; 2.
|
||||
; (a): foldl ist eine Funktion höherer Ordnung, da als erster Parameter
|
||||
; eine Funktion erwartet wird.
|
||||
|
||||
; (b): Die Funktion ist eine Funktion höherer Ordnung, da
|
||||
; sie entweder car oder cdr zurückgibt, welches jeweils Funktionen sind.
|
||||
|
||||
; (c) ist eine Funktion höherer Ordnung, da für den Parameter f
|
||||
; eine Funktion erwartet wird und eine Funktion zurückgegeben wird.
|
||||
|
||||
; (d) ist keine Funktion höherer Ordnung, da keine Funktion
|
||||
; zurückgegeben wird und auch keine Funktion erwartet wird.
|
||||
|
||||
; 3.
|
||||
|
||||
; Nach der inneren Reduktion wird zunächst (pimento + 1) ausgeführt.
|
||||
; Dabei wird f an + gebunden und arg1 wird an 1 gebunden.
|
||||
; Der zurückgegebenen Closure wird nun 3 als Argument übergeben.
|
||||
; Damit wird arg2 an 3 gebunden. Schließlich wird (+ 1 3) ausgeführt
|
||||
; und als Ergebnis 4 zurückgegeben.
|
||||
|
||||
; 4.
|
||||
|
||||
; (foldl (curry * 2) 1 '(1 2 3)) -> 48, weil zunächst (curry * 2)
|
||||
; aufgelöst wird zu einer Closure, die sich wie * verhält, aber
|
||||
; bereits den Faktor 2 auf jeden Fall im Endprodukt hat.
|
||||
; Anschließend wird foldl ausgeführt und verwendet die Elemente der Liste
|
||||
; als Argumente für die Closure. 1 wird als letztes Argument verwendet.
|
||||
; (* 2 1 2 3 1) -> 48
|
||||
|
||||
; (map cons '(1 2 3) '(1 2 3)) -> '((1 . 1) (2 . 2) (3 . 3)),
|
||||
; weil cons auf die Elemente der übergebenen Listen angewendet wird.
|
||||
; Es wird mit dem jeweils ersten Element der Listen begonnen.
|
||||
; Daraus ergibt sich dann:
|
||||
; (cons 1 1) -> (1 . 1)
|
||||
; (cons 2 2) -> (2 . 2)
|
||||
; (cons 3 3) -> (3 . 3)
|
||||
; Die Ergebnisse der Aufrufe von cons landen dann in der Reihenfolge
|
||||
; in der Ergebnisliste.
|
||||
|
||||
; (filter pair? '((a b ) () 1 (()))) -> '((a b) (())), weil
|
||||
; filter eine Liste solcher Elemente zurückgibt, für die pair?
|
||||
; true zurückgibt.
|
||||
; (pair? '(a b)) -> #t
|
||||
; (pair? '()) -> #f
|
||||
; (pair? 1) -> #f
|
||||
; (pair? '(())) -> #t
|
||||
; Daraus ergibt sich die oben genannte Rückgabeliste.
|
||||
|
||||
; (map (compose (curry - 32) (curry * 1.8))
|
||||
; '(5505 100 0 -273.15)) -> '(-9877.0 -148.0 32 523.67), weil
|
||||
; zunächst nach der inneren Reduktion die beiden curry-Aufrufe
|
||||
; je eine Closure zurückgeben. Anschließend wird compose ausgeführt
|
||||
; und erzeugt eine Nacheinanderausführung (closure) der beiden Closures,
|
||||
; wobei die zweite Closure zuerst und die erste Closure danach
|
||||
; ausgeführt wird.
|
||||
; Schließlich wird map aufgerufen und führt die erstellte Nacheinanderausführung
|
||||
; nacheinander für jedes Listenelement aus.
|
||||
; Daraus ergibt sich:
|
||||
; (closure 5505) -> (- 32 (* 1.8 5505)) -> -9877.0
|
||||
; (closure 100) -> (- 32 (* 1.8 100)) -> -148.0
|
||||
; (closure 0) -> (- 32 (* 1.8 0)) -> 32
|
||||
; (closure -273.15) -> (- 32 (* 1.8 -273.15)) -> 523.67
|
||||
|
||||
; 2)
|
||||
(define xs '(1 -2 3 -4 5 -6 7 9))
|
||||
; 1.
|
||||
(map abs xs)
|
||||
|
||||
; 2.
|
||||
(filter
|
||||
(λ (x)
|
||||
(= 0 (modulo x 7)))
|
||||
xs)
|
||||
|
||||
; 3.
|
||||
(foldl +
|
||||
0
|
||||
(filter
|
||||
(λ (x)
|
||||
(and [odd? x]
|
||||
[> x 3])
|
||||
)
|
||||
xs))
|
||||
|
||||
; 4.
|
||||
(define (split pred xs)
|
||||
(letrec ((rec (λ (xs acc1 acc2)
|
||||
(if (empty? xs)
|
||||
(list acc1 acc2)
|
||||
(if (pred (car xs))
|
||||
(rec
|
||||
(cdr xs)
|
||||
(cons (car xs) acc1)
|
||||
acc2)
|
||||
(rec
|
||||
(cdr xs)
|
||||
acc1
|
||||
(cons (car xs) acc2))
|
||||
)))))
|
||||
(rec xs '() '())))
|
||||
(split odd? xs)
|
||||
|
||||
; 3)
|
||||
|
||||
; 1.
|
||||
|
||||
(define (key->wert key tafel)
|
||||
(cdr (assoc key tafel)))
|
||||
|
||||
; Datenstruktur für mögliche Ausprägungen
|
||||
(define ausprägungen
|
||||
`((Form . ,'(Oval Rechteck Welle))
|
||||
(Farbe . ,'(rot blau grün))
|
||||
(Anzahl . ,'(ein zwei drei))
|
||||
(Füllung . ,'(Linie Schraffur Fläche))))
|
||||
|
||||
(define translationList
|
||||
`((Oval . oval)
|
||||
(Rechteck . rectangle)
|
||||
(Welle . waves)
|
||||
(rot . red)
|
||||
(blau . blue)
|
||||
(grün . green)
|
||||
(ein . 1)
|
||||
(zwei . 2)
|
||||
(drei . 3)
|
||||
(Linie . outline)
|
||||
(Schraffur . hatched)
|
||||
(Fläche . solid)))
|
||||
|
||||
; Eine Spielkarte ist repräsentiert durch eine Liste, die von vorne
|
||||
; nach hinten die Form, Farbe, Anzahl und Füllung durch ihre Elemente angibt.
|
||||
|
||||
; 2.
|
||||
; erzeugt die Spielkarten
|
||||
(define (erzeugeSpielkarten)
|
||||
(letrec ((rec (λ (acc cards)
|
||||
(if (= -1 cards)
|
||||
acc
|
||||
(let ((d (modulo cards 3))
|
||||
(c (modulo (floor (/ cards 3)) 3))
|
||||
(b (modulo (floor (/ cards 9)) 3))
|
||||
(a (modulo (floor (/ cards 27)) 3)))
|
||||
(rec (cons (list
|
||||
(list-ref (key->wert 'Form ausprägungen) a)
|
||||
(list-ref (key->wert 'Farbe ausprägungen) b)
|
||||
(list-ref (key->wert 'Anzahl ausprägungen) c)
|
||||
(list-ref (key->wert 'Füllung ausprägungen) d))
|
||||
acc)
|
||||
(- cards 1)))))))
|
||||
(rec '() 80)))
|
||||
|
||||
(require se3-bib/setkarten-module)
|
||||
|
||||
; zeigt eine Set-Karte
|
||||
(define (zeigeKarte karte)
|
||||
(show-set-card
|
||||
(key->wert (third karte) translationList)
|
||||
(key->wert (first karte) translationList)
|
||||
(key->wert (fourth karte) translationList)
|
||||
(key->wert (second karte) translationList)))
|
||||
|
||||
(define (zeigeKarten karten)
|
||||
(map zeigeKarte karten))
|
||||
|
||||
; 3.
|
||||
|
||||
(define (is-a-set? karten)
|
||||
(let* ([gleich (λ (wert1 wert2 wert3)
|
||||
(and
|
||||
(equal? wert1 wert2)
|
||||
(equal? wert1 wert3)
|
||||
))]
|
||||
[verschieden (λ (wert1 wert2 wert3)
|
||||
(and
|
||||
(not (equal? wert1 wert2))
|
||||
(not (equal? wert1 wert3))
|
||||
(not (equal? wert2 wert3))
|
||||
))]
|
||||
[qualified (λ (wert1 wert2 wert3)
|
||||
(or
|
||||
(gleich wert1 wert2 wert3)
|
||||
(verschieden wert1 wert2 wert3)
|
||||
))])
|
||||
(and
|
||||
(qualified (first (first karten))
|
||||
(first (second karten))
|
||||
(first (third karten)))
|
||||
(qualified (second (first karten))
|
||||
(second (second karten))
|
||||
(second (third karten)))
|
||||
(qualified (third (first karten))
|
||||
(third (second karten))
|
||||
(third (third karten)))
|
||||
(qualified (fourth (first karten))
|
||||
(fourth (second karten))
|
||||
(fourth (third karten))))))
|
||||
|
||||
(display "is-a-set?(#t): ")
|
||||
(is-a-set? '((Oval rot ein Linie)
|
||||
(Rechteck rot zwei Linie)
|
||||
(Welle rot drei Linie)))
|
||||
(display "is-a-set?(#f): ")
|
||||
(is-a-set? '((Oval rot ein Linie)
|
||||
(Oval blau zwei Fläche)
|
||||
(Welle rot drei Linie)))
|
||||
|
||||
387
se3/G08_B09_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
387
se3/G08_B09_Jim-2martens_Britta-2noack_Jan-Simon-0giesel.rkt
Normal file
@ -0,0 +1,387 @@
|
||||
#lang swindle
|
||||
|
||||
(require swindle/setf
|
||||
swindle/misc)
|
||||
|
||||
#|
|
||||
SE 3 Funktional Blatt 9
|
||||
Abgebende: Jim 2martens, Britta 2noack, Jan-Simon 0giesel
|
||||
|#
|
||||
|
||||
; 1)
|
||||
|
||||
; 1.1
|
||||
|
||||
; allgemeine wissenschaftliche Publikation
|
||||
(defclass* publikation ()
|
||||
(schlüssel
|
||||
:reader publikation-schlüssel
|
||||
:writer set-publikation-schlüssel!
|
||||
:initvalue 0
|
||||
:initarg :pubSchlüssel
|
||||
:documentation "Der Schlüssel der Publikation"
|
||||
)
|
||||
(autoren
|
||||
:reader publikation-autoren
|
||||
:writer set-publikation-autoren!
|
||||
:initvalue '()
|
||||
:initarg :pubAutoren
|
||||
:type <list>
|
||||
:documentation "Die Autoren der Publikation"
|
||||
)
|
||||
(jahr
|
||||
:reader publikation-jahr
|
||||
:writer set-publikation-jahr!
|
||||
:initvalue "0"
|
||||
:initarg :pubJahr
|
||||
:type <string>
|
||||
:documentation "Das Erscheinungsjahr"
|
||||
)
|
||||
(titel
|
||||
:reader publikation-titel
|
||||
:writer set-publikation-titel!
|
||||
:initvalue ""
|
||||
:initarg :pubTitel
|
||||
:type <string>
|
||||
:documentation "Der Titel"
|
||||
)
|
||||
:autopred #t
|
||||
:printer #t
|
||||
:documentation "The top class of all publications"
|
||||
)
|
||||
|
||||
; Buch erbt von Publikation
|
||||
(defclass* buch (publikation)
|
||||
(verlag
|
||||
:reader buch-verlag
|
||||
:writer set-buch-verlag!
|
||||
:initvalue ""
|
||||
:initarg :buchVerlag
|
||||
:type <string>
|
||||
:documentation "Der Verlag des Buches"
|
||||
)
|
||||
(verlagort
|
||||
:reader buch-verlagort
|
||||
:writer set-buch-verlagort!
|
||||
:initvalue ""
|
||||
:initarg :buchVerlagort
|
||||
:type <string>
|
||||
:documentation "Der Ort des Verlages"
|
||||
)
|
||||
(reihe
|
||||
:reader buch-reihe
|
||||
:writer set-buch-reihe!
|
||||
:initvalue ""
|
||||
:initarg :buchReihe
|
||||
:type <string>
|
||||
:documentation "Die Reihe des Buches"
|
||||
)
|
||||
(reihe-seriennummer
|
||||
:reader buch-reihe-seriennummer
|
||||
:writer set-buch-reihe-seriennummer!
|
||||
:initvalue "0"
|
||||
:initarg :buchSeriennummer
|
||||
:type <string>
|
||||
:documentation "Die Seriennummer in der Reihe"
|
||||
)
|
||||
(edition
|
||||
:reader buch-edition
|
||||
:writer set-buch-edition!
|
||||
:initvalue "1"
|
||||
:initarg :buchEdition
|
||||
:type <string>
|
||||
:documentation "Die Edition des Buches"
|
||||
)
|
||||
:autopred #t
|
||||
:printer #t
|
||||
:documentation "Ein Buch"
|
||||
)
|
||||
|
||||
; Sammelbände erbt von Buch
|
||||
(defclass* sammelband (buch)
|
||||
(herausgeber
|
||||
:reader sammelband-herausgeber
|
||||
:writer set-sammelband-herausgeber!
|
||||
:initvalue ""
|
||||
:initarg :sammelbandHerausgeber
|
||||
:type <string>
|
||||
:documentation "Herausgeber des Sammelbands"
|
||||
)
|
||||
(seitenangabe
|
||||
:reader sammelband-seitenangabe
|
||||
:writer set-sammelband-seitenangabe!
|
||||
:initvalue ""
|
||||
:initarg :sammelbandSeitenangabe
|
||||
:type <string>
|
||||
:documentation "Die Seiten des Artikels"
|
||||
)
|
||||
(name
|
||||
:reader sammelband-name
|
||||
:writer set-sammelband-name!
|
||||
:initvalue ""
|
||||
:initarg :sammelbandName
|
||||
:type <string>
|
||||
:documentation "Name des Sammelbandes"
|
||||
)
|
||||
:autopred #t
|
||||
:printer #t
|
||||
:documentation "Ein Sammelband"
|
||||
)
|
||||
|
||||
; Zeitschriftenartikel
|
||||
(defclass* zeitschrift (publikation)
|
||||
(name
|
||||
:reader zeitschrift-name
|
||||
:writer set-zeitschrift-name!
|
||||
:initvalue ""
|
||||
:initarg :zeitschriftName
|
||||
:type <string>
|
||||
:documentation "Der Name der Zeitschrift"
|
||||
)
|
||||
(band-nummer
|
||||
:reader zeitschrift-band-nummer
|
||||
:writer set-zeitschrift-band-nummer!
|
||||
:initvalue "0"
|
||||
:initarg :zeitschriftBandnummer
|
||||
:type <string>
|
||||
:documentation "Die Bandnummer der Zeitschrift"
|
||||
)
|
||||
(heft-nummer
|
||||
:reader zeitschrift-heft-nummer
|
||||
:writer set-zeitschrift-heft-nummer!
|
||||
:initvalue "0"
|
||||
:initarg :zeitschriftHeftnummer
|
||||
:type <string>
|
||||
:documentation "Die Nummer des Heftes"
|
||||
)
|
||||
(monat
|
||||
:reader zeitschrift-monat
|
||||
:writer set-zeitschrift-monat!
|
||||
:initvalue 'Januar
|
||||
:initarg :zeitschriftMonat
|
||||
:type <symbol>
|
||||
:documentation "Der Erscheinungsmonat der Zeitschrift"
|
||||
)
|
||||
:autopred #t
|
||||
:printer #t
|
||||
:documentation "Ein Zeitschriftenartikel"
|
||||
)
|
||||
|
||||
; Nessie
|
||||
(define nessie
|
||||
(make buch :pubTitel "Mein Leben im Loch Ness: Verfolgt als Ungeheuer"
|
||||
:pubJahr "1790"
|
||||
:pubSchlüssel 'Nessie1790
|
||||
:pubAutoren '("Nessie")
|
||||
:buchVerlag "Minority-Verlag"
|
||||
:buchVerlagort "Inverness"
|
||||
:buchReihe "Die besondere Biographie"
|
||||
:buchSeriennummer "Band 1 der Reihe"))
|
||||
|
||||
; Prefect, F.
|
||||
(define prefect
|
||||
(make sammelband
|
||||
:pubTitel "Mostly harmless - some observations concerning the third planet of the solar system"
|
||||
:pubJahr "1979"
|
||||
:pubSchlüssel 'Prefect1979
|
||||
:pubAutoren '("Prefect, F.")
|
||||
:buchVerlag "Galactic Press"
|
||||
:buchVerlagort "Vega-System, 3rd planet"
|
||||
:buchReihe "\"Travel in Style\""
|
||||
:buchSeriennummer "volume 5 of"
|
||||
:buchEdition "1500 edition"
|
||||
:sammelbandHerausgeber "Adams D., editor"
|
||||
:sammelbandSeitenangabe "p. 500"
|
||||
:sammelbandName "The Hitchhiker's Guide to the Galaxy"
|
||||
))
|
||||
|
||||
; Wells
|
||||
(define wells
|
||||
(make zeitschrift
|
||||
:pubSchlüssel 'Wells3200
|
||||
:pubTitel "Zeitmaschinen leicht gemacht"
|
||||
:pubAutoren '("Wells, H. G.")
|
||||
:pubJahr "3200"
|
||||
:zeitschriftName "Heimwerkerpraxis für Anfänger"
|
||||
:zeitschriftBandnummer "500"
|
||||
:zeitschriftHeftnummer "3"
|
||||
))
|
||||
; 1.2
|
||||
|
||||
(defgeneric cite ((pub publikation)))
|
||||
; cite Methode für Bücher
|
||||
(defmethod cite ((pub buch))
|
||||
"Display the correct citation for given book"
|
||||
(display (string-append
|
||||
(car (publikation-autoren pub))
|
||||
" (" (publikation-jahr pub) "). "
|
||||
(publikation-titel pub) ", "
|
||||
(buch-reihe-seriennummer pub) ": "
|
||||
(buch-reihe pub) ". "
|
||||
(buch-verlag pub) ", " (buch-verlagort pub)
|
||||
".")))
|
||||
; cite Methode für Sammelbände
|
||||
(defmethod cite ((pub sammelband))
|
||||
"Display the correct citation for given collection"
|
||||
(display (string-append
|
||||
(car (publikation-autoren pub))
|
||||
" (" (publikation-jahr pub) "). "
|
||||
(publikation-titel pub) ". In "
|
||||
(sammelband-herausgeber pub) ", "
|
||||
(sammelband-name pub) ", "
|
||||
(buch-reihe-seriennummer pub)" "
|
||||
(buch-reihe pub) ". "
|
||||
(buch-verlag pub) ", " (buch-verlagort pub)
|
||||
", " (buch-edition pub) ", "
|
||||
(sammelband-seitenangabe pub) ".")))
|
||||
|
||||
; cite Methode für Zeitschriften
|
||||
(defmethod cite ((pub zeitschrift))
|
||||
"Display the correct citation for given magazine article"
|
||||
(display (string-append
|
||||
(car (publikation-autoren pub))
|
||||
" (" (publikation-jahr pub) "). "
|
||||
(publikation-titel pub) ". "
|
||||
(zeitschrift-name pub) ", "
|
||||
(zeitschrift-band-nummer pub) "("
|
||||
(zeitschrift-heft-nummer pub) ").")))
|
||||
|
||||
; 1.3
|
||||
|
||||
; Eine Ergänzungsmethode kann vor und nach der Methode der Oberklasse
|
||||
; ausgeführt werden. Außerdem kann sie einhüllend wirken und wird sowohl vor
|
||||
; als auch nach der Elternmethode aufgerufen.
|
||||
|
||||
; Die Vorteile sind, dass jede Ergänzungsmethode ausgeführt wird
|
||||
; und damit keine Initialisierungen vergessen oder unterdrückt
|
||||
; werden können, die in den Oberklassen definiert wurden.
|
||||
; Desweiteren brauchen die geerbten Methoden nicht durch
|
||||
; Modifikationen überladen zu werden, sondern werden nur
|
||||
; ergänzt.
|
||||
|
||||
; Ergänzungsmethoden könnten dazu genutzt werden die Basis-cite
|
||||
; Methode zu ergänzen, sodass nicht eine Methode für jede Publikationsform
|
||||
; von Nöten ist. Dabei könnten die Informationen schrittweise
|
||||
; aufgebaut werden. Allgemeine Information zu Beginn, dann buchspezifische,
|
||||
; dann sammelbandspezifische. Für Zeitschriften würde eine alternative
|
||||
; Reihenfolge von allgemeinen und zeitschriftenspezifischen
|
||||
; Informationen genutzt werden.
|
||||
|
||||
; Allerdings käme es dort zu Problemen, wo Informationen zwischendrin
|
||||
; eingefügt werden müssen. Die Sammelbandseitenangabe zum Beispiel erfolgt
|
||||
; am Schluss, die restlichen Informationen jedoch in der Mitte vor den
|
||||
; Buchinformationen wie Reihe und Verlag.
|
||||
|
||||
; 2)
|
||||
|
||||
; 2.1
|
||||
|
||||
;(defclass fahrzeug ())
|
||||
|
||||
; allgemeine Landfahrzeuge
|
||||
;(defclass landfahrzeug (fahrzeug))
|
||||
; Schienenfahrzeuge
|
||||
;(defclass schienenfahrzeug (fahrzeug))
|
||||
; Straßenfahrzeuge
|
||||
;(defclass straßenfahrzeug (fahrzeug))
|
||||
;(defclass wasserfahrzeug (fahrzeug))
|
||||
;(defclass luftfahrzeug (fahrzeug))
|
||||
|
||||
;(defclass amphibienfahrzeug (wasserfahrzeug landfahrzeug))
|
||||
;(defclass amphibienflugzeug (luftfahrzeug wasserfahrzeug straßenfahrzeug))
|
||||
;(defclass zweiwegefahrzeug (schienenfahrzeug straßenfahrzeug))
|
||||
;(defclass zeitzug (schienenfahrzeug luftfahrzeug))
|
||||
|
||||
; 2.2
|
||||
|
||||
; da ein Fahrzeug mehrere Medien aufweisen kann, ist es sinnvoll
|
||||
; diese in einer Liste zurückzugeben
|
||||
(defgeneric getMedium ((fz fahrzeug))
|
||||
:combination generic-list-combination)
|
||||
; von allen Medien muss die geringste Höchstgeschwindigkeit genommen werden
|
||||
; daher ist die min combination hier richtig
|
||||
(defgeneric getMaxSpeed ((fz fahrzeug))
|
||||
:combination generic-min-combination)
|
||||
; auch bei der Tragfähigkeit ist die geringst mögliche Tragfähigkeit
|
||||
; von Interesse
|
||||
(defgeneric getTragfähigkeit ((fz fahrzeug))
|
||||
:combination generic-min-combination)
|
||||
; beim Verbrauch hingegen ist der maximale Verbrauch über alle
|
||||
; Medien interessant
|
||||
(defgeneric getVerbrauchPro100km ((fz fahrzeug))
|
||||
:combination generic-max-combination)
|
||||
; die Passagierzahl wiederum ist durch die geringste Größe unter allen Medien
|
||||
; limitiert, womit hier ebenso eine min combination anzuwenden ist
|
||||
(defgeneric getPassagierzahl ((fz fahrzeug))
|
||||
:combination generic-min-combination)
|
||||
|
||||
; 2.3
|
||||
|
||||
; Implementation zur Abfrage des Mediums
|
||||
|
||||
(defclass fahrzeug ()
|
||||
:printer #t)
|
||||
(defclass landfahrzeug (fahrzeug)
|
||||
(check
|
||||
:reader landfahrzeug-check
|
||||
:initvalue #t
|
||||
)
|
||||
:printer #t)
|
||||
(defmethod getMedium ((fz landfahrzeug))
|
||||
'Land)
|
||||
|
||||
(defclass schienenfahrzeug (fahrzeug)
|
||||
:printer #t)
|
||||
(defmethod getMedium ((fz schienenfahrzeug))
|
||||
'Schiene)
|
||||
|
||||
(defclass straßenfahrzeug (fahrzeug)
|
||||
:printer #t)
|
||||
(defmethod getMedium ((fz straßenfahrzeug))
|
||||
'Straße)
|
||||
|
||||
(defclass wasserfahrzeug (fahrzeug))
|
||||
(defmethod getMedium ((fz wasserfahrzeug))
|
||||
'Wasser)
|
||||
|
||||
(defclass luftfahrzeug (fahrzeug))
|
||||
(defmethod getMedium ((fz luftfahrzeug))
|
||||
'Luft)
|
||||
|
||||
(defclass amphibienfahrzeug (wasserfahrzeug landfahrzeug))
|
||||
(defclass amphibienflugzeug (luftfahrzeug wasserfahrzeug straßenfahrzeug))
|
||||
(defclass zweiwegefahrzeug (schienenfahrzeug straßenfahrzeug))
|
||||
(defclass zeitzug (schienenfahrzeug luftfahrzeug))
|
||||
|
||||
; Die Funktion getMedium wird bei ampFahrzeug zunächst für
|
||||
; Wasserfahrzeuge aufgerufen, da nach der Klassenpräzedenz-
|
||||
; liste Wasserfahrzeug vor Landfahrzeug kommt.
|
||||
; Anschließend wird die Funktion für Landfahrzeuge aufgerufen.
|
||||
|
||||
; Da die generische Funktion getMedium mit der list combination
|
||||
; verwendet wird, werden die Ausgaben der einzelnen Funktionsaufrufe
|
||||
; in eine Liste kombiniert und zurückgegeben. Das wären in diesem
|
||||
; Fall also 'Wasser und 'Land, die insgesamte Rückgabe sieht dann
|
||||
; so aus: '(Wasser Land)
|
||||
; Da Fahrzeug die generische Funktion nicht implementiert,
|
||||
; bleibt es bei den beiden Funktionsaufrufen.
|
||||
|
||||
; Bei ampFlugzeug funktioniert es analog und es wird
|
||||
; '(Luft Wasser Straße) zurückgegeben.
|
||||
|
||||
; Bei schienenbus verhält es sich analog und die Rückgabe
|
||||
; ist '(Schiene Straße).
|
||||
|
||||
; Für zug wird '(Schiene Luft) zurückgegeben.
|
||||
|
||||
; Die Klassenpräzedenzliste ist hier unerlässlich, um die Reihenfolge
|
||||
; der Funktionen zu bestimmen. Wenn die combination der jeweiligen
|
||||
; generischen Funktion nur ein Ergebnis zurückgibt (bspw. begin combination),
|
||||
; dann bestimmt die Liste auch das Ergebnis.
|
||||
; Ohne eine combination wird auch nur die Funktion ausgeführt,
|
||||
; deren zugehörige Klasse in der Präzendenzliste ganz vorne steht.
|
||||
|
||||
(define ampFahrzeug (make amphibienfahrzeug))
|
||||
(define ampFlugzeug (make amphibienflugzeug))
|
||||
(define schienenbus (make zweiwegefahrzeug))
|
||||
(define zug (make zeitzug))
|
||||
86
sonstiges/Spieleindustrie.tex
Normal file
86
sonstiges/Spieleindustrie.tex
Normal file
@ -0,0 +1,86 @@
|
||||
\documentclass{beamer}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
%\usepackage{paralist}
|
||||
\useoutertheme{infolines}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{listings}
|
||||
\usetheme{Berkeley}
|
||||
\pagenumbering{arabic}
|
||||
\def\thesection{\arabic{section})}
|
||||
\def\thesubsection{\alph{subsection})}
|
||||
\def\thesubsubsection{(\roman{subsubsection})}
|
||||
\setbeamertemplate{navigation symbols}{}
|
||||
\graphicspath{ {src/} }
|
||||
\lstset{language=PHP}
|
||||
|
||||
\begin{document}
|
||||
\author{Jim Martens}
|
||||
\title{Verwandlung der Spieleindustrie}
|
||||
|
||||
\section{Wie es war}
|
||||
\begin{frame}{Wie es war}
|
||||
\begin{itemize}
|
||||
\item tolle Spiele(reihen), die teilweise noch immer gespielt werden
|
||||
\begin{itemize}
|
||||
\item<2-> Wing Commander
|
||||
\item<2-> Privateer
|
||||
\item<2-> Freelancer
|
||||
\item<3-> Independence War 2
|
||||
\item<4-> Ultima
|
||||
\item<4-> Baldurs Gate
|
||||
\item<4-> Neverwinter Nights
|
||||
\item<4-> Knights of the Old Republic
|
||||
\item<5-> Gothic (1-3)
|
||||
\item<5-> Morrowind, Oblivion, Nehrim (Total Conversion von Oblivion, fanmade)
|
||||
\end{itemize}
|
||||
\item<6-> viele kleine Studios mit motivierten Entwicklern (meistens selber leidenschaftliche Spieler)
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\section{Wie es ist}
|
||||
\begin{frame}{Wie es ist}
|
||||
\begin{itemize}
|
||||
\item wenige große Studios mit vielen Entwicklern, für die es ein ganz normaler Beruf ist
|
||||
\item<2-> übermächtige Publisher (EA, Ubisoft, Microsoft, ...), für die allein der Profit zählt
|
||||
\item<3-> Spiele werden zu Gewinnbringern, der Inhalt gerät in den Hintergrund
|
||||
\item<4-> Release-Patches, Käufer sind eigentliche Betatester, vernachlässigte Qualitätskontrolle
|
||||
\item<5-> kurze Entwicklungszeiten
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\section{Wie es sein sollte}
|
||||
\begin{frame}{Wie es sein sollte (allgemein)}
|
||||
\begin{itemize}
|
||||
\item ausreichende Betatests
|
||||
\item<2-> Entwickler, die ihr ganzes Herzblut in ein Spiel hineinstecken
|
||||
\item<3-> den Spielinhalt in den Mittelpunkt rücken, Gewinn ist Nebenprodukt
|
||||
\item<4-> keine Vercasualisierung
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Wie es sein sollte (für Spiele mit Story)}
|
||||
\begin{itemize}
|
||||
\item vor Erschaffung eines Spieles sollte ein glaubwürdiges Universum geschaffen werden
|
||||
\item<2-> dieses Universum enthält unterschiedliche Völker und deren Historie
|
||||
\item<3-> erst nach Schaffung eines Universums, das für sich alleine existieren kann, wird mit der Planung einer Spielereihe begonnen
|
||||
\item<4-> die Spielereihe fügt sich in das Universum ein, nicht umgekehrt
|
||||
\item<5-> Spiele dürfen keine Storys haben, die das Universum an sich beschädigen
|
||||
\item<6-> Ergebnis: ein Universum, dass nach einer Spielereihe nicht ausgelaugt ist
|
||||
\item<7-> Nachteil: es erfordert eine Menge an initialer Arbeit
|
||||
\item<7-> Vorteil: großes Potenzial unterschiedlichster Storys
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}{Schlussfolgerungen}
|
||||
\begin{itemize}
|
||||
\item Jene Spiele unterstützen, die eine reichhaltige Lore aufweisen
|
||||
\item Jene Spiele unterstützen, bei denen der Inhalt im Mittelpunkt steht
|
||||
\item Jene Spiele nicht unterstützen, die reine Abzocke sind
|
||||
\item Jene Spiele nicht unterstützen, die den Spieler zu einem Konsumenten degradieren
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user