* Step 1: Sum WORST_CASE(Omega(n^1),O(n^2))
+ Considered Problem:
- Strict TRS:
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
inssort(xs) -> isort(xs,Nil())
isort(Cons(x,xs),r) -> isort(xs,insert(x,r))
isort(Nil(),r) -> Nil()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<,insert,insert[Ite],inssort,isort} 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:
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
inssort(xs) -> isort(xs,Nil())
isort(Cons(x,xs),r) -> isort(xs,insert(x,r))
isort(Nil(),r) -> Nil()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<,insert,insert[Ite],inssort,isort} and constructors {0
,Cons,False,Nil,S,True}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
isort(y,z){y -> Cons(x,y)} =
isort(Cons(x,y),z) ->^+ isort(y,insert(x,z))
= C[isort(y,insert(x,z)) = isort(y,z){z -> insert(x,z)}]
** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
inssort(xs) -> isort(xs,Nil())
isort(Cons(x,xs),r) -> isort(xs,insert(x,r))
isort(Nil(),r) -> Nil()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2} / {0/0,Cons/2,False/0,Nil/0,S/1,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<,insert,insert[Ite],inssort,isort} and constructors {0
,Cons,False,Nil,S,True}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:
Strict DPs
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
isort#(Nil(),r) -> c_4()
Weak DPs
<#(x,0()) -> c_5()
<#(0(),S(y)) -> c_6()
<#(S(x),S(y)) -> c_7(<#(x,y))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
insert[Ite]#(True(),x,r) -> c_9()
and mark the set of starting terms.
** Step 1.b:2: UsableRules WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
isort#(Nil(),r) -> c_4()
- Weak DPs:
<#(x,0()) -> c_5()
<#(0(),S(y)) -> c_6()
<#(S(x),S(y)) -> c_7(<#(x,y))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
insert[Ite]#(True(),x,r) -> c_9()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
inssort(xs) -> isort(xs,Nil())
isort(Cons(x,xs),r) -> isort(xs,insert(x,r))
isort(Nil(),r) -> Nil()
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/2,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
<#(x,0()) -> c_5()
<#(0(),S(y)) -> c_6()
<#(S(x),S(y)) -> c_7(<#(x,y))
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
insert[Ite]#(True(),x,r) -> c_9()
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
isort#(Nil(),r) -> c_4()
** Step 1.b:3: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
isort#(Nil(),r) -> c_4()
- Weak DPs:
<#(x,0()) -> c_5()
<#(0(),S(y)) -> c_6()
<#(S(x),S(y)) -> c_7(<#(x,y))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
insert[Ite]#(True(),x,r) -> c_9()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/2,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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
{4}
by application of
Pre({4}) = {2,3}.
Here rules are labelled as follows:
1: insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
2: inssort#(xs) -> c_2(isort#(xs,Nil()))
3: isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
4: isort#(Nil(),r) -> c_4()
5: <#(x,0()) -> c_5()
6: <#(0(),S(y)) -> c_6()
7: <#(S(x),S(y)) -> c_7(<#(x,y))
8: insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
9: insert[Ite]#(True(),x,r) -> c_9()
** Step 1.b:4: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
<#(x,0()) -> c_5()
<#(0(),S(y)) -> c_6()
<#(S(x),S(y)) -> c_7(<#(x,y))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
insert[Ite]#(True(),x,r) -> c_9()
isort#(Nil(),r) -> c_4()
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/2,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
-->_1 insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs)):7
-->_2 <#(S(x),S(y)) -> c_7(<#(x,y)):6
-->_1 insert[Ite]#(True(),x,r) -> c_9():8
-->_2 <#(x,0()) -> c_5():4
2:S:inssort#(xs) -> c_2(isort#(xs,Nil()))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
-->_1 isort#(Nil(),r) -> c_4():9
3:S:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_1 isort#(Nil(),r) -> c_4():9
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
-->_2 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x)):1
4:W:<#(x,0()) -> c_5()
5:W:<#(0(),S(y)) -> c_6()
6:W:<#(S(x),S(y)) -> c_7(<#(x,y))
-->_1 <#(S(x),S(y)) -> c_7(<#(x,y)):6
-->_1 <#(0(),S(y)) -> c_6():5
-->_1 <#(x,0()) -> c_5():4
7:W:insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
-->_1 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x)):1
8:W:insert[Ite]#(True(),x,r) -> c_9()
9:W:isort#(Nil(),r) -> c_4()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
9: isort#(Nil(),r) -> c_4()
8: insert[Ite]#(True(),x,r) -> c_9()
6: <#(S(x),S(y)) -> c_7(<#(x,y))
4: <#(x,0()) -> c_5()
5: <#(0(),S(y)) -> c_6()
** Step 1.b:5: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/2,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x))
-->_1 insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs)):7
2:S:inssort#(xs) -> c_2(isort#(xs,Nil()))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
3:S:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
-->_2 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x)):1
7:W:insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
-->_1 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r),<#(S(x),x)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
** Step 1.b:6: RemoveHeads WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
inssort#(xs) -> c_2(isort#(xs,Nil()))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
RemoveHeads
+ Details:
Consider the dependency graph
1:S:insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
-->_1 insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs)):4
2:S:inssort#(xs) -> c_2(isort#(xs,Nil()))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
3:S:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
-->_2 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):1
4:W:insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
-->_1 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):1
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).
[(2,inssort#(xs) -> c_2(isort#(xs,Nil())))]
** Step 1.b:7: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
Problem (S)
- Strict DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
*** Step 1.b:7.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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:
1: insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
Consider the set of all dependency pairs
1: insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
3: isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
4: insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^2))
SPACE(?,?)on application of the dependency pairs
{1}
These cover all (indirect) predecessors of dependency pairs
{1,4}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
**** Step 1.b:7.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
- Weak DPs:
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a polynomial interpretation of kind constructor-based(mixed(2)):
The following argument positions are considered usable:
uargs(c_1) = {1},
uargs(c_3) = {1,2},
uargs(c_8) = {1}
Following symbols are considered usable:
{insert,insert[Ite],<#,insert#,insert[Ite]#,inssort#,isort#}
TcT has computed the following interpretation:
p(0) = 0
p(<) = x2
p(Cons) = 1 + x1 + x2
p(False) = 1
p(Nil) = 1
p(S) = 1
p(True) = 1
p(insert) = 1 + 2*x1 + x2
p(insert[Ite]) = 1 + 2*x2 + x3
p(inssort) = 1 + x1^2
p(isort) = x1*x2
p(<#) = x2 + 2*x2^2
p(insert#) = 1 + x1 + x1^2 + x2
p(insert[Ite]#) = x2 + x2^2 + x3
p(inssort#) = 2*x1^2
p(isort#) = 2 + x1*x2 + x1^2
p(c_1) = x1
p(c_2) = 1
p(c_3) = x1 + x2
p(c_4) = 0
p(c_5) = 0
p(c_6) = 1
p(c_7) = 0
p(c_8) = x1
p(c_9) = 1
Following rules are strictly oriented:
insert#(S(x),r) = 3 + r
> 2 + r
= c_1(insert[Ite]#(<(S(x),x),S(x),r))
Following rules are (at-least) weakly oriented:
insert[Ite]#(False(),x',Cons(x,xs)) = 1 + x + x' + x'^2 + xs
>= 1 + x' + x'^2 + xs
= c_8(insert#(x',xs))
isort#(Cons(x,xs),r) = 3 + r + r*x + r*xs + 2*x + 2*x*xs + x^2 + 2*xs + xs^2
>= 3 + r + r*xs + x + 2*x*xs + x^2 + xs + xs^2
= c_3(isort#(xs,insert(x,r)),insert#(x,r))
insert(S(x),r) = 3 + r
>= 3 + r
= insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) = 2 + x + 2*x' + xs
>= 2 + x + 2*x' + xs
= Cons(x,insert(x',xs))
insert[Ite](True(),x,r) = 1 + r + 2*x
>= 1 + r + x
= Cons(x,r)
**** Step 1.b:7.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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:7.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
-->_1 insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs)):2
2:W:insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
-->_1 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):1
3:W:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):3
-->_2 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
1: insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
2: insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
**** Step 1.b:7.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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:7.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak DPs:
insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_2 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):2
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):1
2:W:insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
-->_1 insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs)):3
3:W:insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
-->_1 insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: insert#(S(x),r) -> c_1(insert[Ite]#(<(S(x),x),S(x),r))
3: insert[Ite]#(False(),x',Cons(x,xs)) -> c_8(insert#(x',xs))
*** Step 1.b:7.b:2: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/2,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)),insert#(x,r)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
*** Step 1.b:7.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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: isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
The strictly oriented rules are moved into the weak component.
**** Step 1.b:7.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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_3) = {1}
Following symbols are considered usable:
{<#,insert#,insert[Ite]#,inssort#,isort#}
TcT has computed the following interpretation:
p(0) = [0]
p(<) = [0]
p(Cons) = [1] x2 + [9]
p(False) = [0]
p(Nil) = [0]
p(S) = [1] x1 + [0]
p(True) = [0]
p(insert) = [0]
p(insert[Ite]) = [0]
p(inssort) = [0]
p(isort) = [0]
p(<#) = [0]
p(insert#) = [0]
p(insert[Ite]#) = [0]
p(inssort#) = [0]
p(isort#) = [2] x1 + [9]
p(c_1) = [0]
p(c_2) = [4] x1 + [0]
p(c_3) = [1] x1 + [10]
p(c_4) = [0]
p(c_5) = [1]
p(c_6) = [0]
p(c_7) = [0]
p(c_8) = [2] x1 + [0]
p(c_9) = [8]
Following rules are strictly oriented:
isort#(Cons(x,xs),r) = [2] xs + [27]
> [2] xs + [19]
= c_3(isort#(xs,insert(x,r)))
Following rules are (at-least) weakly oriented:
**** Step 1.b:7.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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:7.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} and constructors {0,Cons,False,Nil,S,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
-->_1 isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: isort#(Cons(x,xs),r) -> c_3(isort#(xs,insert(x,r)))
**** Step 1.b:7.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
<(x,0()) -> False()
<(0(),S(y)) -> True()
<(S(x),S(y)) -> <(x,y)
insert(S(x),r) -> insert[Ite](<(S(x),x),S(x),r)
insert[Ite](False(),x',Cons(x,xs)) -> Cons(x,insert(x',xs))
insert[Ite](True(),x,r) -> Cons(x,r)
- Signature:
{2,insert/2,insert[Ite]/3,inssort/1,isort/2,<#/2,insert#/2,insert[Ite]#/3,inssort#/1,isort#/2} / {0/0
,Cons/2,False/0,Nil/0,S/1,True/0,c_1/1,c_2/1,c_3/1,c_4/0,c_5/0,c_6/0,c_7/1,c_8/1,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {<#,insert#,insert[Ite]#,inssort#
,isort#} 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))