mirror of
https://github.com/janishutz/eth-summaries.git
synced 2025-11-25 02:24:23 +00:00
[TI] Compact: Fix a few errors
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
\fancydef{Alphabet} Set $\Sigma$.
|
||||
Important alphabets: $\alphabetbool$, $\alphabets{lat}$ (all latin chars), $\alphabets{Keyboard}$ (all chars on keyboard), $\Sigma_m$ ($m$-ary numbers)
|
||||
|
||||
\fancydef{Word} Possibly empty (denoted $\lambda$) sequences of characters from $\Sigma$. $|w|$ is the length,
|
||||
\fancydef{Word} Possibly empty (denoted $\lambda$) sequences of characters from $\Sigma$. $|w|$ is the length,
|
||||
$\Sigma^*$ is the set of all words and $\Sigma^+ = \Sigma^* - \{ \lambda \}$
|
||||
|
||||
\fancydef{Konkatenation} $\text{Kon}(x, y) = xy$, (so like string concat). $(xy)^n$ is $n$-times repeated concat.
|
||||
@@ -13,7 +13,7 @@ $\Sigma^*$ is the set of all words and $\Sigma^+ = \Sigma^* - \{ \lambda \}$
|
||||
\fancydef{Reversal} $a^R$, simply read the word backwards.
|
||||
|
||||
\stepLabelNumber{definition}
|
||||
\fancydef{Prefix, Suffix, Subword} $v$ in $w = vy$; $s$ in $w = sx$; Subword is $u$ in $w = xuy$
|
||||
\fancydef{Prefix, Suffix, Subword} $v$ in $w = vy$; $s$ in $w = xs$; Subword $u$ in $w = xuy$; $x$, $y$ possibly $\lambda$
|
||||
|
||||
\fancydef{Appearance} $|x|_a$ is the number of times $a \in \Sigma$ appears in $x$
|
||||
|
||||
@@ -24,7 +24,7 @@ $\Sigma^*$ is the set of all words and $\Sigma^+ = \Sigma^* - \{ \lambda \}$
|
||||
\end{align*}
|
||||
|
||||
\drmvspace
|
||||
\fancydef{Language} $L \subseteq \word$, and we define $L^C = \word - L$ as the complement, with $L_{\emptyset}$ being the empty language,
|
||||
\fancydef{Language} $L \subseteq \word$, and we define $L^C = \word - L$ as the complement, with $L_{\emptyset}$ being the empty language,
|
||||
whereas $L_\lambda$ is the language with just the empty word in it.
|
||||
|
||||
\bi{Concatenation}: $L_1 \cdot L_2 = \{ vw | v \in L_1 \land w \in L_2 \}$ and $L^{i + 1} = L^i \cdot L \ \forall i \in \N$.
|
||||
@@ -39,7 +39,7 @@ whereas $L_\lambda$ is the language with just the empty word in it.
|
||||
\stepcounter{subsection}
|
||||
\subsection{Kolmogorov-Complexity}
|
||||
\setLabelNumber{definition}{17}
|
||||
\fancydef{Kolmogorov-Complexity} $K(x)$ for $x \in \wordbool$ is the minimum of all binary lengths of Pascal programs that output $x$,
|
||||
\fancydef{Kolmogorov-Complexity} $K(x)$ for $x \in \wordbool$ is the minimum of all binary lengths of Pascal programs that output $x$,
|
||||
where the Program doesn't have to compile, i.e. we can describe processes informally
|
||||
|
||||
\stepLabelNumber{lemma}
|
||||
@@ -56,4 +56,20 @@ where the Program doesn't have to compile, i.e. we can describe processes inform
|
||||
\stepLabelNumber{theorem}
|
||||
\fancytheorem{Prime number} $\displaystyle \limni \frac{\text{Prime}(n)}{\frac{n}{\ln(n)}}$
|
||||
|
||||
\fhlc{Cyan}{Proofs} Most of the proofs start with defining the number of words of exactly the required length and we can then usually deduce some kind of indirect proof (using the fact that there are at most $2^n - 1$ words $x$ with $K(x) < n$).
|
||||
\fhlc{Cyan}{Proofs} Most of the proofs start with defining the number of words of exactly the required length and we can then usually deduce some kind of indirect proof
|
||||
(using the fact that there are at most $2^k - 1$ words $x$ with $K(x) < k$).
|
||||
|
||||
It is useful to remember the laws of logarithm and the fact that there are $\floor{\frac{n}{k}} + 1$ numbers divisible by $k$ in the set $\{ 0, 1, \ldots, n \}$.
|
||||
Additionally, the pigeonhole principle can come in very handy
|
||||
|
||||
\shade{Orange}{Laws of logarithm}
|
||||
\drmvspace
|
||||
\begin{multicols}{3}
|
||||
\begin{itemize}[noitemsep]
|
||||
\item $\log_a(x) + \log_a(y) = \log_a(x \cdot y)$
|
||||
\item $\log_a(x) - \log_a(y) = \log_a(x \div y)$
|
||||
\item $y \log_a(x) = \log_a(x^y)$
|
||||
\item $\log_a(x) = \frac{\ln(x)}{\ln(a)}$
|
||||
\item $\log_a(1) = 0$
|
||||
\end{itemize}
|
||||
\end{multicols}
|
||||
|
||||
@@ -11,10 +11,10 @@ We can note the automata using graphical notation similar to graphs or as a seri
|
||||
\end{align*}
|
||||
|
||||
\drmvspace
|
||||
\fancydef{Finite Automaton}
|
||||
\fancydef{Finite Automaton} $A = (Q, \Sigma, \delta, q_0, F)$ with
|
||||
\drmvspace
|
||||
\begin{multicols}{2}
|
||||
\begin{itemize}
|
||||
\begin{itemize}[noitemsep]
|
||||
\item $Q$ set of states
|
||||
\item $\Sigma$ input alphabet
|
||||
\item $\delta(q, a) = p$ transition from $q$ on reading $a$ to $p$
|
||||
@@ -26,7 +26,7 @@ We can note the automata using graphical notation similar to graphs or as a seri
|
||||
|
||||
\drmvspace
|
||||
$\hat{\delta}(q_0, w) = p$ is the end state reached when we process word $w$ from state $q_0$, and $(q, w) \bigvdash{M}{*} (p, \lambda)$ is the formal definition,
|
||||
with $\bigvdash{M}{*}$ representing any number of steps $\bigvdash{M}{}$ executed.
|
||||
with $\bigvdash{M}{*}$ representing any number of steps $\bigvdash{M}{}$ executed (transitive hull).
|
||||
|
||||
The class $\class[q_i]$ represents all possible words for which the FA is in this state.
|
||||
Be cautious when defining them, make sure that no extra words from other classes could appear in the current class, if this is not intended.
|
||||
@@ -52,9 +52,9 @@ For all of them start by assuming that $L$ is regular.
|
||||
|
||||
\fhlc{Cyan}{Lemma 3.3}
|
||||
\setLabelNumber{lemma}{3}
|
||||
\begin{lemma}[]{Unterscheidung von Wörtern}
|
||||
Sei $A$ ein EA über $\Sigma$ und $x \neq y \in \Sigma^*$ so dass $\hdelta_A (q_0, x) = \hdelta(q_0, y)$.
|
||||
Dann existiert für jedes $z \in \Sigma^*$ ein $r \in Q$, so dass $xz, yz \in \class[r]$, also gilt insbesondere
|
||||
\begin{lemma}[]{Regular words}
|
||||
Let $A$ be a FA over $\Sigma$ and let $x \neq y \in \Sigma^*$, such that $\hdelta_A (q_0, x) = \hdelta(q_0, y)$.
|
||||
Then for each $z \in \Sigma^*$ there exists a $r \in Q$, such that $xz, yz \in \class[r]$, and we thus have
|
||||
\rmvspace
|
||||
\begin{align*}
|
||||
xz \in L(A) \Longleftrightarrow yz \in L(A)
|
||||
@@ -74,13 +74,13 @@ That is a contradiction, which concludes our proof
|
||||
|
||||
\fhlc{Cyan}{Pumping Lemma}
|
||||
\begin{lemma}[]{Pumping-Lemma für reguläre Sprachen}
|
||||
Sei $L$ regulär. Dann existiert eine Konstante $n_0 \in \N$, so dass sich jedes Wort $w \in \word$ mit $|w| \geq n_0$ in $w = yxz$ zerlegen lässt, wobei
|
||||
\rmvspace
|
||||
Let $L$ be regular. Then there exists a constant $n_0 \in \N$, such that each word $w \in \word$ with $|w| \geq n_0$ can be decomposed into $w = yxz$, with
|
||||
\drmvspace
|
||||
\begin{multicols}{2}
|
||||
\begin{enumerate}[label=\textit{(\roman*)}]
|
||||
\item $|yx| \leq n_0$
|
||||
\item $|x| \geq 1$
|
||||
\item Für $X = \{ yx^kz \divides k\in \N \}$ \textit{entweder} $X \subseteq L$ oder $X \cap L = \emptyset$ gilt
|
||||
\item For $X = \{ yx^kz \divides k\in \N \}$ \textit{either} $X \subseteq L$ or $X \cap L = \emptyset$ applies
|
||||
\end{enumerate}
|
||||
\end{multicols}
|
||||
\end{lemma}
|
||||
@@ -98,26 +98,28 @@ That is a contradiction, which concludes our proof
|
||||
|
||||
\fhlc{Cyan}{Kolmogorov Complexity}
|
||||
\begin{enumerate}[noitemsep]
|
||||
\item We first need to choose an $x$ such that $L_x = \{ y | xy \in L \}$.
|
||||
\item We first need to choose an $x$ such that $L_x = \{ y \divides xy \in L \}$.
|
||||
If not immediately apparent, choosing $x = a^{\alpha + 1}$ for $a \in \Sigma$
|
||||
and $\alpha$ being the exponent of the exponent of the words in the language after a variable rename.
|
||||
For example, for $\{ 0^{n^2 + 2n} \divides n \in \N \}$, $\alpha(m) = m^2 + 2m$.
|
||||
Another common way to do this is for languages of the form $\{ a^n b^n \divides n \in \N \}$ to use $x = a^m$ and
|
||||
$L_{0^m} = \{ y | 0^m y \in L \} = \{ 0^j 1^{m + j} | j \in \N \}$.
|
||||
$L_{0^m} = \{ y \divides 0^m y \in L \} = \{ 0^j 1^{m + j} \divides j \in \N \}$.
|
||||
\item Find the first word $y_1 \in L_x$. In the first example, this word would be $y_1 = 0^{(m + 1)^2 \cdot 2(m + 1) - m^2 \cdot 2m + 1}$,
|
||||
or in general $a^{\alpha(m + 1) - \alpha(m) + 1}$.
|
||||
For the second example, the word would be $y_1 = 1^m$, i.e. with $j = 0$
|
||||
\item According to Theorem 3.1, there exists constant $c$ such that $K(y_k) \leq \ceil{\log_2(k + 1)} + c$. We often choose $k = 1$,
|
||||
so we have $K(y_1) \leq \ceil{\log_2(1 + 1)} + c = 1 + c$ and with $d = 1 + c$, $K(y_1) \leq d$
|
||||
\item This however leads to a contradiction, since the number of programs with length $\leq d$ is at most $2^d$ and thus finite and our set $L_x$ is infinite.
|
||||
\item This however leads to a contradiction, since the number of programs with length $\leq d$ is at most $2^d$ and thus finite, but our set $L_x$ is infinite.
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
\newpage
|
||||
\fhlc{Cyan}{Minimum number of states}
|
||||
|
||||
To show that a language needs \textit{at least} $n$ states, use Lemma 3.3 and $n$ words. We thus again do a proof by contradiction:
|
||||
\begin{enumerate}
|
||||
\item Assume that there exists FA with $|Q| < n$. We now choose $n$ words (as short as possible), as we would for non-regularity proofs using Lemma 3.3 (i.e. find some prefixes)
|
||||
\item Assume that there exists FA with $|Q| < n$. We now choose $n$ words (as short as possible), as we would for non-regularity proofs using Lemma 3.3 (i.e. find some prefixes).
|
||||
It is usually beneficial to choose prefixes with $|w|$ small (consider just one letter, $\lambda$, then two and more letter words)
|
||||
\item Construct a table for the suffixes using the $n$ chosen words such that one of the words at entry $x_{ij}$ is in the language and the other is not. ($n \times n$ matrix, see below in example)
|
||||
\item Conclude that we have reached a contradiction as every field $x_{ij}$ contains a suffix such that one of the two words is in the language and the other one is not.
|
||||
\end{enumerate}
|
||||
|
||||
@@ -8,7 +8,7 @@ For example, to detect a recursive language like $\{ 0^n 1^n \divides n \in \N \
|
||||
and repeat until we only have the new symbol, at which point we accept, or there are no more $0$s or $1$s, at which point we reject.
|
||||
|
||||
The Turing Machines have an accepting $\qacc$ and a rejecting state $\qrej$ and a configuration is an element of
|
||||
$\{ \cent \}\cdot \Gamma^* \cdot Q \cdot \Gamma^+ \cup Q \cdot \{ \cent \} \cdot \Gamma^+ \}$ with $\cdot$ being the concatenation and $\cent$ the marker of the start of the band.
|
||||
$\{ \{ \cent \}\cdot \Gamma^* \cdot Q \cdot \Gamma^+ \cup Q \cdot \{ \cent \} \cdot \Gamma^+ \}$ with $\cdot$ being the concatenation and $\cent$ the marker of the start of the band.
|
||||
|
||||
|
||||
\subsection{Multi-tape TM and Church's Thesis}
|
||||
@@ -18,7 +18,7 @@ All read/write-heads of the memory tapes can move in either direction, granted t
|
||||
|
||||
As with normal TMs, the Turing Machine $M$ accepts $w$ if and only if $M$ reaches the state $\qacc$ and rejects if it does not terminate or reaches the state $\qrej$
|
||||
|
||||
\inlinelemma There exists and equivalent $1$-Tape-TM for every TM.
|
||||
\inlinelemma There exists an equivalent $1$-Tape-TM for every TM.
|
||||
|
||||
\inlinelemma There exists an equivalent TM for each Multi-tape TM.
|
||||
|
||||
@@ -29,7 +29,7 @@ It is the only axiom specific to Computer Science.
|
||||
All the words that can be accepted by a Turing Machine are elements of $\mathcal{L}_{RE}$ and are called \bi{recursively enumerable}.
|
||||
|
||||
|
||||
\subsection{Non-Deterministic Turin Machines}
|
||||
\subsection{Non-Deterministic Turing Machines}
|
||||
The same ideas as with NFA apply here. The transition function also maps into the power set:
|
||||
\rmvspace
|
||||
\begin{align*}
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,7 @@
|
||||
\documentclass{article}
|
||||
|
||||
\newcommand{\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!
|
||||
\input{\dir/include.tex}
|
||||
\load{recommended}
|
||||
\input{~/projects/latex/dist/recommended.tex}
|
||||
|
||||
\usetikzlibrary{automata, positioning, arrows.meta}
|
||||
\newcommand{\hdelta}{\hat{\delta}}
|
||||
\newcommand{\qacc}{q_{\text{accept}}}
|
||||
@@ -14,14 +13,42 @@
|
||||
\startDocument
|
||||
\usetcolorboxes
|
||||
|
||||
\vspace{2cm}
|
||||
\begin{Huge}
|
||||
\begin{center}
|
||||
TITLE PAGE COMING SOON
|
||||
\end{center}
|
||||
\end{Huge}
|
||||
|
||||
|
||||
\vspace{4cm}
|
||||
\begin{center}
|
||||
\begin{Large}
|
||||
``\textit{Sie können also alle C Programme in Kanonischer Ordnung aufzählen. Sollten Sie dies tun. Wahrscheinlich nicht. Was aber zählt ist, sie \textbf{können} es tun}''
|
||||
\end{Large}
|
||||
|
||||
\hspace{3cm} - Prof. Dr. Dennis Komm, 2025
|
||||
\end{center}
|
||||
|
||||
\vspace{3cm}
|
||||
\begin{center}
|
||||
HS2025, ETHZ\\[0.2cm]
|
||||
\begin{Large}
|
||||
Compact Summary of the book \color{MidnightBlue}\fbox{\href{https://link.springer.com/book/10.1007/978-3-658-06433-4}{Theoretische Informatik}}\color{black}
|
||||
\end{Large}\\[0.2cm]
|
||||
by Prof. Dr. Juraj Hromkovic
|
||||
\end{center}
|
||||
|
||||
|
||||
\newpage
|
||||
\printtoc{Orange}
|
||||
\section{Introduction}
|
||||
This summary aims to provide a simple, easy to understand and short overview over the topics covered, with approaches for proofs, important theorems and lemmas,
|
||||
as well as definitions.
|
||||
|
||||
It does not aim to serve as a full replacement for the book or my main summary, but as a supplement to both of them.
|
||||
|
||||
It also lacks some formalism and is only intended to give some intuition
|
||||
It also lacks some formalism and is only intended to give some intuition, six pages are really not enough for a formal and complete overview of the topic.
|
||||
|
||||
|
||||
\input{parts/01_words-alphabets.tex}
|
||||
|
||||
Reference in New Issue
Block a user