WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert,insert,leq,sort} and constructors {0,cons,false ,nil,s,true} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) if'insert#(true(),x,y,ys) -> c_2() insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) insert#(x,nil()) -> c_4() leq#(0(),y) -> c_5() leq#(s(x),0()) -> c_6() leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) sort#(nil()) -> c_9() Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) if'insert#(true(),x,y,ys) -> c_2() insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) insert#(x,nil()) -> c_4() leq#(0(),y) -> c_5() leq#(s(x),0()) -> c_6() leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) sort#(nil()) -> c_9() - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4,5,6,9} by application of Pre({2,4,5,6,9}) = {1,3,7,8}. Here rules are labelled as follows: 1: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) 2: if'insert#(true(),x,y,ys) -> c_2() 3: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) 4: insert#(x,nil()) -> c_4() 5: leq#(0(),y) -> c_5() 6: leq#(s(x),0()) -> c_6() 7: leq#(s(x),s(y)) -> c_7(leq#(x,y)) 8: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) 9: sort#(nil()) -> c_9() * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak DPs: if'insert#(true(),x,y,ys) -> c_2() insert#(x,nil()) -> c_4() leq#(0(),y) -> c_5() leq#(s(x),0()) -> c_6() sort#(nil()) -> c_9() - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 -->_1 insert#(x,nil()) -> c_4():6 2:S:insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) -->_2 leq#(s(x),s(y)) -> c_7(leq#(x,y)):3 -->_2 leq#(s(x),0()) -> c_6():8 -->_2 leq#(0(),y) -> c_5():7 -->_1 if'insert#(true(),x,y,ys) -> c_2():5 -->_1 if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)):1 3:S:leq#(s(x),s(y)) -> c_7(leq#(x,y)) -->_1 leq#(s(x),0()) -> c_6():8 -->_1 leq#(0(),y) -> c_5():7 -->_1 leq#(s(x),s(y)) -> c_7(leq#(x,y)):3 4:S:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_2 sort#(nil()) -> c_9():9 -->_1 insert#(x,nil()) -> c_4():6 -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):4 -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 5:W:if'insert#(true(),x,y,ys) -> c_2() 6:W:insert#(x,nil()) -> c_4() 7:W:leq#(0(),y) -> c_5() 8:W:leq#(s(x),0()) -> c_6() 9:W:sort#(nil()) -> c_9() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 9: sort#(nil()) -> c_9() 6: insert#(x,nil()) -> c_4() 5: if'insert#(true(),x,y,ys) -> c_2() 7: leq#(0(),y) -> c_5() 8: leq#(s(x),0()) -> c_6() * Step 4: Decompose WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} Problem (S) - Strict DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} ** Step 4.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + 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: leq#(s(x),s(y)) -> c_7(leq#(x,y)) The strictly oriented rules are moved into the weak component. *** Step 4.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + 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_1) = {1}, uargs(c_3) = {1,2}, uargs(c_7) = {1}, uargs(c_8) = {1,2} Following symbols are considered usable: {if'insert,insert,sort,if'insert#,insert#,leq#,sort#} TcT has computed the following interpretation: p(0) = 3 p(cons) = 1 + x1 + x2 p(false) = 0 p(if'insert) = 2 + x2 + x3 + x4 p(insert) = 1 + x1 + x2 p(leq) = 3*x1 p(nil) = 0 p(s) = 2 + x1 p(sort) = 2*x1 p(true) = 0 p(if'insert#) = 4 + x2 + 2*x2*x4 + 4*x2^2 + 4*x4 p(insert#) = 2*x1*x2 + 4*x1^2 + 4*x2 p(leq#) = x1 + x1*x2 + x2 p(sort#) = 4*x1^2 p(c_1) = 4 + x1 p(c_2) = 1 p(c_3) = x1 + x2 p(c_4) = 0 p(c_5) = 2 p(c_6) = 1 p(c_7) = 5 + x1 p(c_8) = 1 + x1 + x2 p(c_9) = 0 Following rules are strictly oriented: leq#(s(x),s(y)) = 8 + 3*x + x*y + 3*y > 5 + x + x*y + y = c_7(leq#(x,y)) Following rules are (at-least) weakly oriented: if'insert#(false(),x,y,ys) = 4 + x + 2*x*ys + 4*x^2 + 4*ys >= 4 + 2*x*ys + 4*x^2 + 4*ys = c_1(insert#(x,ys)) insert#(x,cons(y,ys)) = 4 + 2*x + 2*x*y + 2*x*ys + 4*x^2 + 4*y + 4*ys >= 4 + 2*x + x*y + 2*x*ys + 4*x^2 + y + 4*ys = c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) sort#(cons(x,xs)) = 4 + 8*x + 8*x*xs + 4*x^2 + 8*xs + 4*xs^2 >= 1 + 4*x*xs + 4*x^2 + 8*xs + 4*xs^2 = c_8(insert#(x,sort(xs)),sort#(xs)) if'insert(false(),x,y,ys) = 2 + x + y + ys >= 2 + x + y + ys = cons(y,insert(x,ys)) if'insert(true(),x,y,ys) = 2 + x + y + ys >= 2 + x + y + ys = cons(x,cons(y,ys)) insert(x,cons(y,ys)) = 2 + x + y + ys >= 2 + x + y + ys = if'insert(leq(x,y),x,y,ys) insert(x,nil()) = 1 + x >= 1 + x = cons(x,nil()) sort(cons(x,xs)) = 2 + 2*x + 2*xs >= 1 + x + 2*xs = insert(x,sort(xs)) sort(nil()) = 0 >= 0 = nil() *** Step 4.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) - Weak DPs: leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 4.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) - Weak DPs: leq#(s(x),s(y)) -> c_7(leq#(x,y)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 2:S:insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) -->_2 leq#(s(x),s(y)) -> c_7(leq#(x,y)):3 -->_1 if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)):1 3:W:leq#(s(x),s(y)) -> c_7(leq#(x,y)) -->_1 leq#(s(x),s(y)) -> c_7(leq#(x,y)):3 4:W:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):4 -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: leq#(s(x),s(y)) -> c_7(leq#(x,y)) *** Step 4.a:1.b:2: SimplifyRHS WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 2:S:insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) -->_1 if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)):1 4:W:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):4 -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) *** Step 4.a:1.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 2: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) Consider the set of all dependency pairs 1: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) 2: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) 3: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) Processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {2} These cover all (indirect) predecessors of dependency pairs {1,2} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. **** Step 4.a:1.b:3.a:1: NaturalMI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) - Weak DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: NaturalMI {miDimension = 3, miDegree = 2, 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 (containing no more than 2 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_3) = {1}, uargs(c_8) = {1,2} Following symbols are considered usable: {if'insert,insert,leq,sort,if'insert#,insert#,leq#,sort#} TcT has computed the following interpretation: p(0) = [0] [0] [0] p(cons) = [1 1 0] [0] [0 0 1] x2 + [0] [0 0 1] [1] p(false) = [0] [0] [1] p(if'insert) = [0 0 0] [1 1 1] [0] [0 0 0] x1 + [0 0 1] x4 + [1] [0 0 1] [0 0 1] [1] p(insert) = [1 1 0] [0] [0 0 1] x2 + [0] [0 0 1] [1] p(leq) = [0] [0] [1] p(nil) = [0] [0] [0] p(s) = [0] [0] [0] p(sort) = [1 1 0] [0] [0 0 1] x1 + [0] [0 0 1] [0] p(true) = [0] [0] [1] p(if'insert#) = [0 0 0] [0 0 0] [0 0 1] [0] [0 0 0] x1 + [1 1 1] x2 + [0 0 0] x4 + [0] [0 0 1] [0 0 0] [1 0 0] [0] p(insert#) = [0 0 0] [0 0 1] [0] [1 1 1] x1 + [0 0 0] x2 + [1] [1 1 1] [0 0 0] [0] p(leq#) = [0] [0] [0] p(sort#) = [1 1 0] [0] [0 0 1] x1 + [1] [1 1 0] [1] p(c_1) = [1 0 0] [0] [0 0 1] x1 + [0] [0 0 0] [1] p(c_2) = [0] [0] [0] p(c_3) = [1 0 0] [0] [0 1 0] x1 + [0] [0 0 0] [0] p(c_4) = [0] [0] [0] p(c_5) = [0] [0] [0] p(c_6) = [0] [0] [0] p(c_7) = [0] [0] [0] p(c_8) = [1 0 0] [1 0 0] [0] [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [1 1 0] [0] p(c_9) = [0] [0] [0] Following rules are strictly oriented: insert#(x,cons(y,ys)) = [0 0 0] [0 0 1] [1] [1 1 1] x + [0 0 0] ys + [1] [1 1 1] [0 0 0] [0] > [0 0 0] [0 0 1] [0] [1 1 1] x + [0 0 0] ys + [0] [0 0 0] [0 0 0] [0] = c_3(if'insert#(leq(x,y),x,y,ys)) Following rules are (at-least) weakly oriented: if'insert#(false(),x,y,ys) = [0 0 0] [0 0 1] [0] [1 1 1] x + [0 0 0] ys + [0] [0 0 0] [1 0 0] [1] >= [0 0 0] [0 0 1] [0] [1 1 1] x + [0 0 0] ys + [0] [0 0 0] [0 0 0] [1] = c_1(insert#(x,ys)) sort#(cons(x,xs)) = [1 1 1] [0] [0 0 1] xs + [2] [1 1 1] [1] >= [1 1 1] [0] [0 0 1] xs + [1] [1 1 1] [1] = c_8(insert#(x,sort(xs)),sort#(xs)) if'insert(false(),x,y,ys) = [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] = cons(y,insert(x,ys)) if'insert(true(),x,y,ys) = [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] = cons(x,cons(y,ys)) insert(x,cons(y,ys)) = [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] >= [1 1 1] [0] [0 0 1] ys + [1] [0 0 1] [2] = if'insert(leq(x,y),x,y,ys) insert(x,nil()) = [0] [0] [1] >= [0] [0] [1] = cons(x,nil()) leq(0(),y) = [0] [0] [1] >= [0] [0] [1] = true() leq(s(x),0()) = [0] [0] [1] >= [0] [0] [1] = false() leq(s(x),s(y)) = [0] [0] [1] >= [0] [0] [1] = leq(x,y) sort(cons(x,xs)) = [1 1 1] [0] [0 0 1] xs + [1] [0 0 1] [1] >= [1 1 1] [0] [0 0 1] xs + [0] [0 0 1] [1] = insert(x,sort(xs)) sort(nil()) = [0] [0] [0] >= [0] [0] [0] = nil() **** Step 4.a:1.b:3.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) - Weak DPs: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 4.a:1.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)):2 2:W:insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) -->_1 if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)):1 3:W:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):3 -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) 1: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) 2: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys)) **** Step 4.a:1.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak DPs: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) leq#(s(x),s(y)) -> c_7(leq#(x,y)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):3 -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):1 2:W:if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) -->_1 insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)):3 3:W:insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) -->_2 leq#(s(x),s(y)) -> c_7(leq#(x,y)):4 -->_1 if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)):2 4:W:leq#(s(x),s(y)) -> c_7(leq#(x,y)) -->_1 leq#(s(x),s(y)) -> c_7(leq#(x,y)):4 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: insert#(x,cons(y,ys)) -> c_3(if'insert#(leq(x,y),x,y,ys),leq#(x,y)) 2: if'insert#(false(),x,y,ys) -> c_1(insert#(x,ys)) 4: leq#(s(x),s(y)) -> c_7(leq#(x,y)) ** Step 4.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/2,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)) -->_2 sort#(cons(x,xs)) -> c_8(insert#(x,sort(xs)),sort#(xs)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sort#(cons(x,xs)) -> c_8(sort#(xs)) ** Step 4.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#(cons(x,xs)) -> c_8(sort#(xs)) - Weak TRS: if'insert(false(),x,y,ys) -> cons(y,insert(x,ys)) if'insert(true(),x,y,ys) -> cons(x,cons(y,ys)) insert(x,cons(y,ys)) -> if'insert(leq(x,y),x,y,ys) insert(x,nil()) -> cons(x,nil()) leq(0(),y) -> true() leq(s(x),0()) -> false() leq(s(x),s(y)) -> leq(x,y) sort(cons(x,xs)) -> insert(x,sort(xs)) sort(nil()) -> nil() - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: sort#(cons(x,xs)) -> c_8(sort#(xs)) ** Step 4.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#(cons(x,xs)) -> c_8(sort#(xs)) - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + 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: sort#(cons(x,xs)) -> c_8(sort#(xs)) The strictly oriented rules are moved into the weak component. *** Step 4.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#(cons(x,xs)) -> c_8(sort#(xs)) - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + 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_8) = {1} Following symbols are considered usable: {if'insert#,insert#,leq#,sort#} TcT has computed the following interpretation: p(0) = [2] p(cons) = [1] x1 + [1] x2 + [2] p(false) = [1] p(if'insert) = [1] x1 + [1] x2 + [1] x3 + [2] x4 + [1] p(insert) = [4] x2 + [1] p(leq) = [8] x2 + [2] p(nil) = [2] p(s) = [1] p(sort) = [8] p(true) = [1] p(if'insert#) = [1] x1 + [2] x2 + [4] x3 + [1] x4 + [1] p(insert#) = [1] x2 + [0] p(leq#) = [1] x1 + [2] x2 + [0] p(sort#) = [8] x1 + [0] p(c_1) = [2] x1 + [0] p(c_2) = [0] p(c_3) = [1] x1 + [1] x2 + [0] p(c_4) = [8] p(c_5) = [1] p(c_6) = [8] p(c_7) = [1] x1 + [0] p(c_8) = [1] x1 + [15] p(c_9) = [0] Following rules are strictly oriented: sort#(cons(x,xs)) = [8] x + [8] xs + [16] > [8] xs + [15] = c_8(sort#(xs)) Following rules are (at-least) weakly oriented: *** Step 4.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sort#(cons(x,xs)) -> c_8(sort#(xs)) - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 4.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sort#(cons(x,xs)) -> c_8(sort#(xs)) - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:sort#(cons(x,xs)) -> c_8(sort#(xs)) -->_1 sort#(cons(x,xs)) -> c_8(sort#(xs)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: sort#(cons(x,xs)) -> c_8(sort#(xs)) *** Step 4.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {if'insert/4,insert/2,leq/2,sort/1,if'insert#/4,insert#/2,leq#/2,sort#/1} / {0/0,cons/2,false/0,nil/0,s/1 ,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0} - Obligation: innermost runtime complexity wrt. defined symbols {if'insert#,insert#,leq#,sort#} and constructors {0,cons ,false,nil,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))