WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) main(x1) -> sort#2(x1) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1,gt#2,insert#3,main ,sort#2} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() gt#2#(0(),x8) -> c_3() gt#2#(S(x12),0()) -> c_4() gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x2,Nil()) -> c_6() insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) sort#2#(Nil()) -> c_10() Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() gt#2#(0(),x8) -> c_3() gt#2#(S(x12),0()) -> c_4() gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x2,Nil()) -> c_6() insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) sort#2#(Nil()) -> c_10() - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) main(x1) -> sort#2(x1) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() gt#2#(0(),x8) -> c_3() gt#2#(S(x12),0()) -> c_4() gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x2,Nil()) -> c_6() insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) sort#2#(Nil()) -> c_10() * Step 3: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() gt#2#(0(),x8) -> c_3() gt#2#(S(x12),0()) -> c_4() gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x2,Nil()) -> c_6() insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) sort#2#(Nil()) -> c_10() - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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,3,4,6,10} by application of Pre({2,3,4,6,10}) = {1,5,7,8,9}. Here rules are labelled as follows: 1: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) 2: cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() 3: gt#2#(0(),x8) -> c_3() 4: gt#2#(S(x12),0()) -> c_4() 5: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) 6: insert#3#(x2,Nil()) -> c_6() 7: insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) 8: main#(x1) -> c_8(sort#2#(x1)) 9: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) 10: sort#2#(Nil()) -> c_10() * Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak DPs: cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() gt#2#(0(),x8) -> c_3() gt#2#(S(x12),0()) -> c_4() insert#3#(x2,Nil()) -> c_6() sort#2#(Nil()) -> c_10() - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):3 -->_1 insert#3#(x2,Nil()) -> c_6():9 2:S:gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) -->_1 gt#2#(S(x12),0()) -> c_4():8 -->_1 gt#2#(0(),x8) -> c_3():7 -->_1 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 3:S:insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) -->_2 gt#2#(S(x12),0()) -> c_4():8 -->_2 gt#2#(0(),x8) -> c_3():7 -->_1 cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2():6 -->_2 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 -->_1 cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)):1 4:S:main#(x1) -> c_8(sort#2#(x1)) -->_1 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):5 -->_1 sort#2#(Nil()) -> c_10():10 5:S:sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) -->_2 sort#2#(Nil()) -> c_10():10 -->_1 insert#3#(x2,Nil()) -> c_6():9 -->_2 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):5 -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):3 6:W:cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() 7:W:gt#2#(0(),x8) -> c_3() 8:W:gt#2#(S(x12),0()) -> c_4() 9:W:insert#3#(x2,Nil()) -> c_6() 10:W:sort#2#(Nil()) -> c_10() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 10: sort#2#(Nil()) -> c_10() 9: insert#3#(x2,Nil()) -> c_6() 6: cond_insert_ord_x_y1_1#(True(),x3,x2,x1) -> c_2() 7: gt#2#(0(),x8) -> c_3() 8: gt#2#(S(x12),0()) -> c_4() * Step 5: RemoveHeads WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) main#(x1) -> c_8(sort#2#(x1)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):3 2:S:gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) -->_1 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 3:S:insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) -->_2 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 -->_1 cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)):1 4:S:main#(x1) -> c_8(sort#2#(x1)) -->_1 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):5 5:S:sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) -->_2 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):5 -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):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). [(4,main#(x1) -> c_8(sort#2#(x1)))] * Step 6: Decompose WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) - Weak DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} Problem (S) - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} ** Step 6.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) - Weak DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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: 2: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) 3: insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) Consider the set of all dependency pairs 1: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) 2: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) 3: insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) 5: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {2,3} These cover all (indirect) predecessors of dependency pairs {1,2,3} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** Step 6.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) - Weak DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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_5) = {1}, uargs(c_7) = {1,2}, uargs(c_9) = {1,2} Following symbols are considered usable: {cond_insert_ord_x_y1_1,insert#3,sort#2,cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main#,sort#2#} TcT has computed the following interpretation: p(0) = 0 p(Cons) = 1 + x1 + x2 p(False) = 0 p(Nil) = 0 p(S) = 2 + x1 p(True) = 1 p(cond_insert_ord_x_y1_1) = 2 + 2*x2 + x3 + x4 p(gt#2) = 2*x1 + x2 + x2^2 p(insert#3) = 1 + 2*x1 + x2 p(main) = 4 + x1 p(sort#2) = 2*x1 p(cond_insert_ord_x_y1_1#) = 7 + 3*x2*x4 + x2^2 + x3 + 3*x4 p(gt#2#) = 3*x1 + x2 p(insert#3#) = 6 + 3*x1*x2 + x1^2 + 3*x2 p(main#) = 4*x1 p(sort#2#) = 4 + 4*x1 + 4*x1^2 p(c_1) = 1 + x1 p(c_2) = 1 p(c_3) = 2 p(c_4) = 1 p(c_5) = x1 p(c_6) = 0 p(c_7) = x1 + x2 p(c_8) = 4 p(c_9) = x1 + x2 p(c_10) = 1 Following rules are strictly oriented: gt#2#(S(x4),S(x2)) = 8 + x2 + 3*x4 > x2 + 3*x4 = c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) = 9 + 3*x2 + 3*x2*x6 + 3*x4 + 3*x4*x6 + 3*x6 + x6^2 > 7 + 3*x2 + 3*x2*x6 + 2*x4 + 3*x6 + x6^2 = c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) Following rules are (at-least) weakly oriented: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) = 7 + 3*x1 + 3*x1*x3 + x2 + x3^2 >= 7 + 3*x1 + 3*x1*x3 + x3^2 = c_1(insert#3#(x3,x1)) sort#2#(Cons(x4,x2)) = 12 + 12*x2 + 8*x2*x4 + 4*x2^2 + 12*x4 + 4*x4^2 >= 10 + 10*x2 + 6*x2*x4 + 4*x2^2 + x4^2 = c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) cond_insert_ord_x_y1_1(False(),x3,x2,x1) = 2 + x1 + x2 + 2*x3 >= 2 + x1 + x2 + 2*x3 = Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) = 2 + x1 + x2 + 2*x3 >= 2 + x1 + x2 + x3 = Cons(x3,Cons(x2,x1)) insert#3(x2,Nil()) = 1 + 2*x2 >= 1 + x2 = Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) = 2 + x2 + x4 + 2*x6 >= 2 + x2 + x4 + 2*x6 = cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) = 2 + 2*x2 + 2*x4 >= 1 + 2*x2 + 2*x4 = insert#3(x4,sort#2(x2)) sort#2(Nil()) = 0 >= 0 = Nil() *** Step 6.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) - Weak DPs: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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 6.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):3 2:W:gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) -->_1 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 3:W:insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) -->_2 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):2 -->_1 cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)):1 4:W:sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) -->_2 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):4 -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) 1: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) 3: insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) 2: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) *** Step 6.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak DPs: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):4 -->_2 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):1 2:W:cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) -->_1 insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)):4 3:W:gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) -->_1 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):3 4:W:insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) -->_2 gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)):3 -->_1 cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: insert#3#(x6,Cons(x4,x2)) -> c_7(cond_insert_ord_x_y1_1#(gt#2(x6,x4),x6,x4,x2),gt#2#(x6,x4)) 2: cond_insert_ord_x_y1_1#(False(),x3,x2,x1) -> c_1(insert#3#(x3,x1)) 3: gt#2#(S(x4),S(x2)) -> c_5(gt#2#(x4,x2)) ** Step 6.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/2,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)) -->_2 sort#2#(Cons(x4,x2)) -> c_9(insert#3#(x4,sort#2(x2)),sort#2#(x2)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) ** Step 6.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) - Weak TRS: cond_insert_ord_x_y1_1(False(),x3,x2,x1) -> Cons(x2,insert#3(x3,x1)) cond_insert_ord_x_y1_1(True(),x3,x2,x1) -> Cons(x3,Cons(x2,x1)) gt#2(0(),x8) -> False() gt#2(S(x12),0()) -> True() gt#2(S(x4),S(x2)) -> gt#2(x4,x2) insert#3(x2,Nil()) -> Cons(x2,Nil()) insert#3(x6,Cons(x4,x2)) -> cond_insert_ord_x_y1_1(gt#2(x6,x4),x6,x4,x2) sort#2(Cons(x4,x2)) -> insert#3(x4,sort#2(x2)) sort#2(Nil()) -> Nil() - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) ** Step 6.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) The strictly oriented rules are moved into the weak component. *** Step 6.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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_9) = {1} Following symbols are considered usable: {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main#,sort#2#} TcT has computed the following interpretation: p(0) = [0] p(Cons) = [1] x1 + [1] x2 + [10] p(False) = [0] p(Nil) = [0] p(S) = [1] x1 + [0] p(True) = [0] p(cond_insert_ord_x_y1_1) = [0] p(gt#2) = [0] p(insert#3) = [0] p(main) = [0] p(sort#2) = [0] p(cond_insert_ord_x_y1_1#) = [0] p(gt#2#) = [1] x2 + [0] p(insert#3#) = [8] x1 + [1] p(main#) = [1] x1 + [1] p(sort#2#) = [2] x1 + [8] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [2] p(c_6) = [0] p(c_7) = [8] x2 + [1] p(c_8) = [1] x1 + [1] p(c_9) = [1] x1 + [1] p(c_10) = [2] Following rules are strictly oriented: sort#2#(Cons(x4,x2)) = [2] x2 + [2] x4 + [28] > [2] x2 + [9] = c_9(sort#2#(x2)) Following rules are (at-least) weakly oriented: *** Step 6.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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 6.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} and constructors {0,Cons,False,Nil,S,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) -->_1 sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: sort#2#(Cons(x4,x2)) -> c_9(sort#2#(x2)) *** Step 6.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {cond_insert_ord_x_y1_1/4,gt#2/2,insert#3/2,main/1,sort#2/1,cond_insert_ord_x_y1_1#/4,gt#2#/2,insert#3#/2 ,main#/1,sort#2#/1} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/1,c_6/0,c_7/2,c_8/1 ,c_9/1,c_10/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_insert_ord_x_y1_1#,gt#2#,insert#3#,main# ,sort#2#} 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))