WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: main(x5,x12) -> map#2(plus_x(x12),x5) map#2(plus_x(x2),Nil()) -> Nil() map#2(plus_x(x6),Cons(x4,x2)) -> Cons(plus_x#1(x6,x4),map#2(plus_x(x6),x2)) plus_x#1(0(),x8) -> x8 plus_x#1(S(x12),x14) -> S(plus_x#1(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1} - Obligation: innermost runtime complexity wrt. defined symbols {main,map#2,plus_x#1} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak innermost dependency pairs: Strict DPs main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x2),Nil()) -> c_2() map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(0(),x8) -> c_4() plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x2),Nil()) -> c_2() map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(0(),x8) -> c_4() plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Strict TRS: main(x5,x12) -> map#2(plus_x(x12),x5) map#2(plus_x(x2),Nil()) -> Nil() map#2(plus_x(x6),Cons(x4,x2)) -> Cons(plus_x#1(x6,x4),map#2(plus_x(x6),x2)) plus_x#1(0(),x8) -> x8 plus_x#1(S(x12),x14) -> S(plus_x#1(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x2),Nil()) -> c_2() map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(0(),x8) -> c_4() plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) * Step 3: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x2),Nil()) -> c_2() map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(0(),x8) -> c_4() plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4} by application of Pre({2,4}) = {1,3,5}. Here rules are labelled as follows: 1: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) 2: map#2#(plus_x(x2),Nil()) -> c_2() 3: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) 4: plus_x#1#(0(),x8) -> c_4() 5: plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) * Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Weak DPs: map#2#(plus_x(x2),Nil()) -> c_2() plus_x#1#(0(),x8) -> c_4() - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) -->_1 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):2 -->_1 map#2#(plus_x(x2),Nil()) -> c_2():4 2:S:map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):3 -->_1 plus_x#1#(0(),x8) -> c_4():5 -->_2 map#2#(plus_x(x2),Nil()) -> c_2():4 -->_2 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):2 3:S:plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) -->_1 plus_x#1#(0(),x8) -> c_4():5 -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):3 4:W:map#2#(plus_x(x2),Nil()) -> c_2() 5:W:plus_x#1#(0(),x8) -> c_4() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: map#2#(plus_x(x2),Nil()) -> c_2() 5: plus_x#1#(0(),x8) -> c_4() * Step 5: RemoveHeads WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)) -->_1 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):2 2:S:map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):3 -->_2 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):2 3:S:plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):3 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). [(1,main#(x5,x12) -> c_1(map#2#(plus_x(x12),x5)))] * Step 6: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 3: plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) The strictly oriented rules are moved into the weak component. ** Step 6.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_3) = {1,2}, uargs(c_5) = {1} Following symbols are considered usable: {main#,map#2#,plus_x#1#} TcT has computed the following interpretation: p(0) = 1 p(Cons) = 2 + x2 p(Nil) = 0 p(S) = 3 + x1 p(main) = x1 + x1^2 + x2 + 2*x2^2 p(map#2) = 1 p(plus_x) = x1 p(plus_x#1) = 1 p(main#) = 2*x2 + x2^2 p(map#2#) = 2*x1*x2 p(plus_x#1#) = 3*x1 p(c_1) = 1 p(c_2) = 0 p(c_3) = x1 + x2 p(c_4) = 2 p(c_5) = 4 + x1 Following rules are strictly oriented: plus_x#1#(S(x12),x14) = 9 + 3*x12 > 4 + 3*x12 = c_5(plus_x#1#(x12,x14)) Following rules are (at-least) weakly oriented: map#2#(plus_x(x6),Cons(x4,x2)) = 2*x2*x6 + 4*x6 >= 2*x2*x6 + 3*x6 = c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) ** Step 6.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) - Weak DPs: plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ** Step 6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) - Weak DPs: plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):2 -->_2 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):1 2:W:plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) -->_1 plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: plus_x#1#(S(x12),x14) -> c_5(plus_x#1#(x12,x14)) ** Step 6.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/2 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)) -->_2 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(plus_x#1#(x6,x4),map#2#(plus_x(x6),x2)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) ** Step 6.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/1 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) The strictly oriented rules are moved into the weak component. *** Step 6.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/1 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_3) = {1} Following symbols are considered usable: {main#,map#2#,plus_x#1#} TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [8] p(Nil) = [0] p(S) = [0] p(main) = [0] p(map#2) = [0] p(plus_x) = [0] p(plus_x#1) = [0] p(main#) = [8] p(map#2#) = [2] x2 + [0] p(plus_x#1#) = [1] x2 + [0] p(c_1) = [1] x1 + [1] p(c_2) = [4] p(c_3) = [1] x1 + [12] p(c_4) = [1] p(c_5) = [2] x1 + [0] Following rules are strictly oriented: map#2#(plus_x(x6),Cons(x4,x2)) = [2] x2 + [2] x4 + [16] > [2] x2 + [12] = c_3(map#2#(plus_x(x6),x2)) Following rules are (at-least) weakly oriented: *** Step 6.b:3.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/1 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 6.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/1 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) -->_1 map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: map#2#(plus_x(x6),Cons(x4,x2)) -> c_3(map#2#(plus_x(x6),x2)) *** Step 6.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {main/2,map#2/2,plus_x#1/2,main#/2,map#2#/2,plus_x#1#/2} / {0/0,Cons/2,Nil/0,S/1,plus_x/1,c_1/1,c_2/0,c_3/1 ,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {main#,map#2#,plus_x#1#} and constructors {0,Cons,Nil,S ,plus_x} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))