Certification Problem

Input (TPDB Runtime_Complexity_Innermost_Rewriting/Strategy_removed_AG01/#4.28)

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)
bits(0) 0 (4)
bits(s(x)) s(bits(half(s(x)))) (5)
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 (6)
originates from
half(0) 0 (1)
half#(s(0)) c1 (7)
originates from
half(s(0)) 0 (2)
half#(s(s(z0))) c2(half#(z0)) (9)
originates from
half(s(s(z0))) s(half(z0)) (8)
bits#(0) c3 (10)
originates from
bits(0) 0 (4)
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)
originates from
bits(s(z0)) s(bits(half(s(z0)))) (11)
Moreover, we add the following terms to the innermost strategy.
half#(0)
half#(s(0))
half#(s(s(z0)))
bits#(0)
bits#(s(z0))

1.1 Usable Rules

We remove the following rules since they are not usable.
bits(0) 0 (4)
bits(s(z0)) s(bits(half(s(z0)))) (11)

1.1.1 Rule Shifting

The rules
bits#(0) c3 (10)
are strictly oriented by the following linear polynomial interpretation over the naturals
[c] = 0
[c1] = 0
[c2(x1)] = 1 · x1 + 0
[c3] = 0
[c4(x1, x2)] = 1 · x1 + 0 + 1 · x2
[half(x1)] = 1 + 1 · x1
[half#(x1)] = 0
[bits#(x1)] = 1
[s(x1)] = 1 + 1 · x1
[0] = 1
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (6)
half#(s(0)) c1 (7)
half#(s(s(z0))) c2(half#(z0)) (9)
bits#(0) c3 (10)
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)

1.1.1.1 Rule Shifting

The rules
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[c] =
0 0
2 0
[c1] =
0 0
2 0
[bits#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c3] =
0 0
0 0
[c4(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
0 0
2 0
+
0 0
0 0
· x1
[s(x1)] =
2 0
1 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 (6)
half#(s(0)) c1 (7)
half#(s(s(z0))) c2(half#(z0)) (9)
bits#(0) c3 (10)
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (8)
half(0) 0 (1)

1.1.1.1.1 Rule Shifting

The rules
half#(0) c (6)
half#(s(0)) c1 (7)
are strictly oriented by the following linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1 over the rationals with delta = 1
[c] =
1 0
0 0
[c1] =
1 0
0 0
[bits#(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[c3] =
0 0
0 0
[c4(x1, x2)] =
0 0
0 0
+
1 0
0 0
· x1 +
1 0
0 0
· x2
[c2(x1)] =
0 0
0 0
+
1 0
0 0
· x1
[half#(x1)] =
2 0
0 0
+
0 0
0 0
· x1
[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
2 0
which has the intended complexity. Here, only the following usable rules have been considered:
half#(0) c (6)
half#(s(0)) c1 (7)
half#(s(s(z0))) c2(half#(z0)) (9)
bits#(0) c3 (10)
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (8)
half(0) 0 (1)

1.1.1.1.1.1 Rule Shifting

The rules
half#(s(s(z0))) c2(half#(z0)) (9)
are strictly oriented by the following linear polynomial interpretation over (3 x 3)-matrices with strict dimension 1 over the rationals with delta = 1
[c] =
0 0 0
0 0 0
0 0 0
[c1] =
1 0 0
0 0 0
0 0 0
[bits#(x1)] =
0 0 0
0 0 0
0 0 0
+
1 3 0
0 0 0
0 0 1
· x1
[c3] =
0 0 0
0 0 0
0 0 0
[c4(x1, x2)] =
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
[c2(x1)] =
0 0 0
0 0 0
0 0 0
+
1 0 0
0 0 0
0 0 1
· x1
[half#(x1)] =
0 0 0
0 0 0
0 0 0
+
0 0 1
0 0 0
0 0 0
· x1
[s(x1)] =
2 0 0
0 0 0
1 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 (6)
half#(s(0)) c1 (7)
half#(s(s(z0))) c2(half#(z0)) (9)
bits#(0) c3 (10)
bits#(s(z0)) c4(bits#(half(s(z0))),half#(s(z0))) (12)
half(s(0)) 0 (2)
half(s(s(z0))) s(half(z0)) (8)
half(0) 0 (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).