4.84/2.80 WORST_CASE(NON_POLY, ?) 4.86/2.81 proof of /export/starexec/sandbox/benchmark/theBenchmark.koat 4.86/2.81 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 4.86/2.81 4.86/2.81 4.86/2.81 The runtime complexity of the given CpxIntTrs could be proven to be BOUNDS(EXP, EXP). 4.86/2.81 4.86/2.81 (0) CpxIntTrs 4.86/2.81 (1) Koat Proof [FINISHED, 16 ms] 4.86/2.81 (2) BOUNDS(1, EXP) 4.86/2.81 (3) Loat Proof [FINISHED, 1232 ms] 4.86/2.81 (4) BOUNDS(EXP, INF) 4.86/2.81 4.86/2.81 4.86/2.81 ---------------------------------------- 4.86/2.81 4.86/2.81 (0) 4.86/2.81 Obligation: 4.86/2.81 Complexity Int TRS consisting of the following rules: 4.86/2.81 f(A, B) -> Com_1(g(A, B)) :|: TRUE 4.86/2.81 g(A, B) -> Com_1(g(2 * A, B - 1)) :|: B > 0 4.86/2.81 g(A, B) -> Com_1(h(A, B)) :|: 0 >= B 4.86/2.81 h(A, B) -> Com_1(h(A - 1, B)) :|: A > 0 4.86/2.81 4.86/2.81 The start-symbols are:[f_2] 4.86/2.81 4.86/2.81 4.86/2.81 ---------------------------------------- 4.86/2.81 4.86/2.81 (1) Koat Proof (FINISHED) 4.86/2.81 YES(?, pow(2, ar_0) * ar_1 + ar_0 + ar_1 + 2) 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Initial complexity problem: 4.86/2.81 4.86/2.81 1: T: 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1)) 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ] 4.86/2.81 4.86/2.81 start location: koat_start 4.86/2.81 4.86/2.81 leaf cost: 0 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Repeatedly propagating knowledge in problem 1 produces the following problem: 4.86/2.81 4.86/2.81 2: T: 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1)) 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ] 4.86/2.81 4.86/2.81 start location: koat_start 4.86/2.81 4.86/2.81 leaf cost: 0 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 A polynomial rank function with 4.86/2.81 4.86/2.81 Pol(f) = 1 4.86/2.81 4.86/2.81 Pol(g) = 1 4.86/2.81 4.86/2.81 Pol(h) = 0 4.86/2.81 4.86/2.81 Pol(koat_start) = 1 4.86/2.81 4.86/2.81 orients all transitions weakly and the transition 4.86/2.81 4.86/2.81 g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 strictly and produces the following problem: 4.86/2.81 4.86/2.81 3: T: 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1)) 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ] 4.86/2.81 4.86/2.81 start location: koat_start 4.86/2.81 4.86/2.81 leaf cost: 0 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 A polynomial rank function with 4.86/2.81 4.86/2.81 Pol(f) = V_1 4.86/2.81 4.86/2.81 Pol(g) = V_1 4.86/2.81 4.86/2.81 Pol(h) = V_1 4.86/2.81 4.86/2.81 Pol(koat_start) = V_1 4.86/2.81 4.86/2.81 orients all transitions weakly and the transition 4.86/2.81 4.86/2.81 g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 strictly and produces the following problem: 4.86/2.81 4.86/2.81 4: T: 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1)) 4.86/2.81 4.86/2.81 (Comp: ar_0, Cost: 1) g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 (Comp: ?, Cost: 1) h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ] 4.86/2.81 4.86/2.81 start location: koat_start 4.86/2.81 4.86/2.81 leaf cost: 0 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 A polynomial rank function with 4.86/2.81 4.86/2.81 Pol(h) = V_2 4.86/2.81 4.86/2.81 and size complexities 4.86/2.81 4.86/2.81 S("koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ]", 0-0) = ar_0 4.86/2.81 4.86/2.81 S("koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ]", 0-1) = ar_1 4.86/2.81 4.86/2.81 S("h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ]", 0-0) = ar_0 4.86/2.81 4.86/2.81 S("h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ]", 0-1) = pow(2, ar_0) * ar_1 + ar_1 4.86/2.81 4.86/2.81 S("g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ]", 0-0) = ar_0 4.86/2.81 4.86/2.81 S("g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ]", 0-1) = pow(2, ar_0) * ar_1 + ar_1 4.86/2.81 4.86/2.81 S("g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ]", 0-0) = ar_0 4.86/2.81 4.86/2.81 S("g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ]", 0-1) = pow(2, ar_0) * ar_1 4.86/2.81 4.86/2.81 S("f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1))", 0-0) = ar_0 4.86/2.81 4.86/2.81 S("f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1))", 0-1) = ar_1 4.86/2.81 4.86/2.81 orients the transitions 4.86/2.81 4.86/2.81 h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 weakly and the transition 4.86/2.81 4.86/2.81 h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 strictly and produces the following problem: 4.86/2.81 4.86/2.81 5: T: 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) f(ar_0, ar_1) -> Com_1(g(ar_0, ar_1)) 4.86/2.81 4.86/2.81 (Comp: ar_0, Cost: 1) g(ar_0, ar_1) -> Com_1(g(ar_0 - 1, 2*ar_1)) [ ar_0 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 1) g(ar_0, ar_1) -> Com_1(h(ar_0, ar_1)) [ 0 >= ar_0 ] 4.86/2.81 4.86/2.81 (Comp: pow(2, ar_0) * ar_1 + ar_1, Cost: 1) h(ar_0, ar_1) -> Com_1(h(ar_0, ar_1 - 1)) [ ar_1 >= 1 ] 4.86/2.81 4.86/2.81 (Comp: 1, Cost: 0) koat_start(ar_0, ar_1) -> Com_1(f(ar_0, ar_1)) [ 0 <= 0 ] 4.86/2.81 4.86/2.81 start location: koat_start 4.86/2.81 4.86/2.81 leaf cost: 0 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Complexity upper bound pow(2, ar_0) * ar_1 + ar_0 + ar_1 + 2 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Time: 0.099 sec (SMT: 0.093 sec) 4.86/2.81 4.86/2.81 4.86/2.81 ---------------------------------------- 4.86/2.81 4.86/2.81 (2) 4.86/2.81 BOUNDS(1, EXP) 4.86/2.81 4.86/2.81 ---------------------------------------- 4.86/2.81 4.86/2.81 (3) Loat Proof (FINISHED) 4.86/2.81 4.86/2.81 4.86/2.81 ### Pre-processing the ITS problem ### 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Initial linear ITS problem 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 0: f -> g : [], cost: 1 4.86/2.81 4.86/2.81 1: g -> g : A'=-1+A, B'=2*B, [ A>=1 ], cost: 1 4.86/2.81 4.86/2.81 2: g -> h : [ 0>=A ], cost: 1 4.86/2.81 4.86/2.81 3: h -> h : B'=-1+B, [ B>=1 ], cost: 1 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 ### Simplification by acceleration and chaining ### 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Accelerating simple loops of location 1. 4.86/2.81 4.86/2.81 Accelerating the following rules: 4.86/2.81 4.86/2.81 1: g -> g : A'=-1+A, B'=2*B, [ A>=1 ], cost: 1 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Accelerated rule 1 with metering function A, yielding the new rule 4. 4.86/2.81 4.86/2.81 Removing the simple loops: 1. 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Accelerating simple loops of location 2. 4.86/2.81 4.86/2.81 Accelerating the following rules: 4.86/2.81 4.86/2.81 3: h -> h : B'=-1+B, [ B>=1 ], cost: 1 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Accelerated rule 3 with metering function B, yielding the new rule 5. 4.86/2.81 4.86/2.81 Removing the simple loops: 3. 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Accelerated all simple loops using metering functions (where possible): 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 0: f -> g : [], cost: 1 4.86/2.81 4.86/2.81 2: g -> h : [ 0>=A ], cost: 1 4.86/2.81 4.86/2.81 4: g -> g : A'=0, B'=2^A*B, [ A>=1 ], cost: A 4.86/2.81 4.86/2.81 5: h -> h : B'=0, [ B>=1 ], cost: B 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Chained accelerated rules (with incoming rules): 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 0: f -> g : [], cost: 1 4.86/2.81 4.86/2.81 6: f -> g : A'=0, B'=2^A*B, [ A>=1 ], cost: 1+A 4.86/2.81 4.86/2.81 2: g -> h : [ 0>=A ], cost: 1 4.86/2.81 4.86/2.81 7: g -> h : B'=0, [ 0>=A && B>=1 ], cost: 1+B 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Removed unreachable locations (and leaf rules with constant cost): 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 0: f -> g : [], cost: 1 4.86/2.81 4.86/2.81 6: f -> g : A'=0, B'=2^A*B, [ A>=1 ], cost: 1+A 4.86/2.81 4.86/2.81 7: g -> h : B'=0, [ 0>=A && B>=1 ], cost: 1+B 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Eliminated locations (on tree-shaped paths): 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 8: f -> h : B'=0, [ 0>=A && B>=1 ], cost: 2+B 4.86/2.81 4.86/2.81 9: f -> h : A'=0, B'=0, [ A>=1 && 2^A*B>=1 ], cost: 2+2^A*B+A 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 ### Computing asymptotic complexity ### 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Fully simplified ITS problem 4.86/2.81 4.86/2.81 Start location: f 4.86/2.81 4.86/2.81 8: f -> h : B'=0, [ 0>=A && B>=1 ], cost: 2+B 4.86/2.81 4.86/2.81 9: f -> h : A'=0, B'=0, [ A>=1 && 2^A*B>=1 ], cost: 2+2^A*B+A 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Computing asymptotic complexity for rule 8 4.86/2.81 4.86/2.81 Solved the limit problem by the following transformations: 4.86/2.81 4.86/2.81 Created initial limit problem: 4.86/2.81 4.86/2.81 2+B (+), 1-A (+/+!), B (+/+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 removing all constraints (solved by SMT) 4.86/2.81 4.86/2.81 resulting limit problem: [solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (C) using substitution {A==-n,B==n} 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 [solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Solution: 4.86/2.81 4.86/2.81 A / -n 4.86/2.81 4.86/2.81 B / n 4.86/2.81 4.86/2.81 Resulting cost 2+n has complexity: Poly(n^1) 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Found new complexity Poly(n^1). 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Computing asymptotic complexity for rule 9 4.86/2.81 4.86/2.81 Solved the limit problem by the following transformations: 4.86/2.81 4.86/2.81 Created initial limit problem: 4.86/2.81 4.86/2.81 2^A*B (+/+!), A (+/+!), 2+2^A*B+A (+) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (C) using substitution {A==1} 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 1 (+/+!), 3+2*B (+), 2*B (+/+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (B), deleting 1 (+/+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 3+2*B (+), 2*B (+/+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (D), replacing 3+2*B (+) by 2*B (+) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2*B (+) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (A), replacing 2*B (+) by B (+) and 2 (+!) using + limit vector (+,+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2 (+!), B (+) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (B), deleting 2 (+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 B (+) [solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Solved the limit problem by the following transformations: 4.86/2.81 4.86/2.81 Created initial limit problem: 4.86/2.81 4.86/2.81 2^A*B (+/+!), A (+/+!), 2+2^A*B+A (+) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (A), replacing 2^A*B (+/+!) by 2^A (+) and B (+!) using + limit vector (+,+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2^A (+), A (+/+!), 2+2^A*B+A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (E), replacing 2^A (+) by 1 (+/+!) and A (+) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 1 (+/+!), A (+), 2+2^A*B+A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (B), deleting 1 (+/+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 A (+), 2+2^A*B+A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (A), replacing 2+2^A*B+A (+) by 2 (+!) and 2^A*B+A (+) using + limit vector (+!,+) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2 (+!), A (+), 2^A*B+A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (B), deleting 2 (+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 A (+), 2^A*B+A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (A), replacing 2^A*B+A (+) by A (+) and 2^A*B (+) using + limit vector (+,+) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2^A*B (+), A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (A), replacing 2^A*B (+) by 2^A (+) and B (+!) using + limit vector (+,+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 2^A (+), A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (E), replacing 2^A (+) by 1 (+/+!) and A (+) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 1 (+/+!), A (+), B (+!) [not solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 applying transformation rule (B), deleting 1 (+/+!) 4.86/2.81 4.86/2.81 resulting limit problem: 4.86/2.81 4.86/2.81 A (+), B (+!) [solved] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Solution: 4.86/2.81 4.86/2.81 A / n 4.86/2.81 4.86/2.81 B / 1 4.86/2.81 4.86/2.81 Resulting cost 2+2^n+n has complexity: Exp 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Found new complexity Exp. 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 Obtained the following overall complexity (w.r.t. the length of the input n): 4.86/2.81 4.86/2.81 Complexity: Exp 4.86/2.81 4.86/2.81 Cpx degree: Exp 4.86/2.81 4.86/2.81 Solved cost: 2+2^n+n 4.86/2.81 4.86/2.81 Rule cost: 2+2^A*B+A 4.86/2.81 4.86/2.81 Rule guard: [ A>=1 && 2^A*B>=1 ] 4.86/2.81 4.86/2.81 4.86/2.81 4.86/2.81 WORST_CASE(EXP,?) 4.86/2.81 4.86/2.81 4.86/2.81 ---------------------------------------- 4.86/2.81 4.86/2.81 (4) 4.86/2.81 BOUNDS(EXP, INF) 4.86/2.83 EOF