Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Mixed_TRS/jones2)

The rewrite relation of the following TRS is considered.

f(empty,l) l (1)
f(cons(x,k),l) g(k,l,cons(x,k)) (2)
g(a,b,c) f(a,cons(b,c)) (3)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
f#(empty,z0) c (5)
originates from
f(empty,z0) z0 (4)
f#(cons(z0,z1),z2) c1(g#(z1,z2,cons(z0,z1))) (7)
originates from
f(cons(z0,z1),z2) g(z1,z2,cons(z0,z1)) (6)
g#(z0,z1,z2) c2(f#(z0,cons(z1,z2))) (9)
originates from
g(z0,z1,z2) f(z0,cons(z1,z2)) (8)
Moreover, we add the following terms to the innermost strategy.
f#(empty,z0)
f#(cons(z0,z1),z2)
g#(z0,z1,z2)

1.1 Usable Rules

We remove the following rules since they are not usable.
f(empty,z0) z0 (4)
f(cons(z0,z1),z2) g(z1,z2,cons(z0,z1)) (6)
g(z0,z1,z2) f(z0,cons(z1,z2)) (8)

1.1.1 Rule Shifting

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

1.1.1.1 Rule Shifting

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

1.1.1.1.1 R is empty

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