WORST_CASE(?,O(n^3)) * Step 1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: cond_merge_h_t_1(Pair(x5,x4),x3,x2,x1) -> T(merge#2(x5,x3),x2,merge#2(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) main(x2,x1) -> merge#2(x2,x1) merge#2(E(),x2) -> x2 merge#2(T(x8,x6,x4),x2) -> cond_merge_h_t_1(partition#2(x6,x2),x8,x6,x4) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1,cond_partition_pivot_heap_1 ,cond_partition_pivot_heap_3,cond_partition_pivot_heap_4,cond_partition_pivot_heap_5 ,cond_partition_pivot_heap_7,cond_partition_pivot_heap_8,cond_partition_pivot_heap_9,leq#2,leqElem#2,main ,merge#2,partition#2} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() leq#2#(0(),x12) -> c_14() leq#2#(S(x16),0()) -> c_15() leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(E(),x2) -> c_19() merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x2,E()) -> c_21() partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() leq#2#(0(),x12) -> c_14() leq#2#(S(x16),0()) -> c_15() leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(E(),x2) -> c_19() merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x2,E()) -> c_21() partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak TRS: cond_merge_h_t_1(Pair(x5,x4),x3,x2,x1) -> T(merge#2(x5,x3),x2,merge#2(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) main(x2,x1) -> merge#2(x2,x1) merge#2(E(),x2) -> x2 merge#2(T(x8,x6,x4),x2) -> cond_merge_h_t_1(partition#2(x6,x2),x8,x6,x4) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/2,c_7/2 ,c_8/0,c_9/0,c_10/2,c_11/2,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4,8,9,12,13,14,15,19,21} by application of Pre({2,4,8,9,12,13,14,15,19,21}) = {1,6,7,10,11,16,17,18,20,22}. Here rules are labelled as follows: 1: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) 2: cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() 3: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) 4: cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() 5: cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)) 6: cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) 7: cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) 8: cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() 9: cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() 10: cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) 11: cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)) 12: cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() 13: cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() 14: leq#2#(0(),x12) -> c_14() 15: leq#2#(S(x16),0()) -> c_15() 16: leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) 17: leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) 18: main#(x2,x1) -> c_18(merge#2#(x2,x1)) 19: merge#2#(E(),x2) -> c_19() 20: merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) 21: partition#2#(x2,E()) -> c_21() 22: partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak DPs: cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() leq#2#(0(),x12) -> c_14() leq#2#(S(x16),0()) -> c_15() merge#2#(E(),x2) -> c_19() partition#2#(x2,E()) -> c_21() - Weak TRS: cond_merge_h_t_1(Pair(x5,x4),x3,x2,x1) -> T(merge#2(x5,x3),x2,merge#2(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) main(x2,x1) -> merge#2(x2,x1) merge#2(E(),x2) -> x2 merge#2(T(x8,x6,x4),x2) -> cond_merge_h_t_1(partition#2(x6,x2),x8,x6,x4) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/2,c_7/2 ,c_8/0,c_9/0,c_10/2,c_11/2,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) -->_2 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 -->_2 merge#2#(E(),x2) -> c_19():21 -->_1 merge#2#(E(),x2) -> c_19():21 2:S:cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)):7 -->_1 cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)):6 3:S:cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)):5 -->_1 cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)):4 4:S:cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_2 partition#2#(x2,E()) -> c_21():22 -->_1 cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9():16 5:S:cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_2 partition#2#(x2,E()) -> c_21():22 -->_1 cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8():15 6:S:cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_2 partition#2#(x2,E()) -> c_21():22 -->_1 cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13():18 7:S:cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_2 partition#2#(x2,E()) -> c_21():22 -->_1 cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12():17 8:S:leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) -->_1 leq#2#(S(x16),0()) -> c_15():20 -->_1 leq#2#(0(),x12) -> c_14():19 -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 9:S:leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) -->_1 leq#2#(S(x16),0()) -> c_15():20 -->_1 leq#2#(0(),x12) -> c_14():19 -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 10:S:main#(x2,x1) -> c_18(merge#2#(x2,x1)) -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 -->_1 merge#2#(E(),x2) -> c_19():21 11:S:merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_2 partition#2#(x2,E()) -> c_21():22 -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)):1 12:S:partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) -->_1 cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4():14 -->_1 cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2():13 -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)):3 -->_1 cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)):2 13:W:cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() 14:W:cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() 15:W:cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() 16:W:cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() 17:W:cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() 18:W:cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() 19:W:leq#2#(0(),x12) -> c_14() 20:W:leq#2#(S(x16),0()) -> c_15() 21:W:merge#2#(E(),x2) -> c_19() 22:W:partition#2#(x2,E()) -> c_21() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 21: merge#2#(E(),x2) -> c_19() 18: cond_partition_pivot_heap_9#(Pair(x12,x13),x7,x8,x10,x11) -> c_13() 17: cond_partition_pivot_heap_8#(Pair(x12,x13),x7,x8,x9,x10) -> c_12() 16: cond_partition_pivot_heap_5#(Pair(x12,x13),x6,x7,x10,x11) -> c_9() 15: cond_partition_pivot_heap_4#(Pair(x12,x13),x6,x7,x9,x10) -> c_8() 22: partition#2#(x2,E()) -> c_21() 19: leq#2#(0(),x12) -> c_14() 20: leq#2#(S(x16),0()) -> c_15() 13: cond_partition_pivot_heap_1#(False(),x3,E(),x2,x1) -> c_2() 14: cond_partition_pivot_heap_1#(True(),x3,x2,x1,E()) -> c_4() * Step 4: SimplifyRHS WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6 ,x3) ,x5 ,x4 ,x2 ,x1) ,partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6 ,x1) ,x5 ,x4 ,x3 ,x2) ,partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak TRS: cond_merge_h_t_1(Pair(x5,x4),x3,x2,x1) -> T(merge#2(x5,x3),x2,merge#2(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) main(x2,x1) -> merge#2(x2,x1) merge#2(E(),x2) -> x2 merge#2(T(x8,x6,x4),x2) -> cond_merge_h_t_1(partition#2(x6,x2),x8,x6,x4) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/2,c_7/2 ,c_8/0,c_9/0,c_10/2,c_11/2,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) -->_2 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 2:S:cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)):7 -->_1 cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)):6 3:S:cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)):5 -->_1 cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)):4 4:S:cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(cond_partition_pivot_heap_5#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 5:S:cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(cond_partition_pivot_heap_4#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 6:S:cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(cond_partition_pivot_heap_9#(partition#2(x6,x3),x5,x4,x2,x1),partition#2#(x6,x3)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 7:S:cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(cond_partition_pivot_heap_8#(partition#2(x6,x1),x5,x4,x3,x2),partition#2#(x6,x1)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 8:S:leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 9:S:leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 10:S:main#(x2,x1) -> c_18(merge#2#(x2,x1)) -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 11:S:merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)):1 12:S:partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)):3 -->_1 cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) * Step 5: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak TRS: cond_merge_h_t_1(Pair(x5,x4),x3,x2,x1) -> T(merge#2(x5,x3),x2,merge#2(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) main(x2,x1) -> merge#2(x2,x1) merge#2(E(),x2) -> x2 merge#2(T(x8,x6,x4),x2) -> cond_merge_h_t_1(partition#2(x6,x2),x8,x6,x4) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) * Step 6: RemoveHeads WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) main#(x2,x1) -> c_18(merge#2#(x2,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) -->_2 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 2:S:cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)):7 -->_1 cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)):6 3:S:cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)):5 -->_1 cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)):4 4:S:cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 5:S:cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 6:S:cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 7:S:cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 8:S:leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 9:S:leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) -->_1 leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)):8 10:S:main#(x2,x1) -> c_18(merge#2#(x2,x1)) -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):11 11:S:merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) -->_2 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):12 -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)):1 12:S:partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) -->_2 leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)):9 -->_1 cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)):3 -->_1 cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)):2 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). [(10,main#(x2,x1) -> c_18(merge#2#(x2,x1)))] * Step 7: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) and a lower component cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) Further, following extension rules are added to the lower component. cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) ** Step 7.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) -->_2 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):2 -->_1 merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) ,partition#2#(x6,x2)):2 2:S:merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4),partition#2#(x6,x2)) -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) ** Step 7.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/1,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(c_1) = {1,2}, uargs(c_20) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [4] p(E) = [0] p(Elem) = [1] x1 + [0] p(False) = [0] p(Pair) = [1] x2 + [0] p(S) = [1] x1 + [2] p(T) = [1] x1 + [0] p(True) = [0] p(cond_merge_h_t_1) = [2] x1 + [1] x2 + [0] p(cond_partition_pivot_heap_1) = [1] x1 + [0] p(cond_partition_pivot_heap_3) = [1] x1 + [0] p(cond_partition_pivot_heap_4) = [1] x1 + [0] p(cond_partition_pivot_heap_5) = [1] x1 + [0] p(cond_partition_pivot_heap_7) = [1] x1 + [0] p(cond_partition_pivot_heap_8) = [1] x1 + [0] p(cond_partition_pivot_heap_9) = [1] x1 + [0] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [4] x1 + [2] p(merge#2) = [1] x2 + [1] p(partition#2) = [0] p(cond_merge_h_t_1#) = [1] x1 + [2] p(cond_partition_pivot_heap_1#) = [1] x1 + [2] x2 + [1] x3 + [1] x4 + [1] x5 + [1] p(cond_partition_pivot_heap_3#) = [1] x1 + [1] x4 + [2] x7 + [1] p(cond_partition_pivot_heap_4#) = [1] x1 + [1] x3 + [0] p(cond_partition_pivot_heap_5#) = [1] x1 + [1] x2 + [1] x5 + [1] p(cond_partition_pivot_heap_7#) = [1] x2 + [1] x3 + [1] x4 + [1] x6 + [4] x7 + [1] p(cond_partition_pivot_heap_8#) = [1] x3 + [4] x5 + [0] p(cond_partition_pivot_heap_9#) = [4] x1 + [1] x3 + [1] x4 + [1] x5 + [0] p(leq#2#) = [1] x2 + [0] p(leqElem#2#) = [2] x1 + [4] x2 + [0] p(main#) = [0] p(merge#2#) = [7] p(partition#2#) = [1] x1 + [2] x2 + [2] p(c_1) = [1] x1 + [1] x2 + [1] p(c_2) = [0] p(c_3) = [1] x1 + [1] x2 + [1] p(c_4) = [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] p(c_11) = [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [0] p(c_17) = [0] p(c_18) = [0] p(c_19) = [0] p(c_20) = [1] x1 + [2] p(c_21) = [0] p(c_22) = [1] x1 + [1] x2 + [0] Following rules are strictly oriented: merge#2#(T(x8,x6,x4),x2) = [7] > [4] = c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x4 + [2] >= [15] = c_1(merge#2#(x5,x3),merge#2#(x4,x1)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [0] >= [0] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [0] >= [0] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [0] >= [0] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [0] >= [0] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x13 + [0] >= [1] x13 + [0] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x13 + [0] >= [1] x13 + [0] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x13 + [0] >= [1] x13 + [0] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x13 + [0] >= [1] x13 + [0] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [0] >= [0] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 7.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) - Weak DPs: merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/1,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(c_1) = {1,2}, uargs(c_20) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(E) = [0] p(Elem) = [1] p(False) = [0] p(Pair) = [1] x1 + [1] x2 + [0] p(S) = [1] x1 + [0] p(T) = [1] x1 + [1] x3 + [2] p(True) = [0] p(cond_merge_h_t_1) = [1] x1 + [1] x2 + [2] x3 + [1] p(cond_partition_pivot_heap_1) = [1] x1 + [1] x3 + [1] x5 + [2] p(cond_partition_pivot_heap_3) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [4] p(cond_partition_pivot_heap_4) = [1] x1 + [1] x2 + [1] x4 + [4] p(cond_partition_pivot_heap_5) = [1] x1 + [1] x2 + [1] x5 + [4] p(cond_partition_pivot_heap_7) = [1] x1 + [1] x4 + [1] x5 + [1] x7 + [4] p(cond_partition_pivot_heap_8) = [1] x1 + [1] x3 + [1] x4 + [4] p(cond_partition_pivot_heap_9) = [1] x1 + [1] x3 + [1] x5 + [4] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [1] x1 + [1] x2 + [0] p(merge#2) = [2] p(partition#2) = [1] x2 + [0] p(cond_merge_h_t_1#) = [1] x1 + [1] x2 + [1] x4 + [1] p(cond_partition_pivot_heap_1#) = [2] x2 + [1] x4 + [4] x5 + [1] p(cond_partition_pivot_heap_3#) = [4] x1 + [2] x2 + [1] x3 + [1] x4 + [1] x5 + [1] p(cond_partition_pivot_heap_4#) = [1] x2 + [1] x3 + [2] x4 + [1] x5 + [1] p(cond_partition_pivot_heap_5#) = [1] x1 + [4] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_7#) = [1] x3 + [2] x4 + [0] p(cond_partition_pivot_heap_8#) = [4] x1 + [1] x3 + [2] x4 + [4] x5 + [2] p(cond_partition_pivot_heap_9#) = [1] x1 + [2] x3 + [1] x4 + [0] p(leq#2#) = [1] x1 + [2] x2 + [1] p(leqElem#2#) = [1] p(main#) = [1] x1 + [1] p(merge#2#) = [1] x1 + [1] x2 + [0] p(partition#2#) = [0] p(c_1) = [1] x1 + [1] x2 + [0] p(c_2) = [0] p(c_3) = [2] x2 + [4] p(c_4) = [4] p(c_5) = [1] x1 + [2] x2 + [0] p(c_6) = [4] x1 + [1] p(c_7) = [1] x1 + [0] p(c_8) = [2] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [1] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [1] p(c_16) = [2] x1 + [4] p(c_17) = [4] x1 + [0] p(c_18) = [0] p(c_19) = [4] p(c_20) = [1] x1 + [0] p(c_21) = [0] p(c_22) = [1] x2 + [1] Following rules are strictly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [1] > [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] = c_1(merge#2#(x5,x3),merge#2#(x4,x1)) Following rules are (at-least) weakly oriented: merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [2] >= [1] x2 + [1] x4 + [1] x8 + [1] = c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [1] x1 + [2] >= [1] x1 + [2] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [4] >= [1] x1 + [1] x3 + [1] x5 + [4] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [1] x2 + [2] >= [1] x2 + [2] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [4] >= [1] x1 + [1] x3 + [1] x5 + [4] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [4] >= [1] x1 + [1] x3 + [1] x5 + [4] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [4] >= [1] x1 + [1] x3 + [1] x5 + [4] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x12 + [1] x13 + [1] x6 + [1] x9 + [4] >= [1] x12 + [1] x13 + [1] x6 + [1] x9 + [4] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x6 + [4] >= [1] x11 + [1] x12 + [1] x13 + [1] x6 + [4] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [4] >= [1] x1 + [1] x3 + [1] x4 + [4] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [4] >= [1] x1 + [1] x3 + [1] x4 + [4] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x12 + [1] x13 + [1] x8 + [1] x9 + [4] >= [1] x12 + [1] x13 + [1] x8 + [1] x9 + [4] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x8 + [4] >= [1] x11 + [1] x12 + [1] x13 + [1] x8 + [4] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [2] >= [1] x2 + [1] x6 + [2] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 7.a:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> c_1(merge#2#(x5,x3),merge#2#(x4,x1)) merge#2#(T(x8,x6,x4),x2) -> c_20(cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/1,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 7.b:1: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) and a lower component leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) Further, following extension rules are added to the lower component. cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7#(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3#(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) -> leqElem#2#(x4,x8) *** Step 7.b:1.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) ,leqElem#2#(x4,x6)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) ,leqElem#2#(x2,x6)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)) -->_1 cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)):6 -->_1 cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)):5 2:S:cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)) -->_1 cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)):4 -->_1 cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)):3 3:S:cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):7 4:S:cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):7 5:S:cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):7 6:S:cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):7 7:S:partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)) -->_1 cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1),leqElem#2#(x2,x6)):2 -->_1 cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3),leqElem#2#(x4,x6)):1 8:W:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) -->_1 merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2):11 -->_1 merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4):10 9:W:cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) -->_1 merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2):11 -->_1 merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4):10 10:W:merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3):9 -->_1 cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1):8 11:W:merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) -->_1 partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) ,leqElem#2#(x4,x8)):7 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) *** Step 7.b:1.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_11) = {1}, uargs(c_22) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(E) = [0] p(Elem) = [1] x1 + [0] p(False) = [0] p(Pair) = [0] p(S) = [1] x1 + [0] p(T) = [1] x2 + [1] p(True) = [0] p(cond_merge_h_t_1) = [0] p(cond_partition_pivot_heap_1) = [1] x1 + [0] p(cond_partition_pivot_heap_3) = [1] x1 + [0] p(cond_partition_pivot_heap_4) = [1] x1 + [0] p(cond_partition_pivot_heap_5) = [1] x1 + [0] p(cond_partition_pivot_heap_7) = [1] x1 + [0] p(cond_partition_pivot_heap_8) = [1] x1 + [0] p(cond_partition_pivot_heap_9) = [1] x1 + [0] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [2] x2 + [1] p(merge#2) = [1] x1 + [2] x2 + [1] p(partition#2) = [0] p(cond_merge_h_t_1#) = [1] x1 + [4] p(cond_partition_pivot_heap_1#) = [1] x1 + [0] p(cond_partition_pivot_heap_3#) = [1] x1 + [6] p(cond_partition_pivot_heap_4#) = [0] p(cond_partition_pivot_heap_5#) = [0] p(cond_partition_pivot_heap_7#) = [1] x1 + [0] p(cond_partition_pivot_heap_8#) = [0] p(cond_partition_pivot_heap_9#) = [0] p(leq#2#) = [0] p(leqElem#2#) = [0] p(main#) = [1] x1 + [0] p(merge#2#) = [4] p(partition#2#) = [3] p(c_1) = [0] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [5] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [1] x1 + [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [0] p(c_17) = [0] p(c_18) = [0] p(c_19) = [0] p(c_20) = [2] x1 + [4] p(c_21) = [1] p(c_22) = [1] x1 + [1] Following rules are strictly oriented: cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [6] > [3] = c_7(partition#2#(x6,x1)) partition#2#(x8,T(x6,x4,x2)) = [3] > [1] = c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [4] >= [4] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [4] >= [4] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [0] >= [0] = c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [0] >= [6] = c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [6] >= [8] = c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [0] >= [3] = c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [0] >= [3] = c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) = [4] >= [4] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [4] >= [3] = partition#2#(x6,x2) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [0] >= [0] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [0] >= [0] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [0] >= [0] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [0] >= [0] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [0] >= [0] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [0] >= [0] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [0] >= [0] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [0] >= [0] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [0] >= [0] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_11) = {1}, uargs(c_22) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(E) = [3] p(Elem) = [1] x1 + [0] p(False) = [1] p(Pair) = [3] p(S) = [1] x1 + [0] p(T) = [1] x2 + [1] x3 + [0] p(True) = [1] p(cond_merge_h_t_1) = [0] p(cond_partition_pivot_heap_1) = [1] x1 + [2] p(cond_partition_pivot_heap_3) = [1] x1 + [2] p(cond_partition_pivot_heap_4) = [1] x1 + [0] p(cond_partition_pivot_heap_5) = [1] x1 + [0] p(cond_partition_pivot_heap_7) = [1] x1 + [2] p(cond_partition_pivot_heap_8) = [1] x1 + [0] p(cond_partition_pivot_heap_9) = [1] x1 + [0] p(leq#2) = [1] p(leqElem#2) = [1] p(main) = [0] p(merge#2) = [0] p(partition#2) = [3] p(cond_merge_h_t_1#) = [1] x1 + [0] p(cond_partition_pivot_heap_1#) = [1] x1 + [0] p(cond_partition_pivot_heap_3#) = [1] x1 + [0] p(cond_partition_pivot_heap_4#) = [0] p(cond_partition_pivot_heap_5#) = [0] p(cond_partition_pivot_heap_7#) = [1] x1 + [1] p(cond_partition_pivot_heap_8#) = [0] p(cond_partition_pivot_heap_9#) = [0] p(leq#2#) = [0] p(leqElem#2#) = [0] p(main#) = [0] p(merge#2#) = [3] p(partition#2#) = [1] p(c_1) = [0] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [1] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [1] x1 + [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [0] p(c_17) = [0] p(c_18) = [0] p(c_19) = [0] p(c_20) = [0] p(c_21) = [0] p(c_22) = [1] x1 + [0] Following rules are strictly oriented: cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [2] > [1] = c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [2] > [1] = c_11(partition#2#(x6,x1)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [3] >= [3] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [3] >= [3] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] >= [2] = c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] >= [1] = c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [1] >= [2] = c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [1] >= [1] = c_7(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) = [3] >= [3] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [3] >= [1] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] >= [1] = c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [3] >= [3] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [3] >= [3] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [3] >= [3] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [3] >= [3] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [3] >= [3] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [3] >= [3] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [3] >= [3] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [3] >= [3] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [3] >= [3] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [3] >= [3] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [3] >= [3] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [3] >= [3] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [1] >= [1] = True() leq#2(S(x16),0()) = [1] >= [1] = False() leq#2(S(x4),S(x2)) = [1] >= [1] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [1] >= [1] = leq#2(x4,x2) partition#2(x2,E()) = [3] >= [3] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [3] >= [3] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.a:4: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_11) = {1}, uargs(c_22) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(E) = [0] p(Elem) = [1] x1 + [0] p(False) = [0] p(Pair) = [0] p(S) = [0] p(T) = [0] p(True) = [0] p(cond_merge_h_t_1) = [0] p(cond_partition_pivot_heap_1) = [1] x1 + [0] p(cond_partition_pivot_heap_3) = [1] x1 + [0] p(cond_partition_pivot_heap_4) = [1] x1 + [0] p(cond_partition_pivot_heap_5) = [1] x1 + [0] p(cond_partition_pivot_heap_7) = [1] x1 + [0] p(cond_partition_pivot_heap_8) = [1] x1 + [0] p(cond_partition_pivot_heap_9) = [1] x1 + [0] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [0] p(merge#2) = [0] p(partition#2) = [0] p(cond_merge_h_t_1#) = [1] x1 + [1] p(cond_partition_pivot_heap_1#) = [1] x1 + [1] p(cond_partition_pivot_heap_3#) = [1] x1 + [2] p(cond_partition_pivot_heap_4#) = [0] p(cond_partition_pivot_heap_5#) = [0] p(cond_partition_pivot_heap_7#) = [1] x1 + [7] p(cond_partition_pivot_heap_8#) = [0] p(cond_partition_pivot_heap_9#) = [0] p(leq#2#) = [0] p(leqElem#2#) = [0] p(main#) = [0] p(merge#2#) = [1] p(partition#2#) = [1] p(c_1) = [0] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [2] p(c_5) = [1] x1 + [3] p(c_6) = [1] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [1] x1 + [0] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [0] p(c_17) = [0] p(c_18) = [0] p(c_19) = [0] p(c_20) = [1] x2 + [1] p(c_21) = [1] p(c_22) = [1] x1 + [0] Following rules are strictly oriented: cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [2] > [1] = c_6(partition#2#(x6,x3)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] >= [1] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] >= [1] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] >= [7] = c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] >= [5] = c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [2] >= [1] = c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [7] >= [1] = c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [7] >= [1] = c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) = [1] >= [1] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [1] >= [1] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] >= [1] = c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [0] >= [0] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [0] >= [0] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [0] >= [0] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [0] >= [0] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [0] >= [0] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [0] >= [0] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [0] >= [0] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [0] >= [0] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [0] >= [0] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [0] >= [0] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.a:5: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_11) = {1}, uargs(c_22) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(E) = [0] p(Elem) = [0] p(False) = [0] p(Pair) = [1] x1 + [1] x2 + [0] p(S) = [1] x1 + [0] p(T) = [1] x1 + [1] x3 + [1] p(True) = [0] p(cond_merge_h_t_1) = [2] x3 + [1] p(cond_partition_pivot_heap_1) = [1] x1 + [1] x3 + [1] x5 + [1] p(cond_partition_pivot_heap_3) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [2] p(cond_partition_pivot_heap_4) = [1] x1 + [1] x2 + [1] x4 + [2] p(cond_partition_pivot_heap_5) = [1] x1 + [1] x2 + [1] x5 + [2] p(cond_partition_pivot_heap_7) = [1] x1 + [1] x4 + [1] x5 + [1] x7 + [2] p(cond_partition_pivot_heap_8) = [1] x1 + [1] x3 + [1] x4 + [2] p(cond_partition_pivot_heap_9) = [1] x1 + [1] x3 + [1] x5 + [2] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [1] x1 + [1] x2 + [0] p(merge#2) = [2] x1 + [1] x2 + [2] p(partition#2) = [1] x2 + [0] p(cond_merge_h_t_1#) = [1] x1 + [1] x2 + [1] x4 + [1] p(cond_partition_pivot_heap_1#) = [1] x1 + [1] x3 + [1] x5 + [0] p(cond_partition_pivot_heap_3#) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [0] p(cond_partition_pivot_heap_4#) = [4] x1 + [2] x2 + [1] x4 + [1] p(cond_partition_pivot_heap_5#) = [4] x1 + [1] x2 + [4] x4 + [1] p(cond_partition_pivot_heap_7#) = [1] x1 + [1] x5 + [1] x7 + [0] p(cond_partition_pivot_heap_8#) = [1] x3 + [4] x4 + [4] x5 + [1] p(cond_partition_pivot_heap_9#) = [1] x2 + [1] x4 + [4] x5 + [4] p(leq#2#) = [2] x1 + [1] x2 + [0] p(leqElem#2#) = [1] x1 + [2] p(main#) = [0] p(merge#2#) = [1] x1 + [1] x2 + [1] p(partition#2#) = [1] x2 + [0] p(c_1) = [1] x2 + [2] p(c_2) = [1] p(c_3) = [1] x1 + [3] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] x1 + [0] p(c_11) = [1] x1 + [0] p(c_12) = [1] p(c_13) = [1] p(c_14) = [1] p(c_15) = [1] p(c_16) = [0] p(c_17) = [1] x1 + [0] p(c_18) = [1] x1 + [1] p(c_19) = [1] p(c_20) = [1] x1 + [4] x2 + [1] p(c_21) = [0] p(c_22) = [1] x1 + [0] Following rules are strictly oriented: cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [1] > [1] x1 + [1] x3 + [1] x5 + [0] = c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [1] >= [1] x1 + [1] x4 + [1] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [1] >= [1] x3 + [1] x5 + [1] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [1] >= [1] x3 + [1] x5 + [3] = c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [0] >= [1] x3 + [0] = c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [0] >= [1] x1 + [0] = c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [0] >= [1] x3 + [0] = c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [0] >= [1] x1 + [0] = c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [2] >= [1] x2 + [1] x4 + [1] x8 + [1] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [2] >= [1] x2 + [0] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [1] >= [1] x2 + [1] x6 + [0] = c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [1] x1 + [1] >= [1] x1 + [1] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [1] x2 + [1] >= [1] x2 + [1] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x12 + [1] x13 + [1] x6 + [1] x9 + [2] >= [1] x12 + [1] x13 + [1] x6 + [1] x9 + [2] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x6 + [2] >= [1] x11 + [1] x12 + [1] x13 + [1] x6 + [2] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [2] >= [1] x1 + [1] x3 + [1] x4 + [2] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [2] >= [1] x1 + [1] x3 + [1] x4 + [2] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x12 + [1] x13 + [1] x8 + [1] x9 + [2] >= [1] x12 + [1] x13 + [1] x8 + [1] x9 + [2] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x8 + [2] >= [1] x11 + [1] x12 + [1] x13 + [1] x8 + [2] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [1] >= [1] x2 + [1] x6 + [1] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.a:6: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_3) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_10) = {1}, uargs(c_11) = {1}, uargs(c_22) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [2] p(E) = [0] p(Elem) = [0] p(False) = [0] p(Pair) = [1] x1 + [1] x2 + [0] p(S) = [1] x1 + [2] p(T) = [1] x1 + [1] x3 + [1] p(True) = [0] p(cond_merge_h_t_1) = [1] x1 + [4] x3 + [1] p(cond_partition_pivot_heap_1) = [1] x1 + [1] x3 + [1] x5 + [1] p(cond_partition_pivot_heap_3) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [2] p(cond_partition_pivot_heap_4) = [1] x1 + [1] x2 + [1] x4 + [2] p(cond_partition_pivot_heap_5) = [1] x1 + [1] x2 + [1] x5 + [2] p(cond_partition_pivot_heap_7) = [1] x1 + [1] x4 + [1] x5 + [1] x7 + [2] p(cond_partition_pivot_heap_8) = [1] x1 + [1] x3 + [1] x4 + [2] p(cond_partition_pivot_heap_9) = [1] x1 + [1] x3 + [1] x5 + [2] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [4] x1 + [4] x2 + [0] p(merge#2) = [1] x1 + [1] x2 + [1] p(partition#2) = [1] x2 + [0] p(cond_merge_h_t_1#) = [1] x1 + [1] x2 + [1] x4 + [0] p(cond_partition_pivot_heap_1#) = [1] x1 + [1] x3 + [1] x5 + [1] p(cond_partition_pivot_heap_3#) = [1] x1 + [1] x5 + [1] x7 + [2] p(cond_partition_pivot_heap_4#) = [1] x1 + [4] x2 + [1] x3 + [1] x4 + [4] x5 + [0] p(cond_partition_pivot_heap_5#) = [2] x2 + [1] x3 + [4] x5 + [1] p(cond_partition_pivot_heap_7#) = [1] x1 + [1] x5 + [1] x7 + [0] p(cond_partition_pivot_heap_8#) = [4] x2 + [1] x3 + [1] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_9#) = [1] x1 + [1] x2 + [1] x3 + [4] x4 + [0] p(leq#2#) = [0] p(leqElem#2#) = [2] x1 + [0] p(main#) = [1] x2 + [1] p(merge#2#) = [1] x1 + [1] x2 + [0] p(partition#2#) = [1] x2 + [0] p(c_1) = [1] x1 + [1] p(c_2) = [1] p(c_3) = [1] x1 + [1] p(c_4) = [4] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [2] p(c_7) = [1] x1 + [1] p(c_8) = [1] p(c_9) = [1] p(c_10) = [1] x1 + [0] p(c_11) = [1] x1 + [0] p(c_12) = [0] p(c_13) = [1] p(c_14) = [0] p(c_15) = [1] p(c_16) = [0] p(c_17) = [0] p(c_18) = [1] x1 + [0] p(c_19) = [0] p(c_20) = [1] x2 + [1] p(c_21) = [0] p(c_22) = [1] x1 + [0] Following rules are strictly oriented: cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] > [1] x3 + [1] x5 + [1] = c_3(cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x4 + [0] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x3 + [1] x5 + [0] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [2] = c_5(cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [2] >= [1] x3 + [2] = c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [2] >= [1] x1 + [1] = c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [0] >= [1] x3 + [0] = c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [0] >= [1] x1 + [0] = c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [1] >= [1] x2 + [1] x4 + [1] x8 + [0] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [1] >= [1] x2 + [0] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [1] >= [1] x2 + [1] x6 + [1] = c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [1] x1 + [1] >= [1] x1 + [1] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [1] x2 + [1] >= [1] x2 + [1] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [2] >= [1] x1 + [1] x3 + [1] x5 + [2] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x12 + [1] x13 + [1] x6 + [1] x9 + [2] >= [1] x12 + [1] x13 + [1] x6 + [1] x9 + [2] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x6 + [2] >= [1] x11 + [1] x12 + [1] x13 + [1] x6 + [2] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [2] >= [1] x1 + [1] x3 + [1] x4 + [2] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [2] >= [1] x1 + [1] x3 + [1] x4 + [2] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x12 + [1] x13 + [1] x8 + [1] x9 + [2] >= [1] x12 + [1] x13 + [1] x8 + [1] x9 + [2] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x8 + [2] >= [1] x11 + [1] x12 + [1] x13 + [1] x8 + [2] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [1] >= [1] x2 + [1] x6 + [1] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.a:7: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> c_3(cond_partition_pivot_heap_7#(leqElem#2(x4 ,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3)) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> c_5(cond_partition_pivot_heap_3#(leqElem#2(x2 ,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1)) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> c_6(partition#2#(x6,x3)) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> c_7(partition#2#(x6,x1)) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> c_10(partition#2#(x6,x3)) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> c_11(partition#2#(x6,x1)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> c_22(cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2)) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/1,c_4/0,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/1} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 7.b:1.b:1: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7#(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3#(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) -> leqElem#2#(x4,x8) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(E) = [1] p(Elem) = [1] x1 + [0] p(False) = [1] p(Pair) = [1] x1 + [1] x2 + [0] p(S) = [1] x1 + [0] p(T) = [1] x1 + [1] x3 + [3] p(True) = [1] p(cond_merge_h_t_1) = [0] p(cond_partition_pivot_heap_1) = [1] x1 + [1] x3 + [1] x5 + [3] p(cond_partition_pivot_heap_3) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [6] p(cond_partition_pivot_heap_4) = [1] x1 + [1] x2 + [1] x4 + [6] p(cond_partition_pivot_heap_5) = [1] x1 + [1] x2 + [1] x5 + [6] p(cond_partition_pivot_heap_7) = [1] x1 + [1] x4 + [1] x5 + [1] x7 + [6] p(cond_partition_pivot_heap_8) = [1] x1 + [1] x3 + [1] x4 + [6] p(cond_partition_pivot_heap_9) = [1] x1 + [1] x3 + [1] x5 + [6] p(leq#2) = [1] p(leqElem#2) = [1] p(main) = [0] p(merge#2) = [2] x2 + [0] p(partition#2) = [1] x2 + [1] p(cond_merge_h_t_1#) = [1] x1 + [1] x2 + [1] x4 + [7] p(cond_partition_pivot_heap_1#) = [1] x1 + [1] x3 + [1] x5 + [1] p(cond_partition_pivot_heap_3#) = [1] x1 + [1] x3 + [1] x5 + [1] x7 + [4] p(cond_partition_pivot_heap_4#) = [0] p(cond_partition_pivot_heap_5#) = [2] x3 + [0] p(cond_partition_pivot_heap_7#) = [1] x1 + [1] x4 + [1] x5 + [1] x7 + [4] p(cond_partition_pivot_heap_8#) = [4] x4 + [2] x5 + [0] p(cond_partition_pivot_heap_9#) = [1] x2 + [1] p(leq#2#) = [0] p(leqElem#2#) = [5] p(main#) = [2] x1 + [1] x2 + [0] p(merge#2#) = [1] x1 + [1] x2 + [7] p(partition#2#) = [1] x2 + [5] p(c_1) = [0] p(c_2) = [1] p(c_3) = [4] p(c_4) = [0] p(c_5) = [2] x1 + [2] x2 + [1] p(c_6) = [2] p(c_7) = [1] x1 + [1] p(c_8) = [2] p(c_9) = [2] p(c_10) = [1] p(c_11) = [4] x1 + [2] p(c_12) = [2] p(c_13) = [2] p(c_14) = [0] p(c_15) = [0] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [4] p(c_18) = [1] x1 + [4] p(c_19) = [0] p(c_20) = [4] x1 + [2] p(c_21) = [0] p(c_22) = [1] x1 + [1] x2 + [0] Following rules are strictly oriented: leqElem#2#(Elem(x4),Elem(x2)) = [5] > [4] = c_17(leq#2#(x4,x2)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [7] >= [1] x1 + [1] x4 + [7] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [7] >= [1] x3 + [1] x5 + [7] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [5] >= [1] x1 + [1] x3 + [1] x5 + [5] = cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [5] >= [5] = leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [5] >= [1] x1 + [1] x3 + [1] x5 + [5] = cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [5] >= [5] = leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [5] >= [1] x3 + [5] = partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [5] >= [1] x1 + [5] = partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [5] >= [1] x3 + [5] = partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [5] >= [1] x1 + [5] = partition#2#(x6,x1) leq#2#(S(x4),S(x2)) = [0] >= [0] = c_16(leq#2#(x4,x2)) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [10] >= [1] x2 + [1] x4 + [1] x8 + [8] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x8 + [10] >= [1] x2 + [5] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [8] >= [1] x2 + [1] x6 + [2] = cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [8] >= [5] = leqElem#2#(x4,x8) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [1] x1 + [5] >= [1] x1 + [5] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x3 + [1] x5 + [7] >= [1] x1 + [1] x3 + [1] x5 + [7] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [1] x2 + [5] >= [1] x2 + [5] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x3 + [1] x5 + [7] >= [1] x1 + [1] x3 + [1] x5 + [7] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [7] >= [1] x1 + [1] x3 + [1] x5 + [7] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x5 + [7] >= [1] x1 + [1] x3 + [1] x5 + [7] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x12 + [1] x13 + [1] x6 + [1] x9 + [6] >= [1] x12 + [1] x13 + [1] x6 + [1] x9 + [6] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x6 + [6] >= [1] x11 + [1] x12 + [1] x13 + [1] x6 + [6] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [7] >= [1] x1 + [1] x3 + [1] x4 + [7] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x3 + [1] x4 + [7] >= [1] x1 + [1] x3 + [1] x4 + [7] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x12 + [1] x13 + [1] x8 + [1] x9 + [6] >= [1] x12 + [1] x13 + [1] x8 + [1] x9 + [6] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x11 + [1] x12 + [1] x13 + [1] x8 + [6] >= [1] x11 + [1] x12 + [1] x13 + [1] x8 + [6] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [1] >= [1] = True() leq#2(S(x16),0()) = [1] >= [1] = False() leq#2(S(x4),S(x2)) = [1] >= [1] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [1] >= [1] = leq#2(x4,x2) partition#2(x2,E()) = [2] >= [2] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [1] x2 + [1] x6 + [4] >= [1] x2 + [1] x6 + [4] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.b:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7#(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3#(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) -> leqElem#2#(x4,x8) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cond_partition_pivot_heap_1) = {1}, uargs(cond_partition_pivot_heap_3) = {1}, uargs(cond_partition_pivot_heap_4) = {1}, uargs(cond_partition_pivot_heap_5) = {1}, uargs(cond_partition_pivot_heap_7) = {1}, uargs(cond_partition_pivot_heap_8) = {1}, uargs(cond_partition_pivot_heap_9) = {1}, uargs(cond_merge_h_t_1#) = {1}, uargs(cond_partition_pivot_heap_1#) = {1}, uargs(cond_partition_pivot_heap_3#) = {1}, uargs(cond_partition_pivot_heap_7#) = {1}, uargs(c_16) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [4] p(E) = [0] p(Elem) = [1] x1 + [2] p(False) = [0] p(Pair) = [1] x1 + [1] x2 + [0] p(S) = [1] x1 + [1] p(T) = [1] x1 + [1] x2 + [1] x3 + [0] p(True) = [0] p(cond_merge_h_t_1) = [1] x1 + [1] x2 + [4] p(cond_partition_pivot_heap_1) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_3) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [1] x6 + [1] x7 + [0] p(cond_partition_pivot_heap_4) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_5) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_7) = [1] x1 + [1] x3 + [1] x4 + [1] x5 + [1] x6 + [1] x7 + [0] p(cond_partition_pivot_heap_8) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] p(cond_partition_pivot_heap_9) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] p(leq#2) = [0] p(leqElem#2) = [0] p(main) = [2] x1 + [1] x2 + [2] p(merge#2) = [4] x1 + [1] p(partition#2) = [1] x2 + [0] p(cond_merge_h_t_1#) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [0] p(cond_partition_pivot_heap_1#) = [1] x1 + [1] x2 + [0] p(cond_partition_pivot_heap_3#) = [1] x1 + [1] x2 + [0] p(cond_partition_pivot_heap_4#) = [2] x1 + [1] x4 + [1] p(cond_partition_pivot_heap_5#) = [1] x2 + [1] x3 + [1] p(cond_partition_pivot_heap_7#) = [1] x1 + [1] x2 + [0] p(cond_partition_pivot_heap_8#) = [4] x1 + [4] x4 + [4] x5 + [1] p(cond_partition_pivot_heap_9#) = [4] x3 + [1] x4 + [1] x5 + [1] p(leq#2#) = [1] x2 + [0] p(leqElem#2#) = [1] x2 + [0] p(main#) = [1] p(merge#2#) = [1] x1 + [1] x2 + [0] p(partition#2#) = [1] x1 + [0] p(c_1) = [2] x1 + [1] p(c_2) = [0] p(c_3) = [1] x2 + [1] p(c_4) = [4] p(c_5) = [1] x1 + [4] p(c_6) = [2] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [1] p(c_10) = [0] p(c_11) = [4] x1 + [4] p(c_12) = [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [0] p(c_16) = [1] x1 + [0] p(c_17) = [1] x1 + [2] p(c_18) = [4] x1 + [1] p(c_19) = [0] p(c_20) = [1] x1 + [4] x2 + [0] p(c_21) = [4] p(c_22) = [4] x1 + [0] Following rules are strictly oriented: leq#2#(S(x4),S(x2)) = [1] x2 + [1] > [1] x2 + [0] = c_16(leq#2#(x4,x2)) Following rules are (at-least) weakly oriented: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x4 + [0] = merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x3 + [1] x5 + [0] = merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = cond_partition_pivot_heap_7#(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x6 + [0] >= [1] x6 + [0] = cond_partition_pivot_heap_3#(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x6 + [0] >= [1] x6 + [0] = leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) = [1] x6 + [0] >= [1] x6 + [0] = partition#2#(x6,x1) leqElem#2#(Elem(x4),Elem(x2)) = [1] x2 + [2] >= [1] x2 + [2] = c_17(leq#2#(x4,x2)) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x6 + [1] x8 + [0] >= [1] x2 + [1] x4 + [1] x6 + [1] x8 + [0] = cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) = [1] x2 + [1] x4 + [1] x6 + [1] x8 + [0] >= [1] x6 + [0] = partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x8 + [0] >= [1] x8 + [0] = cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) = [1] x8 + [0] >= [1] x8 + [0] = leqElem#2#(x4,x8) cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) = [1] x1 + [1] x2 + [0] >= [1] x1 + [1] x2 + [0] = Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_7(leqElem#2(x4,x6),x6,x2,x1,x5,x4,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) = [1] x1 + [1] x2 + [0] >= [1] x1 + [1] x2 + [0] = Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_3(leqElem#2(x2,x6),x6,x5,x4,x3,x2,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_5(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_4(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) = [1] x10 + [1] x12 + [1] x13 + [1] x6 + [1] x7 + [1] x9 + [0] >= [1] x10 + [1] x12 + [1] x13 + [1] x6 + [1] x7 + [1] x9 + [0] = Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) = [1] x10 + [1] x11 + [1] x12 + [1] x13 + [1] x6 + [1] x7 + [0] >= [1] x10 + [1] x11 + [1] x12 + [1] x13 + [1] x6 + [1] x7 + [0] = Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_9(partition#2(x6,x3),x5,x4,x2,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) = [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] >= [1] x1 + [1] x2 + [1] x3 + [1] x4 + [1] x5 + [0] = cond_partition_pivot_heap_8(partition#2(x6,x1),x5,x4,x3,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) = [1] x10 + [1] x12 + [1] x13 + [1] x7 + [1] x8 + [1] x9 + [0] >= [1] x10 + [1] x12 + [1] x13 + [1] x7 + [1] x8 + [1] x9 + [0] = Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) = [1] x10 + [1] x11 + [1] x12 + [1] x13 + [1] x7 + [1] x8 + [0] >= [1] x10 + [1] x11 + [1] x12 + [1] x13 + [1] x7 + [1] x8 + [0] = Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) = [0] >= [0] = True() leq#2(S(x16),0()) = [0] >= [0] = False() leq#2(S(x4),S(x2)) = [0] >= [0] = leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) = [0] >= [0] = leq#2(x4,x2) partition#2(x2,E()) = [0] >= [0] = Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) = [1] x2 + [1] x4 + [1] x6 + [0] >= [1] x2 + [1] x4 + [1] x6 + [0] = cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 7.b:1.b:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x4,x1) cond_merge_h_t_1#(Pair(x5,x4),x3,x2,x1) -> merge#2#(x5,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7#(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1#(False(),x6,T(x5,x4,x3),x2,x1) -> leqElem#2#(x4,x6) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3#(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_1#(True(),x6,x5,x4,T(x3,x2,x1)) -> leqElem#2#(x2,x6) cond_partition_pivot_heap_3#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_3#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) cond_partition_pivot_heap_7#(False(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x3) cond_partition_pivot_heap_7#(True(),x6,x5,x4,x3,x2,x1) -> partition#2#(x6,x1) leq#2#(S(x4),S(x2)) -> c_16(leq#2#(x4,x2)) leqElem#2#(Elem(x4),Elem(x2)) -> c_17(leq#2#(x4,x2)) merge#2#(T(x8,x6,x4),x2) -> cond_merge_h_t_1#(partition#2(x6,x2),x8,x6,x4) merge#2#(T(x8,x6,x4),x2) -> partition#2#(x6,x2) partition#2#(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1#(leqElem#2(x4,x8),x8,x6,x4,x2) partition#2#(x8,T(x6,x4,x2)) -> leqElem#2#(x4,x8) - Weak TRS: cond_partition_pivot_heap_1(False(),x3,E(),x2,x1) -> Pair(E(),T(E(),x2,x1)) cond_partition_pivot_heap_1(False(),x6,T(x5,x4,x3),x2,x1) -> cond_partition_pivot_heap_7(leqElem#2(x4,x6) ,x6 ,x2 ,x1 ,x5 ,x4 ,x3) cond_partition_pivot_heap_1(True(),x3,x2,x1,E()) -> Pair(T(x2,x1,E()),E()) cond_partition_pivot_heap_1(True(),x6,x5,x4,T(x3,x2,x1)) -> cond_partition_pivot_heap_3(leqElem#2(x2,x6) ,x6 ,x5 ,x4 ,x3 ,x2 ,x1) cond_partition_pivot_heap_3(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_5(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_3(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_4(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_4(Pair(x12,x13),x6,x7,x9,x10) -> Pair(T(T(x6,x7,x9),x10,x12),x13) cond_partition_pivot_heap_5(Pair(x12,x13),x6,x7,x10,x11) -> Pair(T(x6,x7,x12),T(x13,x10,x11)) cond_partition_pivot_heap_7(False(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_9(partition#2(x6,x3) ,x5 ,x4 ,x2 ,x1) cond_partition_pivot_heap_7(True(),x6,x5,x4,x3,x2,x1) -> cond_partition_pivot_heap_8(partition#2(x6,x1) ,x5 ,x4 ,x3 ,x2) cond_partition_pivot_heap_8(Pair(x12,x13),x7,x8,x9,x10) -> Pair(T(x9,x10,x12),T(x13,x7,x8)) cond_partition_pivot_heap_9(Pair(x12,x13),x7,x8,x10,x11) -> Pair(x12,T(x13,x10,T(x11,x7,x8))) leq#2(0(),x12) -> True() leq#2(S(x16),0()) -> False() leq#2(S(x4),S(x2)) -> leq#2(x4,x2) leqElem#2(Elem(x4),Elem(x2)) -> leq#2(x4,x2) partition#2(x2,E()) -> Pair(E(),E()) partition#2(x8,T(x6,x4,x2)) -> cond_partition_pivot_heap_1(leqElem#2(x4,x8),x8,x6,x4,x2) - Signature: {cond_merge_h_t_1/4,cond_partition_pivot_heap_1/5,cond_partition_pivot_heap_3/7 ,cond_partition_pivot_heap_4/5,cond_partition_pivot_heap_5/5,cond_partition_pivot_heap_7/7 ,cond_partition_pivot_heap_8/5,cond_partition_pivot_heap_9/5,leq#2/2,leqElem#2/2,main/2,merge#2/2 ,partition#2/2,cond_merge_h_t_1#/4,cond_partition_pivot_heap_1#/5,cond_partition_pivot_heap_3#/7 ,cond_partition_pivot_heap_4#/5,cond_partition_pivot_heap_5#/5,cond_partition_pivot_heap_7#/7 ,cond_partition_pivot_heap_8#/5,cond_partition_pivot_heap_9#/5,leq#2#/2,leqElem#2#/2,main#/2,merge#2#/2 ,partition#2#/2} / {0/0,E/0,Elem/1,False/0,Pair/2,S/1,T/3,True/0,c_1/2,c_2/0,c_3/2,c_4/0,c_5/2,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/1,c_11/1,c_12/0,c_13/0,c_14/0,c_15/0,c_16/1,c_17/1,c_18/1,c_19/0,c_20/2,c_21/0,c_22/2} - Obligation: innermost runtime complexity wrt. defined symbols {cond_merge_h_t_1#,cond_partition_pivot_heap_1# ,cond_partition_pivot_heap_3#,cond_partition_pivot_heap_4#,cond_partition_pivot_heap_5# ,cond_partition_pivot_heap_7#,cond_partition_pivot_heap_8#,cond_partition_pivot_heap_9#,leq#2#,leqElem#2# ,main#,merge#2#,partition#2#} and constructors {0,E,Elem,False,Pair,S,T,True} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^3))