margo, please 80 chars breed
[ker2014-2.git] / report / ass2-1.tex
index 4f0fac2..1e15055 100644 (file)
@@ -208,28 +208,38 @@ P(i_1|burglar)+P(i_2|earthquake)(1-P(i_1|burglar)) =
 0.2*0.0027+0.95*0.0027*(1-0.2*0.0027)=0.00314699654673673$ \\
 TODOOOOOOOOOOO %Ik weet niet of we i_1 en i_2 nog door iets anders vervangen
 % moeten worden.
-When you compare the output of ailog and of the variable elimination, you see
+When you compare the output of AILog and of the variable elimination, you see
 that they are similar.
 
 \newpage
 \section{Burglary problem with extended information}
-$P(burglary)\cdot\left(
-       P(\text{first house is holmes'})+
-       P(\text{second house is holmes'})+
-       P(\text{third house is holmes'})\right)=\\
-0.5102041\cdot\left(
+Extending the problem with multiple houses, dependencies and cold night we get
+the following AILog representation:
+\inputminted[linenos,fontsize=\footnotesize]{prolog}{./src/burglary.ail}
+When thinking about the dependencies and successful burglaries we found out that
+there are only four possible successful burglaries. In the model we abstracted
+from the dependency layer and implemented the model in three layers. The first
+layer is the initial probability of every burglar. The second layer is the
+possible groups that lead to a successful burglary. The chances that Holmes'
+house is hit is the third layer. This results in the following probability for
+a burglary in Holmes' house.
+
+$P(burglary)\cdot(
+       P(\text{first house Holmes'})+
+       P(\text{second house Holmes'})+
+       P(\text{third house Holmes'}))=\\
+0.655976676\cdot\left(
        \frac{1}{10000}+
        \frac{9999}{10000}\cdot\frac{1}{9999}+
-       \frac{9999}{10000}\cdot\frac{9998}{9999}\cdot\frac{1}{9998}\right)=
-\frac{3}{19600}\approx0.000153$
+       \frac{9999}{10000}\cdot\frac{9998}{9999}\cdot\frac{1}{9998}\right)
+       \approx 0.000196773$
 
 \section{Bayesian networks}
-A bayesian network representation of the burglary problem with a multitude of
+A Bayesian network representation of the burglary problem with a multitude of
 houses and burglars is possible but would be very big and tedious because all
 the constraints about the burglars must be incorporated in the network.
 The network would look something like in figure~\ref{bnnetworkhouses}
 
-
 \begin{tabular}{|l|l|}
        \hline
        Joe &\\