3.95/1.78 WORST_CASE(Omega(n^1), O(n^1)) 3.95/1.79 proof of /export/starexec/sandbox2/benchmark/theBenchmark.koat 3.95/1.79 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 3.95/1.79 3.95/1.79 3.95/1.79 The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(n^1, max(1, 2 + Arg_0)). 3.95/1.79 3.95/1.79 (0) CpxIntTrs 3.95/1.79 (1) Koat2 Proof [FINISHED, 26 ms] 3.95/1.79 (2) BOUNDS(1, max(1, 2 + Arg_0)) 3.95/1.79 (3) Loat Proof [FINISHED, 129 ms] 3.95/1.79 (4) BOUNDS(n^1, INF) 3.95/1.79 3.95/1.79 3.95/1.79 ---------------------------------------- 3.95/1.79 3.95/1.79 (0) 3.95/1.79 Obligation: 3.95/1.79 Complexity Int TRS consisting of the following rules: 3.95/1.79 f1(A) -> Com_1(f0(A)) :|: TRUE 3.95/1.79 f0(A) -> Com_1(f0(A - 1)) :|: A >= 0 3.95/1.79 3.95/1.79 The start-symbols are:[f1_1] 3.95/1.79 3.95/1.79 3.95/1.79 ---------------------------------------- 3.95/1.79 3.95/1.79 (1) Koat2 Proof (FINISHED) 3.95/1.79 YES( ?, max([1, 2+Arg_0]) {O(n)}) 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Initial Complexity Problem: 3.95/1.79 3.95/1.79 Start: f1 3.95/1.79 3.95/1.79 Program_Vars: Arg_0 3.95/1.79 3.95/1.79 Temp_Vars: 3.95/1.79 3.95/1.79 Locations: f0, f1 3.95/1.79 3.95/1.79 Transitions: 3.95/1.79 3.95/1.79 f0(Arg_0) -> f0(Arg_0-1):|:0 <= Arg_0 3.95/1.79 3.95/1.79 f1(Arg_0) -> f0(Arg_0):|: 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Timebounds: 3.95/1.79 3.95/1.79 Overall timebound: max([1, 2+Arg_0]) {O(n)} 3.95/1.79 3.95/1.79 1: f0->f0: max([0, 1+Arg_0]) {O(n)} 3.95/1.79 3.95/1.79 0: f1->f0: 1 {O(1)} 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Costbounds: 3.95/1.79 3.95/1.79 Overall costbound: max([1, 2+Arg_0]) {O(n)} 3.95/1.79 3.95/1.79 1: f0->f0: max([0, 1+Arg_0]) {O(n)} 3.95/1.79 3.95/1.79 0: f1->f0: 1 {O(1)} 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Sizebounds: 3.95/1.79 3.95/1.79 `Lower: 3.95/1.79 3.95/1.79 1: f0->f0, Arg_0: -1 {O(1)} 3.95/1.79 3.95/1.79 0: f1->f0, Arg_0: Arg_0 {O(n)} 3.95/1.79 3.95/1.79 `Upper: 3.95/1.79 3.95/1.79 1: f0->f0, Arg_0: Arg_0 {O(n)} 3.95/1.79 3.95/1.79 0: f1->f0, Arg_0: Arg_0 {O(n)} 3.95/1.79 3.95/1.79 3.95/1.79 ---------------------------------------- 3.95/1.79 3.95/1.79 (2) 3.95/1.79 BOUNDS(1, max(1, 2 + Arg_0)) 3.95/1.79 3.95/1.79 ---------------------------------------- 3.95/1.79 3.95/1.79 (3) Loat Proof (FINISHED) 3.95/1.79 3.95/1.79 3.95/1.79 ### Pre-processing the ITS problem ### 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Initial linear ITS problem 3.95/1.79 3.95/1.79 Start location: f1 3.95/1.79 3.95/1.79 0: f1 -> f0 : [], cost: 1 3.95/1.79 3.95/1.79 1: f0 -> f0 : A'=-1+A, [ A>=0 ], cost: 1 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 ### Simplification by acceleration and chaining ### 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Accelerating simple loops of location 1. 3.95/1.79 3.95/1.79 Accelerating the following rules: 3.95/1.79 3.95/1.79 1: f0 -> f0 : A'=-1+A, [ A>=0 ], cost: 1 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Accelerated rule 1 with metering function 1+A, yielding the new rule 2. 3.95/1.79 3.95/1.79 Removing the simple loops: 1. 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Accelerated all simple loops using metering functions (where possible): 3.95/1.79 3.95/1.79 Start location: f1 3.95/1.79 3.95/1.79 0: f1 -> f0 : [], cost: 1 3.95/1.79 3.95/1.79 2: f0 -> f0 : A'=-1, [ A>=0 ], cost: 1+A 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Chained accelerated rules (with incoming rules): 3.95/1.79 3.95/1.79 Start location: f1 3.95/1.79 3.95/1.79 0: f1 -> f0 : [], cost: 1 3.95/1.79 3.95/1.79 3: f1 -> f0 : A'=-1, [ A>=0 ], cost: 2+A 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Removed unreachable locations (and leaf rules with constant cost): 3.95/1.79 3.95/1.79 Start location: f1 3.95/1.79 3.95/1.79 3: f1 -> f0 : A'=-1, [ A>=0 ], cost: 2+A 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 ### Computing asymptotic complexity ### 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Fully simplified ITS problem 3.95/1.79 3.95/1.79 Start location: f1 3.95/1.79 3.95/1.79 3: f1 -> f0 : A'=-1, [ A>=0 ], cost: 2+A 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Computing asymptotic complexity for rule 3 3.95/1.79 3.95/1.79 Solved the limit problem by the following transformations: 3.95/1.79 3.95/1.79 Created initial limit problem: 3.95/1.79 3.95/1.79 2+A (+), 1+A (+/+!) [not solved] 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 removing all constraints (solved by SMT) 3.95/1.79 3.95/1.79 resulting limit problem: [solved] 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 applying transformation rule (C) using substitution {A==n} 3.95/1.79 3.95/1.79 resulting limit problem: 3.95/1.79 3.95/1.79 [solved] 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Solution: 3.95/1.79 3.95/1.79 A / n 3.95/1.79 3.95/1.79 Resulting cost 2+n has complexity: Poly(n^1) 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Found new complexity Poly(n^1). 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 Obtained the following overall complexity (w.r.t. the length of the input n): 3.95/1.79 3.95/1.79 Complexity: Poly(n^1) 3.95/1.79 3.95/1.79 Cpx degree: 1 3.95/1.79 3.95/1.79 Solved cost: 2+n 3.95/1.79 3.95/1.79 Rule cost: 2+A 3.95/1.79 3.95/1.79 Rule guard: [ A>=0 ] 3.95/1.79 3.95/1.79 3.95/1.79 3.95/1.79 WORST_CASE(Omega(n^1),?) 3.95/1.79 3.95/1.79 3.95/1.79 ---------------------------------------- 3.95/1.79 3.95/1.79 (4) 3.95/1.79 BOUNDS(n^1, INF) 3.95/1.80 EOF