/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 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), 4 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) CpxTrsMatchBoundsTAProof [FINISHED, 150 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(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(half(0)) -> mark(0) active(half(s(0))) -> mark(0) active(half(s(s(X)))) -> mark(s(half(X))) active(half(dbl(X))) -> mark(X) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(s(X)) -> s(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(half(X)) -> half(active(X)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) proper(half(X)) -> half(proper(X)) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) 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 top: proper, active The following defined symbols can occur below the 0th argument of proper: proper, active The following defined symbols can occur below the 0th argument of active: proper, active Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: active(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(half(0)) -> mark(0) active(half(s(0))) -> mark(0) active(half(s(s(X)))) -> mark(s(half(X))) active(half(dbl(X))) -> mark(X) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(s(X)) -> s(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(half(X)) -> half(active(X)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(half(X)) -> half(proper(X)) ---------------------------------------- (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: terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(0) -> ok(0) proper(nil) -> ok(nil) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) 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: terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(0) -> ok(0) proper(nil) -> ok(nil) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) 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 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, 8, 9, 10, 11] transitions: mark0(0) -> 0 00() -> 0 ok0(0) -> 0 nil0() -> 0 active0(0) -> 0 terms0(0) -> 1 cons0(0, 0) -> 2 recip0(0) -> 3 sqr0(0) -> 4 s0(0) -> 5 add0(0, 0) -> 6 dbl0(0) -> 7 first0(0, 0) -> 8 half0(0) -> 9 proper0(0) -> 10 top0(0) -> 11 terms1(0) -> 12 mark1(12) -> 1 cons1(0, 0) -> 13 mark1(13) -> 2 recip1(0) -> 14 mark1(14) -> 3 sqr1(0) -> 15 mark1(15) -> 4 s1(0) -> 16 mark1(16) -> 5 add1(0, 0) -> 17 mark1(17) -> 6 dbl1(0) -> 18 mark1(18) -> 7 first1(0, 0) -> 19 mark1(19) -> 8 half1(0) -> 20 mark1(20) -> 9 01() -> 21 ok1(21) -> 10 nil1() -> 22 ok1(22) -> 10 terms1(0) -> 23 ok1(23) -> 1 cons1(0, 0) -> 24 ok1(24) -> 2 recip1(0) -> 25 ok1(25) -> 3 sqr1(0) -> 26 ok1(26) -> 4 s1(0) -> 27 ok1(27) -> 5 add1(0, 0) -> 28 ok1(28) -> 6 dbl1(0) -> 29 ok1(29) -> 7 first1(0, 0) -> 30 ok1(30) -> 8 half1(0) -> 31 ok1(31) -> 9 proper1(0) -> 32 top1(32) -> 11 active1(0) -> 33 top1(33) -> 11 mark1(12) -> 12 mark1(12) -> 23 mark1(13) -> 13 mark1(13) -> 24 mark1(14) -> 14 mark1(14) -> 25 mark1(15) -> 15 mark1(15) -> 26 mark1(16) -> 16 mark1(16) -> 27 mark1(17) -> 17 mark1(17) -> 28 mark1(18) -> 18 mark1(18) -> 29 mark1(19) -> 19 mark1(19) -> 30 mark1(20) -> 20 mark1(20) -> 31 ok1(21) -> 32 ok1(22) -> 32 ok1(23) -> 12 ok1(23) -> 23 ok1(24) -> 13 ok1(24) -> 24 ok1(25) -> 14 ok1(25) -> 25 ok1(26) -> 15 ok1(26) -> 26 ok1(27) -> 16 ok1(27) -> 27 ok1(28) -> 17 ok1(28) -> 28 ok1(29) -> 18 ok1(29) -> 29 ok1(30) -> 19 ok1(30) -> 30 ok1(31) -> 20 ok1(31) -> 31 active2(21) -> 34 top2(34) -> 11 active2(22) -> 34 ---------------------------------------- (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(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(half(0)) -> mark(0) active(half(s(0))) -> mark(0) active(half(s(s(X)))) -> mark(s(half(X))) active(half(dbl(X))) -> mark(X) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(s(X)) -> s(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(half(X)) -> half(active(X)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) proper(half(X)) -> half(proper(X)) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) 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 terms(ok(X)) ->^+ ok(terms(X)) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [X / ok(X)]. 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(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(half(0)) -> mark(0) active(half(s(0))) -> mark(0) active(half(s(s(X)))) -> mark(s(half(X))) active(half(dbl(X))) -> mark(X) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(s(X)) -> s(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(half(X)) -> half(active(X)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) proper(half(X)) -> half(proper(X)) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) 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(terms(N)) -> mark(cons(recip(sqr(N)), terms(s(N)))) active(sqr(0)) -> mark(0) active(sqr(s(X))) -> mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) -> mark(0) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(0, X)) -> mark(X) active(add(s(X), Y)) -> mark(s(add(X, Y))) active(first(0, X)) -> mark(nil) active(first(s(X), cons(Y, Z))) -> mark(cons(Y, first(X, Z))) active(half(0)) -> mark(0) active(half(s(0))) -> mark(0) active(half(s(s(X)))) -> mark(s(half(X))) active(half(dbl(X))) -> mark(X) active(terms(X)) -> terms(active(X)) active(cons(X1, X2)) -> cons(active(X1), X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(s(X)) -> s(active(X)) active(add(X1, X2)) -> add(active(X1), X2) active(add(X1, X2)) -> add(X1, active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1, X2)) -> first(active(X1), X2) active(first(X1, X2)) -> first(X1, active(X2)) active(half(X)) -> half(active(X)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1), X2) -> mark(cons(X1, X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) s(mark(X)) -> mark(s(X)) add(mark(X1), X2) -> mark(add(X1, X2)) add(X1, mark(X2)) -> mark(add(X1, X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1), X2) -> mark(first(X1, X2)) first(X1, mark(X2)) -> mark(first(X1, X2)) half(mark(X)) -> mark(half(X)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(0) -> ok(0) proper(add(X1, X2)) -> add(proper(X1), proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1, X2)) -> first(proper(X1), proper(X2)) proper(nil) -> ok(nil) proper(half(X)) -> half(proper(X)) terms(ok(X)) -> ok(terms(X)) cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1), ok(X2)) -> ok(add(X1, X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1), ok(X2)) -> ok(first(X1, X2)) half(ok(X)) -> ok(half(X)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) S is empty. Rewrite Strategy: FULL