/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) CpxTrsMatchBoundsTAProof [FINISHED, 751 ms] (6) BOUNDS(1, n^1) (7) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (8) TRS for Loop Detection (9) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (10) BEST (11) proven lower bound (12) LowerBoundPropagationProof [FINISHED, 0 ms] (13) BOUNDS(n^1, INF) (14) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 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)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) The following defined symbols can occur below the 0th argument of cons: active, proper, cons The following defined symbols can occur below the 1th argument of cons: active, proper, cons The following defined symbols can occur below the 0th argument of top: active, proper, cons The following defined symbols can occur below the 0th argument of proper: active, proper, cons The following defined symbols can occur below the 0th argument of active: active, proper, cons Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: 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(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)) proper(and(X1, X2)) -> and(proper(X1), proper(X2)) proper(length(X)) -> length(proper(X)) proper(s(X)) -> s(proper(X)) proper(take(X1, X2)) -> take(proper(X1), proper(X2)) ---------------------------------------- (2) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: active(zeros) -> mark(cons(0, zeros)) active(cons(X1, X2)) -> cons(active(X1), 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(tt) -> ok(tt) proper(nil) -> ok(nil) 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)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (4) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: active(zeros) -> mark(cons(0, zeros)) active(cons(X1, X2)) -> cons(active(X1), 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(tt) -> ok(tt) proper(nil) -> ok(nil) 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)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (5) CpxTrsMatchBoundsTAProof (FINISHED) 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 ok0(0) -> 0 tt0() -> 0 nil0() -> 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 ---------------------------------------- (6) BOUNDS(1, n^1) ---------------------------------------- (7) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (8) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 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)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (9) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence take(ok(X1), ok(X2)) ->^+ ok(take(X1, X2)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [X1 / ok(X1), X2 / ok(X2)]. The result substitution is [ ]. ---------------------------------------- (10) Complex Obligation (BEST) ---------------------------------------- (11) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 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)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (12) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (13) BOUNDS(n^1, INF) ---------------------------------------- (14) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). 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)) S is empty. Rewrite Strategy: FULL