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