Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/SK90/2.45)

The rewrite relation of the following TRS is considered.

admit(x,nil) nil (1)
admit(x,.(u,.(v,.(w,z)))) cond(=(sum(x,u,v),w),.(u,.(v,.(w,admit(carry(x,u,v),z))))) (2)
cond(true,y) y (3)
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:
admit#(z0,nil) c (5)
originates from
admit(z0,nil) nil (4)
admit#(z0,.(z1,.(z2,.(w,z3)))) c1(cond#(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))),admit#(carry(z0,z1,z2),z3)) (7)
originates from
admit(z0,.(z1,.(z2,.(w,z3)))) cond(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))) (6)
cond#(true,z0) c2 (9)
originates from
cond(true,z0) z0 (8)
Moreover, we add the following terms to the innermost strategy.
admit#(z0,nil)
admit#(z0,.(z1,.(z2,.(w,z3))))
cond#(true,z0)

1.1 Usable Rules

We remove the following rules since they are not usable.
cond(true,z0) z0 (8)

1.1.1 Rule Shifting

The rules
cond#(true,z0) c2 (9)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c2] = 0
[admit(x1, x2)] = 1 + 1 · x1
[admit#(x1, x2)] = 1 · x1 + 0
[cond#(x1, x2)] = 1 · x1 + 0
[nil] = 1
[.(x1, x2)] = 1 · x1 + 0
[w] = 1
[cond(x1, x2)] = 1 + 1 · x1
[=(x1, x2)] = 1 · x1 + 0
[sum(x1, x2, x3)] = 0
[carry(x1, x2, x3)] = 1 · x1 + 0
[true] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
admit#(z0,nil) c (5)
admit#(z0,.(z1,.(z2,.(w,z3)))) c1(cond#(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))),admit#(carry(z0,z1,z2),z3)) (7)
cond#(true,z0) c2 (9)

1.1.1.1 Rule Shifting

The rules
admit#(z0,nil) c (5)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c2] = 0
[admit(x1, x2)] = 1 + 1 · x1
[admit#(x1, x2)] = 1 + 1 · x1
[cond#(x1, x2)] = 1 · x1 + 0
[nil] = 1
[.(x1, x2)] = 1 · x1 + 0
[w] = 1
[cond(x1, x2)] = 1 + 1 · x1
[=(x1, x2)] = 1 · x1 + 0
[sum(x1, x2, x3)] = 1 · x1 + 0
[carry(x1, x2, x3)] = 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
admit#(z0,nil) c (5)
admit#(z0,.(z1,.(z2,.(w,z3)))) c1(cond#(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))),admit#(carry(z0,z1,z2),z3)) (7)
cond#(true,z0) c2 (9)

1.1.1.1.1 Rule Shifting

The rules
admit#(z0,.(z1,.(z2,.(w,z3)))) c1(cond#(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))),admit#(carry(z0,z1,z2),z3)) (7)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c2] = 0
[admit(x1, x2)] = 1 + 1 · x1
[admit#(x1, x2)] = 1 · x1 + 0 + 1 · x2
[cond#(x1, x2)] = 1 · x1 + 0
[nil] = 1
[.(x1, x2)] = 1 + 1 · x2
[w] = 1
[cond(x1, x2)] = 1 + 1 · x1
[=(x1, x2)] = 1 · x1 + 0
[sum(x1, x2, x3)] = 0
[carry(x1, x2, x3)] = 1 · x1 + 0
[true] = 0
which has the intended complexity. Here, only the following usable rules have been considered:
admit#(z0,nil) c (5)
admit#(z0,.(z1,.(z2,.(w,z3)))) c1(cond#(=(sum(z0,z1,z2),w),.(z1,.(z2,.(w,admit(carry(z0,z1,z2),z3))))),admit#(carry(z0,z1,z2),z3)) (7)
cond#(true,z0) c2 (9)

1.1.1.1.1.1 R is empty

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