Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Transformed_CSR_04/Ex4_7_56_Bor03_Z)

The rewrite relation of the following TRS is considered.

from(X) cons(X,n__from(s(X))) (1)
after(0,XS) XS (2)
after(s(N),cons(X,XS)) after(N,activate(XS)) (3)
from(X) n__from(X) (4)
activate(n__from(X)) from(X) (5)
activate(X) X (6)
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:
from#(z0) c (8)
originates from
from(z0) cons(z0,n__from(s(z0))) (7)
from#(z0) c1 (10)
originates from
from(z0) n__from(z0) (9)
after#(0,z0) c2 (12)
originates from
after(0,z0) z0 (11)
after#(s(z0),cons(z1,z2)) c3(after#(z0,activate(z2)),activate#(z2)) (14)
originates from
after(s(z0),cons(z1,z2)) after(z0,activate(z2)) (13)
activate#(n__from(z0)) c4(from#(z0)) (16)
originates from
activate(n__from(z0)) from(z0) (15)
activate#(z0) c5 (18)
originates from
activate(z0) z0 (17)
Moreover, we add the following terms to the innermost strategy.
from#(z0)
from#(z0)
after#(0,z0)
after#(s(z0),cons(z1,z2))
activate#(n__from(z0))
activate#(z0)

1.1 Usable Rules

We remove the following rules since they are not usable.
after(0,z0) z0 (11)
after(s(z0),cons(z1,z2)) after(z0,activate(z2)) (13)

1.1.1 Rule Shifting

The rules
after#(0,z0) c2 (12)
after#(s(z0),cons(z1,z2)) c3(after#(z0,activate(z2)),activate#(z2)) (14)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[activate(x1)] = 3
[from(x1)] = 3 + 3 · x1
[from#(x1)] = 0
[after#(x1, x2)] = 3 + 2 · x1
[activate#(x1)] = 0
[n__from(x1)] = 3 + 1 · x1
[cons(x1, x2)] = 3 + 1 · x1
[s(x1)] = 1 + 1 · x1
[0] = 3
which has the intended complexity. Here, only the following usable rules have been considered:
from#(z0) c (8)
from#(z0) c1 (10)
after#(0,z0) c2 (12)
after#(s(z0),cons(z1,z2)) c3(after#(z0,activate(z2)),activate#(z2)) (14)
activate#(n__from(z0)) c4(from#(z0)) (16)
activate#(z0) c5 (18)

1.1.1.1 Rule Shifting

The rules
activate#(n__from(z0)) c4(from#(z0)) (16)
activate#(z0) c5 (18)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[activate(x1)] = 3
[from(x1)] = 3 + 3 · x1
[from#(x1)] = 0
[after#(x1, x2)] = 2 · x1 + 0
[activate#(x1)] = 2
[n__from(x1)] = 3 + 1 · x1
[cons(x1, x2)] = 3 + 1 · x1
[s(x1)] = 1 + 1 · x1
[0] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
from#(z0) c (8)
from#(z0) c1 (10)
after#(0,z0) c2 (12)
after#(s(z0),cons(z1,z2)) c3(after#(z0,activate(z2)),activate#(z2)) (14)
activate#(n__from(z0)) c4(from#(z0)) (16)
activate#(z0) c5 (18)

1.1.1.1.1 Rule Shifting

The rules
from#(z0) c (8)
from#(z0) c1 (10)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4(x1)] = 1 · x1 + 0
[c5] = 0
[activate(x1)] = 3
[from(x1)] = 3 + 3 · x1
[from#(x1)] = 1
[after#(x1, x2)] = 2 · x1 + 0
[activate#(x1)] = 1
[n__from(x1)] = 3 + 1 · x1
[cons(x1, x2)] = 3 + 1 · x1
[s(x1)] = 3 + 1 · x1
[0] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
from#(z0) c (8)
from#(z0) c1 (10)
after#(0,z0) c2 (12)
after#(s(z0),cons(z1,z2)) c3(after#(z0,activate(z2)),activate#(z2)) (14)
activate#(n__from(z0)) c4(from#(z0)) (16)
activate#(z0) c5 (18)

1.1.1.1.1.1 R is empty

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