Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.52)

The rewrite relation of the following TRS is considered.

f(0,1,x) f(s(x),x,x) (1)
f(x,y,s(z)) s(f(0,1,z)) (2)
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:
f#(0,1,z0) c(f#(s(z0),z0,z0)) (4)
originates from
f(0,1,z0) f(s(z0),z0,z0) (3)
f#(z0,z1,s(z2)) c1(f#(0,1,z2)) (6)
originates from
f(z0,z1,s(z2)) s(f(0,1,z2)) (5)
Moreover, we add the following terms to the innermost strategy.
f#(0,1,z0)
f#(z0,z1,s(z2))

1.1 Usable Rules

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

1.1.1 Rule Shifting

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

1.1.1.1 Rule Shifting

The rules
f#(0,1,z0) c(f#(s(z0),z0,z0)) (4)
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(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c1(x1)] =
3 0
0 0
+
1 0
0 0
· x1
[f#(x1, x2, x3)] =
0 0
0 0
+
0 1
0 0
· x1 +
0 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
4 0
0 0
+
1 2
0 0
· x1
[0] =
4 0
1 0
[1] =
3 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
f#(0,1,z0) c(f#(s(z0),z0,z0)) (4)
f#(z0,z1,s(z2)) c1(f#(0,1,z2)) (6)

1.1.1.1.1 R is empty

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