(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(take(0, IL)) → mark(nil)
active(take(s(M), cons(N, IL))) → mark(cons(N, take(M, IL)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
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 5.
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, 8]
transitions:
zeros0() → 0
mark0(0) → 0
00() → 0
tt0() → 0
nil0() → 0
ok0(0) → 0
active0(0) → 1
cons0(0, 0) → 2
and0(0, 0) → 3
length0(0) → 4
s0(0) → 5
take0(0, 0) → 6
proper0(0) → 7
top0(0) → 8
01() → 10
zeros1() → 11
cons1(10, 11) → 9
mark1(9) → 1
cons1(0, 0) → 12
mark1(12) → 2
and1(0, 0) → 13
mark1(13) → 3
length1(0) → 14
mark1(14) → 4
s1(0) → 15
mark1(15) → 5
take1(0, 0) → 16
mark1(16) → 6
zeros1() → 17
ok1(17) → 7
01() → 18
ok1(18) → 7
tt1() → 19
ok1(19) → 7
nil1() → 20
ok1(20) → 7
cons1(0, 0) → 21
ok1(21) → 2
and1(0, 0) → 22
ok1(22) → 3
length1(0) → 23
ok1(23) → 4
s1(0) → 24
ok1(24) → 5
take1(0, 0) → 25
ok1(25) → 6
proper1(0) → 26
top1(26) → 8
active1(0) → 27
top1(27) → 8
mark1(9) → 27
mark1(12) → 12
mark1(12) → 21
mark1(13) → 13
mark1(13) → 22
mark1(14) → 14
mark1(14) → 23
mark1(15) → 15
mark1(15) → 24
mark1(16) → 16
mark1(16) → 25
ok1(17) → 26
ok1(18) → 26
ok1(19) → 26
ok1(20) → 26
ok1(21) → 12
ok1(21) → 21
ok1(22) → 13
ok1(22) → 22
ok1(23) → 14
ok1(23) → 23
ok1(24) → 15
ok1(24) → 24
ok1(25) → 16
ok1(25) → 25
proper2(9) → 28
top2(28) → 8
active2(17) → 29
top2(29) → 8
active2(18) → 29
active2(19) → 29
active2(20) → 29
02() → 31
zeros2() → 32
cons2(31, 32) → 30
mark2(30) → 29
proper2(10) → 33
proper2(11) → 34
cons2(33, 34) → 28
zeros2() → 35
ok2(35) → 34
02() → 36
ok2(36) → 33
proper3(30) → 37
top3(37) → 8
proper3(31) → 38
proper3(32) → 39
cons3(38, 39) → 37
cons3(36, 35) → 40
ok3(40) → 28
zeros3() → 41
ok3(41) → 39
03() → 42
ok3(42) → 38
active3(40) → 43
top3(43) → 8
cons4(42, 41) → 44
ok4(44) → 37
active4(36) → 45
cons4(45, 35) → 43
active4(44) → 46
top4(46) → 8
active5(42) → 47
cons5(47, 41) → 46
(2) BOUNDS(O(1), O(n^1))