/export/starexec/sandbox/solver/bin/starexec_run_rcdcRelativeAlsoLower /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(?, O(n^2)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(1, n^2). (0) DCpxTrs (1) DerivationalComplexityToRuntimeComplexityProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxRelTRS (3) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 154 ms] (4) CpxRelTRS (5) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (6) CdtProblem (7) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CdtProblem (11) CdtGraphSplitRhsProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (14) CdtProblem (15) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CdtProblem (17) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CdtProblem (19) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CdtProblem (21) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 3731 ms] (22) CdtProblem (23) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (24) BOUNDS(1, 1) ---------------------------------------- (0) Obligation: The Derivational Complexity (innermost) of the given DCpxTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: f(f(a, f(x, a)), a) -> f(a, f(f(x, a), a)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) DerivationalComplexityToRuntimeComplexityProof (BOTH BOUNDS(ID, ID)) The following rules have been added to S to convert the given derivational complexity problem to a runtime complexity problem: encArg(a) -> a encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: f(f(a, f(x, a)), a) -> f(a, f(f(x, a), a)) The (relative) TRS S consists of the following rules: encArg(a) -> a encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a Rewrite Strategy: INNERMOST ---------------------------------------- (3) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (4) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: f(f(a, f(x, a)), a) -> f(a, f(f(x, a), a)) The (relative) TRS S consists of the following rules: encArg(a) -> a encArg(cons_f(x_1, x_2)) -> f(encArg(x_1), encArg(x_2)) encode_f(x_1, x_2) -> f(encArg(x_1), encArg(x_2)) encode_a -> a Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(a) -> c ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_A -> c3 F(f(a, f(z0, a)), a) -> c4(F(a, f(f(z0, a), a)), F(f(z0, a), a), F(z0, a)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(a, f(f(z0, a), a)), F(f(z0, a), a), F(z0, a)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_a Defined Pair Symbols: ENCARG_1, ENCODE_F_2, ENCODE_A, F_2 Compound Symbols: c, c1_3, c2_3, c3, c4_3 ---------------------------------------- (7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: ENCARG(a) -> c ENCODE_A -> c3 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(f(a, f(z0, a)), a) -> c4(F(a, f(f(z0, a), a)), F(f(z0, a), a), F(z0, a)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(a, f(f(z0, a), a)), F(f(z0, a), a), F(z0, a)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_a Defined Pair Symbols: ENCARG_1, ENCODE_F_2, F_2 Compound Symbols: c1_3, c2_3, c4_3 ---------------------------------------- (9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) ENCODE_F(z0, z1) -> c2(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(f(a, f(z0, a)), a) -> c4(F(z0, a)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_a Defined Pair Symbols: ENCARG_1, ENCODE_F_2, F_2 Compound Symbols: c1_3, c2_3, c4_1 ---------------------------------------- (11) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID)) Split RHS of tuples not part of any SCC ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCODE_F(z0, z1) -> c(ENCARG(z0)) ENCODE_F(z0, z1) -> c(ENCARG(z1)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_a Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_3, c4_1, c_1 ---------------------------------------- (13) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 2 leading nodes: ENCODE_F(z0, z1) -> c(ENCARG(z0)) ENCODE_F(z0, z1) -> c(ENCARG(z1)) ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: f_2, encArg_1, encode_f_2, encode_a Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_3, c4_1, c_1 ---------------------------------------- (15) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: encode_f(z0, z1) -> f(encArg(z0), encArg(z1)) encode_a -> a ---------------------------------------- (16) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: ENCARG_1, F_2, ENCODE_F_2 Compound Symbols: c1_3, c4_1, c_1 ---------------------------------------- (17) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace ENCARG(cons_f(z0, z1)) -> c1(F(encArg(z0), encArg(z1)), ENCARG(z0), ENCARG(z1)) by ENCARG(cons_f(x0, a)) -> c1(F(encArg(x0), a), ENCARG(x0), ENCARG(a)) ENCARG(cons_f(x0, cons_f(z0, z1))) -> c1(F(encArg(x0), f(encArg(z0), encArg(z1))), ENCARG(x0), ENCARG(cons_f(z0, z1))) ENCARG(cons_f(a, x1)) -> c1(F(a, encArg(x1)), ENCARG(a), ENCARG(x1)) ENCARG(cons_f(cons_f(z0, z1), x1)) -> c1(F(f(encArg(z0), encArg(z1)), encArg(x1)), ENCARG(cons_f(z0, z1)), ENCARG(x1)) ---------------------------------------- (18) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCARG(cons_f(x0, a)) -> c1(F(encArg(x0), a), ENCARG(x0), ENCARG(a)) ENCARG(cons_f(x0, cons_f(z0, z1))) -> c1(F(encArg(x0), f(encArg(z0), encArg(z1))), ENCARG(x0), ENCARG(cons_f(z0, z1))) ENCARG(cons_f(a, x1)) -> c1(F(a, encArg(x1)), ENCARG(a), ENCARG(x1)) ENCARG(cons_f(cons_f(z0, z1), x1)) -> c1(F(f(encArg(z0), encArg(z1)), encArg(x1)), ENCARG(cons_f(z0, z1)), ENCARG(x1)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: F_2, ENCODE_F_2, ENCARG_1 Compound Symbols: c4_1, c_1, c1_3 ---------------------------------------- (19) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing tuple parts ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCARG(cons_f(x0, cons_f(z0, z1))) -> c1(F(encArg(x0), f(encArg(z0), encArg(z1))), ENCARG(x0), ENCARG(cons_f(z0, z1))) ENCARG(cons_f(cons_f(z0, z1), x1)) -> c1(F(f(encArg(z0), encArg(z1)), encArg(x1)), ENCARG(cons_f(z0, z1)), ENCARG(x1)) ENCARG(cons_f(x0, a)) -> c1(F(encArg(x0), a), ENCARG(x0)) ENCARG(cons_f(a, x1)) -> c1(ENCARG(x1)) S tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) K tuples:none Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: F_2, ENCODE_F_2, ENCARG_1 Compound Symbols: c4_1, c_1, c1_3, c1_2, c1_1 ---------------------------------------- (21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. F(f(a, f(z0, a)), a) -> c4(F(z0, a)) We considered the (Usable) Rules: f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) And the Tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCARG(cons_f(x0, cons_f(z0, z1))) -> c1(F(encArg(x0), f(encArg(z0), encArg(z1))), ENCARG(x0), ENCARG(cons_f(z0, z1))) ENCARG(cons_f(cons_f(z0, z1), x1)) -> c1(F(f(encArg(z0), encArg(z1)), encArg(x1)), ENCARG(cons_f(z0, z1)), ENCARG(x1)) ENCARG(cons_f(x0, a)) -> c1(F(encArg(x0), a), ENCARG(x0)) ENCARG(cons_f(a, x1)) -> c1(ENCARG(x1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(ENCARG(x_1)) = x_1^2 POL(ENCODE_F(x_1, x_2)) = [2] + [2]x_1 + [2]x_2 + x_2^2 + [2]x_1*x_2 + [2]x_1^2 POL(F(x_1, x_2)) = [2]x_1 + [2]x_1*x_2 POL(a) = 0 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c1(x_1, x_2)) = x_1 + x_2 POL(c1(x_1, x_2, x_3)) = x_1 + x_2 + x_3 POL(c4(x_1)) = x_1 POL(cons_f(x_1, x_2)) = [2] + x_1 + x_2 POL(encArg(x_1)) = x_1 POL(f(x_1, x_2)) = [1] + x_1 + x_2 ---------------------------------------- (22) Obligation: Complexity Dependency Tuples Problem Rules: encArg(a) -> a encArg(cons_f(z0, z1)) -> f(encArg(z0), encArg(z1)) f(f(a, f(z0, a)), a) -> f(a, f(f(z0, a), a)) Tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) ENCODE_F(z0, z1) -> c(F(encArg(z0), encArg(z1))) ENCARG(cons_f(x0, cons_f(z0, z1))) -> c1(F(encArg(x0), f(encArg(z0), encArg(z1))), ENCARG(x0), ENCARG(cons_f(z0, z1))) ENCARG(cons_f(cons_f(z0, z1), x1)) -> c1(F(f(encArg(z0), encArg(z1)), encArg(x1)), ENCARG(cons_f(z0, z1)), ENCARG(x1)) ENCARG(cons_f(x0, a)) -> c1(F(encArg(x0), a), ENCARG(x0)) ENCARG(cons_f(a, x1)) -> c1(ENCARG(x1)) S tuples:none K tuples: F(f(a, f(z0, a)), a) -> c4(F(z0, a)) Defined Rule Symbols: encArg_1, f_2 Defined Pair Symbols: F_2, ENCODE_F_2, ENCARG_1 Compound Symbols: c4_1, c_1, c1_3, c1_2, c1_1 ---------------------------------------- (23) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (24) BOUNDS(1, 1)