mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-28 23:37:57 +02:00
41 lines
1.1 KiB
TeX
41 lines
1.1 KiB
TeX
\section*{Aufgabe 2}
|
|
\subsection*{Teilaufgabe a}
|
|
\textbf{Aufgabe}
|
|
Formulieren Sie einen Algorithmus in Pseudocode zum Lösen des Gleichungssystems
|
|
\[Ly = b,\]
|
|
wobei $L$ eine invertierbare, untere Dreiecksmatrix ist.
|
|
|
|
Geben Sie die Formel zur Berechnung von $y_i$ an.
|
|
|
|
\textbf{Lösung:}
|
|
|
|
\[y_i = \frac{b_i - \sum_{k=i}^{i-1} l_{ik} \cdot y_k}{l_{ii}}\]
|
|
|
|
\subsection*{Teilaufgabe b}
|
|
\[Ax = b ? PAx = Pb ? LRx = Pb \]
|
|
|
|
Pseudocode:
|
|
|
|
\begin{algorithm}[H]
|
|
\begin{algorithmic}
|
|
\Require Matrix $A$, Vektor $b$
|
|
\Procedure{CalculateLegendre}{$A$, $b$}
|
|
\State $P, L, R \gets \Call{LRZerlegung}{A}$
|
|
\State $b^* \gets Pb$
|
|
\State $c \gets \Call{VorwärtsSubstitution}{L, b^*}$
|
|
\State $x \gets \Call{RückwärtsSubstitution}{R, c}$
|
|
\State \Return $x$
|
|
\EndProcedure
|
|
\end{algorithmic}
|
|
\caption{Calculate TODO}
|
|
\label{alg:TODO}
|
|
\end{algorithm}
|
|
|
|
\subsection*{Teilaufgabe c}
|
|
Der Gesamtaufwand ist:
|
|
\begin{itemize}
|
|
\item LR-Zerlegung, $\frac{1}{3}n^3 - \frac{1}{3} n^2$
|
|
\item Vektormultiplikation, $2n$
|
|
\item Vorwärtssubstitution, $\frac{1}{2} n^2$
|
|
\item Rückwärtssubstitution, $\frac{1}{2} n^2$
|
|
\end{itemize}
|