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