WORST_CASE(Omega(n^1),O(n^3)) proof of /export/starexec/sandbox/benchmark/theBenchmark.trs # AProVE Commit ID: c69e44bd14796315568835c1ffa2502984884775 mhark 20210624 unpublished The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, 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), 12 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 824 ms] (10) BOUNDS(1, n^3) (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (12) TRS for Loop Detection (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (14) BEST (15) proven lower bound (16) LowerBoundPropagationProof [FINISHED, 0 ms] (17) BOUNDS(n^1, INF) (18) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(0, y) -> 0 minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^3). The TRS R consists of the following rules: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(0, y) -> 0 [1] minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) [1] if_minus(true, s(x), y) -> 0 [1] if_minus(false, s(x), y) -> s(minus(x, y)) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) [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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(0, y) -> 0 [1] minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) [1] if_minus(true, s(x), y) -> 0 [1] if_minus(false, s(x), y) -> s(minus(x, y)) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) [1] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false minus :: 0:s -> 0:s -> 0:s if_minus :: true:false -> 0:s -> 0:s -> 0:s quot :: 0:s -> 0:s -> 0:s log :: 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: if_minus(v0, v1, v2) -> null_if_minus [0] quot(v0, v1) -> null_quot [0] log(v0) -> null_log [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] And the following fresh constants: null_if_minus, null_quot, null_log, null_le, null_minus ---------------------------------------- (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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(0, y) -> 0 [1] minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) [1] if_minus(true, s(x), y) -> 0 [1] if_minus(false, s(x), y) -> s(minus(x, y)) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) [1] log(s(0)) -> 0 [1] log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) [1] if_minus(v0, v1, v2) -> null_if_minus [0] quot(v0, v1) -> null_quot [0] log(v0) -> null_log [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] The TRS has the following type information: le :: 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus -> true:false:null_le 0 :: 0:s:null_if_minus:null_quot:null_log:null_minus true :: true:false:null_le s :: 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus false :: true:false:null_le minus :: 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus if_minus :: true:false:null_le -> 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus quot :: 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus log :: 0:s:null_if_minus:null_quot:null_log:null_minus -> 0:s:null_if_minus:null_quot:null_log:null_minus null_if_minus :: 0:s:null_if_minus:null_quot:null_log:null_minus null_quot :: 0:s:null_if_minus:null_quot:null_log:null_minus null_log :: 0:s:null_if_minus:null_quot:null_log:null_minus null_le :: true:false:null_le null_minus :: 0:s:null_if_minus:null_quot:null_log:null_minus 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: 0 => 0 true => 2 false => 1 null_if_minus => 0 null_quot => 0 null_log => 0 null_le => 0 null_minus => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: if_minus(z, z', z'') -{ 1 }-> 0 :|: z = 2, z' = 1 + x, z'' = y, x >= 0, y >= 0 if_minus(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if_minus(z, z', z'') -{ 1 }-> 1 + minus(x, y) :|: z' = 1 + x, z'' = y, z = 1, x >= 0, y >= 0 le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 2 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 le(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 log(z) -{ 1 }-> 0 :|: z = 1 + 0 log(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 log(z) -{ 1 }-> 1 + log(1 + quot(x, 1 + (1 + 0))) :|: x >= 0, z = 1 + (1 + x) minus(z, z') -{ 1 }-> if_minus(le(1 + x, y), 1 + x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y minus(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 0 :|: z' = 1 + y, y >= 0, z = 0 quot(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 1 + quot(minus(x, y), 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x 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(V1, V, V11),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V11),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V11),0,[fun(V1, V, V11, Out)],[V1 >= 0,V >= 0,V11 >= 0]). eq(start(V1, V, V11),0,[quot(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V11),0,[log(V1, Out)],[V1 >= 0]). eq(le(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = 0,V = V2]). eq(le(V1, V, Out),1,[],[Out = 1,V3 >= 0,V1 = 1 + V3,V = 0]). eq(le(V1, V, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). eq(minus(V1, V, Out),1,[],[Out = 0,V6 >= 0,V1 = 0,V = V6]). eq(minus(V1, V, Out),1,[le(1 + V7, V8, Ret0),fun(Ret0, 1 + V7, V8, Ret1)],[Out = Ret1,V7 >= 0,V8 >= 0,V1 = 1 + V7,V = V8]). eq(fun(V1, V, V11, Out),1,[],[Out = 0,V1 = 2,V = 1 + V9,V11 = V10,V9 >= 0,V10 >= 0]). eq(fun(V1, V, V11, Out),1,[minus(V12, V13, Ret11)],[Out = 1 + Ret11,V = 1 + V12,V11 = V13,V1 = 1,V12 >= 0,V13 >= 0]). eq(quot(V1, V, Out),1,[],[Out = 0,V = 1 + V14,V14 >= 0,V1 = 0]). eq(quot(V1, V, Out),1,[minus(V15, V16, Ret10),quot(Ret10, 1 + V16, Ret12)],[Out = 1 + Ret12,V = 1 + V16,V15 >= 0,V16 >= 0,V1 = 1 + V15]). eq(log(V1, Out),1,[],[Out = 0,V1 = 1]). eq(log(V1, Out),1,[quot(V17, 1 + (1 + 0), Ret101),log(1 + Ret101, Ret13)],[Out = 1 + Ret13,V17 >= 0,V1 = 2 + V17]). eq(fun(V1, V, V11, Out),0,[],[Out = 0,V19 >= 0,V11 = V20,V18 >= 0,V1 = V19,V = V18,V20 >= 0]). eq(quot(V1, V, Out),0,[],[Out = 0,V22 >= 0,V21 >= 0,V1 = V22,V = V21]). eq(log(V1, Out),0,[],[Out = 0,V23 >= 0,V1 = V23]). eq(le(V1, V, Out),0,[],[Out = 0,V24 >= 0,V25 >= 0,V1 = V24,V = V25]). eq(minus(V1, V, Out),0,[],[Out = 0,V26 >= 0,V27 >= 0,V1 = V26,V = V27]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,V11,Out),[V1,V,V11],[Out]). input_output_vars(quot(V1,V,Out),[V1,V],[Out]). input_output_vars(log(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [le/3] 1. recursive : [fun/4,minus/3] 2. recursive : [quot/3] 3. recursive : [log/2] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into quot/3 3. SCC is partially evaluated into log/2 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 16 is refined into CE [23] * CE 14 is refined into CE [24] * CE 13 is refined into CE [25] * CE 15 is refined into CE [26] ### Cost equations --> "Loop" of le/3 * CEs [26] --> Loop 13 * CEs [23] --> Loop 14 * CEs [24] --> Loop 15 * CEs [25] --> Loop 16 ### Ranking functions of CR le(V1,V,Out) * RF of phase [13]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [13]: - RF of loop [13:1]: V V1 ### Specialization of cost equations minus/3 * CE 8 is refined into CE [27,28,29,30] * CE 10 is refined into CE [31] * CE 11 is refined into CE [32] * CE 12 is refined into CE [33] * CE 9 is refined into CE [34,35] ### Cost equations --> "Loop" of minus/3 * CEs [35] --> Loop 17 * CEs [34] --> Loop 18 * CEs [27] --> Loop 19 * CEs [28,29,30,31,32,33] --> Loop 20 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [17]: [V1-1,V1-V] * RF of phase [18]: [V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V1-1 V1-V * Partial RF of phase [18]: - RF of loop [18:1]: V1 ### Specialization of cost equations quot/3 * CE 17 is refined into CE [36] * CE 19 is refined into CE [37] * CE 18 is refined into CE [38,39,40] ### Cost equations --> "Loop" of quot/3 * CEs [40] --> Loop 21 * CEs [38] --> Loop 22 * CEs [39] --> Loop 23 * CEs [36,37] --> Loop 24 ### Ranking functions of CR quot(V1,V,Out) * RF of phase [21]: [V1/2-1,V1/2-V/2] * RF of phase [23]: [V1-1] #### Partial ranking functions of CR quot(V1,V,Out) * Partial RF of phase [21]: - RF of loop [21:1]: V1/2-1 V1/2-V/2 * Partial RF of phase [23]: - RF of loop [23:1]: V1-1 ### Specialization of cost equations log/2 * CE 20 is refined into CE [41] * CE 22 is refined into CE [42] * CE 21 is refined into CE [43,44,45,46] ### Cost equations --> "Loop" of log/2 * CEs [46] --> Loop 25 * CEs [45] --> Loop 26 * CEs [44] --> Loop 27 * CEs [43] --> Loop 28 * CEs [41,42] --> Loop 29 ### Ranking functions of CR log(V1,Out) * RF of phase [25,26]: [V1-4,V1/2-2] #### Partial ranking functions of CR log(V1,Out) * Partial RF of phase [25,26]: - RF of loop [25:1]: V1/2-2 - RF of loop [26:1]: V1/3-4/3 ### Specialization of cost equations start/3 * CE 3 is refined into CE [47] * CE 1 is refined into CE [48] * CE 2 is refined into CE [49,50,51] * CE 4 is refined into CE [52,53,54,55,56] * CE 5 is refined into CE [57,58,59] * CE 6 is refined into CE [60,61,62,63,64,65] * CE 7 is refined into CE [66,67,68,69,70,71] ### Cost equations --> "Loop" of start/3 * CEs [60,61] --> Loop 30 * CEs [53,58] --> Loop 31 * CEs [47] --> Loop 32 * CEs [49,50,51] --> Loop 33 * CEs [48,52,54,55,56,57,59,62,63,64,65,66,67,68,69,70,71] --> Loop 34 ### Ranking functions of CR start(V1,V,V11) #### Partial ranking functions of CR start(V1,V,V11) Computing Bounds ===================================== #### Cost of chains of le(V1,V,Out): * Chain [[13],16]: 1*it(13)+1 Such that:it(13) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[13],15]: 1*it(13)+1 Such that:it(13) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[13],14]: 1*it(13)+0 Such that:it(13) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [16]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [15]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [14]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[18],20]: 3*it(18)+2*s(4)+3 Such that:aux(1) =< V1-Out it(18) =< Out s(4) =< aux(1) with precondition: [V=0,Out>=1,V1>=Out] * Chain [[18],19]: 3*it(18)+2 Such that:it(18) =< Out with precondition: [V=0,Out>=1,V1>=Out+1] * Chain [[17],20]: 3*it(17)+2*s(2)+2*s(4)+1*s(8)+3 Such that:aux(1) =< V1-Out it(17) =< Out aux(4) =< V s(4) =< aux(1) s(2) =< aux(4) s(8) =< it(17)*aux(4) with precondition: [V>=1,Out>=1,V1>=Out+V] * Chain [20]: 2*s(2)+2*s(4)+3 Such that:aux(1) =< V1 aux(2) =< V s(4) =< aux(1) s(2) =< aux(2) with precondition: [Out=0,V1>=0,V>=0] * Chain [19]: 2 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of quot(V1,V,Out): * Chain [[23],24]: 6*it(23)+6*s(25)+1 Such that:aux(9) =< V1 it(23) =< aux(9) s(28) =< it(23)*aux(9) s(25) =< s(28) with precondition: [V=1,Out>=1,V1>=Out+1] * Chain [[23],22,24]: 8*it(23)+6*s(25)+2*s(32)+5 Such that:s(30) =< 1 aux(10) =< V1 it(23) =< aux(10) s(32) =< s(30) s(28) =< it(23)*aux(10) s(25) =< s(28) with precondition: [V=1,Out>=2,V1>=Out] * Chain [[21],24]: 4*it(21)+3*s(45)+4*s(46)+1*s(48)+1 Such that:aux(13) =< V1 aux(12) =< V1+1 aux(11) =< V1-V it(21) =< V1/2-V/2 s(41) =< V s(49) =< aux(12) s(49) =< aux(13) s(45) =< it(21)*aux(11) s(46) =< s(49) s(48) =< s(45)*s(41) with precondition: [V>=2,Out>=1,V1+1>=2*Out+V] * Chain [[21],22,24]: 6*it(21)+2*s(32)+3*s(45)+4*s(46)+1*s(48)+5 Such that:aux(12) =< V1+1 aux(11) =< V1-V aux(14) =< V1 aux(15) =< V it(21) =< aux(14) s(32) =< aux(15) s(49) =< aux(12) s(49) =< aux(14) s(45) =< it(21)*aux(11) s(46) =< s(49) s(48) =< s(45)*aux(15) with precondition: [V>=2,Out>=2,V1+3>=2*Out+V] * Chain [24]: 1 with precondition: [Out=0,V1>=0,V>=0] * Chain [22,24]: 2*s(31)+2*s(32)+5 Such that:s(29) =< V1 s(30) =< V s(31) =< s(29) s(32) =< s(30) with precondition: [Out=1,V1>=1,V>=1] #### Cost of chains of log(V1,Out): * Chain [[25,26],29]: 6*it(25)+2*it(26)+10*s(82)+2*s(83)+3*s(84)+1*s(85)+4*s(88)+3*s(89)+4*s(90)+1*s(91)+1 Such that:aux(20) =< 2 it(26) =< V1/3 aux(26) =< 5/2*V1 aux(25) =< 5/2*V1+45/2 aux(28) =< 13/6*V1 aux(27) =< 13/6*V1+91/6 aux(29) =< V1 aux(30) =< V1/2 aux(18) =< aux(29) it(25) =< aux(29) it(26) =< aux(29) aux(18) =< aux(30) it(25) =< aux(30) it(26) =< aux(30) it(26) =< aux(25) s(87) =< aux(25) it(26) =< aux(26) s(87) =< aux(26) aux(19) =< aux(27) aux(19) =< aux(28) s(78) =< aux(29) s(88) =< aux(19)*(1/2) s(86) =< aux(18)*2 s(89) =< s(88)*s(78) s(90) =< aux(19) s(91) =< s(89)*aux(20) s(82) =< s(87) s(83) =< s(86) s(84) =< s(82)*aux(29) s(85) =< s(84)*aux(20) with precondition: [Out>=1,V1>=4*Out+1] * Chain [[25,26],28,29]: 6*it(25)+2*it(26)+10*s(82)+2*s(83)+3*s(84)+1*s(85)+4*s(88)+3*s(89)+4*s(90)+1*s(91)+3 Such that:aux(20) =< 2 it(26) =< V1/3 aux(26) =< 5/2*V1 aux(25) =< 5/2*V1+45/2 aux(28) =< 13/6*V1 aux(27) =< 13/6*V1+91/6 aux(31) =< V1 aux(32) =< V1/2 aux(18) =< aux(31) it(25) =< aux(31) it(26) =< aux(31) aux(18) =< aux(32) it(25) =< aux(32) it(26) =< aux(32) it(26) =< aux(25) s(87) =< aux(25) it(26) =< aux(26) s(87) =< aux(26) aux(19) =< aux(27) aux(19) =< aux(28) s(78) =< aux(31) s(88) =< aux(19)*(1/2) s(86) =< aux(18)*2 s(89) =< s(88)*s(78) s(90) =< aux(19) s(91) =< s(89)*aux(20) s(82) =< s(87) s(83) =< s(86) s(84) =< s(82)*aux(31) s(85) =< s(84)*aux(20) with precondition: [Out>=2,V1+3>=4*Out] * Chain [[25,26],27,29]: 6*it(25)+2*it(26)+10*s(82)+2*s(83)+3*s(84)+1*s(85)+4*s(88)+3*s(89)+4*s(90)+1*s(91)+2*s(95)+2*s(96)+7 Such that:aux(26) =< 5*V1 aux(28) =< 13*V1 aux(23) =< V1/2 aux(25) =< 5/2*V1+45/2 aux(27) =< 13/6*V1+91/6 aux(33) =< 2 aux(34) =< V1 it(26) =< aux(34) s(95) =< aux(34) s(96) =< aux(33) aux(18) =< aux(34) it(25) =< aux(34) aux(18) =< aux(23) it(25) =< aux(23) it(26) =< aux(23) it(26) =< aux(25) s(87) =< aux(25) it(26) =< aux(26) s(87) =< aux(26) aux(19) =< aux(27) aux(19) =< aux(28) s(78) =< aux(34) s(88) =< aux(19)*(1/2) s(86) =< aux(18)*2 s(89) =< s(88)*s(78) s(90) =< aux(19) s(91) =< s(89)*aux(33) s(82) =< s(87) s(83) =< s(86) s(84) =< s(82)*aux(34) s(85) =< s(84)*aux(33) with precondition: [Out>=2,V1+3>=4*Out] * Chain [[25,26],27,28,29]: 6*it(25)+2*it(26)+10*s(82)+2*s(83)+3*s(84)+1*s(85)+4*s(88)+3*s(89)+4*s(90)+1*s(91)+2*s(95)+2*s(96)+9 Such that:aux(26) =< 5*V1 aux(28) =< 13*V1 aux(23) =< V1/2 aux(25) =< 5/2*V1+45/2 aux(27) =< 13/6*V1+91/6 aux(35) =< 2 aux(36) =< V1 it(26) =< aux(36) s(95) =< aux(36) s(96) =< aux(35) aux(18) =< aux(36) it(25) =< aux(36) aux(18) =< aux(23) it(25) =< aux(23) it(26) =< aux(23) it(26) =< aux(25) s(87) =< aux(25) it(26) =< aux(26) s(87) =< aux(26) aux(19) =< aux(27) aux(19) =< aux(28) s(78) =< aux(36) s(88) =< aux(19)*(1/2) s(86) =< aux(18)*2 s(89) =< s(88)*s(78) s(90) =< aux(19) s(91) =< s(89)*aux(35) s(82) =< s(87) s(83) =< s(86) s(84) =< s(82)*aux(36) s(85) =< s(84)*aux(35) with precondition: [Out>=3,V1+7>=4*Out] * Chain [29]: 1 with precondition: [Out=0,V1>=0] * Chain [28,29]: 3 with precondition: [Out=1,V1>=2] * Chain [27,29]: 2*s(95)+2*s(96)+7 Such that:s(94) =< 2 s(93) =< V1 s(95) =< s(93) s(96) =< s(94) with precondition: [Out=1,V1>=3] * Chain [27,28,29]: 2*s(95)+2*s(96)+9 Such that:s(94) =< 2 s(93) =< V1 s(95) =< s(93) s(96) =< s(94) with precondition: [Out=2,V1>=3] #### Cost of chains of start(V1,V,V11): * Chain [34]: 10*s(147)+24*s(149)+1*s(159)+4*s(167)+3*s(170)+8*s(171)+1*s(172)+3*s(180)+1*s(182)+8*s(186)+4*s(192)+24*s(200)+8*s(204)+6*s(206)+8*s(207)+2*s(208)+20*s(209)+8*s(210)+6*s(211)+2*s(212)+4*s(237)+8*s(242)+6*s(243)+8*s(244)+2*s(245)+20*s(246)+6*s(247)+2*s(248)+9 Such that:s(167) =< V1/2-V/2 aux(43) =< 2 aux(44) =< V1 aux(45) =< V1+1 aux(46) =< V1-V aux(47) =< 5*V1 aux(48) =< 13*V1 aux(49) =< V1/2 aux(50) =< V1/3 aux(51) =< 5/2*V1 aux(52) =< 5/2*V1+45/2 aux(53) =< 13/6*V1 aux(54) =< 13/6*V1+91/6 aux(55) =< V s(149) =< aux(44) s(192) =< aux(50) s(147) =< aux(55) s(186) =< aux(43) s(199) =< aux(44) s(200) =< aux(44) s(192) =< aux(44) s(199) =< aux(49) s(200) =< aux(49) s(192) =< aux(49) s(192) =< aux(52) s(201) =< aux(52) s(192) =< aux(51) s(201) =< aux(51) s(202) =< aux(54) s(202) =< aux(53) s(203) =< aux(44) s(204) =< s(202)*(1/2) s(205) =< s(199)*2 s(206) =< s(204)*s(203) s(207) =< s(202) s(208) =< s(206)*aux(43) s(209) =< s(201) s(210) =< s(205) s(211) =< s(209)*aux(44) s(212) =< s(211)*aux(43) s(237) =< aux(44) s(237) =< aux(49) s(237) =< aux(52) s(240) =< aux(52) s(237) =< aux(47) s(240) =< aux(47) s(241) =< aux(54) s(241) =< aux(48) s(242) =< s(241)*(1/2) s(243) =< s(242)*s(203) s(244) =< s(241) s(245) =< s(243)*aux(43) s(246) =< s(240) s(247) =< s(246)*aux(44) s(248) =< s(247)*aux(43) s(169) =< aux(45) s(169) =< aux(44) s(170) =< s(167)*aux(46) s(171) =< s(169) s(172) =< s(170)*aux(55) s(180) =< s(149)*aux(46) s(182) =< s(180)*aux(55) s(159) =< s(149)*aux(55) with precondition: [V1>=0] * Chain [33]: 15*s(275)+4*s(276)+1*s(286)+4 Such that:aux(58) =< V aux(59) =< V11 s(275) =< aux(58) s(276) =< aux(59) s(286) =< s(275)*aux(59) with precondition: [V1=1,V>=1,V11>=0] * Chain [32]: 1 with precondition: [V1=2,V>=1,V11>=0] * Chain [31]: 8*s(289)+3 Such that:aux(60) =< V1 s(289) =< aux(60) with precondition: [V=0,V1>=1] * Chain [30]: 14*s(292)+12*s(294)+2*s(298)+5 Such that:s(295) =< 1 aux(61) =< V1 s(292) =< aux(61) s(298) =< s(295) s(293) =< s(292)*aux(61) s(294) =< s(293) with precondition: [V=1,V1>=2] Closed-form bounds of start(V1,V,V11): ------------------------------------- * Chain [34] with precondition: [V1>=0] - Upper bound: 68*V1+25+nat(V)*V1+nat(V)*V1*nat(V1-V)+(5/2*V1+45/2)*(20*V1)+(13/6*V1+91/6)*(10*V1)+3*V1*nat(V1-V)+nat(V)*10+nat(V1-V)*nat(V)*nat(V1/2-V/2)+(8*V1+8)+(100*V1+900)+(52*V1+364)+nat(V1-V)*3*nat(V1/2-V/2)+nat(V1/2-V/2)*4+4/3*V1 - Complexity: n^3 * Chain [33] with precondition: [V1=1,V>=1,V11>=0] - Upper bound: 15*V+4+V11*V+4*V11 - Complexity: n^2 * Chain [32] with precondition: [V1=2,V>=1,V11>=0] - Upper bound: 1 - Complexity: constant * Chain [31] with precondition: [V=0,V1>=1] - Upper bound: 8*V1+3 - Complexity: n * Chain [30] with precondition: [V=1,V1>=2] - Upper bound: 14*V1+7+12*V1*V1 - Complexity: n^2 ### Maximum cost of start(V1,V,V11): max([6*V1+4+max([12*V1*V1,54*V1+18+nat(V)*V1+nat(V)*V1*nat(V1-V)+(5/2*V1+45/2)*(20*V1)+(13/6*V1+91/6)*(10*V1)+3*V1*nat(V1-V)+nat(V)*10+nat(V1-V)*nat(V)*nat(V1/2-V/2)+(8*V1+8)+(100*V1+900)+(52*V1+364)+nat(V1-V)*3*nat(V1/2-V/2)+nat(V1/2-V/2)*4+4/3*V1])+(8*V1+2),nat(V)*15+3+nat(V11)*nat(V)+nat(V11)*4])+1 Asymptotic class: n^3 * Total analysis performed in 668 ms. ---------------------------------------- (10) BOUNDS(1, n^3) ---------------------------------------- (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (12) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(0, y) -> 0 minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence le(s(x), s(y)) ->^+ le(x, y) gives rise to a decreasing loop by considering the right hand sides subterm at position []. The pumping substitution is [x / s(x), y / s(y)]. The result substitution is [ ]. ---------------------------------------- (14) Complex Obligation (BEST) ---------------------------------------- (15) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(0, y) -> 0 minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (16) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (17) BOUNDS(n^1, INF) ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(0, y) -> 0 minus(s(x), y) -> if_minus(le(s(x), y), s(x), y) if_minus(true, s(x), y) -> 0 if_minus(false, s(x), y) -> s(minus(x, y)) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(x, y), s(y))) log(s(0)) -> 0 log(s(s(x))) -> s(log(s(quot(x, s(s(0)))))) S is empty. Rewrite Strategy: INNERMOST