/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxRelTRS (1) STerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 175 ms] (2) CpxRelTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 54 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 13 ms] (12) CdtProblem (13) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 0 ms] (14) CdtProblem (15) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (16) BOUNDS(1, 1) (17) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (18) TRS for Loop Detection (19) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (20) BEST (21) proven lower bound (22) LowerBoundPropagationProof [FINISHED, 0 ms] (23) BOUNDS(n^1, INF) (24) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (1) STerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Nil, z0) -> z0 goal(z0, z1) -> merge(z0, z1) Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) <='(0, z0) -> c1 <='(S(z0), 0) -> c2 MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 GOAL(z0, z1) -> c8(MERGE(z0, z1)) S tuples: MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 GOAL(z0, z1) -> c8(MERGE(z0, z1)) K tuples:none Defined Rule Symbols: merge_2, goal_2, <=_2, merge[Ite]_3 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2, GOAL_2 Compound Symbols: c_1, c1, c2, c3_1, c4_1, c5, c6_2, c7, c8_1 ---------------------------------------- (5) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0, z1) -> c8(MERGE(z0, z1)) Removed 2 trailing nodes: <='(S(z0), 0) -> c2 <='(0, z0) -> c1 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Nil, z0) -> z0 goal(z0, z1) -> merge(z0, z1) Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 S tuples: MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 K tuples:none Defined Rule Symbols: merge_2, goal_2, <=_2, merge[Ite]_3 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2 Compound Symbols: c_1, c3_1, c4_1, c5, c6_2, c7 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: merge[Ite](False, z0, Cons(z1, z2)) -> Cons(z1, merge(z0, z2)) merge[Ite](True, Cons(z0, z1), z2) -> Cons(z0, merge(z1, z2)) merge(Cons(z0, z1), Nil) -> Cons(z0, z1) merge(Cons(z0, z1), Cons(z2, z3)) -> merge[Ite](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)) merge(Nil, z0) -> z0 goal(z0, z1) -> merge(z0, z1) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 S tuples: MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 K tuples:none Defined Rule Symbols: <=_2 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2 Compound Symbols: c_1, c3_1, c4_1, c5, c6_2, c7 ---------------------------------------- (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. MERGE(Nil, z0) -> c7 We considered the (Usable) Rules: <=(0, z0) -> True <=(S(z0), S(z1)) -> <=(z0, z1) <=(S(z0), 0) -> False And the Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<=(x_1, x_2)) = 0 POL(<='(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = x_1 + x_2 POL(False) = 0 POL(MERGE(x_1, x_2)) = x_1 POL(MERGE[ITE](x_1, x_2, x_3)) = x_1 + x_2 POL(Nil) = [1] POL(S(x_1)) = [1] + x_1 POL(True) = 0 POL(c(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c5) = 0 POL(c6(x_1, x_2)) = x_1 + x_2 POL(c7) = 0 ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 S tuples: MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) K tuples: MERGE(Nil, z0) -> c7 Defined Rule Symbols: <=_2 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2 Compound Symbols: c_1, c3_1, c4_1, c5, c6_2, c7 ---------------------------------------- (11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. MERGE(Cons(z0, z1), Nil) -> c5 We considered the (Usable) Rules: <=(0, z0) -> True <=(S(z0), S(z1)) -> <=(z0, z1) <=(S(z0), 0) -> False And the Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<=(x_1, x_2)) = [1] POL(<='(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] + x_1 + x_2 POL(False) = [1] POL(MERGE(x_1, x_2)) = [1] + x_1 POL(MERGE[ITE](x_1, x_2, x_3)) = x_1 + x_2 POL(Nil) = [1] POL(S(x_1)) = [1] + x_1 POL(True) = [1] POL(c(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c5) = 0 POL(c6(x_1, x_2)) = x_1 + x_2 POL(c7) = 0 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 S tuples: MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) K tuples: MERGE(Nil, z0) -> c7 MERGE(Cons(z0, z1), Nil) -> c5 Defined Rule Symbols: <=_2 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2 Compound Symbols: c_1, c3_1, c4_1, c5, c6_2, c7 ---------------------------------------- (13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) We considered the (Usable) Rules:none And the Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [3] POL(<=(x_1, x_2)) = [3] POL(<='(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [2] + x_2 POL(False) = [3] POL(MERGE(x_1, x_2)) = [1] + [2]x_1 + x_2 POL(MERGE[ITE](x_1, x_2, x_3)) = [2]x_2 + x_3 POL(Nil) = 0 POL(S(x_1)) = [3] + x_1 POL(True) = [3] POL(c(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c5) = 0 POL(c6(x_1, x_2)) = x_1 + x_2 POL(c7) = 0 ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: <=(S(z0), S(z1)) -> <=(z0, z1) <=(0, z0) -> True <=(S(z0), 0) -> False Tuples: <='(S(z0), S(z1)) -> c(<='(z0, z1)) MERGE[ITE](False, z0, Cons(z1, z2)) -> c3(MERGE(z0, z2)) MERGE[ITE](True, Cons(z0, z1), z2) -> c4(MERGE(z1, z2)) MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) MERGE(Nil, z0) -> c7 S tuples:none K tuples: MERGE(Nil, z0) -> c7 MERGE(Cons(z0, z1), Nil) -> c5 MERGE(Cons(z0, z1), Cons(z2, z3)) -> c6(MERGE[ITE](<=(z0, z2), Cons(z0, z1), Cons(z2, z3)), <='(z0, z2)) Defined Rule Symbols: <=_2 Defined Pair Symbols: <='_2, MERGE[ITE]_3, MERGE_2 Compound Symbols: c_1, c3_1, c4_1, c5, c6_2, c7 ---------------------------------------- (15) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (16) BOUNDS(1, 1) ---------------------------------------- (17) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (19) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence merge(Cons(0, xs'), Cons(x, xs)) ->^+ Cons(0, merge(xs', Cons(x, xs))) gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. The pumping substitution is [xs' / Cons(0, xs')]. The result substitution is [ ]. ---------------------------------------- (20) Complex Obligation (BEST) ---------------------------------------- (21) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (22) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (23) BOUNDS(n^1, INF) ---------------------------------------- (24) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST