\input{../settings/settings}

\begin{document}

  \klausur{KInf-SemInf-M}
        {Prof. Dr. C. Schlieder}
        {Wintersemester 16/17}
        {90}
        {keine}

  \begin{enumerate}
  \item Search Methods
  
  \begin{enumerate}
  	\item When is a search strategy optimal? When is it complete? It is possible that a search strategy is optimal but not complete? (4 Points)
  	
  	\item Simulated Annealing is a probabilistic optimization algorithm, which randomly selects the next state from the list of possible states. What criterion is used for determining whether or not to accept that state? (4 Points)
  	
  	\item Places of a city are connected by a public transportation network. The travelling times between the places are specified by the edges of the graph shown below. \\
  	Use the A*-algorithm to compute the shortest path from A to F. Use the Manhattan distance from a node x to the goal node F as heuristic function h(x) (e.g. h(A) = 8 + 4 = 12, h(D) = 2 + 2 = 4). (7 Points)
  	
  	\begin{figure}[h]
  		\centering
  		\includegraphics[width=0.4\linewidth]{ws1617-Aufgabe1c}
  		\label{fig:aufgabe1c}
  	\end{figure}
  
  \end{enumerate}

  \item Search Strategies for Games
  
  \begin{enumerate}
  	\item In a variation of the NIM game, players alternately take (delete) one or two tokens from one of the three stacks. The player that takes the last token loses the game. The current game state is shown below. The next move is MAX's, he deletes one token from a stack with two elements. Draw the MinMax tree starting from the situation below and calculate the MIN and MAX values for all subsequent game states. Can MAX win the game? (9 Points)
  	
  	\begin{figure}[h]
  		\centering
  		\includegraphics[width=0.3\linewidth]{ws1617-Aufgabe2a}
  		\label{fig:aufgabe2a}
  	\end{figure}
  
  	\item Describe the optimization technique $\alpha$-$\beta$-Prunning. Calculate the $\alpha$ and $\beta$ values for the MinMax tree from problem a). (6 Points)
  \end{enumerate}
  
  \item Constraint Systems
  
  \begin{enumerate}
  	\item Describe the concept of constraint instantiation. What is the difference between constraint propagation and constraint instantiation? (4 Points)
  	
  	\item For four variables K, L, M and N from the domain \{2, 3, 4, 6, 7, 8, 10, 11\} the following binary and unary constraints are known: \\
  	
  	Binary constraints: K \{>,=\} N, M \{>\} K, N \{<,=\} L, N \{>,=\} M \\
  	Unary constraints: K $\in$ \{4,8,10\}, L $\in$ \{2,3,4,6\}, M $\in$ \{2,3,7,11\}, N $\in$ \{3,4,8,11\} \\
  	
  	Draw the constraint graph for the four variables. (4 Points)
  	
  	\item Use the arc consistency algorithm to assign the corresponding values to the variable from problem b). Write the intermediary results in separate tables. Does the algorithm find a solution? (7 Points)
  	
  	K: 4, 8, 10 \\
  	L: 2, 3, 4, 6 \\
  	M: 2, 3, 7, 11 \\
  	N: 3, 4, 8, 11  	
  \end{enumerate}

  \item Modeling with Logic
  
  \begin{enumerate}
  	\item Give a definition for the notions satisfiable formula, tautological formula, and contradictory formula in predicate logic. You may assume that the notion of a model of a formula in predicate logic has already been defined. (3 Points)
  	
  	\item Describe the GSAT-algorithm. Is the GSAT-algorithm complete? Justify your answer. (5 Points)
  	
  	\item Compute the most general unifier (mgu) of the two terms below. Note that w, x, y and z are variables, \underline{a} and \underline{b} are constants. \\
  	
  	P(h(y, g(y,x)), w, g(\underline{a})) \\
  	P(h(f(x), g(z, \underline{b})), f(z), g(\underline{a})) \\
  	
  	Simplify the mgu such that the substitutions are order-independent and specify the unified term. (7 Points)
  \end{enumerate}

  \item Ontologies and Bayesian Networks
  
  \begin{enumerate}
  	\item Two definitions in description logics were translated in natural language. Evaluate the correctness of the translation and justify your decision by referring to the semantics of the value restriction and the existential restriction. If necessary, specify the correct translation. (6 Points) \\
  	
  	Definition 1: \\
  	SeminarParticipant = Student $\sqcap$ $\exists$ visits($\neg$ Lecture) \\
  	A seminar participant is a student that visits exactly one event that is not a lecture. \\
  	
  	Definition 2: \\
  	Student = $\forall$ visits(Lecture $\sqcup$ Seminar $\sqcup$ Tutorial) \\
  	A student is someone who -- if he visits events -- only visits lectures, seminars and tutorials.
  	
  	\item Describe the concepts of causal and diagnostic reasoning. Explain the Bayes' rule. Is it used for causal or diagnostic reasoning? (5 Points) 
  	
  	\item The following table shows the complete probability distribution for two events A and B. Explain why the values in the table are not consistent. (4 Points) \\
  	
  	\begin{tabular}{|c|c|c|}
  		\hline 
  		A & B & P \\ 
  		\hline 
  		0 & 0 & 0,45 \\ 
  		\hline 
  		0 & 1 & 0,35 \\ 
  		\hline 
  		1 & 0 & 0,15 \\ 
  		\hline 
  		1 & 1 & 0,15 \\ 
  		\hline 
  	\end{tabular} 
  \end{enumerate}

  \item Machine Learning
  
  \begin{enumerate}
  	\item A training set S that is used for decision tree learning contains 8 positive and 4 negative examples. Explain how the information content I(S) is determined. \\
  	
  	Two attributes $A_1$ or $A_2$ can be used to split S:
  	\begin{enumerate}
  		\item Attribute $A_1$ with values 0 or 1 splits the training set S in $S_{10}$ with 2 positive and 2 negative examples and $S_{11}$ with 6 positive and 2 negative examples.
  		\item Attribute $A_2$ with values 0 and 1 splits the training set S in $S_{20}$ with 2 positive and 4 negative examples and in $S_{21}$ with 6 positive examples.
  	\end{enumerate}
  
  	Which attribute provides the bigger information gain? Specify the formulas for the information gain Gain(S, $A_1$) and Gain(S, $A_2$) and make an educated guess about the result. (9 Points)
  	
  	\item A perceptron consists of two unput neurons $i_1$ and $i_2$ that are connected with output neuron o via the weights $w_1$ and $w_2$. Show how the weights $w_1$=1 and $w_2$=1 are changed if the training examples shown below are processed with a learning rate of $\alpha$=1. (6 Points) \\
  	
  	\begin{tabular}{|c|c|c|c|c|}
  		\hline 
  		Example Nr. & 1 & 2 & 3 & 4 \\ 
  		\hline 
  		$i_1$ & 1 & 1 & 0 & 0 \\ 
  		\hline 
  		$i_2$ & 1 & 0 & 1 & 0 \\ 
  		\hline 
  		o & -2 & -1 & -1 & 0 \\ 
  		\hline 
  	\end{tabular} 
  \end{enumerate}
  
  \end{enumerate}
\end{document}