Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.23)

The rewrite relation of the following TRS is considered.

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

1.1 Rule Shifting

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

1.1.1 Rule Shifting

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

1.1.1.1 R is empty

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