O
L C
mputational
gic
The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution
Martin Avanzini and Georg Moser
Computational Logic Faculty of Computer Science, University of Innsbruck
WST ’09
O mputational gic L The Polynomial Path Order and the Rules of - - PowerPoint PPT Presentation
C O mputational gic L The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution Martin Avanzini and Georg Moser Computational Logic Faculty of Computer Science, University of Innsbruck WST 09
Martin Avanzini and Georg Moser
Computational Logic Faculty of Computer Science, University of Innsbruck
WST ’09
Automatic Complexity Analysis
Goal
◮ purely automatic complexity analysis
Approach
◮ employ term rewriting as model of computation ◮ translate termination proofs into complexity certificates
MA (ICS @ UIBK) POP∗
ps
2/16
Automatic Complexity Analysis
Goal
◮ purely automatic complexity analysis
Approach
◮ employ term rewriting as model of computation ◮ translate termination proofs into complexity certificates ◮ to detect feasible computation, restrictions on termination
technique usually inevitable
MA (ICS @ UIBK) POP∗
ps
2/16
Automatic Complexity Analysis
Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008
MA (ICS @ UIBK) POP∗
ps
3/16
Automatic Complexity Analysis
A new Recursion-Theoretic Characterization of the Polytime Functions Computation and Complexity, 2(2), pp. 97–110, 1992
Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008
MA (ICS @ UIBK) POP∗
ps
3/16
Automatic Complexity Analysis
A new Recursion-Theoretic Characterization of the Polytime Functions Computation and Complexity, 2(2), pp. 97–110, 1992
Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008
The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution In Proc. of WST’09
MA (ICS @ UIBK) POP∗
ps
3/16
Automatic Complexity Analysis
◮ initial functions 0, s, Πk i ◮ composition
f ( x) = g(h1( x), . . . , hm( x))
◮ primitive recursion
f (z + 1, x) = g( x) f (z + 1, x) = h(z, x, f (z, x))
MA (ICS @ UIBK) POP∗
ps
4/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i ◮ composition
f ( x) = g(h1( x), . . . , hm( x))
◮ primitive recursion on notation
f (ε, x) = g( x) f (z·i, x) = hi(z, x, f (z, x)), i ∈ {0, 1}
MA (ICS @ UIBK) POP∗
ps
4/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i ◮ composition
f ( x) = g(h1( x), . . . , hm( x))
◮ primitive recursion on notation
f (ε, x) = g( x) f (z·i, x) = hi(z, x, f (z, x)), i ∈ {0, 1} dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x)) exp(x·i) = dup(exp(x))
MA (ICS @ UIBK) POP∗
ps
4/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ composition
f ( x) = g(h1( x), . . . , hm( x))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}
Theorem
polytime computable functions
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε;) = ε exp(ε) = s1(;ε) dup(x·i;) = si(;si(;dup(x;))) exp(x·i) = dup(exp(x);)
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis
◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
◮ predicative recursion on notation
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε;) = ε exp(ε) = s1(;ε) dup(x·i;) = si(;si(;dup(x;))) exp(x·i) = dup(exp(x);)
MA (ICS @ UIBK) POP∗
ps
5/16
Automatic Complexity Analysis by Rewriting
dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))
dup(ǫ) → ǫ exp(ǫ) → s1(ǫ) dup(si(x)) → si(si(dup(x))) exp(si(x)) → dup(exp(x))
MA (ICS @ UIBK) POP∗
ps
6/16
Automatic Complexity Analysis by Rewriting
dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))
dup(ǫ) → ǫ exp(ǫ) → s1(ǫ) dup(si(x)) → si(si(dup(x))) exp(si(x)) → dup(exp(x)) f (w1, . . . , wn) = v ⇐ ⇒ f(w1, . . . , wn) − →!
R v
computation
MA (ICS @ UIBK) POP∗
ps
6/16
Automatic Complexity Analysis by Rewriting
◮ derivation length
dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}
MA (ICS @ UIBK) POP∗
ps
7/16
Automatic Complexity Analysis by Rewriting
◮ derivation length
dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}
◮ derivational complexity
dcR(n) = dl(n, T (F, V), − →R)
◮ runtime complexity
rcR (n) = dl(n, Tb, − →R) Tb := {f (c1, . . . , cn) | f ∈ D and ci ∈ T (C, V)}
MA (ICS @ UIBK) POP∗
ps
7/16
Automatic Complexity Analysis by Rewriting
◮ derivation length
dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}
◮ derivational complexity
dcR(n) = dl(n, T (F, V), − →R)
◮ innermost runtime complexity
rci
R (n) = dl(n, Tb, i
− →R) Tb := {f (c1, . . . , cn) | f ∈ D and ci ∈ T (C, V)}
MA (ICS @ UIBK) POP∗
ps
7/16
Polynomial Path Orders
◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion
Theorem R ⊆ >pop∗ ⇒ rci
R polynomially bounded
for constructor TRS R
MA (ICS @ UIBK) POP∗
ps
8/16
Polynomial Path Orders
◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion
Theorem R ⊆ >pop∗ ⇒ rci
R polynomially bounded
for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)
MA (ICS @ UIBK) POP∗
ps
8/16
Polynomial Path Orders
◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion
Theorem R ⊆ >pop∗ ⇒ rci
R polynomially bounded
for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) revtl(x:xs; ys) >mpo revtl(xs; x:ys)
MA (ICS @ UIBK) POP∗
ps
8/16
Polynomial Path Orders
◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion
Theorem R ⊆ >pop∗ ⇒ rci
R polynomially bounded
for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) Rrev ⊆ >pop∗
MA (ICS @ UIBK) POP∗
ps
8/16
Polynomial Path Orders
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}
f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; p(z, x; y))), i ∈ {0, 1} predicative recursion with parameter substitution
Theorem (Bellantoni,1993)
BC is closed under predicative recursion with parameter substitution scheme.
MA (ICS @ UIBK) POP∗
ps
9/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V) MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj
f(s(;x); y) >pps∗ f(x; f(x; y))
MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f(s(;x); y) >pps∗ f(x; f(x; y))
POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f(s(;x); y) >pps∗ g(f(x; y), f(x; y))
MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f(s(;x); y) >pps∗ g(f(x; y), f(x; y))
POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))
MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f ( x; y) >pps∗ g(n( x; y); s( x; y))
MA (ICS @ UIBK) POP∗
ps
10/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps t if
>pps t for some i ∈ {1, . . . , m} and
◮ if f ∈ D then i ∈ {1, . . . , o}
◮ s >pps tj for all j ∈ {1, . . . , n} MA (ICS @ UIBK) POP∗
ps
11/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps t if
>pps t for some i ∈ {1, . . . , m} and
◮ if f ∈ D then i ∈ {1, . . . , o}
◮ s >pps tj for all j ∈ {1, . . . , n}
f(x; y) >pps g(x; y)
MA (ICS @ UIBK) POP∗
ps
11/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps t if
>pps t for some i ∈ {1, . . . , m} and
◮ if f ∈ D then i ∈ {1, . . . , o}
◮ s >pps tj for all j ∈ {1, . . . , n}
f(x; y) >pps y
MA (ICS @ UIBK) POP∗
ps
11/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps t if
>pps t for some i ∈ {1, . . . , m} and
◮ if f ∈ D then i ∈ {1, . . . , o}
◮ s >pps tj for all j ∈ {1, . . . , n}
f(x; y) >pps x
MA (ICS @ UIBK) POP∗
ps
11/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps t if
>pps t for some i ∈ {1, . . . , m} and
◮ if f ∈ D then i ∈ {1, . . . , o}
◮ s >pps tj for all j ∈ {1, . . . , n}
f(x; y) >pps g(x; )
MA (ICS @ UIBK) POP∗
ps
11/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f ( x; y) >pps∗ g(n( x; y); s( x; y))
MA (ICS @ UIBK) POP∗
ps
12/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f ( x; y) >pps∗ g(n( x; y); s( x; y))
POP∗
ps
12/16
Polynomial Path Order and Parameter Substitution
ps
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)
f ( x; y) >pps∗ g(n( x; ); s( x; y))
POP∗
ps
12/16
Polynomial Path Order and Parameter Substitution
s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if
>pps∗ t for some i ∈ {1, . . . , m}
◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}
◮ {
{s1, . . . , so} } >mul
pps∗ {
{t1, . . . , tp} }
◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V) MA (ICS @ UIBK) POP∗
ps
12/16
Polynomial Path Order and Parameter Substitution
Theorem R ⊆ >pps∗ ⇒ rci
R polynomially bounded
for constructor TRS R
MA (ICS @ UIBK) POP∗
ps
13/16
Polynomial Path Order and Parameter Substitution
Theorem R ⊆ >pps∗ ⇒ rci
R polynomially bounded
for constructor TRS R
Observation
rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)
MA (ICS @ UIBK) POP∗
ps
13/16
Polynomial Path Order and Parameter Substitution
Theorem R ⊆ >pps∗ ⇒ rci
R polynomially bounded
for constructor TRS R
Observation
rev(xs; ) >pps∗ revtl(xs; [ ]) revtl([ ]; ys) >pps∗ ys revtl(x:xs; ys) >pps∗ revtl(xs; x:ys)
MA (ICS @ UIBK) POP∗
ps
13/16
Polytime Computability
Theorem
If R ⊆ >pps∗ then the functions computed by R are polytime computable.
MA (ICS @ UIBK) POP∗
ps
14/16
Polytime Computability
Theorem
◮ Let R be an S-sorted constructor TRS based on a simple
polytime computable. terms grow only polynomial in size
MA (ICS @ UIBK) POP∗
ps
14/16
Polytime Computability
Theorem
◮ Let R be an S-sorted constructor TRS based on a simple
polytime computable. terms grow only polynomial in size
Example
◮ s1 : Word → Word
◮ (:) : a × List(a) → List(a)
◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
14/16
Polytime Computability
Theorem
◮ Let R be an S-sorted constructor TRS based on a simple
polytime computable.
◮ Each polytime computable function is computable by an S-sorted,
terms grow only polynomial in size
Example
◮ s1 : Word → Word
◮ (:) : a × List(a) → List(a)
◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
14/16
Experiments
{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638)
MA (ICS @ UIBK) POP∗
ps
15/16
Experiments
{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67)
MA (ICS @ UIBK) POP∗
ps
15/16
Experiments
{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67) POP∗ (40)
MA (ICS @ UIBK) POP∗
ps
15/16
Experiments
{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67) POP∗
ps (51)
POP∗ (40)
MA (ICS @ UIBK) POP∗
ps
15/16
Experiments
◮ integrating the rules of predicative recursion with parameter
substitution increases the power of polynomial path orders considerably
complexity analysis
◮ >pps∗ + argument filterings used with weak dependency pairs ◮ >pps∗ + (finite) semantic labeling ◮ . . .
constraints on the precedence hack
MA (ICS @ UIBK) POP∗
ps
16/16
Appendix
f(ǫ) → tip mkTree(x) → node(x, x) f(si(x)) → mkTree(f(x))
MA (ICS @ UIBK) POP∗
ps
17/16
Appendix
f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; )) f > mkTree > node > tip
MA (ICS @ UIBK) POP∗
ps
17/16
Appendix
f(ǫ; ) >pps∗ tip mkTree(; x) >pps∗ node(; x, x) f(si(; x); ) >pps∗ mkTree(; f(x; )) f > mkTree > node > tip
MA (ICS @ UIBK) POP∗
ps
17/16
Appendix
f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; ))
Observations
◮ rci R of above TRS R polynomial ◮ i
− →R does not give a (direct) polytime algorithm for computing f
◮ terms grow exponentially in size MA (ICS @ UIBK) POP∗
ps
17/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
Example
◮ true : Bool ◮ s1 : Word → Word ◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
Example
◮ true : Bool
◮ s1 : Word → Word ◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
Example
◮ true : Bool
◮ s1 : Word → Word
◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
Example
◮ true : Bool
◮ s1 : Word → Word
◮ (:) : a × List(a) → List(a)
◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Definition
an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s
◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}
rk : S → N
Example
◮ true : Bool
◮ s1 : Word → Word
◮ (:) : a × List(a) → List(a)
◮ node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
18/16
Appendix
Theorem
let R be an S-sorted constructor TRS based on a simple signature
◮ if R is compatible with >pps∗ then the functions computed by R
are polytime computable
◮ each polytime computable function is computable by such a TRS
compatible with >pps∗
MA (ICS @ UIBK) POP∗
ps
19/16
Appendix
Theorem
let R be an S-sorted constructor TRS based on a simple signature
◮ if R is compatible with >pps∗ then the functions computed by R
are polytime computable
◮ each polytime computable function is computable by such a TRS
compatible with >pps∗ f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; )) node : Tree × Tree → Tree
MA (ICS @ UIBK) POP∗
ps
19/16
Appendix
Theorem
let R be an S-sorted constructor TRS based on a simple signature
◮ if R is compatible with >pps∗ then the functions computed by R
are polytime computable
◮ each polytime computable function is computable by such a TRS
compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)
MA (ICS @ UIBK) POP∗
ps
19/16
Appendix
Theorem
let R be an S-sorted constructor TRS based on a simple signature
◮ if R is compatible with >pps∗ then the functions computed by R
are polytime computable
◮ each polytime computable function is computable by such a TRS
compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) [ ]: List(a) rev: List(a) → List(a) (:): a × List(a) → List(a) revtl : List(a) × List(a) → List(a)
MA (ICS @ UIBK) POP∗
ps
19/16
Appendix
Theorem
let R be an S-sorted constructor TRS based on a simple signature
◮ if R is compatible with >pps∗ then the functions computed by R
are polytime computable
◮ each polytime computable function is computable by such a TRS
compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) [ ]: List(a) rev: List(a) → List(a) (:): a × List(a) → List(a) revtl : List(a) × List(a) → List(a)
MA (ICS @ UIBK) POP∗
ps
19/16