Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/SK90/2.17)

The rewrite relation of the following TRS is considered.

sum(0) 0 (1)
sum(s(x)) +(sum(x),s(x)) (2)
sum1(0) 0 (3)
sum1(s(x)) s(+(sum1(x),+(x,x))) (4)
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:
sum#(0) c (5)
originates from
sum(0) 0 (1)
sum#(s(z0)) c1(sum#(z0)) (7)
originates from
sum(s(z0)) +(sum(z0),s(z0)) (6)
sum1#(0) c2 (8)
originates from
sum1(0) 0 (3)
sum1#(s(z0)) c3(sum1#(z0)) (10)
originates from
sum1(s(z0)) s(+(sum1(z0),+(z0,z0))) (9)
Moreover, we add the following terms to the innermost strategy.
sum#(0)
sum#(s(z0))
sum1#(0)
sum1#(s(z0))

1.1 Usable Rules

We remove the following rules since they are not usable.
sum(0) 0 (1)
sum(s(z0)) +(sum(z0),s(z0)) (6)
sum1(0) 0 (3)
sum1(s(z0)) s(+(sum1(z0),+(z0,z0))) (9)

1.1.1 Rule Shifting

The rules
sum#(0) c (5)
sum#(s(z0)) c1(sum#(z0)) (7)
sum1#(0) c2 (8)
sum1#(s(z0)) c3(sum1#(z0)) (10)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1)] = 1 · x1 + 0
[sum#(x1)] = 1 · x1 + 0
[sum1#(x1)] = 1 · x1 + 0
[0] = 1
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
sum#(0) c (5)
sum#(s(z0)) c1(sum#(z0)) (7)
sum1#(0) c2 (8)
sum1#(s(z0)) c3(sum1#(z0)) (10)

1.1.1.1 R is empty

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