2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Musterlösung angefangen

This commit is contained in:
Martin Thoma 2013-09-10 05:50:43 +02:00
parent 38c46c8081
commit 33ba7ff981
9 changed files with 291 additions and 0 deletions

View file

@ -0,0 +1,195 @@
\section*{Aufgabe 1}
\subsection*{Teilaufgabe a}
\textbf{Gegeben:}
\[A =
\begin{pmatrix}
3 & 15 & 13 \\
6 & 6 & 6 \\
2 & 8 & 19
\end{pmatrix}\]
\textbf{Aufgabe:} LR-Zerlegung von $A$ mit Spaltenpivotwahl
\textbf{Lösung:}
\[P =
\begin{pmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 1
\end{pmatrix}\]
durch scharfes hinsehen.
Nun $L, R$ berechnen:
\begin{align}
&\begin{gmatrix}[p]
6 & 6 & 6 \\
3 & 15 & 13 \\
2 & 8 & 19
\rowops
\add[\cdot (-\frac{1}{2})]{0}{1}
\add[\cdot (-\frac{1}{3})]{0}{2}
\end{gmatrix}
\\
= \begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{3} & 0 & 1
\end{pmatrix} \cdot
&\begin{gmatrix}[p]
6 & 6 & 6 \\
0 & 12 & 10 \\
0 & 6 & 17
\rowops
\add[\cdot (-\frac{1}{2})]{1}{2}
\end{gmatrix}
\\
= \begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & -\frac{1}{2} & 1
\end{pmatrix} \cdot
\begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{3} & 0 & 1
\end{pmatrix} \cdot
&\begin{gmatrix}[p]
6 & 6 & 6 \\
0 & 12 & 10 \\
0 & 0 & 12
\colops
\add[\cdot (-1)]{0}{1}
\add[\cdot (-1)]{0}{2}
\end{gmatrix}
\\
= \begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{12} & - \frac{1}{2} & 1
\end{pmatrix} \cdot
&\begin{gmatrix}[p]
6 & 0 & 0 \\
0 & 12 & 10 \\
0 & 0 & 12
\colops
\add[\cdot (-\frac{10}{12})]{1}{2}
\end{gmatrix}
\cdot
\begin{pmatrix}
1 & -1 & -1 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{pmatrix}
\\
= \begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{12} & - \frac{1}{2} & 1
\end{pmatrix} \cdot
&\begin{gmatrix}[p]
6 & 0 & 0 \\
0 & 12 & 0 \\
0 & 0 & 12
\colops
\mult{0}{\cdot \frac{1}{6}}
\mult{1}{\cdot \frac{1}{12}}
\mult{2}{\cdot \frac{1}{12}}
\end{gmatrix}
\cdot
\begin{pmatrix}
1 & -1 & -1 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{pmatrix}
\cdot
\begin{pmatrix}
1 & 0 & 0 \\
0 & 1 & -\frac{10}{12} \\
0 & 0 & 1
\end{pmatrix}
\\
= \begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{12} & - \frac{1}{2} & 1
\end{pmatrix} \cdot
&\begin{gmatrix}[p]
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{gmatrix}
\cdot
\begin{pmatrix}
1 & -1 & -\frac{1}{6} \\
0 & 1 & -\frac{5}{6} \\
0 & 0 & 1
\end{pmatrix}
\cdot
\begin{pmatrix}
\frac{1}{6} & 0 & 0 \\
0 & \frac{1}{12} & 0 \\
0 & 0 & \frac{1}{12}
\end{pmatrix}
\\
= \underbrace{\begin{pmatrix}
1 & 0 & 0 \\
-\frac{1}{2} & 1 & 0 \\
-\frac{1}{12} & - \frac{1}{2} & 1
\end{pmatrix}}_L \cdot
&\begin{gmatrix}[p]
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{gmatrix}
\cdot \underbrace{\frac{1}{72}
\begin{pmatrix}
12 & -6 & -1 \\
0 & 6 & -5 \\
0 & 0 & 6
\end{pmatrix}}_R
\end{align}
ACHTUNG: Ich habe mich irgendwo verrechnet!
Siehe \href{http://www.wolframalpha.com/input/?i=%7B%7B1%2C0%2C0%7D%2C%7B-1%2F2%2C1%2C0%7D%2C%7B-1%2F12%2C-1%2F2%2C1%7D%7D*%7B%7B12%2C-6%2C-1%7D%2C%7B0%2C6%2C-5%7D%2C%7B0%2C0%2C6%7D%7D}{WolframAlpha}
\subsection*{Teilaufgabe b}
\textbf{Gegeben:}
\[A =
\begin{pmatrix}
9 & 4 & 12 \\
4 & 1 & 4 \\
12 & 4 & 17
\end{pmatrix}\]
\textbf{Aufgabe:} $A$ auf positive Definitheit untersuchen, ohne Eigenwerte zu berechnen.
\textbf{Lösung:}
Eine Matrix $A \in \mathbb{R}^{n \times n}$ heißt positiv Definit $\dots$
\begin{align*}
\dots & \Leftrightarrow \forall x \in \mathbb{R}^n: x^T A x > 0\\
& \Leftrightarrow \text{Alle Eigenwerte sind größer als 0}
\end{align*}
Falls $A$ symmetrisch ist, gilt:
\begin{align*}
\text{$A$ ist pos. Definit} & \Leftrightarrow \text{alle führenden Hauptminore von $A$ sind positiv}\\
& \Leftrightarrow \text{es gibt eine Cholesky-Zerlegung $A=GG^T$ mit $G$ ist reguläre untere Dreiecksmatrix}\\
\end{align*}
Mit dem Hauptminor-Kriterium gilt:
\begin{align}
\det(A_1) &= 9 > 0\\
\det(A_2) &=
\begin{vmatrix}
9 & 4 \\
4 & 1 \\
\end{vmatrix} = 9 - 16 < 0\\
&\Rightarrow \text{$A$ ist nicht positiv definit}
\end{align}

View file

@ -0,0 +1,49 @@
\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:} TODO! %TODO!
\begin{algorithm}[H]
\begin{algorithmic}
\Require $p \in \mathbb{P}, a \in \mathbb{Z}, p \geq 3$
\Procedure{CalculateLegendre}{$a$, $p$}
\If{$a \geq p$ or $a < 0$}\Comment{rule (III)}
\State \Return $\Call{CalculateLegendre}{a \mod p, p}$ \Comment{now: $a \in [0, \dots, p-1]$}
\ElsIf{$a == 0$ or $a == 1$}
\State \Return $a$ \Comment{now: $a \in [2, \dots, p-1]$}
\ElsIf{$a == 2$} \Comment{rule (VII)}
\If{$p \equiv \pm 1 \mod 8$}
\State \Return 1
\Else
\State \Return -1
\EndIf \Comment{now: $a \in [3, \dots, p-1]$}
\ElsIf{$a == p-1$} \Comment{rule (VI)}
\If{$p \equiv 1 \mod 4$}
\State \Return 1
\Else
\State \Return -1
\EndIf \Comment{now: $a \in [3, \dots, p-2]$}
\ElsIf{!$\Call{isPrime}{a}$} \Comment{rule (II)}
\State $p_1, p_2, \dots, p_n \gets \Call{Factorize}{a}$
\State \Return $\prod_{i=1}^n \Call{CalculateLegendre}{p_i, p}$
\Else \Comment{now: $a \in \mathbb{P}, \sqrt{p-2} \geq a \geq 3$}
\If{$\frac{p-1}{2} \equiv 0 \mod 2$ or $\frac{a-1}{2} \equiv 0 \mod 2$}
\State \Return $\Call{CalculateLegendre}{p, a}$
\Else
\State \Return $(-1) \cdot \Call{CalculateLegendre}{p, a}$
\EndIf
\EndIf
\EndProcedure
\end{algorithmic}
\caption{Calculate Legendre symbol}
\label{alg:calculateLegendreSymbol}
\end{algorithm}
\subsection*{Teilaufgabe b}
\subsection*{Teilaufgabe c}

View file

@ -0,0 +1 @@
\section*{Aufgabe 3}

View file

@ -0,0 +1 @@
\section*{Aufgabe 4}

View file

@ -0,0 +1 @@
\section*{Aufgabe 5}

Binary file not shown.

View file

@ -0,0 +1,36 @@
\documentclass[a4paper]{scrartcl}
\usepackage{amssymb, amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage{pdfpages} % Signatureinbingung und includepdf
\usepackage{geometry} % [margin=2.5cm]layout
\usepackage{hyperref} % links im text
\usepackage{color}
\usepackage{framed}
\usepackage{enumerate} % for advanced numbering of lists
\usepackage{marvosym} % checkedbox
\usepackage{wasysym}
\usepackage{braket} % for \Set{}
\usepackage{pifont}% http://ctan.org/pkg/pifont
\usepackage{gauss}
\usepackage{algorithm,algpseudocode}
\usepackage{parskip}
\allowdisplaybreaks
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\hypersetup{
pdfauthor = {Martin Thoma},
pdfkeywords = {Numerik,KIT},
pdftitle = {Numerik Klausur1 - Musterlösung}
}
\begin{document}
\include{Aufgabe1}
\include{Aufgabe2}
\include{Aufgabe3}
\include{Aufgabe4}
\include{Aufgabe5}
\end{document}

View file

@ -0,0 +1,7 @@
SOURCE = Klausur1
make:
pdflatex -shell-escape $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.pyg

View file

@ -0,0 +1 @@
Dies ist eine inoffizielle Lösung für [Klausur1.pdf von Dr. Daniel Weiß](http://www.math.kit.edu/ianm3/lehre/numainfing2013s/seite/uebnuminfing).