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