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