Statistiques
| Révision :

root / CSL17 / preliminaries.tex @ 212

Historique | Voir | Annoter | Télécharger (11,55 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
	
148
	$\bit(l;x)$ returns the $\mode l$th bit of $x$.
149
	\end{example}
150

    
151

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

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

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

    
162
$f(\vec u; \vec x):= \begin{cases}
163
 s_1(\mu y.h(\vec u; \vec x, y)\mod 2 = 0)& \mbox{ if  there exists such a $y$,} \\
164
0  & \mbox{ otherwise,}
165
\end{cases}
166
$
167

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

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

    
172
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.
173
 
174
\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$.
175
\end{itemize}
176
 \end{definition}
177
 One then obtains:
178
 \begin{theorem}[\cite{BellantoniThesis, Bellantoni95}]\label{thm:mubc}
179
 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}$.
180
 \end{theorem}
181
 We will also need an intermediary lemma, also proved in \cite{BellantoniThesis}.
182
 \begin{definition}
183
  A function $f(\vec u; \vec x)$ is \textit{polymax bounded} if there exists a polynomial $q$ such that,
184
  for any $\vec u$ and $\vec x$ one has:
185

    
186
%$\size{u}$
187
  $$ \size{f(\vec u; \vec x)} \leq q(\size{u_1} , \dots , \size{u_k}) + \max_j \size{x_j}.$$
188
 \end{definition}
189
  
190
 We define the function $\mode$ by $u\mode x:= u \mod 2^{\size{x}}$.
191
 \begin{definition}
192
 A function $f(\vec u; \vec x)$ is a \textit{polynomial checking function} on $\vec u$ if there exists a polynomial $q$
193
 such that, for any $\vec u$, $\vec x$, $y$ and $z$ such that $\size{y} \geq q(\size{\vec u})+ \size{z}$ we have:
194
 $$ f(\vec u; \vec x) \mode z = f(\vec u; \vec x \mode y)\mode z.$$
195
 A polynomial $q$ satisfying this condition is called a \textit{threshold} for $f$.
196
 \end{definition}
197
 One then has:
198
 \begin{lemma}[Bounded Minimization, \cite{BellantoniThesis}]
199
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:
200
$$ (\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) .$$
201
 \end{lemma}
202
 Finally we can state an important lemma about $\mubc$:
203
 \begin{lemma}[Polychecking Lemma, \cite{BellantoniThesis}]
204
 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$.
205
 \end{lemma}
206
 The following property follows from \cite{BellantoniThesis, Bellantoni95}]
207
 \begin{proposition}
208
  If $\Phi$ is a class of polymax bounded polynomial checking functions, then  $\mubc(\Phi)$ satisfies the properties of Thm \ref{thm:mubc}.
209
 \end{proposition}
210
  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$.
211
  
212
  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)$.
213