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