Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Rubio_04/logarquot)

The rewrite relation of the following TRS is considered.

min(X,0) X (1)
min(s(X),s(Y)) min(X,Y) (2)
quot(0,s(Y)) 0 (3)
quot(s(X),s(Y)) s(quot(min(X,Y),s(Y))) (4)
log(s(0)) 0 (5)
log(s(s(X))) s(log(s(quot(X,s(s(0)))))) (6)
The evaluation strategy is innermost.

Property / Task

Determine bounds on the runtime complexity.

Answer / Result

An upperbound for the complexity is O(n2).

Proof (by AProVE @ termCOMP 2023)

1 Dependency Tuples

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

1.1 Usable Rules

We remove the following rules since they are not usable.
log(s(0)) 0 (5)
log(s(s(z0))) s(log(s(quot(z0,s(s(0)))))) (16)

1.1.1 Rule Shifting

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

1.1.1.1 Rule Shifting

The rules
quot#(0,s(z0)) c2 (12)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1, x2)] = 1 · x1 + 0 + 1 · x2
[min(x1, x2)] = 1 · x1 + 0
[quot(x1, x2)] = 1 · x1 + 0
[min#(x1, x2)] = 0
[quot#(x1, x2)] = 1
[log#(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:
min#(z0,0) c (8)
min#(s(z0),s(z1)) c1(min#(z0,z1)) (10)
quot#(0,s(z0)) c2 (12)
quot#(s(z0),s(z1)) c3(quot#(min(z0,z1),s(z1)),min#(z0,z1)) (14)
log#(s(0)) c4 (15)
log#(s(s(z0))) c5(log#(s(quot(z0,s(s(0))))),quot#(z0,s(s(0)))) (17)
min(z0,0) z0 (7)
min(s(z0),s(z1)) min(z0,z1) (9)
quot(s(z0),s(z1)) s(quot(min(z0,z1),s(z1))) (13)
quot(0,s(z0)) 0 (11)

1.1.1.1.1 Rule Shifting

The rules
log#(s(s(z0))) c5(log#(s(quot(z0,s(s(0))))),quot#(z0,s(s(0)))) (17)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1(x1)] = 1 · x1 + 0
[c2] = 0
[c3(x1, x2)] = 1 · x1 + 0 + 1 · x2
[c4] = 0
[c5(x1, x2)] = 1 · x1 + 0 + 1 · x2
[min(x1, x2)] = 1 · x1 + 0
[quot(x1, x2)] = 1 · x1 + 0
[min#(x1, x2)] = 0
[quot#(x1, x2)] = 0
[log#(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:
min#(z0,0) c (8)
min#(s(z0),s(z1)) c1(min#(z0,z1)) (10)
quot#(0,s(z0)) c2 (12)
quot#(s(z0),s(z1)) c3(quot#(min(z0,z1),s(z1)),min#(z0,z1)) (14)
log#(s(0)) c4 (15)
log#(s(s(z0))) c5(log#(s(quot(z0,s(s(0))))),quot#(z0,s(s(0)))) (17)
min(z0,0) z0 (7)
min(s(z0),s(z1)) min(z0,z1) (9)
quot(s(z0),s(z1)) s(quot(min(z0,z1),s(z1))) (13)
quot(0,s(z0)) 0 (11)

1.1.1.1.1.1 Rule Shifting

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

1.1.1.1.1.1.1 Rule Shifting

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

1.1.1.1.1.1.1.1 Rule Shifting

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

1.1.1.1.1.1.1.1.1 R is empty

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