/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) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (4) CdtProblem (5) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (6) CdtProblem (7) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 1 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 48 ms] (12) CdtProblem (13) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 6 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 (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: perfectp(0) -> false perfectp(s(x)) -> f(x, s(0), s(x), s(x)) f(0, y, 0, u) -> true f(0, y, s(z), u) -> false f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u) f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS does not nest defined symbols, we have rc = irc. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: perfectp(0) -> false perfectp(s(x)) -> f(x, s(0), s(x), s(x)) f(0, y, 0, u) -> true f(0, y, s(z), u) -> false f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u) f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (3) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: perfectp(0) -> false perfectp(s(z0)) -> f(z0, s(0), s(z0), s(z0)) f(0, z0, 0, z1) -> true f(0, z0, s(z1), z2) -> false f(s(z0), 0, z1, z2) -> f(z0, z2, minus(z1, s(z0)), z2) f(s(z0), s(z1), z2, z3) -> if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3)) Tuples: PERFECTP(0) -> c PERFECTP(s(z0)) -> c1(F(z0, s(0), s(z0), s(z0))) F(0, z0, 0, z1) -> c2 F(0, z0, s(z1), z2) -> c3 F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3)) S tuples: PERFECTP(0) -> c PERFECTP(s(z0)) -> c1(F(z0, s(0), s(z0), s(z0))) F(0, z0, 0, z1) -> c2 F(0, z0, s(z1), z2) -> c3 F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3)) K tuples:none Defined Rule Symbols: perfectp_1, f_4 Defined Pair Symbols: PERFECTP_1, F_4 Compound Symbols: c, c1_1, c2, c3, c4_1, c5_2 ---------------------------------------- (5) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: PERFECTP(s(z0)) -> c1(F(z0, s(0), s(z0), s(z0))) Removed 3 trailing nodes: F(0, z0, s(z1), z2) -> c3 PERFECTP(0) -> c F(0, z0, 0, z1) -> c2 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: perfectp(0) -> false perfectp(s(z0)) -> f(z0, s(0), s(z0), s(z0)) f(0, z0, 0, z1) -> true f(0, z0, s(z1), z2) -> false f(s(z0), 0, z1, z2) -> f(z0, z2, minus(z1, s(z0)), z2) f(s(z0), s(z1), z2, z3) -> if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3)) Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3)) S tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(s(z0), minus(z1, z0), z2, z3), F(z0, z3, z2, z3)) K tuples:none Defined Rule Symbols: perfectp_1, f_4 Defined Pair Symbols: F_4 Compound Symbols: c4_1, c5_2 ---------------------------------------- (7) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: perfectp(0) -> false perfectp(s(z0)) -> f(z0, s(0), s(z0), s(z0)) f(0, z0, 0, z1) -> true f(0, z0, s(z1), z2) -> false f(s(z0), 0, z1, z2) -> f(z0, z2, minus(z1, s(z0)), z2) f(s(z0), s(z1), z2, z3) -> if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3)) Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) S tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) K tuples:none Defined Rule Symbols: perfectp_1, f_4 Defined Pair Symbols: F_4 Compound Symbols: c4_1, c5_1 ---------------------------------------- (9) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: perfectp(0) -> false perfectp(s(z0)) -> f(z0, s(0), s(z0), s(z0)) f(0, z0, 0, z1) -> true f(0, z0, s(z1), z2) -> false f(s(z0), 0, z1, z2) -> f(z0, z2, minus(z1, s(z0)), z2) f(s(z0), s(z1), z2, z3) -> if(le(z0, z1), f(s(z0), minus(z1, z0), z2, z3), f(z0, z3, z2, z3)) ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) S tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_4 Compound Symbols: c4_1, c5_1 ---------------------------------------- (11) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) We considered the (Usable) Rules:none And the Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(F(x_1, x_2, x_3, x_4)) = x_1 + x_3 POL(c4(x_1)) = x_1 POL(c5(x_1)) = x_1 POL(minus(x_1, x_2)) = [1] POL(s(x_1)) = [1] + x_1 ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) S tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) K tuples: F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) Defined Rule Symbols:none Defined Pair Symbols: F_4 Compound Symbols: c4_1, c5_1 ---------------------------------------- (13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) We considered the (Usable) Rules:none And the Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(F(x_1, x_2, x_3, x_4)) = [3]x_1 + x_3 POL(c4(x_1)) = x_1 POL(c5(x_1)) = x_1 POL(minus(x_1, x_2)) = [1] + x_1 POL(s(x_1)) = [3] + x_1 ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) S tuples:none K tuples: F(s(z0), s(z1), z2, z3) -> c5(F(z0, z3, z2, z3)) F(s(z0), 0, z1, z2) -> c4(F(z0, z2, minus(z1, s(z0)), z2)) Defined Rule Symbols:none Defined Pair Symbols: F_4 Compound Symbols: c4_1, c5_1 ---------------------------------------- (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 (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: perfectp(0) -> false perfectp(s(x)) -> f(x, s(0), s(x), s(x)) f(0, y, 0, u) -> true f(0, y, s(z), u) -> false f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u) f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (19) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence f(s(s(x1_0)), s(y), z, s(y2_0)) ->^+ if(le(s(x1_0), y), f(s(s(x1_0)), minus(y, s(x1_0)), z, s(y2_0)), if(le(x1_0, y2_0), f(s(x1_0), minus(y2_0, x1_0), z, s(y2_0)), f(x1_0, s(y2_0), z, s(y2_0)))) gives rise to a decreasing loop by considering the right hand sides subterm at position [2,2]. The pumping substitution is [x1_0 / s(s(x1_0))]. The result substitution is [y / y2_0]. ---------------------------------------- (20) Complex Obligation (BEST) ---------------------------------------- (21) 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: perfectp(0) -> false perfectp(s(x)) -> f(x, s(0), s(x), s(x)) f(0, y, 0, u) -> true f(0, y, s(z), u) -> false f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u) f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) S is empty. Rewrite Strategy: FULL ---------------------------------------- (22) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (23) BOUNDS(n^1, INF) ---------------------------------------- (24) 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: perfectp(0) -> false perfectp(s(x)) -> f(x, s(0), s(x), s(x)) f(0, y, 0, u) -> true f(0, y, s(z), u) -> false f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u) f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u)) S is empty. Rewrite Strategy: FULL