(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(f(0)) → mark(cons(0, f(s(0))))
active(f(s(0))) → mark(f(p(s(0))))
active(p(s(0))) → mark(0)
active(f(X)) → f(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(p(X)) → p(active(X))
f(mark(X)) → mark(f(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
p(mark(X)) → mark(p(X))
proper(f(X)) → f(proper(X))
proper(0) → ok(0)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(p(X)) → p(proper(X))
f(ok(X)) → ok(f(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
p(ok(X)) → ok(p(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
Rewrite Strategy: INNERMOST
(1) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)
A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.
The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6, 7]
transitions:
00() → 0
mark0(0) → 0
ok0(0) → 0
active0(0) → 1
f0(0) → 2
cons0(0, 0) → 3
s0(0) → 4
p0(0) → 5
proper0(0) → 6
top0(0) → 7
f1(0) → 8
mark1(8) → 2
cons1(0, 0) → 9
mark1(9) → 3
s1(0) → 10
mark1(10) → 4
p1(0) → 11
mark1(11) → 5
01() → 12
ok1(12) → 6
f1(0) → 13
ok1(13) → 2
cons1(0, 0) → 14
ok1(14) → 3
s1(0) → 15
ok1(15) → 4
p1(0) → 16
ok1(16) → 5
proper1(0) → 17
top1(17) → 7
active1(0) → 18
top1(18) → 7
mark1(8) → 8
mark1(8) → 13
mark1(9) → 9
mark1(9) → 14
mark1(10) → 10
mark1(10) → 15
mark1(11) → 11
mark1(11) → 16
ok1(12) → 17
ok1(13) → 8
ok1(13) → 13
ok1(14) → 9
ok1(14) → 14
ok1(15) → 10
ok1(15) → 15
ok1(16) → 11
ok1(16) → 16
active2(12) → 19
top2(19) → 7
(2) BOUNDS(O(1), O(n^1))