Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.53b)

The rewrite relation of the following TRS is considered.

g(x,y) x (1)
g(x,y) y (2)
f(0,1,x) f(s(x),x,x) (3)
f(x,y,s(z)) s(f(0,1,z)) (4)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n2).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
g#(z0,z1) c (6)
originates from
g(z0,z1) z0 (5)
g#(z0,z1) c1 (8)
originates from
g(z0,z1) z1 (7)
f#(0,1,z0) c2(f#(s(z0),z0,z0)) (10)
originates from
f(0,1,z0) f(s(z0),z0,z0) (9)
f#(z0,z1,s(z2)) c3(f#(0,1,z2)) (12)
originates from
f(z0,z1,s(z2)) s(f(0,1,z2)) (11)
Moreover, we add the following terms to the innermost strategy.
g#(z0,z1)
g#(z0,z1)
f#(0,1,z0)
f#(z0,z1,s(z2))

1.1 Usable Rules

We remove the following rules since they are not usable.
g(z0,z1) z0 (5)
g(z0,z1) z1 (7)
f(0,1,z0) f(s(z0),z0,z0) (9)
f(z0,z1,s(z2)) s(f(0,1,z2)) (11)

1.1.1 Rule Shifting

The rules
g#(z0,z1) c (6)
g#(z0,z1) c1 (8)
f#(z0,z1,s(z2)) c3(f#(0,1,z2)) (12)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3(x1)] = 1 · x1 + 0
[g#(x1, x2)] = 1
[f#(x1, x2, x3)] = 1 · x3 + 0
[0] = 1
[1] = 0
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
g#(z0,z1) c (6)
g#(z0,z1) c1 (8)
f#(0,1,z0) c2(f#(s(z0),z0,z0)) (10)
f#(z0,z1,s(z2)) c3(f#(0,1,z2)) (12)

1.1.1.1 Rule Shifting

The rules
f#(0,1,z0) c2(f#(s(z0),z0,z0)) (10)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[c] =
4 0
4 0
[g#(x1, x2)] =
4 0
4 0
+
1 0
0 1
· x1 +
0 0
0 0
· x2
[c1] =
4 0
4 0
[c3(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[f#(x1, x2, x3)] =
0 0
0 0
+
0 2
0 0
· x1 +
0 0
0 0
· x2 +
1 0
0 0
· x3
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[s(x1)] =
4 0
0 0
+
1 2
0 0
· x1
[0] =
4 0
2 0
[1] =
3 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
g#(z0,z1) c (6)
g#(z0,z1) c1 (8)
f#(0,1,z0) c2(f#(s(z0),z0,z0)) (10)
f#(z0,z1,s(z2)) c3(f#(0,1,z2)) (12)

1.1.1.1.1 R is empty

There are no rules in the TRS R. Hence, R/S has complexity O(1).