Statistiques
| Révision :

root / CSL17 / preliminaries.tex @ 213

Historique | Voir | Annoter | Télécharger (12,26 ko)

1

    
2
\section{Preliminaries}
3
We introduce the polynomial hierarchy and its basic properties, then the Bellantoni characterisation.
4

    
5
\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

    
7
\subsection{Polynomial hierarchy}
8
%(include closure properties)
9

    
10
\begin{definition}
11
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
$$ 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
where $Q_i=\forall$ (resp. $Q_i=\exists$) if $i$ is even (resp. odd).
14

    
15
The class $\pip{i}$ is defined similarly but with first quantifier $\forall$ instead of $\exists$. 
16
\end{definition}
17
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

    
19
The polynomial hierarchy is defined as $\ph:=\cup_i \sigp{i}$, and we also have $\ph=\cup_i \pip{i}$.
20

    
21
Given a language $L$ we denote as $\fptime(L)$ the class of functions computable by a deterministic
22
polynomial time Turing machine with oracle $L$.
23

    
24
We now define the following function classes:
25
\begin{eqnarray*}
26
 \fphi{i+1} &:= & \fptime(\sigp{i}),\\
27
 \fph &:=& \cup_i  \fphi{i}. 
28
\end{eqnarray*}
29
One can then check that $ \fphi{i+1} =  \fptime(\pip{i})=  \fptime(\sigp{i}\cup \pip{i})$.
30

    
31
\subsection{Bellantoni's characterisation using predicative minimisation}
32
(perhaps compare with Cobham's using limited recursion)
33

    
34
\anupam{copied below from last year's paper}
35

    
36
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
%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
%We say that an expression is well-sorted if the arities of function symbols in it is respected.
39

    
40
%\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
\begin{definition}
42
	[BC programs]
43
	BC is the set of functions generated as follows:
44
	%	\paragraph{Initial functions}
45
	%	The initial functions are:
46
	\begin{enumerate}
47
		\item The constant functions $\epsilon^k$ which takes $k$ arguments and outputs $\epsilon \in \Word$.
48
		\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
		\item The successor functions $\succ i ( ; x) := xi$ for $i = 0,1$.
50
		\item The predecessor function $\pred (; x) := \begin{cases}
51
		\epsilon &  \mbox{ if }  x = \epsilon \\
52
		x' &  \mbox{ if }  x = x'i
53
		\end{cases}$.
54
		\item The conditional function 
55
		\[
56
		%\begin{array}{rcl}
57
		%C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
58
		%C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\
59
		%C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 
60
		%\end{array}
61
		C (; \epsilon, y_\epsilon , y_0, y_1  ) := y_\epsilon 
62
		\quad
63
		C(; x0 , y_\epsilon , y_0, y_1) := y_0 
64
		\quad
65
		C(; x1 , y_\epsilon , y_0, y_1) := y_1 
66
		\]
67
		%		$\cond (;x,y,z) := \begin{cases}
68
		%		y & \mbox{ if } x=x' 0 \\
69
		%		z & \text{otherwise}
70
		%		\end{cases}$.
71
	\end{enumerate}
72
	
73
	%	One considers the following closure schemes:
74
	\begin{enumerate}
75
		\setcounter{enumi}{5}
76
		\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by,
77
		\[
78
		\begin{array}{rcl}
79
		f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
80
		f (\succ i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
81
		\end{array}
82
		\]
83
		for $i = 0,1$,  so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments).
84
		\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
85
		\[
86
		f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
87
		\]
88
		so long as the expression is well-formed.
89
	\end{enumerate}
90
\end{definition}
91
%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

    
93
We will implicitly identify a BC function with the equational specification it induces.
94
The main property of BC programs is:
95
\begin{theorem}[\cite{BellantoniCook92}]
96
	The class of functions representable by BC programs is $\fptime$.
97
\end{theorem}	
98
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
99

    
100
$(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
\[
102
\begin{array}{rcl}
103
f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\
104
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
\end{array}
106
\]
107
for $i = 0,1$,  so long as the expressions are well-formed.
108

    
109
%\anupam{simultaneous recursion?}
110

    
111
%\anupam{also identity, hereditarily safe, expressions, etc.}
112

    
113
%\anupam{we implicitly associate a BC program with its equational specification} 
114

    
115
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
For instance $y$ occurs hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$.
117
\begin{proposition}
118
	[Properties of BC programs]
119
	\label{prop:bc-properties}
120
	We have the following properties:
121
	\begin{enumerate}
122
		\item The identity function is in BC.
123
		\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
		\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
		is also a BC program.
126
	\end{enumerate}
127
	
128
	%\begin{proposition}
129
	%[Properties of BC programs]
130
	%\label{prop:bc-properties}
131
	%We have the following properties:
132
	%\begin{enumerate}
133
	%\item Hereditarily safe expressions over BC programs are BC definable.
134
	%\item Can pass safe input to normal input.
135
	%\end{enumerate}
136
\end{proposition}
137

    
138
%\nb{TODO: extend with $\mu$s.}
139

    
140
%\anupam{Should add $+(;x,y)$ as a basic function (check satisfies polychecking lemma!), since otherwise not definable with safe input. Then define unary successor $\succ{} (;x)$ as $+(;x,\succ 1 0)$. }
141

    
142
\begin{example}
143
	[Some simple functions]
144
	\label{ex:simple-bc-fns}
145
%	\todo{Boolean predicates $\notfn, \andfn, \orfn, \equivfn$ .}
146
%	\todo{$\bit$}
147
Observe that:
148
	\begin{itemize}
149
	\item The boolean predicates $\notfn (;x)$,  $\andfn(;x,y)$, $\orfn(;x,y)$, $\equivfn(;x,y)$ can all be defined on safe arguments, simply by computing by case distinction using the conditional $C(;x,y_{\epsilon}, y_0,y_1)$ function.
150
	%\item $\bit(l;x)$ returns the $\mode l$th bit of $x$.
151
	\item We can define the function $\bit(l;x)$ which returns the $|l|$th least significant bit of $x$. For instance $\bit(11;1010)=0$.
152
	
153
	For that let us first define the function $\shorten(l;x)$ which returns the $|x|- |l|$ prefix of $x$, as follows:
154
	\begin{eqnarray*}
155
	\shorten(\epsilon;x) &=&x\\
156
	\shorten(li;x) &=&p(;\shorten(l;x))
157
	\end{eqnarray*}
158
	Then we define $\bit(l;x)$  as follows:
159
	$$\bit(l;x)=C(;\shorten(pl;x),\epsilon,0,1).$$ 
160
	\end{itemize}
161
	\end{example}
162

    
163

    
164
%\nb{Remember polymax bounded checking lemma! Quite important. Also need to bear this in mind when adding functions.}
165

    
166
Now, in order to characterize $\fph$ and its subclasses $\fphi{i}$ we consider Bellantoni's function algebra $\mubc$, defined by using predicative minimization: 
167
\begin{definition}[$\mubc$ and $\mubc^i$ programs]
168
We define:
169
\begin{itemize}
170
\item The class $\mubc$ is the set of functions defined as the BC functions, but with the following additional generation rule:
171

    
172
8. Predicative minimization. If $h$ is in $\mubc$, then so is $f$ defined by
173

    
174
$f(\vec u; \vec x):= \begin{cases}
175
 s_1(\mu y.h(\vec u; \vec x, y)\mod 2 = 0)& \mbox{ if  there exists such a $y$,} \\
176
0  & \mbox{ otherwise,}
177
\end{cases}
178
$
179

    
180
where $\mu y.h(\vec u; \vec x , y)\mod 2 = 0$ is the least $y$ such that the equality holds.
181

    
182
We will denote this function $f$ as $\mu y^{+1} . h(\vec u ; \vec x , y) =_2 0$.
183

    
184
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.
185
 
186
\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$.
187
\end{itemize}
188
 \end{definition}
189
 One then obtains:
190
 \begin{theorem}[\cite{BellantoniThesis, Bellantoni95}]\label{thm:mubc}
191
 The class of functions representable by $\mubc$ programs is $\fph$, and for each $i\geq 1$ the class representable by $\mubc^{i-1}$ programs is $\fphi{i}$.
192
 \end{theorem}
193
 We will also need an intermediary lemma, also proved in \cite{BellantoniThesis}.
194
 \begin{definition}
195
  A function $f(\vec u; \vec x)$ is \textit{polymax bounded} if there exists a polynomial $q$ such that,
196
  for any $\vec u$ and $\vec x$ one has:
197

    
198
%$\size{u}$
199
  $$ \size{f(\vec u; \vec x)} \leq q(\size{u_1} , \dots , \size{u_k}) + \max_j \size{x_j}.$$
200
 \end{definition}
201
  
202
 We define the function $\mode$ by $u\mode x:= u \mod 2^{\size{x}}$.
203
 \begin{definition}
204
 A function $f(\vec u; \vec x)$ is a \textit{polynomial checking function} on $\vec u$ if there exists a polynomial $q$
205
 such that, for any $\vec u$, $\vec x$, $y$ and $z$ such that $\size{y} \geq q(\size{\vec u})+ \size{z}$ we have:
206
 $$ f(\vec u; \vec x) \mode z = f(\vec u; \vec x \mode y)\mode z.$$
207
 A polynomial $q$ satisfying this condition is called a \textit{threshold} for $f$.
208
 \end{definition}
209
 One then has:
210
 \begin{lemma}[Bounded Minimization, \cite{BellantoniThesis}]
211
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:
212
$$ (\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) .$$
213
 \end{lemma}
214
 Finally we can state an important lemma about $\mubc$:
215
 \begin{lemma}[Polychecking Lemma, \cite{BellantoniThesis}]
216
 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$.
217
 \end{lemma}
218
 The following property follows from \cite{BellantoniThesis, Bellantoni95}]
219
 \begin{proposition}
220
  If $\Phi$ is a class of polymax bounded polynomial checking functions, then  $\mubc(\Phi)$ satisfies the properties of Thm \ref{thm:mubc}.
221
 \end{proposition}
222
  Consider the addition function $+$ with two safe arguments, so denoted as $+(;x,y)$. It is clear that if $+(;x,y)=z$, then we have $|z| \leq \max(|x|,|y|)+1$, so $+$ is a polymax bounded function. Moreover for any $n$, the $n$th least significant bits of $z$ only depend on the $n$th least significant bits  of $x$ and $y$, so $+(;x,y)$ is a polynomial checking function (on no normal argument), with threshold $q(x,y)=0$.
223
  
224
  In the following we will consider $\mubc(\Phi)$ with $\Phi$ containing the function $+(;x,y)$, but write it simply as $\mubc$. Note that addition could be defined in $\bc$ (hence in $\mubc$), but not with two safe arguments because the definition would use safe recursion. We will also use the unary successor $\succ{} (;x)$, which is defined thanks to addition as  as $\succ{} (;x)=+(;x,\succ 1 0)$.
225