95 lines
4.3 KiB
TeX

\input{../settings/settings}
\usepackage{amsfonts}
\usepackage{fitch_selinger}
\begin{document}
\klausur{Mathematik für Informatiker 1}{Prof. M. Mendler}{Wintersemester 12/13}{90}{Wörterbuch, Taschenrechner ohne vollständige alphanumerische Tastatur oder Grafikdisplay}
1a) Give an appropriate signature $\Sigma_{archive}$ = (S, OP, REL) for \textit{video archives} with the following properties:\\
\begin{itemize}
\item You can add single BlueRay discs to an archive or remove them from an archive
\item You can also add single DVDs to an archive or remove them from an archive or replace them by BlueRay discs.\\
\end{itemize}
Further, introduce
\begin{itemize}
\item a relation that indicates that an archive is \textit{emtpy}
\item a relation that indicates that there are only BlueRay discs in the archive (no DVDs)\\
\end{itemize}
b) Using the signature $\Sigma_{archive}$ and a $\Sigma_{archive}$-sorted family of variables \textit{X}, formalize the following state ment in first-order predicate logic (FOL). A German translation is given in brackets:\\\\
"Removing a DVD or a BlueRay disc from an empty archive results in an empty archive."\\\\
(Das Entfernen einer DVD oder BlueRay aus einem leeren Archiv liefert ein leeres Archiv.)\\\\
For this, define a $\Sigma_{archive}$-sorted family of variables \textit{x} first! You do not need to prove anything!\\\\
2) Prove the following argument using the Fitch proof calculus. The Fitch rules are given in the Appendix (Anhang!)\\\\
% fitch formula here
$
\begin{nd}
\hypo{1}{\forall x (P(x) \to T(x, k))}
\hypo{2}{\forall y (Q(y) \to \neg T(y, k)}
\have[?]{3}{\forall z (P(z) \to \neg Q(z))}
\end{nd}
$\\\\\\
3) Use mathematical induction to prove that for all natural numbers n $\in$ $\mathbb{N}$,\\\\
\begin{center}
$\sum\limits_{i=0}^{n}i 2^i = (2^{n+1} (n-1))+2$\\[5mm]
\end{center}
\newpage
4) Consider the propositional signature $\Sigma$ = (S, OP, REL) with S = OP = $\emptyset$ and REL = \{ A, B, C : Prop\}\\
Consider the formulas $\varphi_1$ and $\varphi_2$ in $Form_{\Sigma}(\emptyset)$:\\
\begin{tabbing}
Links \= Mitte \= Rechts \kill
\>\>$\varphi_1$ = $_{df}$ $\neg$(A $\lor$ $\neg$ B) $\to$ (($\neg$A $\wedge$ B) $\wedge$ C)\\
\>\>$\varphi_2$ = $_{df}$ A $\lor$ ($\neg$B $\lor$ C)\\
\end{tabbing}
a) Using the laws of Boolean Algebra (see Appendix) shows that $\varphi_1$ = $\varphi_2$ holds.\\
State for every transformation step the name of the rule which you apply.\\
Hint: Note that $\phi$ $\to$ $\psi$ can be written as $\neg$ $\phi$ $\lor$ $\psi$ for all formulas $\phi$ and $\psi$!\\\\
b) Show by structural truth table evaluation that $\varphi_1$ = $\varphi_2$ holds (you find the general truth tables in Appendix)\\\\
5) Consider the computer system relations of Appendix I\\
a) Construct a formal expression of relational algebra to answer the following questions:\\\\
What are the product names (Prod$\_$Name) of the Tablet PCs (Model) with a hard drive size (HD$\_$size) of 1024 and with Doors operating system (OpSys)?\\
b) Consider the following expression of relational algebra referring to the tables of Appendix I\\\\
\begin{center}
$\pi$ Price ( $\sigma$Model = Notebook (System * Type * (HardDrive \textbackslash $\sigma_{HD\_Size}$ < 1000 (HardDrive))))\\
\end{center}
Provide a table (with table header, i.e. attribute names) to the tables of Appendix I.\\
Explain your workings for instanceby paraphrasing in english or german what this expression means.
\newpage
\textbf{Appendix I}
\begin{center}
Computer Systems\\
\end{center}
System:
\begin{tabular}{c|l*{2}{|c}|l|r}
CID & Prod$\_$Name & TID & HDID & Op$\_$Sys & Price\\
\hline
1 & Doll Super 15 & 1 & 1 & Doors & 329\\
2 & Doll Super 17 & 2 & 1 & Doors & 399\\
3 & Doll Super 18 & 2 & 2 & Lunix & 399\\
4 & Doll Spec & 3 & 2 & Lunix & 359\\
5 & Fishitsu Wonder & 2 & 3 & None & 420\\
6 & Fishitsu Classic & 3 & 1 & None & 500\\
7 & Media Monster & 4 & 4 & Doors & 6000\\
8 & Devil's Eye & 1 & 1 & MockOS & 900\\
9 & Sugar Play 3000 & 5 & 2 & Doors & 250\\
\end{tabular}
\\\\\\\\
Type:
\begin{tabular}{c|l|c|c}
TID & Model & Screen$\_$Size & Touch$\_$Screen\\
\hline
1 & Notebook & 14 & No\\
2 & Notebook & 17 & No\\
3 & Tablet & 15 & Yes\\
4 & Tablet & 22 & Yes\\
5 & Desktop & 18 & No\\
\end{tabular}
\\\\\\\\
Hard Drive:
\begin{tabular}{c|r}
HDID & HD-Size\\
\hline
1 & 320\\
2 & 500\\
3 & 1024\\
4 & 2048\\
\end{tabular}
\end{document}