Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.16)

The rewrite relation of the following TRS is considered.

times(x,0) 0 (1)
times(x,s(y)) plus(times(x,y),x) (2)
plus(x,0) x (3)
plus(0,x) x (4)
plus(x,s(y)) s(plus(x,y)) (5)
plus(s(x),y) s(plus(x,y)) (6)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n3).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

We get the following set of dependency tuples:
times#(z0,0) c (8)
originates from
times(z0,0) 0 (7)
times#(z0,s(z1)) c1(plus#(times(z0,z1),z0),times#(z0,z1)) (10)
originates from
times(z0,s(z1)) plus(times(z0,z1),z0) (9)
plus#(z0,0) c2 (12)
originates from
plus(z0,0) z0 (11)
plus#(0,z0) c3 (14)
originates from
plus(0,z0) z0 (13)
plus#(z0,s(z1)) c4(plus#(z0,z1)) (16)
originates from
plus(z0,s(z1)) s(plus(z0,z1)) (15)
plus#(s(z0),z1) c5(plus#(z0,z1)) (18)
originates from
plus(s(z0),z1) s(plus(z0,z1)) (17)
Moreover, we add the following terms to the innermost strategy.
times#(z0,0)
times#(z0,s(z1))
plus#(z0,0)
plus#(0,z0)
plus#(z0,s(z1))
plus#(s(z0),z1)

1.1 Rule Shifting

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

1.1.1 Rule Shifting

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

1.1.1.1 Rule Shifting

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

1.1.1.1.1 Rule Shifting

The rules
plus#(s(z0),z1) c5(plus#(z0,z1)) (18)
are strictly oriented by the following non-linear polynomial interpretation over the naturals
[c] = 0
[c1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c2] = 0
[c3] = 0
[c4(x1)] = 1 · x1 + 0
[c5(x1)] = 1 · x1 + 0
[times(x1, x2)] = 1 · x1 + 0 + 1 · x1 · x2
[plus(x1, x2)] = 1 · x1 + 0 + 1 · x2
[times#(x1, x2)] = 1 · x2 · x1 · x1 + 0 + 1 · x2 · x2 · x1
[plus#(x1, x2)] = 1 · x1 + 0 + 1 · x2 · x2
[0] = 0
[s(x1)] = 1 + 1 · x1
which has the intended complexity. Here, only the following usable rules have been considered:
times#(z0,0) c (8)
times#(z0,s(z1)) c1(plus#(times(z0,z1),z0),times#(z0,z1)) (10)
plus#(z0,0) c2 (12)
plus#(0,z0) c3 (14)
plus#(z0,s(z1)) c4(plus#(z0,z1)) (16)
plus#(s(z0),z1) c5(plus#(z0,z1)) (18)
times(z0,s(z1)) plus(times(z0,z1),z0) (9)
plus(z0,s(z1)) s(plus(z0,z1)) (15)
plus(s(z0),z1) s(plus(z0,z1)) (17)
plus(z0,0) z0 (11)
plus(0,z0) z0 (13)
times(z0,0) 0 (7)

1.1.1.1.1.1 R is empty

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