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