Blame view

text/00_PASP.tex 29 KB
808facfe   Francisco Coelho   Main text adapted...
1
\documentclass{beamer}
b43c061c   Francisco Coelho   rewriting 00_PASP...
2
3
4
5
6
%------------------------------------------
\usecolortheme{rose}
%------------------------------------------
\useinnertheme{circles}
%------------------------------------------
808facfe   Francisco Coelho   Main text adapted...
7
\setbeamertemplate{navigation symbols}{}
b43c061c   Francisco Coelho   rewriting 00_PASP...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
%------------------------------------------
\AtBeginSection{
    \begin{frame}<beamer>\small
        \tableofcontents[currentsection,subsectionstyle=shaded/shaded/hide]
    \end{frame}
}
%------------------------------------------
\AtBeginSubsection{	
    \begin{frame}<beamer>\small
        \tableofcontents[
            currentsection,sectionstyle=shaded/shaded,
            currentsubsection,subsectionstyle=show/shaded/hide]
    \end{frame}
}
%------------------------------------------
808facfe   Francisco Coelho   Main text adapted...
23
24
25
\usepackage[overridenote]{pdfpc}

\usepackage{tikz}
53b3b48c   Francisco Coelho   Started pre-paper...
26
27
28
29
30
31

\usepackage{commath}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\hypersetup{%
237d62bd   Francisco Coelho   Further rewriting...
32
  colorlinks=true,
53b3b48c   Francisco Coelho   Started pre-paper...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  allcolors=blue,
}
%
% Local commands
%
\newcommand{\todo}[1]{{\color{orange}TODO #1}}
\newcommand{\naf}{\ensuremath{\sim\!}}
\newcommand{\larr}{\ensuremath{\leftarrow}}
\newcommand{\at}[1]{\ensuremath{\!\del{#1}}}
\newcommand{\co}[1]{\ensuremath{\overline{#1}}}
\newcommand{\fml}[1]{\ensuremath{{\cal #1}}}
\newcommand{\deft}[1]{\textbf{#1}}
\newcommand{\pset}[1]{\ensuremath{\mathbb{P}\at{#1}}}
\newcommand{\ent}{\ensuremath{\lhd}}
\newcommand{\cset}[2]{\ensuremath{\set{#1,~#2}}}
\newcommand{\langof}[1]{\ensuremath{\fml{L}\at{#1}}}
\newcommand{\uset}[1]{\ensuremath{\left|{#1}\right>}}
\newcommand{\lset}[1]{\ensuremath{\left<{#1}\right|}}
\newcommand{\pr}[1]{\ensuremath{\mathrm{p}\at{#1}}}
%
%	Identificação deste documento
%
\title{Zugzwang}
\subtitle{Stochastic Adventures in Inductive Logic}
\author{Francisco Coelho}
237d62bd   Francisco Coelho   Further rewriting...
58
\institute[\texttt{fc@uevora.pt}]{
808facfe   Francisco Coelho   Main text adapted...
59
  Departamento de Informática, Universidade de Évora\\
808facfe   Francisco Coelho   Main text adapted...
60
61
62
63
64
65
  High Performance Computing Chair\\
  NOVA-LINCS
}

\begin{document}
%
53b3b48c   Francisco Coelho   Started pre-paper...
66
67
\begin{frame}[plain]
\titlepage
808facfe   Francisco Coelho   Main text adapted...
68
69
70
71
72
73
74
75
76
77
78
79
\end{frame}

\section{Introduction}


\begin{frame}{Notation and Assumptions}
    % --------------------------------
    \begin{itemize}
        % --------------------------------
        \item $\co{x} = 1 - x$.
        % --------------------------------
        \item \textbf{Probabilistic Atomic Choice (PAC):} $\alpha :: a$ defines $a \lor \neg a$ and probabilities $\pr{a} = \alpha, \pr{\neg a} = \co{\alpha}$. 
b43c061c   Francisco Coelho   rewriting 00_PASP...
80
        % --------------------------------
808facfe   Francisco Coelho   Main text adapted...
81
82
83
        \item $\delta a$ denotes $a \lor \neg a$ and $\delta\! \set{\alpha :: a, a \in \fml{A}} = \set{\delta a, a \in \fml{A}}$ for a set of atoms $\fml{A}$.
        % --------------------------------
        \item \textbf{Closed World Assumption:} $\naf x \models \neg x$.
b43c061c   Francisco Coelho   rewriting 00_PASP...
84
        % --------------------------------
241956f9   Francisco Coelho   continuing 00_PASP
85
        % \item Probabilistic choices and sub-goals are independent.
eb584496   Francisco Coelho   presentation, as ...
86
87
88
89
        % --------------------------------
    \end{itemize}
    % --------------------------------
\end{frame}
b43c061c   Francisco Coelho   rewriting 00_PASP...
90
% ================================================================
eb584496   Francisco Coelho   presentation, as ...
91
92
\begin{frame}{General Setting}
    % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
93
94
95
    \begin{itemize}    
        % --------------------------------
        \item  \textbf{Atoms} $\fml{A}$,
eb584496   Francisco Coelho   presentation, as ...
96
        $\overline{\fml{A}} = \cset{\neg a}{a \in \fml{A}}$,
808facfe   Francisco Coelho   Main text adapted...
97
98
        % --------------------------------
        \item \textbf{Observations} $\fml{Z}$:
eb584496   Francisco Coelho   presentation, as ...
99
100
101
        $$\fml{Z} = \cset{z = \alpha \cup \beta }{ \alpha \subseteq \fml{A} \land \beta \subseteq \overline{\fml{A}} }$$
        % --------------------------------
        \item \textbf{Interpretations} or \textit{consistent observations} $\fml{I}$ :
808facfe   Francisco Coelho   Main text adapted...
102
103
104
105
106
        $$\fml{I} = \cset{z \in \fml{Z} }{ \forall a \in \fml{A}~\envert{\set{a,\neg a} \cap z} \leq 1}.$$
        % --------------------------------
        \item \textit{PASP Problem}  or \textbf{Specification:} $P = C \land F \land R$ where
        % --------------------------------
            \begin{itemize}
eb584496   Francisco Coelho   presentation, as ...
107
                % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
108
                \item $C = C_P = \cset{\alpha_i :: a_i }{ i \in 1:n \land  a_i \in \fml{A}}$ \textit{pacs}.
808facfe   Francisco Coelho   Main text adapted...
109
                % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
110
111
112
                \item $F = F_P$ \textit{facts}.
                % --------------------------------
                \item $R = R_P$ \textit{rules}.
53b3b48c   Francisco Coelho   Started pre-paper...
113
                % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
114
                \item $\fml{A}_P, \fml{Z}_P$ and $\fml{I}_P$: \textit{atoms}, \textit{observations} and \textit{interpretations} of $P$.
53b3b48c   Francisco Coelho   Started pre-paper...
115
            \end{itemize}
b43c061c   Francisco Coelho   rewriting 00_PASP...
116
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
117
        \item \textbf{Stable Models} of $P$, $\fml{S} = \fml{S}_P$, are the stable models of $\delta P = \delta C + F + R$.
b43c061c   Francisco Coelho   rewriting 00_PASP...
118
119
120
        % --------------------------------
    \end{itemize}
    % --------------------------------
808facfe   Francisco Coelho   Main text adapted...
121
\end{frame}
b43c061c   Francisco Coelho   rewriting 00_PASP...
122
% ================================================================
808facfe   Francisco Coelho   Main text adapted...
123
\begin{frame}{Distribution Semantics}
b43c061c   Francisco Coelho   rewriting 00_PASP...
124
    % --------------------------------
eb584496   Francisco Coelho   presentation, as ...
125
    \begin{itemize}
b43c061c   Francisco Coelho   rewriting 00_PASP...
126
        % --------------------------------
eb584496   Francisco Coelho   presentation, as ...
127
        \item \textbf{Total Choices:} $\Theta = \Theta_C = \Theta_P$ elements are  $\theta = \set{c_1, \ldots, c_n}$ where $c_i$ is $a_i$ or $\neg a_i$.  
b43c061c   Francisco Coelho   rewriting 00_PASP...
128
129
        % --------------------------------
        %\item For $s\in\fml{S}$ let $\theta_s \subseteq s$ (unique \textit{total choice})
53b3b48c   Francisco Coelho   Started pre-paper...
130
        %\item Define $\fml{S}_\theta = \cset{s \in \fml{S}}{\theta \subset s}$.
b43c061c   Francisco Coelho   rewriting 00_PASP...
131
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
132
        
b43c061c   Francisco Coelho   rewriting 00_PASP...
133
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
134
135
        \item \textbf{Total Choice Probability:}
        \begin{equation}
b43c061c   Francisco Coelho   rewriting 00_PASP...
136
137
138
139
140
            \pr{\theta} = \prod_{a_i \in \theta}\alpha_i \prod_{\neg a_i \in \theta}\co{\alpha_i}.\label{eq:prob.tc}
        \end{equation}
        % --------------------------------
    \end{itemize}
    % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
141
    \begin{quote}
b43c061c   Francisco Coelho   rewriting 00_PASP...
142
143
144
145
146
        This is the \emph{Distribution Semantics} as set by Sato.
    \end{quote}
\end{frame}
% ================================================================
\begin{frame}{Problem Statement}
53b3b48c   Francisco Coelho   Started pre-paper...
147
    % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
148
149
150
151
152
153
154
155
156
157
158
159
    \begin{quotation}
        How to extend probability from the total choices to interpretations and observations?
    \end{quotation}
    % --------------------------------
    \begin{itemize}
        % --------------------------------
        \item \textbf{Todo:} Extend probability to \textit{stable models}, \textit{interpretations} and \textit{observations}.
        % --------------------------------
    \end{itemize}
    % --------------------------------
    \begin{quotation}
        \textbf{But} there is a problem extending probability from total choices to stable models.
53b3b48c   Francisco Coelho   Started pre-paper...
160
    \end{quotation}
b43c061c   Francisco Coelho   rewriting 00_PASP...
161
162
163
164
    % --------------------------------
\end{frame}
% ================================================================
\begin{frame}{The Disjunction Case}
808facfe   Francisco Coelho   Main text adapted...
165
    % --------------------------------    
b43c061c   Francisco Coelho   rewriting 00_PASP...
166
167
168
    \begin{exampleblock}{Disjuntion Example}
        The specification
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
169
        $$
b43c061c   Francisco Coelho   rewriting 00_PASP...
170
171
        \begin{aligned}
            0.3 :: a    &,          \cr 
808facfe   Francisco Coelho   Main text adapted...
172
            b \lor c    &\larr a    .
b43c061c   Francisco Coelho   rewriting 00_PASP...
173
        \end{aligned}
241956f9   Francisco Coelho   continuing 00_PASP
174
        $$
808facfe   Francisco Coelho   Main text adapted...
175
        % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
176
        has three stable models,
237d62bd   Francisco Coelho   Further rewriting...
177
178
179
        % --------------------------------
        $$
        \begin{aligned}
53b3b48c   Francisco Coelho   Started pre-paper...
180
            s_1 &= \set{\neg a}, & s_2 &= \set{a, b},  & s_3 &= \set{a, c}.
237d62bd   Francisco Coelho   Further rewriting...
181
        \end{aligned}
b43c061c   Francisco Coelho   rewriting 00_PASP...
182
183
        $$
    \end{exampleblock}
241956f9   Francisco Coelho   continuing 00_PASP
184
    % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
    \begin{itemize}
        % --------------------------------
        \item\label{prop:unique.ext.tcsm}\textit{Any stable model contains exactly one total choice.~$\blacksquare$}
        % --------------------------------
        \item $\pr{\set{\neg a}} = 0.7$ is straightforward.
        % --------------------------------
        \item But, no \textit{unbiased} choice for $\alpha\in\intcc{0,1}$ in
        $$
        \begin{aligned}
            \pr{\set{a, b}} &= 0.3 \alpha, \cr
            \pr{\set{a, c}} &= 0.3 \co{\alpha}.
        \end{aligned}
        $$
        % --------------------------------
    \end{itemize}
    % --------------------------------
\end{frame}
% ================================================================
\section{Motivation}
% ================================================================
\begin{frame}{Specification, Data \& Evaluation}
    % --------------------------------
    Given some procedure to assign probabilities to observations from specifications and:
    % --------------------------------
    \begin{itemize}
        % --------------------------------
        \item $P$, a specification.
        % --------------------------------
        \item $p$, the distribution of observations from above.
        % --------------------------------
        \item $Z$, a dataset of observations.
53b3b48c   Francisco Coelho   Started pre-paper...
216
        % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
217
218
        \item $e$, the respective empirical distribution.
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
219
220
        \item $D$, some probability divergence, \textit{e.g.} Kullback-Leibler.
        % --------------------------------
b43c061c   Francisco Coelho   rewriting 00_PASP...
221
222
223
224
225
226
227
    \end{itemize}
    % --------------------------------
    Given a dataset $Z$, $D\at{P} = D\at{e, p}$ is a \textit{performance} measure of $P$ and can be used, \textit{e.g.} fitness, by algorithms searching for optimal specifications of a dataset.
    % --------------------------------
\end{frame}
% ================================================================
\section{Resolution}
241956f9   Francisco Coelho   continuing 00_PASP
228
229
230
231
% ================================================================
\begin{frame}{Bounds of Interpretations}    
    % --------------------------------
    \begin{itemize}
53b3b48c   Francisco Coelho   Started pre-paper...
232
        % --------------------------------
241956f9   Francisco Coelho   continuing 00_PASP
233
234
        \item For $x\in\fml{I}$:
        % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
235
236
        \begin{itemize}
            % --------------------------------
241956f9   Francisco Coelho   continuing 00_PASP
237
238
            \item \textbf{Lower Models:} $\lset{x} = \cset{s\in \fml{S} }{ s \subseteq x}$.
            % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
239
            \item \textbf{Upper Models:} $\uset{x} = \cset{s\in \fml{S} }{ x \subseteq s}$.
241956f9   Francisco Coelho   continuing 00_PASP
240
241
            % --------------------------------
        \end{itemize}
53b3b48c   Francisco Coelho   Started pre-paper...
242
243
244
        % --------------------------------
        \item\label{prop:lucases} \textbf{Proposition.} Stable models are \textit{minimal} so \textit{one} of the following cases takes place: 
        % --------------------------------
241956f9   Francisco Coelho   continuing 00_PASP
245
246
        \begin{enumerate}
            % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
247
            \item\label{prop:lucases.a} $\lset{x} = \set{x} = \uset{x}$ and $x$ is a stable model.
241956f9   Francisco Coelho   continuing 00_PASP
248
            % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
249
            \item\label{prop:lucases.b} $\lset{x} \neq \emptyset \land \uset{x} = \emptyset$. 
241956f9   Francisco Coelho   continuing 00_PASP
250
251
252
            % --------------------------------
            \item\label{prop:lucases.c} $\lset{x} = \emptyset \land \uset{x} \neq \emptyset$.
            % --------------------------------
53b3b48c   Francisco Coelho   Started pre-paper...
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
            \item\label{prop:lucases.d} $\lset{x} = \emptyset = \uset{x}$. 
            % --------------------------------
        \end{enumerate}
        % --------------------------------
    \end{itemize}
    % --------------------------------
\end{frame}
% ================================================================
\begin{frame}
    
    Next we try to formalize the possible configurations of this scenario. Consider the ASP program $P = C \land F \land R$ with total choices $\Theta $ and stable models $\fml{S}$. Let $d  ::  \fml{S} \to \intcc{0,1}$ such that $\sum_{s\in\fml{S}_\theta} d\at{s} = 1$. 
\end{frame}
% ================================================================
\begin{frame}
    
    \begin{enumerate}
241956f9   Francisco Coelho   continuing 00_PASP
269
270
271
        \item For each $z\in\fml{Z}$ only one of the following cases takes place 
        \begin{enumerate}
            \item $z$ is inconsistent. Then \textbf{define}
237d62bd   Francisco Coelho   Further rewriting...
272
            \begin{equation}
241956f9   Francisco Coelho   continuing 00_PASP
273
                w_d\at{x} = 0.\label{def:w.inconsistent}
237d62bd   Francisco Coelho   Further rewriting...
274
            \end{equation}
241956f9   Francisco Coelho   continuing 00_PASP
275
276
            %
            \item $z$ is an interpretation and $\lset{z} = \set{z} = \uset{x}$. Then $z = s$ is a stable model and \textbf{define}
53b3b48c   Francisco Coelho   Started pre-paper...
277
278
279
            \begin{equation}
                w_d\at{z} = w\at{s} = d\at{s} \pr{\theta_s}.\label{eq:prob.sm}
            \end{equation}
241956f9   Francisco Coelho   continuing 00_PASP
280
281
282
283
284
285
286
287
288
            %
            \item $z$ is an interpretation and $\lset{z} \neq \emptyset \land \uset{x} = \emptyset$. Then \textbf{define} 
            \begin{equation}
                w_d\at{z} = \sum_{s \in \lset{z}} w_d\at{s}.\label{def:w.disj}
            \end{equation}
            %
            \item $z$ is an interpretation and $\lset{z} = \emptyset \land \uset{z} \neq \emptyset$. Then \textbf{define} 
            \begin{equation}
                w_d\at{z} = \prod_{s \in \uset{z}} w_d\at{s}.\label{def:w.conj}
237d62bd   Francisco Coelho   Further rewriting...
289
290
291
            \end{equation}
            %
            \item $z$ is an interpretation and $\lset{z} = \emptyset \land \uset{z} = \emptyset$. Then \textbf{define} 
241956f9   Francisco Coelho   continuing 00_PASP
292
            \begin{equation}
237d62bd   Francisco Coelho   Further rewriting...
293
294
295
296
297
                w_d\at{z} = 0.\label{def:w.empty}
            \end{equation}
        \end{enumerate}
        %
        \item The last point defines a ``weight'' function on the observations that depends not only on the total choices and stable models of a PASP but also on a certain function $d$ that must respect some conditions. To simplify the notation we use the subscript in $w_d$ only when necessary.
241956f9   Francisco Coelho   continuing 00_PASP
298
299
300
301
302
        %
        \item At first, it may seem counter-intuitive that $w\at{\emptyset} = \sum_{s\in\fml{S}} w\at{s}$ is the largest ``weight'' in the lattice. But $\emptyset$, as an interpretation, sets zero restrictions on the ``compatible'' stable models. The ``complement'' of $\bot = \emptyset$ is the \emph{maximal inconsistent} observation $\top = \fml{A} \cup \cset{\neg a }{ a \in \fml{A}}$.
        %
        \item \textbf{We haven't yet defined a probability measure.} To do so we must define a set of samples $\Omega$, a set of events $F\subseteq \pset{\Omega}$ and a function $P:F\to\intcc{0,1}$ such that:
        \begin{enumerate}
53b3b48c   Francisco Coelho   Started pre-paper...
303
            \item $\pr{E} \in \intcc{0, 1}$ for any $E \in F$.
b43c061c   Francisco Coelho   rewriting 00_PASP...
304
            \item $\pr{\Omega} = 1$.
237d62bd   Francisco Coelho   Further rewriting...
305
            \item if $E_1 \cap E_2 = \emptyset$ then $\pr{E_1 \cup E_2} = \pr{E_1} + \pr{E_2}$. 
b43c061c   Francisco Coelho   rewriting 00_PASP...
306
307
308
        \end{enumerate} 
        %
        \item In the following, assume that the stable models are iid.
53b3b48c   Francisco Coelho   Started pre-paper...
309
        %
b43c061c   Francisco Coelho   rewriting 00_PASP...
310
311
312
313
314
315
        \item Let the sample space $\Omega = \fml{Z}$ and the event space $F = \pset{\Omega}$. Define $Z = \sum_{\zeta\in\fml{Z}} w\at{\zeta}$ and
        \begin{equation}
            \pr{z} = \frac{w\at{z}}{Z}, z \in \Omega \label{eq:def.prob}
        \end{equation}
        and
        \begin{equation}
237d62bd   Francisco Coelho   Further rewriting...
316
            \pr{E} = \sum_{x\in E} \pr{x}, E \subseteq \Omega. \label{eq:def.prob.event}
53b3b48c   Francisco Coelho   Started pre-paper...
317
318
319
320
321
322
323
324
325
326
327
328
        \end{equation}
        Now:
        \begin{enumerate}
            \item $P(E) \in \intcc{0,1}$ results directly from the definitions of $P$ and $w$.
            \item $\pr{\Omega} = 1$ also results directly from the definitions.
            \item Consider two disjunct events $A, B \subset \Omega \land A \cap B = \emptyset$. Then 
            $$
            \begin{aligned}
                \pr{A \cup B} &= \sum_{x \in A \cup B} \pr{x} \cr
                    &= \sum_{x \in A} \pr{x} + \sum_{x \in B} \pr{x} - \sum_{x \in A \cap B} \pr{x}  \cr
                    &= \sum_{x \in A} \pr{x} + \sum_{x \in B} \pr{x} &\text{because}~A\cap B = \emptyset \cr
                    &= \pr{A} + \pr{B}.
237d62bd   Francisco Coelho   Further rewriting...
329
            \end{aligned}
b43c061c   Francisco Coelho   rewriting 00_PASP...
330
331
332
            $$
            \item So $\del{\Omega = \fml{Z}, F = \pset{\Omega}, P}$ is a probability space. {$\blacksquare$}
        \end{enumerate}
237d62bd   Francisco Coelho   Further rewriting...
333
    \end{enumerate}
b43c061c   Francisco Coelho   rewriting 00_PASP...
334
    
241956f9   Francisco Coelho   continuing 00_PASP
335
\end{frame}
237d62bd   Francisco Coelho   Further rewriting...
336
% ================================================================
241956f9   Francisco Coelho   continuing 00_PASP
337
\section{Cases \& Examples}
53b3b48c   Francisco Coelho   Started pre-paper...
338
339
340
341
342
343
% ================================================================
\subsection{Programs with disjunctive heads}
% ================================================================
\begin{frame}
    
    Consider the program:
241956f9   Francisco Coelho   continuing 00_PASP
344
    $$
53b3b48c   Francisco Coelho   Started pre-paper...
345
    \begin{aligned}
241956f9   Francisco Coelho   continuing 00_PASP
346
    c_1 &= a \lor \neg a, \cr
53b3b48c   Francisco Coelho   Started pre-paper...
347
348
    c_2 &= b \lor c \larr a.
    \end{aligned}
b43c061c   Francisco Coelho   rewriting 00_PASP...
349
    $$
808facfe   Francisco Coelho   Main text adapted...
350
    This program has two total choices,
b43c061c   Francisco Coelho   rewriting 00_PASP...
351
    $$
53b3b48c   Francisco Coelho   Started pre-paper...
352
    \begin{aligned}
b43c061c   Francisco Coelho   rewriting 00_PASP...
353
    \theta_1&= \set{ \neg a }, \cr
eb584496   Francisco Coelho   presentation, as ...
354
    \theta_2&= \set{ a }.
b43c061c   Francisco Coelho   rewriting 00_PASP...
355
356
357
358
359
    \end{aligned}
    $$
    and three stable models,
    $$
    \begin{aligned}
eb584496   Francisco Coelho   presentation, as ...
360
    s_1 &= \set{ \neg a }, \cr
b43c061c   Francisco Coelho   rewriting 00_PASP...
361
    s_2 &= \set{ a, b }, \cr
237d62bd   Francisco Coelho   Further rewriting...
362
    s_3 &= \set{ a, c }.
b43c061c   Francisco Coelho   rewriting 00_PASP...
363
    \end{aligned}
808facfe   Francisco Coelho   Main text adapted...
364
    $$
b43c061c   Francisco Coelho   rewriting 00_PASP...
365
\end{frame}
53b3b48c   Francisco Coelho   Started pre-paper...
366
367
368
369
% ================================================================
\begin{frame}
    Suppose that we add an annotation $\alpha :: a$, which entails $\co{\alpha} :: \neg a$. This is enough to get $w\at{s_1} = \co{\alpha}$ but, on the absence of further information, no fixed probability can be assigned to either model $s_2, s_3$ except that the respective sum must be $\alpha$. So, expressing our lack of knowledge using a parameter $d \in \intcc{0, 1}$ we get:
    $$
b43c061c   Francisco Coelho   rewriting 00_PASP...
370
    \begin{cases}
53b3b48c   Francisco Coelho   Started pre-paper...
371
372
373
374
        w\at{s_1 } = &\co{\alpha}\cr
        w\at{s_2 } = &d\alpha\cr
        w\at{s_3} = &\co{d}\alpha.
    \end{cases}
b43c061c   Francisco Coelho   rewriting 00_PASP...
375
    $$
53b3b48c   Francisco Coelho   Started pre-paper...
376
377
378
379
\end{frame}
% ================================================================
\begin{frame}
    
b43c061c   Francisco Coelho   rewriting 00_PASP...
380
    Now consider all the interpretations for this program:
53b3b48c   Francisco Coelho   Started pre-paper...
381
382
383
384
    \begin{center}
    \begin{tikzpicture}
        %\draw [help lines] grid (11,3);
        %
b43c061c   Francisco Coelho   rewriting 00_PASP...
385
        \node [draw, circle] (E) at (5.5,0) {$\emptyset$};
808facfe   Francisco Coelho   Main text adapted...
386
        %
237d62bd   Francisco Coelho   Further rewriting...
387
        \node [draw, circle] (a) at (3,2) {$a$};
b43c061c   Francisco Coelho   rewriting 00_PASP...
388
        \node [draw, circle] (b) at (2,2) {$b$};
808facfe   Francisco Coelho   Main text adapted...
389
        \node [draw, circle] (c) at (4,2) {$c$};
b43c061c   Francisco Coelho   rewriting 00_PASP...
390
        \node [fill=gray!50] (A) at (8,2) {$\co{a}$};
808facfe   Francisco Coelho   Main text adapted...
391
        \node (B) at (9,2) {$\co{b}$};
b43c061c   Francisco Coelho   rewriting 00_PASP...
392
        \node (C) at (7,2) {$\co{c}$};
53b3b48c   Francisco Coelho   Started pre-paper...
393
394
395
396
397
398
399
400
401
402
403
404
405
406
        %
        \node [fill=gray!50] (ab) at (0,4) {$ab$};
        \node [fill=gray!50] (ac) at (1,4) {$ac$};
        \node (aB) at (2,4) {$a\co{b}$};
        \node (aC) at (3,4) {$a\co{c}$};
        \node [draw] (Ab) at (4,4) {$\co{a}b$};
        \node [draw] (Ac) at (5,4) {$\co{a}c$};
        \node [draw] (AB) at (6,4) {$\co{a}\co{b}$};
        \node [draw] (AC) at (7,4) {$\co{a}\co{c}$};
        \node [fill=white] (bc) at (10,4) {$bc$};
        \node [fill=white] (bC) at (11,4) {$b\co{c}$};
        \node [fill=white] (Bc) at (12,4) {$\co{b}c$};
        \node [fill=white] (BC) at (13,4) {$\co{b}\co{c}$};
        %
237d62bd   Francisco Coelho   Further rewriting...
407
408
        \node [draw] (abc) at (0.5,6) {$abc$};
        \node (abC) at (3,6) {$ab\co{c}$};
53b3b48c   Francisco Coelho   Started pre-paper...
409
410
411
412
413
414
415
416
417
418
419
420
421
422
        \node (aBc) at (4,6) {$a\co{b}c$};
        \node (aBC) at (5,6) {$a\co{b}\co{c}$};
        \node [draw] (Abc) at (7,6) {$\co{a}bc$};
        \node [draw] (AbC) at (8,6) {$\co{a}b\co{c}$};
        \node [draw] (ABc) at (9,6) {$\co{a}\co{b}c$};
        \node [draw] (ABC) at (10,6) {$\co{a}\co{b}\co{c}$};
        %
        \draw [->] (ab) to [out=270,in=180] (E);
        \draw [->] (ab) to [out=270,in=90] (a);
        \draw [->] (ab) to [out=270,in=90] (b);
        \draw [->] (ab) to [out=90,in=270] (abc);
        %
        \draw [->] (ac) to [out=270,in=180] (E);
        \draw [->] (ac) to [out=270,in=90] (a);
237d62bd   Francisco Coelho   Further rewriting...
423
        \draw [->] (ac) to [out=270,in=90] (c);
53b3b48c   Francisco Coelho   Started pre-paper...
424
425
426
427
428
        \draw [->] (ac) to [out=90,in=270] (abc);
        %
        \draw [->] (A) to [out=270,in=0] (E);
        %
        \draw [->] (A) to [out=90,in=270] (Abc);
237d62bd   Francisco Coelho   Further rewriting...
429
        \draw [->] (A) to [out=90,in=270] (AbC);
53b3b48c   Francisco Coelho   Started pre-paper...
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
        \draw [->] (A) to [out=90,in=270] (ABc);
        \draw [->] (A) to [out=90,in=270] (ABC);
        %
        \draw [->] (A) to [out=90,in=270] (Ab);
        \draw [->] (A) to [out=90,in=270] (Ac);
        \draw [->] (A) to [out=90,in=270] (AB);
        \draw [->] (A) to [out=90,in=270] (AC);
    \end{tikzpicture}    
    \end{center}
\end{frame}
% ================================================================
\begin{frame}
    
    In this diagram:
    \begin{itemize}
        \item Negations are represented as \emph{e.g.} $\co{a}$ instead of $\neg a$; Stable models are denoted by shaded nodes as \tikz{\node[fill=gray!50] {$ab$}}.
        
        \item Interpretations in $\lset{x}$ are \emph{e.g.} \tikz{\node[draw, circle] {$a$}} and those in $\uset{x}$ are \emph{e.g.}  \tikz{\node[draw] {$\co{a}b$}}. The remaining are simply denoted by \emph{e.g.}  \tikz{\node {$a\co{b}$}}.
        
        \item The edges connect stable models with related interpretations. Up arrow indicate links to $\uset{s}$ and down arrows to $\lset{s}$.
        
        \item The \emph{weight propagation} sets:
        $$
        \begin{aligned}
            w\at{abc} &= w\at{ab} w\at{ac} =  \alpha^2d\co{d}, \cr
237d62bd   Francisco Coelho   Further rewriting...
455
            w\at{\co{a}\cdot\cdot} &= w\at{\neg a} = \co{\alpha}, \cr
53b3b48c   Francisco Coelho   Started pre-paper...
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
            w\at{a} &= w\at{ab} + w\at{ac} = \alpha(d + \co{d}) = \alpha, \cr
            w\at{b} &= w\at{ab} = d\alpha, \cr
            w\at{c} &= w\at{ac} = \co{d}\alpha, \cr
            w\at{\emptyset} &= w\at{ab} + w\at{ac} + w\at{\neg a} = d\alpha + \co{d}\alpha + \co{\alpha} = 1, \cr
            w\at{a\co{b}} &= 0.
        \end{aligned}
        $$
        \item The total weight is
        $$
        \begin{aligned}
            Z   &= w\at{abc} + 8 w\at{\co{a}b}\cr
                &+ w\at{ab} + w\at{ac} + w\at{\co{a}}\cr
                &+ w\at{a}+ w\at{b}+ w\at{c}\cr
                &+ w\at{\emptyset}\cr
                %
                &= - \alpha^{2} d^{2} + \alpha^{2} d + 2 \alpha d - 7 \alpha + 10       
        \end{aligned}
        $$
        \item Now, if $\alpha$ has an annotation to \emph{e.g.} $0.3$ we get
        $$
        Z = - 0.09 d^{2} + 0.69 d + 7.9
        $$ 
        \item Now some statistics are possible. For example we get 
        $$
        \pr{abc \mid \alpha = 0.3} = \frac{0.09 d \left(d - 1\right)}{0.09 d^{2} - 0.69 d - 7.9}
        $$. 
    
        \item This expression can be plotted for $d\in\intcc{0,1}$
        \begin{center}
            \includegraphics[height=15em]{Pabc_alpha03.pdf}
        \end{center} 
        
        \item If a data set $E$ entails \emph{e.g.} $\pr{abc \mid E} = 0.0015$ we can numerically solve
        $$
        \begin{aligned}
            \pr{abc \mid \alpha = 0.3} &= \pr{abc \mid E} \cr
            \iff\cr
            \frac{0.09 d \del{d - 1}}{0.09 d^{2} - 0.69 d - 7.9} &= 0.0015
        \end{aligned}
        $$
        which has two solutions, $d \approx 0.15861$ or $d \approx 0.83138$.
    \end{itemize}
\end{frame}
% ================================================================
\subsection{Non-stratified programs}
% ================================================================
\begin{frame}
    The following LP is non-stratified, because has a cycle with negated arcs:
    $$
237d62bd   Francisco Coelho   Further rewriting...
505
    \begin{aligned}
53b3b48c   Francisco Coelho   Started pre-paper...
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
        c_1 &= a\lor \neg a,\cr
        c_2 &= b \larr \naf c \land \naf a, \cr
        c_3 &= c \larr \naf b.
    \end{aligned}
    $$    
    This program has three stable models
    $$
    \begin{aligned}
    s_1 &= \set{ a, c }, \cr
    s_2 &= \set{ \neg a, b }, \cr
    s_3 &= \set{ \neg a, c }.
    \end{aligned}
    $$
\end{frame}

\begin{frame}    
    The disjunctive clause $a\lor\neg a$ defines a set of \textbf{total choices}
    $$
    \Theta = \set{
        \theta_1 = \set{ a },
        \theta_2 = \set{ \neg a }
    }.
    $$
\end{frame}
% ================================================================
\begin{frame}
    
    Looking into probabilistic interpretations of the program and/or its models, we define $\alpha = \pr{\Theta = \theta_1}\in\intcc{0, 1}$ and $\pr{\Theta = \theta_2} = \co{\alpha}$.
    
    Since $s_1$ is the only stable model that results from $\Theta = \theta_1$, it is natural to extend $\pr{ s_1 } = \pr{\Theta = \theta_1}  = \alpha$. However, there is no clear way to assign $\pr{s_2}, \pr{s_3}$ since \emph{both models result from the single total choice} $\Theta = \theta_2$. Clearly, 
    $$\pr{s_2 \mid \Theta} + \pr{s_3 \mid \Theta} =
    \begin{cases}
        0 & \text{if}~\Theta = \theta_1\cr
        1 & \text{if}~\Theta = \theta_2
237d62bd   Francisco Coelho   Further rewriting...
540
    \end{cases}
53b3b48c   Francisco Coelho   Started pre-paper...
541
    $$
237d62bd   Francisco Coelho   Further rewriting...
542
543
544
545
    but further assumptions are not supported \emph{a priori}. So let's \textbf{parameterize} the equation above,
    $$
    \begin{cases}
        \pr{s_2 \mid \Theta = \theta_2} = &\beta \in \intcc{0, 1} \cr
53b3b48c   Francisco Coelho   Started pre-paper...
546
        \pr{s_3 \mid \Theta = \theta_2} = &\co{\beta},
237d62bd   Francisco Coelho   Further rewriting...
547
548
549
550
551
    \end{cases}
    $$
    in order to explicit our knowledge, or lack of, with numeric values and relations.
\end{frame}
% ================================================================
53b3b48c   Francisco Coelho   Started pre-paper...
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
\begin{frame}
    Now we are able to define the \textbf{joint distribution} of the boolean random variables $A,B,C$:
    
    $$
    \begin{array}{cc|l}
        A, B, C& P & \text{Obs.}\cr
        \hline
        a, \neg b, c & \alpha & s_1, \Theta=\theta_1\cr
        \neg a, b, \neg c & \co{\alpha}\beta  & s_2, \Theta=\theta_2\cr
        \neg a, \neg b, c & \co{\alpha}\co{\beta} & s_3, \Theta=\theta_2\cr
        \ast & 0&\text{not stable models}
    \end{array}
    $$
    where $\alpha, \beta\in\intcc{0,1}$.
\end{frame}
% ================================================================
\section{Conclusions}
% ================================================================
\begin{frame}
    \begin{itemize}
        \item We can use the basics of probability theory and logic programming to assign explicit \emph{parameterized} probabilities to the (stable) models of a program.
        \item In the covered cases it was possible to define a (parameterized) \emph{family of joint distributions}.
        \item How far this approach can cover all the cases on logic programs is (still) an issue \emph{under investigation}.
        \item However, it is non-restrictive since \emph{no unusual assumptions are made}.
    \end{itemize}
\end{frame}
% ================================================================
\section*{ASP \& related definitions}
% ================================================================
\begin{frame}
    
    \begin{itemize}
        \item An \deft{atom} is $r(t_1, \ldots t_n)$ where
        \begin{itemize}
            \item $r$ is a $n$-ary predicate symbol and each $t_i$ is a constant or a variable.
            \item A \deft{ground atom} has no variables; A \deft{literal} is either an atom $a$ or a negated atom $\neg a$.
        \end{itemize}
        
        \item An \deft{ASP Program} is a set of \deft{rules} such as $h_1 \vee \cdots \vee h_m \leftarrow b_1 \wedge \cdots \wedge b_n$.
        \begin{itemize}
            \item The \deft{head} of this rule is $h_1 \vee \cdots \vee h_m$, the \deft{body} is $b_1 \wedge \cdots \wedge b_n$ and each $b_i$ is a \deft{subgoal}.
            \item Each $h_i$ is a literal, each subgoal $b_j$ is a literal or a literal preceded by $\naf\;$ and $m + n > 0$.
            \item A \deft{propositional program} has no variables.
            \item A \deft{non-disjunctive rule} has $m \leq 1$; A \deft{normal rule} has $m = 1$; A \deft{constraint} has $m = 0$; A \deft{fact} is a normal rule with $n = 0$.
        \end{itemize}
        
        \item The \deft{Herbrand base} of a program is the set of ground literals that result from combining all the predicates and constants of the program.     
        \begin{itemize}
            \item An \deft{interpretation} is a consistent subset (\emph{i.e.} doesn't contain $\set{a, \neg a}$) of the Herbrand base.
            \item Given an interpretation $I$, a ground literal $a$ is \deft{true}, $I \models a$, if $a \in I$; otherwise the literal is \deft{false}.
            \item A ground subgoal, $\naf b$, where $b$ is a ground literal, is \deft{true}, $I \models \naf b$, if $b \not\in I$; otherwise, if $b \in I$,  it is \deft{false}.
            \item A ground rule $r = h_1 \vee \cdots \vee h_m \leftarrow b_1 \wedge \cdots \wedge b_n$ is \deft{satisfied} by the interpretation $I$, \emph{i.e.} $I \models r$, iff 
            $$
            \forall j \exists i~I \models b_j \implies I \models h_i.
            $$
            \item A \deft{model} of a program is an interpretation that satisfies all its rules. Denote $\fml{M}_P$ the set of all models of $P$.
        \end{itemize}
        
        \item The \deft{dependency graph} of a program is a digraph where:
        \begin{itemize}
            \item Each grounded atom is a node.
            \item For each grounded rule there are edges from the atoms in the body to the atoms in the head.
            \item A \deft{negative edge} results from an atom with $\naf\;$; Otherwise it is a \deft{positive edge}.
            \item An \deft{acyclic program} has an acyclic dependency graph; A \deft{normal program} has only normal rules; A \deft{definite program} is a normal program that doesn't contains $\neg$ neither $\naf\;$.
            \item In the dependency graph of a \deft{stratified program} no cycle contains a negative edge.
            \item \textbf{A stratified program has a single minimal model} that assigns either true or false to each atom.
        \end{itemize}
        \item Every \emph{definite program} has a unique minimal model: its \deft{semantic}.
        \item Programs with negation may have no unique minimal model.
        \item Given a program $P$ and an interpretation $I$, their \deft{reduct}, $P^I$, is the propositional program that results from
        \begin{enumerate}
            \item Removing all the rules with $\naf b$ in the body where $b \in I$.
            \item Removing all the $\naf b$ subgoals from the remaining rules.
        \end{enumerate}
        \item A \deft{stable model} (or \deft{answer set}) of the program $P$ is an interpretation $I$ that is the minimal model of the reduct $P^I$.  
        \item Denote $\fml{S}_P$ the set of all stable models of program $P$. The \deft{semantics} (or \deft{answer sets}) of a program $P$ is the set $\fml{S}_P$.
        \begin{itemize}
            \item Some programs, such as $a \leftarrow \naf a$, have no stable models.
            \item A stable model is an interpretation closed under the rules of the program.
        \end{itemize}
    \end{itemize}
\end{frame}
% ================================================================
\end{document}
237d62bd   Francisco Coelho   Further rewriting...

808facfe   Francisco Coelho   Main text adapted...

237d62bd   Francisco Coelho   Further rewriting...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

237d62bd   Francisco Coelho   Further rewriting...

808facfe   Francisco Coelho   Main text adapted...

237d62bd   Francisco Coelho   Further rewriting...

53b3b48c   Francisco Coelho   Started pre-paper...

237d62bd   Francisco Coelho   Further rewriting...

53b3b48c   Francisco Coelho   Started pre-paper...

237d62bd   Francisco Coelho   Further rewriting...

53b3b48c   Francisco Coelho   Started pre-paper...

237d62bd   Francisco Coelho   Further rewriting...

53b3b48c   Francisco Coelho   Started pre-paper...

237d62bd   Francisco Coelho   Further rewriting...

808facfe   Francisco Coelho   Main text adapted...

808facfe   Francisco Coelho   Main text adapted...

237d62bd   Francisco Coelho   Further rewriting...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

53b3b48c   Francisco Coelho   Started pre-paper...

808facfe   Francisco Coelho   Main text adapted...

b43c061c   Francisco Coelho   rewriting 00_PASP...

808facfe   Francisco Coelho   Main text adapted...