/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), 8 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) CpxTrsMatchBoundsTAProof [FINISHED, 76 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(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)) 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)) 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) 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)) 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(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)) 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)) ---------------------------------------- (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)) 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)) 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)) 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)) 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] 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 proper0(0) -> 9 top0(0) -> 10 terms1(0) -> 11 mark1(11) -> 1 cons1(0, 0) -> 12 mark1(12) -> 2 recip1(0) -> 13 mark1(13) -> 3 sqr1(0) -> 14 mark1(14) -> 4 s1(0) -> 15 mark1(15) -> 5 add1(0, 0) -> 16 mark1(16) -> 6 dbl1(0) -> 17 mark1(17) -> 7 first1(0, 0) -> 18 mark1(18) -> 8 01() -> 19 ok1(19) -> 9 nil1() -> 20 ok1(20) -> 9 terms1(0) -> 21 ok1(21) -> 1 cons1(0, 0) -> 22 ok1(22) -> 2 recip1(0) -> 23 ok1(23) -> 3 sqr1(0) -> 24 ok1(24) -> 4 s1(0) -> 25 ok1(25) -> 5 add1(0, 0) -> 26 ok1(26) -> 6 dbl1(0) -> 27 ok1(27) -> 7 first1(0, 0) -> 28 ok1(28) -> 8 proper1(0) -> 29 top1(29) -> 10 active1(0) -> 30 top1(30) -> 10 mark1(11) -> 11 mark1(11) -> 21 mark1(12) -> 12 mark1(12) -> 22 mark1(13) -> 13 mark1(13) -> 23 mark1(14) -> 14 mark1(14) -> 24 mark1(15) -> 15 mark1(15) -> 25 mark1(16) -> 16 mark1(16) -> 26 mark1(17) -> 17 mark1(17) -> 27 mark1(18) -> 18 mark1(18) -> 28 ok1(19) -> 29 ok1(20) -> 29 ok1(21) -> 11 ok1(21) -> 21 ok1(22) -> 12 ok1(22) -> 22 ok1(23) -> 13 ok1(23) -> 23 ok1(24) -> 14 ok1(24) -> 24 ok1(25) -> 15 ok1(25) -> 25 ok1(26) -> 16 ok1(26) -> 26 ok1(27) -> 17 ok1(27) -> 27 ok1(28) -> 18 ok1(28) -> 28 active2(19) -> 31 top2(31) -> 10 active2(20) -> 31 ---------------------------------------- (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(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)) 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)) 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) 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)) 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(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)) 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)) 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) 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)) 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(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)) 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)) 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) 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)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) S is empty. Rewrite Strategy: FULL