WORST_CASE(?,O(n^2)) * Step 1: WeightGap WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: add(0(),y) -> y add(s(x),y) -> s(add(x,y)) mtadd(x,cons(t,ts)) -> cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) -> nil() tadd(x,leaf()) -> leaf() tadd(x,node(y,ts)) -> node(add(x,y),mtadd(x,ts)) - Signature: {add/2,mtadd/2,tadd/2} / {0/0,cons/2,leaf/0,nil/0,node/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {add,mtadd,tadd} and constructors {0,cons,leaf,nil,node,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {1,2}, uargs(node) = {1,2}, uargs(s) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(add) = [7] x2 + [5] p(cons) = [1] x1 + [1] x2 + [0] p(leaf) = [0] p(mtadd) = [7] x2 + [0] p(nil) = [0] p(node) = [1] x1 + [1] x2 + [1] p(s) = [1] x1 + [0] p(tadd) = [7] x2 + [0] Following rules are strictly oriented: add(0(),y) = [7] y + [5] > [1] y + [0] = y tadd(x,node(y,ts)) = [7] ts + [7] y + [7] > [7] ts + [7] y + [6] = node(add(x,y),mtadd(x,ts)) Following rules are (at-least) weakly oriented: add(s(x),y) = [7] y + [5] >= [7] y + [5] = s(add(x,y)) mtadd(x,cons(t,ts)) = [7] t + [7] ts + [0] >= [7] t + [7] ts + [0] = cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) = [0] >= [0] = nil() tadd(x,leaf()) = [0] >= [0] = leaf() Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 2: WeightGap WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: add(s(x),y) -> s(add(x,y)) mtadd(x,cons(t,ts)) -> cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) -> nil() tadd(x,leaf()) -> leaf() - Weak TRS: add(0(),y) -> y tadd(x,node(y,ts)) -> node(add(x,y),mtadd(x,ts)) - Signature: {add/2,mtadd/2,tadd/2} / {0/0,cons/2,leaf/0,nil/0,node/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {add,mtadd,tadd} and constructors {0,cons,leaf,nil,node,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {1,2}, uargs(node) = {1,2}, uargs(s) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(add) = [2] x2 + [0] p(cons) = [1] x1 + [1] x2 + [3] p(leaf) = [0] p(mtadd) = [2] x2 + [13] p(nil) = [0] p(node) = [1] x1 + [1] x2 + [0] p(s) = [1] x1 + [2] p(tadd) = [2] x2 + [13] Following rules are strictly oriented: mtadd(x,nil()) = [13] > [0] = nil() tadd(x,leaf()) = [13] > [0] = leaf() Following rules are (at-least) weakly oriented: add(0(),y) = [2] y + [0] >= [1] y + [0] = y add(s(x),y) = [2] y + [0] >= [2] y + [2] = s(add(x,y)) mtadd(x,cons(t,ts)) = [2] t + [2] ts + [19] >= [2] t + [2] ts + [29] = cons(tadd(x,t),mtadd(x,ts)) tadd(x,node(y,ts)) = [2] ts + [2] y + [13] >= [2] ts + [2] y + [13] = node(add(x,y),mtadd(x,ts)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 3: WeightGap WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: add(s(x),y) -> s(add(x,y)) mtadd(x,cons(t,ts)) -> cons(tadd(x,t),mtadd(x,ts)) - Weak TRS: add(0(),y) -> y mtadd(x,nil()) -> nil() tadd(x,leaf()) -> leaf() tadd(x,node(y,ts)) -> node(add(x,y),mtadd(x,ts)) - Signature: {add/2,mtadd/2,tadd/2} / {0/0,cons/2,leaf/0,nil/0,node/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {add,mtadd,tadd} and constructors {0,cons,leaf,nil,node,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {1,2}, uargs(node) = {1,2}, uargs(s) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(add) = [2] x2 + [0] p(cons) = [1] x1 + [1] x2 + [2] p(leaf) = [4] p(mtadd) = [2] x2 + [0] p(nil) = [10] p(node) = [1] x1 + [1] x2 + [12] p(s) = [1] x1 + [12] p(tadd) = [2] x2 + [0] Following rules are strictly oriented: mtadd(x,cons(t,ts)) = [2] t + [2] ts + [4] > [2] t + [2] ts + [2] = cons(tadd(x,t),mtadd(x,ts)) Following rules are (at-least) weakly oriented: add(0(),y) = [2] y + [0] >= [1] y + [0] = y add(s(x),y) = [2] y + [0] >= [2] y + [12] = s(add(x,y)) mtadd(x,nil()) = [20] >= [10] = nil() tadd(x,leaf()) = [8] >= [4] = leaf() tadd(x,node(y,ts)) = [2] ts + [2] y + [24] >= [2] ts + [2] y + [12] = node(add(x,y),mtadd(x,ts)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 4: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: add(s(x),y) -> s(add(x,y)) - Weak TRS: add(0(),y) -> y mtadd(x,cons(t,ts)) -> cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) -> nil() tadd(x,leaf()) -> leaf() tadd(x,node(y,ts)) -> node(add(x,y),mtadd(x,ts)) - Signature: {add/2,mtadd/2,tadd/2} / {0/0,cons/2,leaf/0,nil/0,node/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {add,mtadd,tadd} and constructors {0,cons,leaf,nil,node,s} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(cons) = {1,2}, uargs(node) = {1,2}, uargs(s) = {1} Following symbols are considered usable: {add,mtadd,tadd} TcT has computed the following interpretation: p(0) = 2 p(add) = 2 + 5*x1 + x1*x2 p(cons) = 2 + x1 + x2 p(leaf) = 0 p(mtadd) = 2 + 4*x1 + 4*x1*x2 + 3*x2 p(nil) = 0 p(node) = 2 + x1 + x2 p(s) = 2 + x1 p(tadd) = 3 + 4*x1 + 4*x1*x2 + 3*x2 Following rules are strictly oriented: add(s(x),y) = 12 + 5*x + x*y + 2*y > 4 + 5*x + x*y = s(add(x,y)) Following rules are (at-least) weakly oriented: add(0(),y) = 12 + 2*y >= y = y mtadd(x,cons(t,ts)) = 8 + 3*t + 4*t*x + 3*ts + 4*ts*x + 12*x >= 7 + 3*t + 4*t*x + 3*ts + 4*ts*x + 8*x = cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) = 2 + 4*x >= 0 = nil() tadd(x,leaf()) = 3 + 4*x >= 0 = leaf() tadd(x,node(y,ts)) = 9 + 3*ts + 4*ts*x + 12*x + 4*x*y + 3*y >= 6 + 3*ts + 4*ts*x + 9*x + x*y = node(add(x,y),mtadd(x,ts)) * Step 5: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: add(0(),y) -> y add(s(x),y) -> s(add(x,y)) mtadd(x,cons(t,ts)) -> cons(tadd(x,t),mtadd(x,ts)) mtadd(x,nil()) -> nil() tadd(x,leaf()) -> leaf() tadd(x,node(y,ts)) -> node(add(x,y),mtadd(x,ts)) - Signature: {add/2,mtadd/2,tadd/2} / {0/0,cons/2,leaf/0,nil/0,node/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {add,mtadd,tadd} and constructors {0,cons,leaf,nil,node,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))