3.63/1.90 WORST_CASE(Omega(n^1), O(n^1)) 3.63/1.91 proof of /export/starexec/sandbox/benchmark/theBenchmark.koat 3.63/1.91 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.63/1.91 3.63/1.91 3.63/1.91 The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(n^1, n^1). 3.63/1.91 3.63/1.91 (0) CpxIntTrs 3.63/1.91 (1) Koat Proof [FINISHED, 21 ms] 3.63/1.91 (2) BOUNDS(1, n^1) 3.63/1.91 (3) Loat Proof [FINISHED, 117 ms] 3.63/1.91 (4) BOUNDS(n^1, INF) 3.63/1.91 3.63/1.91 3.63/1.91 ---------------------------------------- 3.63/1.91 3.63/1.91 (0) 3.63/1.91 Obligation: 3.63/1.91 Complexity Int TRS consisting of the following rules: 3.63/1.91 f4(A, B, C) -> Com_1(f5(A, B, 1)) :|: 0 >= A && 0 >= B 3.63/1.91 f0(A, B, C) -> Com_1(f2(A, B, 1)) :|: A >= 1 3.63/1.91 f4(A, B, C) -> Com_1(f4(A, B - 1, C)) :|: B >= 1 3.63/1.91 f0(A, B, C) -> Com_1(f4(A, B, 0)) :|: 0 >= A 3.63/1.91 3.63/1.91 The start-symbols are:[f0_3] 3.63/1.91 3.63/1.91 3.63/1.91 ---------------------------------------- 3.63/1.91 3.63/1.91 (1) Koat Proof (FINISHED) 3.63/1.91 YES(?, ar_1 + 3) 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Initial complexity problem: 3.63/1.91 3.63/1.91 1: T: 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f5(ar_0, ar_1, 1)) [ 0 >= ar_0 /\ 0 >= ar_1 ] 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f2(ar_0, ar_1, 1)) [ ar_0 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1 - 1, ar_2)) [ ar_1 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1, 0)) [ 0 >= ar_0 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1, ar_2) -> Com_1(f0(ar_0, ar_1, ar_2)) [ 0 <= 0 ] 3.63/1.91 3.63/1.91 start location: koat_start 3.63/1.91 3.63/1.91 leaf cost: 0 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Repeatedly propagating knowledge in problem 1 produces the following problem: 3.63/1.91 3.63/1.91 2: T: 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f5(ar_0, ar_1, 1)) [ 0 >= ar_0 /\ 0 >= ar_1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f2(ar_0, ar_1, 1)) [ ar_0 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1 - 1, ar_2)) [ ar_1 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1, 0)) [ 0 >= ar_0 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1, ar_2) -> Com_1(f0(ar_0, ar_1, ar_2)) [ 0 <= 0 ] 3.63/1.91 3.63/1.91 start location: koat_start 3.63/1.91 3.63/1.91 leaf cost: 0 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 A polynomial rank function with 3.63/1.91 3.63/1.91 Pol(f4) = 1 3.63/1.91 3.63/1.91 Pol(f5) = 0 3.63/1.91 3.63/1.91 Pol(f0) = 1 3.63/1.91 3.63/1.91 Pol(f2) = 0 3.63/1.91 3.63/1.91 Pol(koat_start) = 1 3.63/1.91 3.63/1.91 orients all transitions weakly and the transition 3.63/1.91 3.63/1.91 f4(ar_0, ar_1, ar_2) -> Com_1(f5(ar_0, ar_1, 1)) [ 0 >= ar_0 /\ 0 >= ar_1 ] 3.63/1.91 3.63/1.91 strictly and produces the following problem: 3.63/1.91 3.63/1.91 3: T: 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f5(ar_0, ar_1, 1)) [ 0 >= ar_0 /\ 0 >= ar_1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f2(ar_0, ar_1, 1)) [ ar_0 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: ?, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1 - 1, ar_2)) [ ar_1 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1, 0)) [ 0 >= ar_0 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1, ar_2) -> Com_1(f0(ar_0, ar_1, ar_2)) [ 0 <= 0 ] 3.63/1.91 3.63/1.91 start location: koat_start 3.63/1.91 3.63/1.91 leaf cost: 0 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 A polynomial rank function with 3.63/1.91 3.63/1.91 Pol(f4) = V_2 3.63/1.91 3.63/1.91 Pol(f5) = V_2 3.63/1.91 3.63/1.91 Pol(f0) = V_2 3.63/1.91 3.63/1.91 Pol(f2) = V_2 3.63/1.91 3.63/1.91 Pol(koat_start) = V_2 3.63/1.91 3.63/1.91 orients all transitions weakly and the transition 3.63/1.91 3.63/1.91 f4(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1 - 1, ar_2)) [ ar_1 >= 1 ] 3.63/1.91 3.63/1.91 strictly and produces the following problem: 3.63/1.91 3.63/1.91 4: T: 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f5(ar_0, ar_1, 1)) [ 0 >= ar_0 /\ 0 >= ar_1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f2(ar_0, ar_1, 1)) [ ar_0 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: ar_1, Cost: 1) f4(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1 - 1, ar_2)) [ ar_1 >= 1 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 1) f0(ar_0, ar_1, ar_2) -> Com_1(f4(ar_0, ar_1, 0)) [ 0 >= ar_0 ] 3.63/1.91 3.63/1.91 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1, ar_2) -> Com_1(f0(ar_0, ar_1, ar_2)) [ 0 <= 0 ] 3.63/1.91 3.63/1.91 start location: koat_start 3.63/1.91 3.63/1.91 leaf cost: 0 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Complexity upper bound ar_1 + 3 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Time: 0.048 sec (SMT: 0.044 sec) 3.63/1.91 3.63/1.91 3.63/1.91 ---------------------------------------- 3.63/1.91 3.63/1.91 (2) 3.63/1.91 BOUNDS(1, n^1) 3.63/1.91 3.63/1.91 ---------------------------------------- 3.63/1.91 3.63/1.91 (3) Loat Proof (FINISHED) 3.63/1.91 3.63/1.91 3.63/1.91 ### Pre-processing the ITS problem ### 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Initial linear ITS problem 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 0: f4 -> f5 : C'=1, [ 0>=A && 0>=B ], cost: 1 3.63/1.91 3.63/1.91 2: f4 -> f4 : B'=-1+B, [ B>=1 ], cost: 1 3.63/1.91 3.63/1.91 1: f0 -> f2 : C'=1, [ A>=1 ], cost: 1 3.63/1.91 3.63/1.91 3: f0 -> f4 : C'=0, [ 0>=A ], cost: 1 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Removed unreachable and leaf rules: 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 2: f4 -> f4 : B'=-1+B, [ B>=1 ], cost: 1 3.63/1.91 3.63/1.91 3: f0 -> f4 : C'=0, [ 0>=A ], cost: 1 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 ### Simplification by acceleration and chaining ### 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Accelerating simple loops of location 0. 3.63/1.91 3.63/1.91 Accelerating the following rules: 3.63/1.91 3.63/1.91 2: f4 -> f4 : B'=-1+B, [ B>=1 ], cost: 1 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Accelerated rule 2 with metering function B, yielding the new rule 4. 3.63/1.91 3.63/1.91 Removing the simple loops: 2. 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Accelerated all simple loops using metering functions (where possible): 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 4: f4 -> f4 : B'=0, [ B>=1 ], cost: B 3.63/1.91 3.63/1.91 3: f0 -> f4 : C'=0, [ 0>=A ], cost: 1 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Chained accelerated rules (with incoming rules): 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 3: f0 -> f4 : C'=0, [ 0>=A ], cost: 1 3.63/1.91 3.63/1.91 5: f0 -> f4 : B'=0, C'=0, [ 0>=A && B>=1 ], cost: 1+B 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Removed unreachable locations (and leaf rules with constant cost): 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 5: f0 -> f4 : B'=0, C'=0, [ 0>=A && B>=1 ], cost: 1+B 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 ### Computing asymptotic complexity ### 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Fully simplified ITS problem 3.63/1.91 3.63/1.91 Start location: f0 3.63/1.91 3.63/1.91 5: f0 -> f4 : B'=0, C'=0, [ 0>=A && B>=1 ], cost: 1+B 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Computing asymptotic complexity for rule 5 3.63/1.91 3.63/1.91 Solved the limit problem by the following transformations: 3.63/1.91 3.63/1.91 Created initial limit problem: 3.63/1.91 3.63/1.91 1-A (+/+!), 1+B (+), B (+/+!) [not solved] 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 removing all constraints (solved by SMT) 3.63/1.91 3.63/1.91 resulting limit problem: [solved] 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 applying transformation rule (C) using substitution {A==0,B==n} 3.63/1.91 3.63/1.91 resulting limit problem: 3.63/1.91 3.63/1.91 [solved] 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Solution: 3.63/1.91 3.63/1.91 A / 0 3.63/1.91 3.63/1.91 B / n 3.63/1.91 3.63/1.91 Resulting cost 1+n has complexity: Poly(n^1) 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Found new complexity Poly(n^1). 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 Obtained the following overall complexity (w.r.t. the length of the input n): 3.63/1.91 3.63/1.91 Complexity: Poly(n^1) 3.63/1.91 3.63/1.91 Cpx degree: 1 3.63/1.91 3.63/1.91 Solved cost: 1+n 3.63/1.91 3.63/1.91 Rule cost: 1+B 3.63/1.91 3.63/1.91 Rule guard: [ 0>=A && B>=1 ] 3.63/1.91 3.63/1.91 3.63/1.91 3.63/1.91 WORST_CASE(Omega(n^1),?) 3.63/1.91 3.63/1.91 3.63/1.91 ---------------------------------------- 3.63/1.91 3.63/1.91 (4) 3.63/1.91 BOUNDS(n^1, INF) 3.63/1.93 EOF