Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Der95/08)

The rewrite relation of the following TRS is considered.

D(t) 1 (1)
D(constant) 0 (2)
D(+(x,y)) +(D(x),D(y)) (3)
D(*(x,y)) +(*(y,D(x)),*(x,D(y))) (4)
D(-(x,y)) -(D(x),D(y)) (5)
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:
D#(t) c (6)
originates from
D(t) 1 (1)
D#(constant) c1 (7)
originates from
D(constant) 0 (2)
D#(+(z0,z1)) c2(D#(z0),D#(z1)) (9)
originates from
D(+(z0,z1)) +(D(z0),D(z1)) (8)
D#(*(z0,z1)) c3(D#(z0),D#(z1)) (11)
originates from
D(*(z0,z1)) +(*(z1,D(z0)),*(z0,D(z1))) (10)
D#(-(z0,z1)) c4(D#(z0),D#(z1)) (13)
originates from
D(-(z0,z1)) -(D(z0),D(z1)) (12)
Moreover, we add the following terms to the innermost strategy.
D#(t)
D#(constant)
D#(+(z0,z1))
D#(*(z0,z1))
D#(-(z0,z1))

1.1 Usable Rules

We remove the following rules since they are not usable.
D(t) 1 (1)
D(constant) 0 (2)
D(+(z0,z1)) +(D(z0),D(z1)) (8)
D(*(z0,z1)) +(*(z1,D(z0)),*(z0,D(z1))) (10)
D(-(z0,z1)) -(D(z0),D(z1)) (12)

1.1.1 Rule Shifting

The rules
D#(+(z0,z1)) c2(D#(z0),D#(z1)) (9)
D#(*(z0,z1)) c3(D#(z0),D#(z1)) (11)
D#(-(z0,z1)) c4(D#(z0),D#(z1)) (13)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[D#(x1)] = 1 · x1 + 0
[t] = 0
[constant] = 0
[+(x1, x2)] = 1 + 1 · x1 + 1 · x2
[*(x1, x2)] = 1 + 1 · x1 + 1 · x2
[-(x1, x2)] = 1 + 1 · x1 + 1 · x2
which has the intended complexity. Here, only the following usable rules have been considered:
D#(t) c (6)
D#(constant) c1 (7)
D#(+(z0,z1)) c2(D#(z0),D#(z1)) (9)
D#(*(z0,z1)) c3(D#(z0),D#(z1)) (11)
D#(-(z0,z1)) c4(D#(z0),D#(z1)) (13)

1.1.1.1 Rule Shifting

The rules
D#(t) c (6)
D#(constant) c1 (7)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[D#(x1)] = 3 + 3 · x1
[t] = 1
[constant] = 1
[+(x1, x2)] = 2 + 1 · x1 + 1 · x2
[*(x1, x2)] = 3 + 1 · x1 + 1 · x2
[-(x1, x2)] = 2 + 1 · x1 + 1 · x2
which has the intended complexity. Here, only the following usable rules have been considered:
D#(t) c (6)
D#(constant) c1 (7)
D#(+(z0,z1)) c2(D#(z0),D#(z1)) (9)
D#(*(z0,z1)) c3(D#(z0),D#(z1)) (11)
D#(-(z0,z1)) c4(D#(z0),D#(z1)) (13)

1.1.1.1.1 R is empty

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