WORST_CASE(?,O(n^1)) proof of input_78HIzt01SV.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxTRS (11) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (12) CpxTRS (13) CpxTrsMatchBoundsTAProof [FINISHED, 26 ms] (14) BOUNDS(1, n^1) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: merge(nil, y) -> y merge(x, nil) -> x merge(.(x, y), .(u, v)) -> if(<(x, u), .(x, merge(y, .(u, v))), .(u, merge(.(x, y), v))) ++(nil, y) -> y ++(.(x, y), z) -> .(x, ++(y, z)) if(true, x, y) -> x if(false, x, y) -> x S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: merge(nil, z0) -> z0 merge(z0, nil) -> z0 merge(.(z0, z1), .(z2, z3)) -> if(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))) ++(nil, z0) -> z0 ++(.(z0, z1), z2) -> .(z0, ++(z1, z2)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z0 Tuples: MERGE(nil, z0) -> c MERGE(z0, nil) -> c1 MERGE(.(z0, z1), .(z2, z3)) -> c2(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(.(z0, z1), z3)) ++'(nil, z0) -> c4 ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) IF(true, z0, z1) -> c6 IF(false, z0, z1) -> c7 S tuples: MERGE(nil, z0) -> c MERGE(z0, nil) -> c1 MERGE(.(z0, z1), .(z2, z3)) -> c2(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(.(z0, z1), z3)) ++'(nil, z0) -> c4 ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) IF(true, z0, z1) -> c6 IF(false, z0, z1) -> c7 K tuples:none Defined Rule Symbols: merge_2, ++_2, if_3 Defined Pair Symbols: MERGE_2, ++'_2, IF_3 Compound Symbols: c, c1, c2_2, c3_2, c4, c5_1, c6, c7 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 5 trailing nodes: ++'(nil, z0) -> c4 IF(true, z0, z1) -> c6 MERGE(z0, nil) -> c1 IF(false, z0, z1) -> c7 MERGE(nil, z0) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: merge(nil, z0) -> z0 merge(z0, nil) -> z0 merge(.(z0, z1), .(z2, z3)) -> if(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))) ++(nil, z0) -> z0 ++(.(z0, z1), z2) -> .(z0, ++(z1, z2)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z0 Tuples: MERGE(.(z0, z1), .(z2, z3)) -> c2(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(.(z0, z1), z3)) ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) S tuples: MERGE(.(z0, z1), .(z2, z3)) -> c2(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(IF(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))), MERGE(.(z0, z1), z3)) ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) K tuples:none Defined Rule Symbols: merge_2, ++_2, if_3 Defined Pair Symbols: MERGE_2, ++'_2 Compound Symbols: c2_2, c3_2, c5_1 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: merge(nil, z0) -> z0 merge(z0, nil) -> z0 merge(.(z0, z1), .(z2, z3)) -> if(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))) ++(nil, z0) -> z0 ++(.(z0, z1), z2) -> .(z0, ++(z1, z2)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z0 Tuples: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) S tuples: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) K tuples:none Defined Rule Symbols: merge_2, ++_2, if_3 Defined Pair Symbols: ++'_2, MERGE_2 Compound Symbols: c5_1, c2_1, c3_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: merge(nil, z0) -> z0 merge(z0, nil) -> z0 merge(.(z0, z1), .(z2, z3)) -> if(<(z0, z2), .(z0, merge(z1, .(z2, z3))), .(z2, merge(.(z0, z1), z3))) ++(nil, z0) -> z0 ++(.(z0, z1), z2) -> .(z0, ++(z1, z2)) if(true, z0, z1) -> z0 if(false, z0, z1) -> z0 ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) S tuples: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: ++'_2, MERGE_2 Compound Symbols: c5_1, c2_1, c3_1 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) 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: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (12) 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: ++'(.(z0, z1), z2) -> c5(++'(z1, z2)) MERGE(.(z0, z1), .(z2, z3)) -> c2(MERGE(z1, .(z2, z3))) MERGE(.(z0, z1), .(z2, z3)) -> c3(MERGE(.(z0, z1), z3)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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 1. The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by: final states : [1, 2] transitions: .0(0, 0) -> 0 c50(0) -> 0 c20(0) -> 0 c30(0) -> 0 ++'0(0, 0) -> 1 MERGE0(0, 0) -> 2 ++'1(0, 0) -> 3 c51(3) -> 1 .1(0, 0) -> 5 MERGE1(0, 5) -> 4 c21(4) -> 2 .1(0, 0) -> 7 MERGE1(7, 0) -> 6 c31(6) -> 2 c51(3) -> 3 c21(4) -> 4 c21(4) -> 6 c31(6) -> 4 c31(6) -> 6 ---------------------------------------- (14) BOUNDS(1, n^1)