WORST_CASE(?,O(n^2)) proof of input_mR0HPQBlrn.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^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 1182 ms] (10) BOUNDS(1, n^2) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: cond1(true, x, y, z) -> cond2(gr(y, z), x, y, z) cond2(true, x, y, z) -> cond2(gr(y, z), x, p(y), z) cond2(false, x, y, z) -> cond1(gr(x, z), p(x), y, z) gr(0, x) -> false gr(s(x), 0) -> true gr(s(x), s(y)) -> gr(x, y) p(0) -> 0 p(s(x)) -> x S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: cond1(true, x, y, z) -> cond2(gr(y, z), x, y, z) [1] cond2(true, x, y, z) -> cond2(gr(y, z), x, p(y), z) [1] cond2(false, x, y, z) -> cond1(gr(x, z), p(x), y, z) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: cond1(true, x, y, z) -> cond2(gr(y, z), x, y, z) [1] cond2(true, x, y, z) -> cond2(gr(y, z), x, p(y), z) [1] cond2(false, x, y, z) -> cond1(gr(x, z), p(x), y, z) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> 0:s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> 0:s -> cond1:cond2 gr :: 0:s -> 0:s -> true:false p :: 0:s -> 0:s false :: true:false 0 :: 0:s s :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: cond1(v0, v1, v2, v3) -> null_cond1 [0] And the following fresh constants: null_cond1 ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: cond1(true, x, y, z) -> cond2(gr(y, z), x, y, z) [1] cond2(true, x, y, z) -> cond2(gr(y, z), x, p(y), z) [1] cond2(false, x, y, z) -> cond1(gr(x, z), p(x), y, z) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] cond1(v0, v1, v2, v3) -> null_cond1 [0] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> 0:s -> null_cond1 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> 0:s -> null_cond1 gr :: 0:s -> 0:s -> true:false p :: 0:s -> 0:s false :: true:false 0 :: 0:s s :: 0:s -> 0:s null_cond1 :: null_cond1 Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: true => 1 false => 0 0 => 0 null_cond1 => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: cond1(z', z'', z1, z2) -{ 1 }-> cond2(gr(y, z), x, y, z) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1 cond1(z', z'', z1, z2) -{ 0 }-> 0 :|: z2 = v3, v0 >= 0, z1 = v2, v1 >= 0, z'' = v1, v2 >= 0, v3 >= 0, z' = v0 cond2(z', z'', z1, z2) -{ 1 }-> cond2(gr(y, z), x, p(y), z) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1 cond2(z', z'', z1, z2) -{ 1 }-> cond1(gr(x, z), p(x), y, z) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 0 gr(z', z'') -{ 1 }-> gr(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y gr(z', z'') -{ 1 }-> 1 :|: z'' = 0, z' = 1 + x, x >= 0 gr(z', z'') -{ 1 }-> 0 :|: x >= 0, z'' = x, z' = 0 p(z') -{ 1 }-> x :|: z' = 1 + x, x >= 0 p(z') -{ 1 }-> 0 :|: z' = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V, V1, V6, V2),0,[cond1(V, V1, V6, V2, Out)],[V >= 0,V1 >= 0,V6 >= 0,V2 >= 0]). eq(start(V, V1, V6, V2),0,[cond2(V, V1, V6, V2, Out)],[V >= 0,V1 >= 0,V6 >= 0,V2 >= 0]). eq(start(V, V1, V6, V2),0,[gr(V, V1, Out)],[V >= 0,V1 >= 0]). eq(start(V, V1, V6, V2),0,[p(V, Out)],[V >= 0]). eq(cond1(V, V1, V6, V2, Out),1,[gr(V3, V4, Ret0),cond2(Ret0, V5, V3, V4, Ret)],[Out = Ret,V6 = V3,V4 >= 0,V2 = V4,V5 >= 0,V3 >= 0,V1 = V5,V = 1]). eq(cond2(V, V1, V6, V2, Out),1,[gr(V9, V7, Ret01),p(V9, Ret2),cond2(Ret01, V8, Ret2, V7, Ret1)],[Out = Ret1,V6 = V9,V7 >= 0,V2 = V7,V8 >= 0,V9 >= 0,V1 = V8,V = 1]). eq(cond2(V, V1, V6, V2, Out),1,[gr(V11, V12, Ret02),p(V11, Ret11),cond1(Ret02, Ret11, V10, V12, Ret3)],[Out = Ret3,V6 = V10,V12 >= 0,V2 = V12,V11 >= 0,V10 >= 0,V1 = V11,V = 0]). eq(gr(V, V1, Out),1,[],[Out = 0,V13 >= 0,V1 = V13,V = 0]). eq(gr(V, V1, Out),1,[],[Out = 1,V1 = 0,V = 1 + V14,V14 >= 0]). eq(gr(V, V1, Out),1,[gr(V16, V15, Ret4)],[Out = Ret4,V = 1 + V16,V16 >= 0,V15 >= 0,V1 = 1 + V15]). eq(p(V, Out),1,[],[Out = 0,V = 0]). eq(p(V, Out),1,[],[Out = V17,V = 1 + V17,V17 >= 0]). eq(cond1(V, V1, V6, V2, Out),0,[],[Out = 0,V2 = V20,V19 >= 0,V6 = V21,V18 >= 0,V1 = V18,V21 >= 0,V20 >= 0,V = V19]). input_output_vars(cond1(V,V1,V6,V2,Out),[V,V1,V6,V2],[Out]). input_output_vars(cond2(V,V1,V6,V2,Out),[V,V1,V6,V2],[Out]). input_output_vars(gr(V,V1,Out),[V,V1],[Out]). input_output_vars(p(V,Out),[V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [gr/3] 1. non_recursive : [p/2] 2. recursive : [cond1/5,cond2/5] 3. non_recursive : [start/4] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into gr/3 1. SCC is partially evaluated into p/2 2. SCC is partially evaluated into cond2/5 3. SCC is partially evaluated into start/4 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations gr/3 * CE 8 is refined into CE [14] * CE 7 is refined into CE [15] * CE 6 is refined into CE [16] ### Cost equations --> "Loop" of gr/3 * CEs [15] --> Loop 10 * CEs [16] --> Loop 11 * CEs [14] --> Loop 12 ### Ranking functions of CR gr(V,V1,Out) * RF of phase [12]: [V,V1] #### Partial ranking functions of CR gr(V,V1,Out) * Partial RF of phase [12]: - RF of loop [12:1]: V V1 ### Specialization of cost equations p/2 * CE 13 is refined into CE [17] * CE 12 is refined into CE [18] ### Cost equations --> "Loop" of p/2 * CEs [17] --> Loop 13 * CEs [18] --> Loop 14 ### Ranking functions of CR p(V,Out) #### Partial ranking functions of CR p(V,Out) ### Specialization of cost equations cond2/5 * CE 11 is refined into CE [19,20,21,22] * CE 10 is refined into CE [23,24,25,26,27] * CE 9 is refined into CE [28,29,30,31] ### Cost equations --> "Loop" of cond2/5 * CEs [31] --> Loop 15 * CEs [30] --> Loop 16 * CEs [29] --> Loop 17 * CEs [28] --> Loop 18 * CEs [22] --> Loop 19 * CEs [21] --> Loop 20 * CEs [20] --> Loop 21 * CEs [19] --> Loop 22 * CEs [27] --> Loop 23 * CEs [26] --> Loop 24 * CEs [24] --> Loop 25 * CEs [25] --> Loop 26 * CEs [23] --> Loop 27 ### Ranking functions of CR cond2(V,V1,V6,V2,Out) * RF of phase [19]: [V6-1,V6-V2] * RF of phase [21]: [V6] * RF of phase [24]: [V1-1,V1-V2,V1-V6] * RF of phase [26]: [V1-1,V1-V2] * RF of phase [27]: [V1] #### Partial ranking functions of CR cond2(V,V1,V6,V2,Out) * Partial RF of phase [19]: - RF of loop [19:1]: V6-1 V6-V2 * Partial RF of phase [21]: - RF of loop [21:1]: V6 * Partial RF of phase [24]: - RF of loop [24:1]: V1-1 V1-V2 V1-V6 * Partial RF of phase [26]: - RF of loop [26:1]: V1-1 V1-V2 * Partial RF of phase [27]: - RF of loop [27:1]: V1 ### Specialization of cost equations start/4 * CE 1 is refined into CE [32] * CE 2 is refined into CE [33,34,35,36,37,38,39,40,41,42,43,44,45] * CE 3 is refined into CE [46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64] * CE 4 is refined into CE [65,66,67,68] * CE 5 is refined into CE [69,70] ### Cost equations --> "Loop" of start/4 * CEs [44,62] --> Loop 28 * CEs [41,60] --> Loop 29 * CEs [45,64] --> Loop 30 * CEs [42,63] --> Loop 31 * CEs [39,61] --> Loop 32 * CEs [36,59] --> Loop 33 * CEs [37,58] --> Loop 34 * CEs [34,35,57] --> Loop 35 * CEs [43,56] --> Loop 36 * CEs [40,55] --> Loop 37 * CEs [32,38,54] --> Loop 38 * CEs [33,53,66,67,68,70] --> Loop 39 * CEs [46,47,48,49,50,51,52,65,69] --> Loop 40 ### Ranking functions of CR start(V,V1,V6,V2) #### Partial ranking functions of CR start(V,V1,V6,V2) Computing Bounds ===================================== #### Cost of chains of gr(V,V1,Out): * Chain [[12],11]: 1*it(12)+1 Such that:it(12) =< V with precondition: [Out=0,V>=1,V1>=V] * Chain [[12],10]: 1*it(12)+1 Such that:it(12) =< V1 with precondition: [Out=1,V1>=1,V>=V1+1] * Chain [11]: 1 with precondition: [V=0,Out=0,V1>=0] * Chain [10]: 1 with precondition: [V1=0,Out=1,V>=1] #### Cost of chains of p(V,Out): * Chain [14]: 1 with precondition: [V=0,Out=0] * Chain [13]: 1 with precondition: [V=Out+1,V>=1] #### Cost of chains of cond2(V,V1,V6,V2,Out): * Chain [[27],18]: 5*it(27)+3 Such that:it(27) =< V1 with precondition: [V=0,V6=0,V2=0,Out=0,V1>=1] * Chain [[27],17]: 5*it(27)+3 Such that:it(27) =< V1 with precondition: [V=0,V6=0,V2=0,Out=0,V1>=2] * Chain [[26],16]: 5*it(26)+1*s(1)+1*s(4)+3 Such that:it(26) =< V1-V2 aux(2) =< V2 s(1) =< aux(2) s(4) =< it(26)*aux(2) with precondition: [V=0,V6=0,Out=0,V2>=1,V1>=V2+1] * Chain [[26],15]: 5*it(26)+1*s(4)+1*s(5)+3 Such that:it(26) =< V1-V2 aux(3) =< V2 s(5) =< aux(3) s(4) =< it(26)*aux(3) with precondition: [V=0,V6=0,Out=0,V2>=1,V1>=V2+2] * Chain [[24],16]: 5*it(24)+1*s(1)+1*s(10)+1*s(11)+3 Such that:it(24) =< V1-V2 aux(4) =< V6 aux(6) =< V2 s(1) =< aux(6) s(10) =< it(24)*aux(6) s(11) =< it(24)*aux(4) with precondition: [V=0,Out=0,V6>=1,V2>=V6,V1>=V2+1] * Chain [[24],15]: 5*it(24)+1*s(5)+1*s(10)+1*s(11)+3 Such that:it(24) =< V1-V2 aux(4) =< V6 aux(7) =< V2 s(5) =< aux(7) s(10) =< it(24)*aux(7) s(11) =< it(24)*aux(4) with precondition: [V=0,Out=0,V6>=1,V2>=V6,V1>=V2+2] * Chain [[21],22,[27],18]: 3*it(21)+5*it(27)+6 Such that:it(27) =< V1 it(21) =< V6 with precondition: [V=1,V2=0,Out=0,V1>=1,V6>=1] * Chain [[21],22,[27],17]: 3*it(21)+5*it(27)+6 Such that:it(27) =< V1 it(21) =< V6 with precondition: [V=1,V2=0,Out=0,V1>=2,V6>=1] * Chain [[21],22,18]: 3*it(21)+6 Such that:it(21) =< V6 with precondition: [V=1,V1=0,V2=0,Out=0,V6>=1] * Chain [[21],22,17]: 3*it(21)+6 Such that:it(21) =< V6 with precondition: [V=1,V2=0,Out=0,V1>=1,V6>=1] * Chain [[19],20,[26],16]: 3*it(19)+5*it(26)+2*s(1)+1*s(4)+1*s(15)+6 Such that:it(26) =< V1 it(19) =< V6 aux(9) =< 1 s(1) =< aux(9) s(4) =< it(26)*aux(9) s(15) =< it(19)*aux(9) with precondition: [V=1,V2=1,Out=0,V1>=2,V6>=2] * Chain [[19],20,[26],15]: 3*it(19)+5*it(26)+1*s(4)+2*s(5)+1*s(15)+6 Such that:it(26) =< V1 it(19) =< V6 aux(10) =< 1 s(5) =< aux(10) s(4) =< it(26)*aux(10) s(15) =< it(19)*aux(10) with precondition: [V=1,V2=1,Out=0,V1>=3,V6>=2] * Chain [[19],20,[24],16]: 3*it(19)+5*it(24)+2*s(1)+2*s(10)+1*s(15)+6 Such that:it(24) =< V1-V2 it(19) =< V6-V2 aux(12) =< V2 s(1) =< aux(12) s(10) =< it(24)*aux(12) s(15) =< it(19)*aux(12) with precondition: [V=1,Out=0,V2>=2,V1>=V2+1,V6>=V2+1] * Chain [[19],20,[24],15]: 3*it(19)+5*it(24)+2*s(5)+2*s(10)+1*s(15)+6 Such that:it(24) =< V1-V2 it(19) =< V6-V2 aux(14) =< V2 s(5) =< aux(14) s(10) =< it(24)*aux(14) s(15) =< it(19)*aux(14) with precondition: [V=1,Out=0,V2>=2,V1>=V2+2,V6>=V2+1] * Chain [[19],20,18]: 3*it(19)+1*s(12)+1*s(15)+6 Such that:it(19) =< V6-V2 aux(15) =< V2 s(12) =< aux(15) s(15) =< it(19)*aux(15) with precondition: [V=1,V1=0,Out=0,V2>=1,V6>=V2+1] * Chain [[19],20,16]: 3*it(19)+1*s(1)+1*s(12)+1*s(15)+6 Such that:s(1) =< V1 it(19) =< V6-V2 aux(16) =< V2 s(12) =< aux(16) s(15) =< it(19)*aux(16) with precondition: [V=1,Out=0,V1>=1,V2>=V1,V6>=V2+1] * Chain [[19],20,15]: 3*it(19)+2*s(5)+1*s(15)+6 Such that:it(19) =< V6-V2 aux(17) =< V2 s(5) =< aux(17) s(15) =< it(19)*aux(17) with precondition: [V=1,Out=0,V2>=1,V1>=V2+1,V6>=V2+1] * Chain [25,[21],22,[27],18]: 3*it(21)+5*it(27)+11 Such that:it(27) =< V1 it(21) =< V6 with precondition: [V=0,V2=0,Out=0,V1>=2,V6>=1] * Chain [25,[21],22,[27],17]: 3*it(21)+5*it(27)+11 Such that:it(27) =< V1 it(21) =< V6 with precondition: [V=0,V2=0,Out=0,V1>=3,V6>=1] * Chain [25,[21],22,18]: 3*it(21)+11 Such that:it(21) =< V6 with precondition: [V=0,V1=1,V2=0,Out=0,V6>=1] * Chain [25,[21],22,17]: 3*it(21)+11 Such that:it(21) =< V6 with precondition: [V=0,V2=0,Out=0,V1>=2,V6>=1] * Chain [23,[19],20,[26],16]: 3*it(19)+5*it(26)+4*s(1)+1*s(4)+1*s(15)+11 Such that:it(26) =< V1 it(19) =< V6 aux(19) =< 1 s(1) =< aux(19) s(4) =< it(26)*aux(19) s(15) =< it(19)*aux(19) with precondition: [V=0,V2=1,Out=0,V1>=3,V6>=2] * Chain [23,[19],20,[26],15]: 3*it(19)+5*it(26)+1*s(4)+4*s(5)+1*s(15)+11 Such that:it(26) =< V1 it(19) =< V6 aux(20) =< 1 s(5) =< aux(20) s(4) =< it(26)*aux(20) s(15) =< it(19)*aux(20) with precondition: [V=0,V2=1,Out=0,V1>=4,V6>=2] * Chain [23,[19],20,[24],16]: 3*it(19)+5*it(24)+4*s(1)+2*s(10)+1*s(15)+11 Such that:it(24) =< V1-V2 it(19) =< V6-V2 aux(21) =< V2 s(1) =< aux(21) s(10) =< it(24)*aux(21) s(15) =< it(19)*aux(21) with precondition: [V=0,Out=0,V2>=2,V1>=V2+2,V6>=V2+1] * Chain [23,[19],20,[24],15]: 3*it(19)+5*it(24)+4*s(5)+2*s(10)+1*s(15)+11 Such that:it(24) =< V1-V2 it(19) =< V6-V2 aux(22) =< V2 s(5) =< aux(22) s(10) =< it(24)*aux(22) s(15) =< it(19)*aux(22) with precondition: [V=0,Out=0,V2>=2,V1>=V2+3,V6>=V2+1] * Chain [23,[19],20,16]: 3*it(19)+4*s(1)+1*s(15)+11 Such that:it(19) =< V6-V2 aux(23) =< V2 s(1) =< aux(23) s(15) =< it(19)*aux(23) with precondition: [V=0,Out=0,V1=V2+1,V1>=2,V6>=V1] * Chain [23,[19],20,15]: 3*it(19)+4*s(5)+1*s(15)+11 Such that:it(19) =< V6-V2 aux(24) =< V2 s(5) =< aux(24) s(15) =< it(19)*aux(24) with precondition: [V=0,Out=0,V2>=1,V1>=V2+2,V6>=V2+1] * Chain [22,[27],18]: 5*it(27)+6 Such that:it(27) =< V1 with precondition: [V=1,V6=0,V2=0,Out=0,V1>=1] * Chain [22,[27],17]: 5*it(27)+6 Such that:it(27) =< V1 with precondition: [V=1,V6=0,V2=0,Out=0,V1>=2] * Chain [22,[26],16]: 5*it(26)+1*s(1)+1*s(4)+6 Such that:it(26) =< V1-V2 aux(2) =< V2 s(1) =< aux(2) s(4) =< it(26)*aux(2) with precondition: [V=1,V6=0,Out=0,V2>=1,V1>=V2+1] * Chain [22,[26],15]: 5*it(26)+1*s(4)+1*s(5)+6 Such that:it(26) =< V1-V2 aux(3) =< V2 s(5) =< aux(3) s(4) =< it(26)*aux(3) with precondition: [V=1,V6=0,Out=0,V2>=1,V1>=V2+2] * Chain [22,18]: 6 with precondition: [V=1,V1=0,V6=0,Out=0,V2>=0] * Chain [22,17]: 6 with precondition: [V=1,V6=0,V2=0,Out=0,V1>=1] * Chain [22,16]: 1*s(1)+6 Such that:s(1) =< V1 with precondition: [V=1,V6=0,Out=0,V1>=1,V2>=V1] * Chain [22,15]: 1*s(5)+6 Such that:s(5) =< V2 with precondition: [V=1,V6=0,Out=0,V2>=1,V1>=V2+1] * Chain [20,[26],16]: 5*it(26)+1*s(1)+1*s(4)+1*s(12)+6 Such that:s(12) =< 1 it(26) =< V1-V2 aux(2) =< V2 s(1) =< aux(2) s(4) =< it(26)*aux(2) with precondition: [V=1,V6=1,Out=0,V2>=1,V1>=V2+1] * Chain [20,[26],15]: 5*it(26)+1*s(4)+1*s(5)+1*s(12)+6 Such that:s(12) =< 1 it(26) =< V1-V2 aux(3) =< V2 s(5) =< aux(3) s(4) =< it(26)*aux(3) with precondition: [V=1,V6=1,Out=0,V2>=1,V1>=V2+2] * Chain [20,[24],16]: 5*it(24)+1*s(1)+1*s(10)+1*s(11)+1*s(12)+6 Such that:it(24) =< V1-V2 aux(6) =< V2 aux(11) =< V6 s(12) =< aux(11) s(1) =< aux(6) s(10) =< it(24)*aux(6) s(11) =< it(24)*aux(11) with precondition: [V=1,Out=0,V6>=2,V2>=V6,V1>=V2+1] * Chain [20,[24],15]: 5*it(24)+1*s(5)+1*s(10)+1*s(11)+1*s(12)+6 Such that:it(24) =< V1-V2 aux(7) =< V2 aux(13) =< V6 s(12) =< aux(13) s(5) =< aux(7) s(10) =< it(24)*aux(7) s(11) =< it(24)*aux(13) with precondition: [V=1,Out=0,V6>=2,V2>=V6,V1>=V2+2] * Chain [20,18]: 1*s(12)+6 Such that:s(12) =< V6 with precondition: [V=1,V1=0,Out=0,V6>=1,V2>=V6] * Chain [20,16]: 1*s(1)+1*s(12)+6 Such that:s(1) =< V1 s(12) =< V6 with precondition: [V=1,Out=0,V1>=1,V6>=1,V2>=V1,V2>=V6] * Chain [20,15]: 1*s(5)+1*s(12)+6 Such that:s(12) =< V6 s(5) =< V2 with precondition: [V=1,Out=0,V6>=1,V2>=V6,V1>=V2+1] * Chain [18]: 3 with precondition: [V=0,V1=0,Out=0,V6>=0,V2>=0] * Chain [17]: 3 with precondition: [V=0,V2=0,Out=0,V1>=1,V6>=0] * Chain [16]: 1*s(1)+3 Such that:s(1) =< V1 with precondition: [V=0,Out=0,V1>=1,V6>=0,V2>=V1] * Chain [15]: 1*s(5)+3 Such that:s(5) =< V2 with precondition: [V=0,Out=0,V6>=0,V2>=1,V1>=V2+1] #### Cost of chains of start(V,V1,V6,V2): * Chain [40]: 31*s(147)+18*s(148)+30*s(155)+12*s(156)+21*s(157)+8*s(158)+4*s(159)+2*s(160)+8*s(166)+2*s(167)+2*s(168)+11 Such that:s(161) =< 1 s(151) =< V1-V2 aux(50) =< V1 aux(51) =< V6 aux(52) =< V6-V2 aux(53) =< V2 s(147) =< aux(50) s(156) =< aux(52) s(148) =< aux(51) s(166) =< s(161) s(167) =< s(147)*s(161) s(168) =< s(148)*s(161) s(155) =< s(151) s(157) =< aux(53) s(158) =< s(155)*aux(53) s(159) =< s(156)*aux(53) s(160) =< s(155)*aux(51) with precondition: [V=0] * Chain [39]: 1*s(174)+1*s(175)+6 Such that:s(174) =< V s(175) =< V1 with precondition: [V>=1] * Chain [38]: 6*s(176)+8 Such that:aux(54) =< V6 s(176) =< aux(54) with precondition: [V>=0,V1>=0,V6>=0,V2>=0] * Chain [37]: 2*s(178)+6 Such that:aux(55) =< V6 s(178) =< aux(55) with precondition: [V=1,V1=0,V6>=1,V2>=V6] * Chain [36]: 3*s(180)+6*s(181)+2*s(184)+8 Such that:aux(57) =< V6-V2 aux(58) =< V2 s(181) =< aux(57) s(180) =< aux(58) s(184) =< s(181)*aux(58) with precondition: [V=1,V1=0,V2>=1,V6>=V2+1] * Chain [35]: 30*s(191)+13 Such that:aux(59) =< V1 s(191) =< aux(59) with precondition: [V=1,V6=0,V2=0,V1>=1] * Chain [34]: 2*s(197)+6 Such that:aux(60) =< V1 s(197) =< aux(60) with precondition: [V=1,V6=0,V1>=1,V2>=V1] * Chain [33]: 40*s(203)+9*s(204)+20*s(205)+10*s(206)+3*s(207)+13 Such that:s(201) =< -V2 aux(61) =< V1-V2 aux(62) =< V2 s(203) =< aux(61) s(204) =< s(201) s(205) =< aux(62) s(206) =< s(203)*aux(62) s(207) =< s(204)*aux(62) with precondition: [V=1,V6=0,V2>=1,V1>=V2+1] * Chain [32]: 20*s(216)+18*s(217)+8 Such that:aux(63) =< V1 aux(64) =< V6 s(216) =< aux(63) s(217) =< aux(64) with precondition: [V=1,V2=0,V1>=1,V6>=1] * Chain [31]: 2*s(222)+2*s(223)+6 Such that:aux(65) =< V1 aux(66) =< V6 s(223) =< aux(65) s(222) =< aux(66) with precondition: [V=1,V1>=1,V6>=1,V2>=V1,V2>=V6] * Chain [30]: 3*s(226)+2*s(227)+6*s(228)+2*s(231)+8 Such that:aux(68) =< V1 aux(69) =< V6-V2 aux(70) =< V2 s(227) =< aux(68) s(228) =< aux(69) s(226) =< aux(70) s(231) =< s(228)*aux(70) with precondition: [V=1,V1>=1,V2>=V1,V6>=V2+1] * Chain [29]: 4*s(237)+50*s(242)+9*s(243)+22*s(244)+12*s(245)+3*s(246)+4*s(247)+2*s(252)+13 Such that:s(248) =< 1 s(240) =< V6-V2 aux(72) =< V1-V2 aux(73) =< V6 aux(74) =< V2 s(252) =< s(248) s(242) =< aux(72) s(237) =< aux(73) s(244) =< aux(74) s(245) =< s(242)*aux(74) s(247) =< s(242)*aux(73) s(243) =< s(240) s(246) =< s(243)*aux(74) with precondition: [V=1,V6>=1,V2>=V6,V1>=V2+1] * Chain [28]: 13*s(258)+20*s(265)+20*s(266)+12*s(267)+18*s(268)+8*s(269)+4*s(270)+4*s(271)+8*s(273)+6*s(274)+8 Such that:aux(76) =< 1 aux(77) =< V1 aux(78) =< V1-V2 aux(79) =< V6 aux(80) =< V6-V2 aux(81) =< V2 s(258) =< aux(81) s(265) =< aux(77) s(266) =< aux(78) s(267) =< aux(79) s(268) =< aux(80) s(269) =< aux(76) s(270) =< s(265)*aux(76) s(271) =< s(267)*aux(76) s(273) =< s(266)*aux(81) s(274) =< s(268)*aux(81) with precondition: [V=1,V2>=1,V1>=V2+1,V6>=V2+1] Closed-form bounds of start(V,V1,V6,V2): ------------------------------------- * Chain [40] with precondition: [V=0] - Upper bound: nat(V1)*33+19+nat(V6)*20+nat(V6)*2*nat(V1-V2)+nat(V2)*21+nat(V2)*8*nat(V1-V2)+nat(V2)*4*nat(V6-V2)+nat(V1-V2)*30+nat(V6-V2)*12 - Complexity: n^2 * Chain [39] with precondition: [V>=1] - Upper bound: V+6+nat(V1) - Complexity: n * Chain [38] with precondition: [V>=0,V1>=0,V6>=0,V2>=0] - Upper bound: 6*V6+8 - Complexity: n * Chain [37] with precondition: [V=1,V1=0,V6>=1,V2>=V6] - Upper bound: 2*V6+6 - Complexity: n * Chain [36] with precondition: [V=1,V1=0,V2>=1,V6>=V2+1] - Upper bound: 6*V6-6*V2+(3*V2+8+(V6-V2)*(2*V2)) - Complexity: n^2 * Chain [35] with precondition: [V=1,V6=0,V2=0,V1>=1] - Upper bound: 30*V1+13 - Complexity: n * Chain [34] with precondition: [V=1,V6=0,V1>=1,V2>=V1] - Upper bound: 2*V1+6 - Complexity: n * Chain [33] with precondition: [V=1,V6=0,V2>=1,V1>=V2+1] - Upper bound: 40*V1-40*V2+(20*V2+13+(V1-V2)*(10*V2)) - Complexity: n^2 * Chain [32] with precondition: [V=1,V2=0,V1>=1,V6>=1] - Upper bound: 20*V1+18*V6+8 - Complexity: n * Chain [31] with precondition: [V=1,V1>=1,V6>=1,V2>=V1,V2>=V6] - Upper bound: 2*V1+2*V6+6 - Complexity: n * Chain [30] with precondition: [V=1,V1>=1,V2>=V1,V6>=V2+1] - Upper bound: 6*V6-6*V2+(2*V1+3*V2+8+(V6-V2)*(2*V2)) - Complexity: n^2 * Chain [29] with precondition: [V=1,V6>=1,V2>=V6,V1>=V2+1] - Upper bound: 50*V1-50*V2+(4*V6+15+(V1-V2)*(4*V6)+22*V2+(V1-V2)*(12*V2)) - Complexity: n^2 * Chain [28] with precondition: [V=1,V2>=1,V1>=V2+1,V6>=V2+1] - Upper bound: 18*V6-18*V2+(20*V1-20*V2+(24*V1+16*V6+13*V2+16+(V1-V2)*(8*V2)+(V6-V2)*(6*V2))) - Complexity: n^2 ### Maximum cost of start(V,V1,V6,V2): max([max([nat(V2)*3+2+max([nat(V2)*2*nat(V6-V2)+nat(V6-V2)*6,nat(V2)*17+5+nat(V2)*10*nat(V1-V2)+nat(V1-V2)*40]),nat(V6)*2+2+max([nat(V6)*2,nat(V6)*4*nat(V1-V2)+7+nat(V2)*22+nat(V2)*12*nat(V1-V2)+nat(V1-V2)*50])+nat(V6)*2]),nat(V1)+max([V,nat(V1)+max([max([nat(V6)*2,nat(V2)*3+2+nat(V2)*2*nat(V6-V2)+nat(V6-V2)*6]),nat(V1)*18+2+max([nat(V6)*18,nat(V1)*4+5+max([nat(V6)*16+3+nat(V2)*13+nat(V2)*8*nat(V1-V2)+nat(V2)*6*nat(V6-V2)+nat(V1-V2)*20+nat(V6-V2)*18,nat(V1)*3+6+nat(V6)*20+nat(V6)*2*nat(V1-V2)+nat(V2)*21+nat(V2)*8*nat(V1-V2)+nat(V2)*4*nat(V6-V2)+nat(V1-V2)*30+nat(V6-V2)*12+nat(V1)*6])])])])])+6 Asymptotic class: n^2 * Total analysis performed in 1080 ms. ---------------------------------------- (10) BOUNDS(1, n^2)