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