Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.47)

The rewrite relation of the following TRS is considered.

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

1.1 Rule Shifting

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

1.1.1 Rule Shifting

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

1.1.1.1 R is empty

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