root / CSL17 / preliminaries.tex @ 181
Historique | Voir | Annoter | Télécharger (9,97 ko)
1 | 154 | adas | |
---|---|---|---|
2 | 154 | adas | \section{Preliminaries} |
3 | 154 | adas | We introduce the polynomial hierarchy and its basic properties, then the Bellantoni characterisation. |
4 | 154 | adas | |
5 | 157 | adas | \anupam{Should recall polymax bounded functions and the polychecking lemma, e.g.\ from Bellantoni's FPH paper or thesis. Quite important, even if proof not given.} |
6 | 157 | adas | |
7 | 154 | adas | \subsection{Polynomial hierarchy} |
8 | 161 | pbaillot | %(include closure properties) |
9 | 154 | adas | |
10 | 161 | pbaillot | \begin{definition} |
11 | 163 | pbaillot | Given $i\geq 0$, a language $L$ belongs to the class $\sigp{i}$ if there exists a polynomial time predicate $A$ and a polynomial $q$ such that: |
12 | 161 | pbaillot | $$ x \in L \Leftrightarrow \exists y_1 \in \{0,1\}^{q(\size{x})}\forall y_2 \in \{0,1\}^{q(\size{x})}\dots Q_iy_i\in \{0,1\}^{q(\size{x})}\ A(x,y_1,\dots,y_i)=1$$ |
13 | 161 | pbaillot | where $Q_i=\forall$ (resp. $Q_i=\exists$) if $i$ is even (resp. odd). |
14 | 161 | pbaillot | |
15 | 161 | pbaillot | The class $\pip{i}$ is defined similarly but with first quantifier $\forall$ instead of $\exists$. |
16 | 161 | pbaillot | \end{definition} |
17 | 162 | pbaillot | In particular: $\sigp{0}=\pip{0}=\ptime$, $\sigp{1}=\np$, $\pip{1}=\conp$. Note that for any $i$ we have $\pip{i}=\mathbf{co}\sigp{i}$ and $\sigp{i}\subseteq \pip{i+1}$, $\pip{i}\subseteq \sigp{i+1}$. |
18 | 161 | pbaillot | |
19 | 161 | pbaillot | The polynomial hierarchy is defined as $\ph:=\cup_i \sigp{i}$, and we also have $\ph=\cup_i \pip{i}$. |
20 | 161 | pbaillot | |
21 | 161 | pbaillot | Given a language $L$ we denote as $\fptime(L)$ the class of functions computable by a deterministic |
22 | 161 | pbaillot | polynomial time Turing machine with oracle $L$. |
23 | 161 | pbaillot | |
24 | 161 | pbaillot | We now define the following function classes: |
25 | 161 | pbaillot | \begin{eqnarray*} |
26 | 162 | pbaillot | \fphi{i+1} &:= & \fptime(\sigp{i}),\\ |
27 | 162 | pbaillot | \fph &:=& \cup_i \fphi{i}. |
28 | 161 | pbaillot | \end{eqnarray*} |
29 | 161 | pbaillot | One can then check that $ \fphi{i+1} = \fptime(\pip{i})= \fptime(\sigp{i}\cup \pip{i})$. |
30 | 161 | pbaillot | |
31 | 154 | adas | \subsection{Bellantoni's characterisation using predicative minimisation} |
32 | 156 | adas | (perhaps compare with Cobham's using limited recursion) |
33 | 156 | adas | |
34 | 156 | adas | \anupam{copied below from last year's paper} |
35 | 156 | adas | |
36 | 156 | adas | We recall the Bellantoni-Cook algebra BC of functions defined by \emph{safe} (or \emph{predicative}) recursion on notation \cite{BellantoniCook92}. These will be employed for proving both the completeness (all polynomial time functions are provably convergent) and the soundness result (all provably total functions are polynomial time) of THEORY. We consider function symbols $f$ over the domain $\Word$ with sorted arguments $(\vec u ; \vec x)$, where the inputs $\vec u$ are called \textit{normal} and $\vec x$ are called \textit{safe}. |
37 | 156 | adas | %Each symbol is given with an arity $m$ and a number $n\leq m$ of normal arguments, and will be denoted as $f(\vec{u};\vec{x})$ where $\vec{u}$ (resp. $\vec{x}$) are the normal (resp. safe) arguments. |
38 | 156 | adas | %We say that an expression is well-sorted if the arities of function symbols in it is respected. |
39 | 156 | adas | |
40 | 156 | adas | %\patrick{Note that below I used the terminology 'BC programs', to distinguish them from 'functions' in the extensional sense, which I find clearer. But if you prefer to keep 'BC functions' it is all right for me.} |
41 | 156 | adas | \begin{definition} |
42 | 156 | adas | [BC programs] |
43 | 156 | adas | BC is the set of functions generated as follows: |
44 | 156 | adas | % \paragraph{Initial functions} |
45 | 156 | adas | % The initial functions are: |
46 | 156 | adas | \begin{enumerate} |
47 | 156 | adas | \item The constant functions $\epsilon^k$ which takes $k$ arguments and outputs $\epsilon \in \Word$. |
48 | 156 | adas | \item The projection functions $\pi^{m,n}_k ( x_1 , \dots , x_m ; x_{m+1} , \dots, x_{m+n} ) := x_k$ for $n,m \in \Word$ and $1 \leq k \leq m+n$. |
49 | 168 | adas | \item The successor functions $\succ i ( ; x) := xi$ for $i = 0,1$. |
50 | 156 | adas | \item The predecessor function $\pred (; x) := \begin{cases} |
51 | 156 | adas | \epsilon & \mbox{ if } x = \epsilon \\ |
52 | 156 | adas | x' & \mbox{ if } x = x'i |
53 | 156 | adas | \end{cases}$. |
54 | 156 | adas | \item The conditional function |
55 | 156 | adas | \[ |
56 | 156 | adas | %\begin{array}{rcl} |
57 | 156 | adas | %C (; \epsilon, y_\epsilon , y_0, y_1 ) & = & y_\epsilon \\ |
58 | 156 | adas | %C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\ |
59 | 156 | adas | %C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 |
60 | 156 | adas | %\end{array} |
61 | 156 | adas | C (; \epsilon, y_\epsilon , y_0, y_1 ) := y_\epsilon |
62 | 156 | adas | \quad |
63 | 156 | adas | C(; x0 , y_\epsilon , y_0, y_1) := y_0 |
64 | 156 | adas | \quad |
65 | 156 | adas | C(; x1 , y_\epsilon , y_0, y_1) := y_1 |
66 | 156 | adas | \] |
67 | 156 | adas | % $\cond (;x,y,z) := \begin{cases} |
68 | 156 | adas | % y & \mbox{ if } x=x' 0 \\ |
69 | 156 | adas | % z & \text{otherwise} |
70 | 156 | adas | % \end{cases}$. |
71 | 156 | adas | \end{enumerate} |
72 | 156 | adas | |
73 | 156 | adas | % One considers the following closure schemes: |
74 | 156 | adas | \begin{enumerate} |
75 | 156 | adas | \setcounter{enumi}{5} |
76 | 156 | adas | \item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by, |
77 | 156 | adas | \[ |
78 | 156 | adas | \begin{array}{rcl} |
79 | 156 | adas | f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\ |
80 | 168 | adas | f (\succ i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) ) |
81 | 156 | adas | \end{array} |
82 | 156 | adas | \] |
83 | 156 | adas | for $i = 0,1$, so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments). |
84 | 156 | adas | \item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by, |
85 | 156 | adas | \[ |
86 | 156 | adas | f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) ) |
87 | 156 | adas | \] |
88 | 156 | adas | so long as the expression is well-formed. |
89 | 156 | adas | \end{enumerate} |
90 | 156 | adas | \end{definition} |
91 | 156 | adas | %Note that the programs of this class can be defined by equational specifications in a natural way, and in the following we will thus silently identify a BC program with the corresponding equational specification. |
92 | 156 | adas | |
93 | 156 | adas | We will implicitly identify a BC function with the equational specification it induces. |
94 | 156 | adas | The main property of BC programs is: |
95 | 156 | adas | \begin{theorem}[\cite{BellantoniCook92}] |
96 | 156 | adas | The class of functions representable by BC programs is $\fptime$. |
97 | 156 | adas | \end{theorem} |
98 | 156 | adas | Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}: |
99 | 156 | adas | |
100 | 156 | adas | $(f^j)_{1\leq j\leq n}$ are defined by simultaneous PRN scheme from $(g^j)_{1\leq j\leq n}$, $(h^j_0, h^j_1)_{1\leq j\leq n}$ if for $1\leq j\leq n$ we have: |
101 | 156 | adas | \[ |
102 | 156 | adas | \begin{array}{rcl} |
103 | 156 | adas | f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\ |
104 | 168 | adas | f^j(\succ i u , \vec v ; \vec x ) & := & h^j_i ( u , \vec v ; \vec x , \vec{f} (u , \vec v ; \vec x) ) |
105 | 156 | adas | \end{array} |
106 | 156 | adas | \] |
107 | 156 | adas | for $i = 0,1$, so long as the expressions are well-formed. |
108 | 156 | adas | |
109 | 156 | adas | %\anupam{simultaneous recursion?} |
110 | 156 | adas | |
111 | 156 | adas | %\anupam{also identity, hereditarily safe, expressions, etc.} |
112 | 156 | adas | |
113 | 156 | adas | %\anupam{we implicitly associate a BC program with its equational specification} |
114 | 156 | adas | |
115 | 156 | adas | Consider a well-formed expression $t$ built from function symbols and variables. We say that a variable $y$ occurs \textit{hereditarily safe} in $t$ if, for every subexpression $f(\vec{r}; \vec{s})$ of $t$, the terms in $\vec{r}$ do not contain $y$. |
116 | 156 | adas | For instance $y$ occurs hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$. |
117 | 156 | adas | \begin{proposition} |
118 | 156 | adas | [Properties of BC programs] |
119 | 156 | adas | \label{prop:bc-properties} |
120 | 156 | adas | We have the following properties: |
121 | 156 | adas | \begin{enumerate} |
122 | 156 | adas | \item The identity function is in BC. |
123 | 156 | adas | \item Let $t$ be a well-formed expression built from BC functions and variables, denote its free variables as $\{u_1,\dots, u_n,x_1,\dots, x_k\}$, and assume for each $1\leq i\leq k$, $x_i$ is hereditarily safe in $t$. Then the function $f(u_1,\dots, u_n; x_1,\dots, x_k):=t$ is in BC. |
124 | 156 | adas | \item If $f$ is a BC function, then the function $g(\vec{u},v;\vec{x})$ defined as $f(\vec{u};v,\vec{x})$ |
125 | 156 | adas | is also a BC program. |
126 | 156 | adas | \end{enumerate} |
127 | 156 | adas | |
128 | 156 | adas | %\begin{proposition} |
129 | 156 | adas | %[Properties of BC programs] |
130 | 156 | adas | %\label{prop:bc-properties} |
131 | 156 | adas | %We have the following properties: |
132 | 156 | adas | %\begin{enumerate} |
133 | 156 | adas | %\item Hereditarily safe expressions over BC programs are BC definable. |
134 | 156 | adas | %\item Can pass safe input to normal input. |
135 | 156 | adas | %\end{enumerate} |
136 | 156 | adas | \end{proposition} |
137 | 156 | adas | |
138 | 159 | pbaillot | %\nb{TODO: extend with $\mu$s.} |
139 | 158 | adas | |
140 | 158 | adas | |
141 | 159 | pbaillot | \nb{Remember polymax bounded checking lemma! Quite important. Also need to bear this in mind when adding functions.} |
142 | 159 | pbaillot | |
143 | 159 | pbaillot | Now, in order to characterize $\fph$ and its subclasses $\fphi{i}$ we consider Bellantoni's function algebra $\mubc$, defined by using predicative minimization: |
144 | 159 | pbaillot | \begin{definition}[$\mubc$ and $\mubc^i$ programs] |
145 | 159 | pbaillot | We define: |
146 | 159 | pbaillot | \begin{itemize} |
147 | 159 | pbaillot | \item The class $\mubc$ is the set of functions defined as the BC functions, but with the following additional generation rule: |
148 | 159 | pbaillot | |
149 | 159 | pbaillot | 8. Predicative minimization. If $h$ is in $\mubc$, then so is $f$ defined by |
150 | 159 | pbaillot | |
151 | 159 | pbaillot | $f(\vec u; \vec x):= \begin{cases} |
152 | 159 | pbaillot | s_1(\mu y.h(\vec u; \vec x, y)\mod 2 = 0)& \mbox{ if there exists such a $y$,} \\ |
153 | 159 | pbaillot | & \mbox{ otherwise,} |
154 | 159 | pbaillot | \end{cases} |
155 | 159 | pbaillot | $ |
156 | 159 | pbaillot | |
157 | 159 | pbaillot | where $\mu y.h(\vec u; \vec x , y)\mod 2 = 0$ is the least $y$ such that the equality holds. |
158 | 159 | pbaillot | |
159 | 159 | pbaillot | If $\Phi$ is a class of functions, we denote by $\mubc(\Phi)$ the class obtained as $\mubc$ but adding $\Phi$ to the set of initial functions. |
160 | 159 | pbaillot | |
161 | 159 | pbaillot | \item For each $i\geq 0$, $\mubc^i$ is the set of $\mubc$ functions obtained by at most $i$ applications of predicative minimization. So $\mubc^0=BC$ and $\mubc =\cup_i \mubc^i$. |
162 | 159 | pbaillot | \end{itemize} |
163 | 159 | pbaillot | \end{definition} |
164 | 159 | pbaillot | One then obtains: |
165 | 163 | pbaillot | \begin{theorem}[\cite{BellantoniThesis, Bellantoni95}] |
166 | 159 | pbaillot | The class of functions representable by $\mubc$ programs is $\fph$, and for each $i$ the class representable by $\mubc^i$ programs is $\fphi{i}$. |
167 | 159 | pbaillot | \end{theorem} |
168 | 159 | pbaillot | We will also need an intermediary lemma, also proved in \cite{BellantoniThesis}. |
169 | 159 | pbaillot | \begin{definition} |
170 | 159 | pbaillot | A function $f(\vec u; \vec x)$ is \textit{polymax bounded} if there exists a polynomial $q$ such that, |
171 | 159 | pbaillot | for any $\vec u$ and $\vec x$ one has: |
172 | 159 | pbaillot | |
173 | 159 | pbaillot | %$\size{u}$ |
174 | 159 | pbaillot | $$ \size{f(\vec u; \vec x)} \leq q(\size{u_1} , \dots , \size{u_k}) + \max_j \size{x_j}.$$ |
175 | 159 | pbaillot | \end{definition} |
176 | 160 | pbaillot | |
177 | 160 | pbaillot | We define the function $\mode$ by $u\mode x:= u \mod 2^{\size{x}}$. |
178 | 160 | pbaillot | \begin{definition} |
179 | 160 | pbaillot | A function $f(\vec u; \vec x)$ is a \textit{polynomial checking function} on $\vec u$ if there exists a polynomial $q$ |
180 | 160 | pbaillot | such that, for any $\vec u$, $\vec x$, $y$ and $z$ such that $\size{y} \geq q(\size{\vec u})+ \size{z}$ we have: |
181 | 160 | pbaillot | $$ f(\vec u; \vec x) \mode z = f(\vec u; \vec x \mode y)\mode z.$$ |
182 | 160 | pbaillot | A polynomial $q$ satisfying this condition is called a \textit{threshold} for $f$. |
183 | 160 | pbaillot | \end{definition} |
184 | 160 | pbaillot | One then has: |
185 | 160 | pbaillot | \begin{lemma}[Bounded Minimization, \cite{BellantoniThesis}] |
186 | 160 | pbaillot | If $f(\vec u; \vec x,y)$ is a polynomial checking function on $\vec u$ and $q$ is a threshold, then for any $\vec u$ and $\vec x$ we have: |
187 | 160 | pbaillot | $$ (\exists y. f(\vec u; \vec x,y)\mbox{ mod } 2=0) \Rightarrow (\exists y. (\size{y}\leq q(\size{\vec{x}})+2) \mbox{ and } f(\vec u; \vec x,y) \mbox{ mod } 2=0) .$$ |
188 | 160 | pbaillot | \end{lemma} |
189 | 160 | pbaillot | Finally we can state an important lemma about $\mubc$: |
190 | 160 | pbaillot | \begin{lemma}[Polychecking Lemma, \cite{BellantoniThesis}] |
191 | 164 | pbaillot | Let $\Phi$ be a class of polymax bounded polynomial checking functions. If $f(\vec u; \vec x)$ is in $\mubc(\Phi)$, then $f$ is a polymax bounded function polynomial checking function on $\vec u$. |
192 | 160 | pbaillot | \end{lemma} |