Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/AG01/#3.42)

The rewrite relation of the following TRS is considered.

half(0) 0 (1)
half(s(0)) 0 (2)
half(s(s(x))) s(half(x)) (3)
lastbit(0) 0 (4)
lastbit(s(0)) s(0) (5)
lastbit(s(s(x))) lastbit(x) (6)
conv(0) cons(nil,0) (7)
conv(s(x)) cons(conv(half(s(x))),lastbit(s(x))) (8)
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:
half#(0) c (9)
originates from
half(0) 0 (1)
half#(s(0)) c1 (10)
originates from
half(s(0)) 0 (2)
half#(s(s(z0))) c2(half#(z0)) (12)
originates from
half(s(s(z0))) s(half(z0)) (11)
lastbit#(0) c3 (13)
originates from
lastbit(0) 0 (4)
lastbit#(s(0)) c4 (14)
originates from
lastbit(s(0)) s(0) (5)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
originates from
lastbit(s(s(z0))) lastbit(z0) (15)
conv#(0) c6 (17)
originates from
conv(0) cons(nil,0) (7)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
originates from
conv(s(z0)) cons(conv(half(s(z0))),lastbit(s(z0))) (18)
Moreover, we add the following terms to the innermost strategy.
half#(0)
half#(s(0))
half#(s(s(z0)))
lastbit#(0)
lastbit#(s(0))
lastbit#(s(s(z0)))
conv#(0)
conv#(s(z0))

1.1 Usable Rules

We remove the following rules since they are not usable.
lastbit(0) 0 (4)
lastbit(s(0)) s(0) (5)
lastbit(s(s(z0))) lastbit(z0) (15)
conv(0) cons(nil,0) (7)
conv(s(z0)) cons(conv(half(s(z0))),lastbit(s(z0))) (18)

1.1.1 Rule Shifting

The rules
conv#(0) c6 (17)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4] = 0
[c5(x1)] = 1 · x1 + 0
[c6] = 0
[c7(x1, x2, x3)] = 1 · x1 + 0 + 1 · x2 + 1 · x3
[half(x1)] = 1 + 1 · x1
[half#(x1)] = 0
[lastbit#(x1)] = 0
[conv#(x1)] = 1
[s(x1)] = 1 · x1 + 0
[0] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)

1.1.1.1 Rule Shifting

The rules
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
0 0
4 0
+
0 0
0 0
· x1
[c] =
0 0
0 0
[c1] =
0 0
0 0
[conv#(x1)] =
4 0
0 0
+
1 4
0 0
· x1
[c5(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c6] =
4 0
0 0
[c3] =
0 0
4 0
[c4] =
0 0
4 0
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[c7(x1, x2, x3)] =
1 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
4 0
2 0
+
0 1
0 1
· x1
[half(x1)] =
0 0
0 0
+
0 1
0 1
· x1
[0] =
0 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1 Rule Shifting

The rules
half#(s(0)) c1 (10)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[c] =
1 0
0 0
[c1] =
0 0
0 0
[conv#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c5(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c6] =
0 0
0 0
[c3] =
0 0
0 0
[c4] =
0 0
0 0
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
1 0
0 0
+
0 0
0 0
· x1
[c7(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
4 0
2 0
+
0 1
0 1
· x1
[half(x1)] =
0 0
0 0
+
0 1
0 1
· x1
[0] =
0 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1.1 Rule Shifting

The rules
lastbit#(0) c3 (13)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
1 0
0 0
+
0 0
0 0
· x1
[c] =
0 0
0 0
[c1] =
0 0
0 0
[conv#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c5(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c6] =
0 0
0 0
[c3] =
0 0
0 0
[c4] =
1 0
0 0
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[c7(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
3 0
2 0
+
0 1
0 1
· x1
[half(x1)] =
0 0
0 0
+
0 1
0 1
· x1
[0] =
0 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1.1.1 Rule Shifting

The rules
half#(0) c (9)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[c] =
1 0
0 0
[c1] =
2 0
0 0
[conv#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c5(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c6] =
0 0
0 0
[c3] =
0 0
0 0
[c4] =
0 0
0 0
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
2 0
0 0
+
0 0
0 0
· x1
[c7(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
4 0
2 0
+
0 1
0 1
· x1
[half(x1)] =
0 0
0 0
+
0 1
0 1
· x1
[0] =
0 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1.1.1.1 Rule Shifting

The rules
lastbit#(s(0)) c4 (14)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
1 0
4 0
+
0 0
0 0
· x1
[c] =
0 0
0 0
[c1] =
0 0
0 0
[conv#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c5(x1)] =
0 0
2 0
+
1 0
0 0
· x1
[c6] =
0 0
0 0
[c3] =
1 0
4 0
[c4] =
0 0
4 0
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
0 0
0 0
+
0 0
0 0
· x1
[c7(x1, x2, x3)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2 +
1 0
0 0
· x3
[s(x1)] =
3 0
2 0
+
0 1
0 1
· x1
[half(x1)] =
0 0
0 0
+
0 1
0 1
· x1
[0] =
0 0
0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
are strictly oriented by the following linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 0 0
0 0 0
· x1
[c] =
0 0 0
1 0 0
1 0 0
[c1] =
0 0 0
1 0 0
1 0 0
[conv#(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 1
0 0 0
0 0 0
· x1
[c5(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c6] =
0 0 0
0 0 0
0 0 0
[c3] =
0 0 0
0 0 0
0 0 0
[c4] =
2 0 0
0 0 0
0 0 0
[c2(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[half#(x1)] =
0 0 0
1 0 0
1 0 0
+
0 0 0
0 0 0
0 0 0
· x1
[c7(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2 +
1 0 0
0 0 0
0 0 0
· x3
[s(x1)] =
2 0 0
0 0 0
2 0 0
+
0 1 3
0 1 2
0 0 1
· x1
[half(x1)] =
0 0 0
0 0 0
0 0 0
+
0 1 0
0 1 0
0 0 1
· x1
[0] =
0 0 0
0 0 0
0 0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.1.1.1.1.1.1.1.1 Rule Shifting

The rules
half#(s(s(z0))) c2(half#(z0)) (12)
are strictly oriented by the following linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the rationals with delta = 1
[lastbit#(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 0
0 0 0
0 0 0
· x1
[c] =
2 0 0
2 0 0
2 0 0
[c1] =
0 0 0
2 0 0
2 0 0
[conv#(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[c5(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[c6] =
0 0 0
0 0 0
0 0 0
[c3] =
0 0 0
0 0 0
0 0 0
[c4] =
0 0 0
0 0 0
0 0 0
[c2(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1
[half#(x1)] =
0 0 0
2 0 0
2 0 0
+
0 0 1
0 0 0
0 0 0
· x1
[c7(x1, x2, x3)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 0
· x1 +
1 0 0
0 0 0
0 0 0
· x2 +
1 0 0
0 0 0
0 0 0
· x3
[s(x1)] =
2 0 0
0 0 0
2 0 0
+
0 1 2
0 1 1
0 0 1
· x1
[half(x1)] =
0 0 0
0 0 0
0 0 0
+
0 1 0
0 1 0
0 0 1
· x1
[0] =
0 0 0
0 0 0
2 0 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (9)
half#(s(0)) c1 (10)
half#(s(s(z0))) c2(half#(z0)) (12)
lastbit#(0) c3 (13)
lastbit#(s(0)) c4 (14)
lastbit#(s(s(z0))) c5(lastbit#(z0)) (16)
conv#(0) c6 (17)
conv#(s(z0)) c7(conv#(half(s(z0))),half#(s(z0)),lastbit#(s(z0))) (19)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (11)
half(0) 0 (1)

1.1.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).