/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 (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) NestedDefinedSymbolProof [UPPER BOUND(ID), 0 ms] (2) CpxTRS (3) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTRS (5) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (6) CdtProblem (7) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CdtProblem (11) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 38 ms] (12) CdtProblem (13) SIsEmptyProof [BOTH BOUNDS(ID, ID), 0 ms] (14) BOUNDS(1, 1) (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (16) TRS for Loop Detection (17) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) 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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) mem(x, max(x)) -> not(null(x)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) NestedDefinedSymbolProof (UPPER BOUND(ID)) The TRS does not nest defined symbols. Hence, the left-hand sides of the following rules are not basic-reachable and can be removed: mem(x, max(x)) -> not(null(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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: FULL ---------------------------------------- (3) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. As the TRS does not nest defined symbols, we have rc = irc. ---------------------------------------- (4) 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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, nil) -> g(nil, z0) f(z0, g(z1, z2)) -> g(f(z0, z1), z2) ++(z0, nil) -> z0 ++(z0, g(z1, z2)) -> g(++(z0, z1), z2) null(nil) -> true null(g(z0, z1)) -> false mem(nil, z0) -> false mem(g(z0, z1), z2) -> or(=(z1, z2), mem(z0, z2)) max(g(g(nil, z0), z1)) -> max'(z0, z1) max(g(g(g(z0, z1), z2), u)) -> max'(max(g(g(z0, z1), z2)), u) Tuples: F(z0, nil) -> c F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, nil) -> c2 ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) NULL(nil) -> c4 NULL(g(z0, z1)) -> c5 MEM(nil, z0) -> c6 MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(nil, z0), z1)) -> c8 MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) S tuples: F(z0, nil) -> c F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, nil) -> c2 ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) NULL(nil) -> c4 NULL(g(z0, z1)) -> c5 MEM(nil, z0) -> c6 MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(nil, z0), z1)) -> c8 MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) K tuples:none Defined Rule Symbols: f_2, ++_2, null_1, mem_2, max_1 Defined Pair Symbols: F_2, ++'_2, NULL_1, MEM_2, MAX_1 Compound Symbols: c, c1_1, c2, c3_1, c4, c5, c6, c7_1, c8, c9_1 ---------------------------------------- (7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing nodes: MAX(g(g(nil, z0), z1)) -> c8 MEM(nil, z0) -> c6 NULL(g(z0, z1)) -> c5 ++'(z0, nil) -> c2 F(z0, nil) -> c NULL(nil) -> c4 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: f(z0, nil) -> g(nil, z0) f(z0, g(z1, z2)) -> g(f(z0, z1), z2) ++(z0, nil) -> z0 ++(z0, g(z1, z2)) -> g(++(z0, z1), z2) null(nil) -> true null(g(z0, z1)) -> false mem(nil, z0) -> false mem(g(z0, z1), z2) -> or(=(z1, z2), mem(z0, z2)) max(g(g(nil, z0), z1)) -> max'(z0, z1) max(g(g(g(z0, z1), z2), u)) -> max'(max(g(g(z0, z1), z2)), u) Tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) S tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) K tuples:none Defined Rule Symbols: f_2, ++_2, null_1, mem_2, max_1 Defined Pair Symbols: F_2, ++'_2, MEM_2, MAX_1 Compound Symbols: c1_1, c3_1, c7_1, c9_1 ---------------------------------------- (9) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: f(z0, nil) -> g(nil, z0) f(z0, g(z1, z2)) -> g(f(z0, z1), z2) ++(z0, nil) -> z0 ++(z0, g(z1, z2)) -> g(++(z0, z1), z2) null(nil) -> true null(g(z0, z1)) -> false mem(nil, z0) -> false mem(g(z0, z1), z2) -> or(=(z1, z2), mem(z0, z2)) max(g(g(nil, z0), z1)) -> max'(z0, z1) max(g(g(g(z0, z1), z2), u)) -> max'(max(g(g(z0, z1), z2)), u) ---------------------------------------- (10) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) S tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: F_2, ++'_2, MEM_2, MAX_1 Compound Symbols: c1_1, c3_1, c7_1, c9_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(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) We considered the (Usable) Rules:none And the Tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(++'(x_1, x_2)) = x_2 POL(F(x_1, x_2)) = x_2 POL(MAX(x_1)) = x_1 POL(MEM(x_1, x_2)) = x_1 POL(c1(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c9(x_1)) = x_1 POL(g(x_1, x_2)) = [1] + x_1 + x_2 POL(u) = [1] ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) S tuples:none K tuples: F(z0, g(z1, z2)) -> c1(F(z0, z1)) ++'(z0, g(z1, z2)) -> c3(++'(z0, z1)) MEM(g(z0, z1), z2) -> c7(MEM(z0, z2)) MAX(g(g(g(z0, z1), z2), u)) -> c9(MAX(g(g(z0, z1), z2))) Defined Rule Symbols:none Defined Pair Symbols: F_2, ++'_2, MEM_2, MAX_1 Compound Symbols: c1_1, c3_1, c7_1, c9_1 ---------------------------------------- (13) SIsEmptyProof (BOTH BOUNDS(ID, ID)) The set S is empty ---------------------------------------- (14) BOUNDS(1, 1) ---------------------------------------- (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (16) 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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) mem(x, max(x)) -> not(null(x)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: FULL ---------------------------------------- (17) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence ++(x, g(y, z)) ->^+ g(++(x, y), z) gives rise to a decreasing loop by considering the right hand sides subterm at position [0]. The pumping substitution is [y / g(y, z)]. The result substitution is [ ]. ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) 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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) mem(x, max(x)) -> not(null(x)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: FULL ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) 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: f(x, nil) -> g(nil, x) f(x, g(y, z)) -> g(f(x, y), z) ++(x, nil) -> x ++(x, g(y, z)) -> g(++(x, y), z) null(nil) -> true null(g(x, y)) -> false mem(nil, y) -> false mem(g(x, y), z) -> or(=(y, z), mem(x, z)) mem(x, max(x)) -> not(null(x)) max(g(g(nil, x), y)) -> max'(x, y) max(g(g(g(x, y), z), u)) -> max'(max(g(g(x, y), z)), u) S is empty. Rewrite Strategy: FULL