WORST_CASE(?,O(n^1)) * Step 1: NaturalPI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: dfsAcc#3(Leaf(x8),x16) -> Cons(x8,x16) dfsAcc#3(Node(x6,x4),x2) -> dfsAcc#3(x4,dfsAcc#3(x6,x2)) main(x1) -> revApp#2(dfsAcc#3(x1,Nil()),Nil()) revApp#2(Cons(x6,x4),x2) -> revApp#2(x4,Cons(x6,x2)) revApp#2(Nil(),x16) -> x16 - Signature: {dfsAcc#3/2,main/1,revApp#2/2} / {Cons/2,Leaf/1,Nil/0,Node/2} - Obligation: innermost runtime complexity wrt. defined symbols {dfsAcc#3,main,revApp#2} and constructors {Cons,Leaf,Nil ,Node} + Applied Processor: NaturalPI {shape = Linear, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(linear): The following argument positions are considered usable: uargs(dfsAcc#3) = {2}, uargs(revApp#2) = {1} Following symbols are considered usable: {dfsAcc#3,main,revApp#2} TcT has computed the following interpretation: p(Cons) = 6 + x1 + x2 p(Leaf) = 8 + x1 p(Nil) = 0 p(Node) = 8 + x1 + x2 p(dfsAcc#3) = 1 + x1 + x2 p(main) = 8 + 8*x1 p(revApp#2) = 4 + 4*x1 + 2*x2 Following rules are strictly oriented: dfsAcc#3(Leaf(x8),x16) = 9 + x16 + x8 > 6 + x16 + x8 = Cons(x8,x16) dfsAcc#3(Node(x6,x4),x2) = 9 + x2 + x4 + x6 > 2 + x2 + x4 + x6 = dfsAcc#3(x4,dfsAcc#3(x6,x2)) revApp#2(Cons(x6,x4),x2) = 28 + 2*x2 + 4*x4 + 4*x6 > 16 + 2*x2 + 4*x4 + 2*x6 = revApp#2(x4,Cons(x6,x2)) revApp#2(Nil(),x16) = 4 + 2*x16 > x16 = x16 Following rules are (at-least) weakly oriented: main(x1) = 8 + 8*x1 >= 8 + 4*x1 = revApp#2(dfsAcc#3(x1,Nil()),Nil()) * Step 2: NaturalPI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: main(x1) -> revApp#2(dfsAcc#3(x1,Nil()),Nil()) - Weak TRS: dfsAcc#3(Leaf(x8),x16) -> Cons(x8,x16) dfsAcc#3(Node(x6,x4),x2) -> dfsAcc#3(x4,dfsAcc#3(x6,x2)) revApp#2(Cons(x6,x4),x2) -> revApp#2(x4,Cons(x6,x2)) revApp#2(Nil(),x16) -> x16 - Signature: {dfsAcc#3/2,main/1,revApp#2/2} / {Cons/2,Leaf/1,Nil/0,Node/2} - Obligation: innermost runtime complexity wrt. defined symbols {dfsAcc#3,main,revApp#2} and constructors {Cons,Leaf,Nil ,Node} + Applied Processor: NaturalPI {shape = Linear, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(linear): The following argument positions are considered usable: uargs(dfsAcc#3) = {2}, uargs(revApp#2) = {1} Following symbols are considered usable: {dfsAcc#3,main,revApp#2} TcT has computed the following interpretation: p(Cons) = x2 p(Leaf) = x1 p(Nil) = 1 p(Node) = 8 + x1 + x2 p(dfsAcc#3) = 5 + 3*x1 + x2 p(main) = 15 + 9*x1 p(revApp#2) = 2*x1 + 2*x2 Following rules are strictly oriented: main(x1) = 15 + 9*x1 > 14 + 6*x1 = revApp#2(dfsAcc#3(x1,Nil()),Nil()) Following rules are (at-least) weakly oriented: dfsAcc#3(Leaf(x8),x16) = 5 + x16 + 3*x8 >= x16 = Cons(x8,x16) dfsAcc#3(Node(x6,x4),x2) = 29 + x2 + 3*x4 + 3*x6 >= 10 + x2 + 3*x4 + 3*x6 = dfsAcc#3(x4,dfsAcc#3(x6,x2)) revApp#2(Cons(x6,x4),x2) = 2*x2 + 2*x4 >= 2*x2 + 2*x4 = revApp#2(x4,Cons(x6,x2)) revApp#2(Nil(),x16) = 2 + 2*x16 >= x16 = x16 * Step 3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: dfsAcc#3(Leaf(x8),x16) -> Cons(x8,x16) dfsAcc#3(Node(x6,x4),x2) -> dfsAcc#3(x4,dfsAcc#3(x6,x2)) main(x1) -> revApp#2(dfsAcc#3(x1,Nil()),Nil()) revApp#2(Cons(x6,x4),x2) -> revApp#2(x4,Cons(x6,x2)) revApp#2(Nil(),x16) -> x16 - Signature: {dfsAcc#3/2,main/1,revApp#2/2} / {Cons/2,Leaf/1,Nil/0,Node/2} - Obligation: innermost runtime complexity wrt. defined symbols {dfsAcc#3,main,revApp#2} and constructors {Cons,Leaf,Nil ,Node} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))