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