* Step 1: Sum WORST_CASE(Omega(n^1),O(n^2))
+ Considered Problem:
- Strict TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
ifselsort(false(),cons(N,L)) -> cons(min(cons(N,L)),selsort(replace(min(cons(N,L)),N,L)))
ifselsort(true(),cons(N,L)) -> cons(N,selsort(L))
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
selsort(cons(N,L)) -> ifselsort(eq(N,min(cons(N,L))),cons(N,L))
selsort(nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq,ifmin,ifrepl,ifselsort,le,min,replace
,selsort} 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:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
ifselsort(false(),cons(N,L)) -> cons(min(cons(N,L)),selsort(replace(min(cons(N,L)),N,L)))
ifselsort(true(),cons(N,L)) -> cons(N,selsort(L))
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
selsort(cons(N,L)) -> ifselsort(eq(N,min(cons(N,L))),cons(N,L))
selsort(nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq,ifmin,ifrepl,ifselsort,le,min,replace
,selsort} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
eq(x,y){x -> s(x),y -> s(y)} =
eq(s(x),s(y)) ->^+ eq(x,y)
= C[eq(x,y) = eq(x,y){}]
** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
ifselsort(false(),cons(N,L)) -> cons(min(cons(N,L)),selsort(replace(min(cons(N,L)),N,L)))
ifselsort(true(),cons(N,L)) -> cons(N,selsort(L))
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
selsort(cons(N,L)) -> ifselsort(eq(N,min(cons(N,L))),cons(N,L))
selsort(nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq,ifmin,ifrepl,ifselsort,le,min,replace
,selsort} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:
Strict DPs
eq#(0(),0()) -> c_1()
eq#(0(),s(Y)) -> c_2()
eq#(s(X),0()) -> c_3()
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifrepl#(true(),N,M,cons(K,L)) -> c_8()
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(0(),Y) -> c_11()
le#(s(X),0()) -> c_12()
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
min#(cons(0(),nil())) -> c_15()
min#(cons(s(N),nil())) -> c_16()
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
replace#(N,M,nil()) -> c_18()
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
selsort#(nil()) -> c_20()
Weak DPs
and mark the set of starting terms.
** Step 1.b:2: UsableRules WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(0(),0()) -> c_1()
eq#(0(),s(Y)) -> c_2()
eq#(s(X),0()) -> c_3()
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifrepl#(true(),N,M,cons(K,L)) -> c_8()
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(0(),Y) -> c_11()
le#(s(X),0()) -> c_12()
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
min#(cons(0(),nil())) -> c_15()
min#(cons(s(N),nil())) -> c_16()
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
replace#(N,M,nil()) -> c_18()
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
selsort#(nil()) -> c_20()
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
ifselsort(false(),cons(N,L)) -> cons(min(cons(N,L)),selsort(replace(min(cons(N,L)),N,L)))
ifselsort(true(),cons(N,L)) -> cons(N,selsort(L))
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
selsort(cons(N,L)) -> ifselsort(eq(N,min(cons(N,L))),cons(N,L))
selsort(nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
eq#(0(),0()) -> c_1()
eq#(0(),s(Y)) -> c_2()
eq#(s(X),0()) -> c_3()
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifrepl#(true(),N,M,cons(K,L)) -> c_8()
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(0(),Y) -> c_11()
le#(s(X),0()) -> c_12()
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
min#(cons(0(),nil())) -> c_15()
min#(cons(s(N),nil())) -> c_16()
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
replace#(N,M,nil()) -> c_18()
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
selsort#(nil()) -> c_20()
** Step 1.b:3: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(0(),0()) -> c_1()
eq#(0(),s(Y)) -> c_2()
eq#(s(X),0()) -> c_3()
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifrepl#(true(),N,M,cons(K,L)) -> c_8()
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(0(),Y) -> c_11()
le#(s(X),0()) -> c_12()
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
min#(cons(0(),nil())) -> c_15()
min#(cons(s(N),nil())) -> c_16()
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
replace#(N,M,nil()) -> c_18()
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
selsort#(nil()) -> c_20()
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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
{1,2,3,8,11,12,15,16,18,20}
by application of
Pre({1,2,3,8,11,12,15,16,18,20}) = {4,5,6,7,9,10,13,14,17,19}.
Here rules are labelled as follows:
1: eq#(0(),0()) -> c_1()
2: eq#(0(),s(Y)) -> c_2()
3: eq#(s(X),0()) -> c_3()
4: eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
5: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
6: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
7: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
8: ifrepl#(true(),N,M,cons(K,L)) -> c_8()
9: ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
10: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
11: le#(0(),Y) -> c_11()
12: le#(s(X),0()) -> c_12()
13: le#(s(X),s(Y)) -> c_13(le#(X,Y))
14: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
15: min#(cons(0(),nil())) -> c_15()
16: min#(cons(s(N),nil())) -> c_16()
17: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
18: replace#(N,M,nil()) -> c_18()
19: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
20: selsort#(nil()) -> c_20()
** Step 1.b:4: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak DPs:
eq#(0(),0()) -> c_1()
eq#(0(),s(Y)) -> c_2()
eq#(s(X),0()) -> c_3()
ifrepl#(true(),N,M,cons(K,L)) -> c_8()
le#(0(),Y) -> c_11()
le#(s(X),0()) -> c_12()
min#(cons(0(),nil())) -> c_15()
min#(cons(s(N),nil())) -> c_16()
replace#(N,M,nil()) -> c_18()
selsort#(nil()) -> c_20()
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
-->_1 eq#(s(X),0()) -> c_3():13
-->_1 eq#(0(),s(Y)) -> c_2():12
-->_1 eq#(0(),0()) -> c_1():11
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
2:S:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_1 min#(cons(s(N),nil())) -> c_16():18
-->_1 min#(cons(0(),nil())) -> c_15():17
3:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_1 min#(cons(s(N),nil())) -> c_16():18
-->_1 min#(cons(0(),nil())) -> c_15():17
4:S:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
-->_1 replace#(N,M,nil()) -> c_18():19
5:S:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_2 selsort#(nil()) -> c_20():20
-->_3 replace#(N,M,nil()) -> c_18():19
-->_4 min#(cons(s(N),nil())) -> c_16():18
-->_1 min#(cons(s(N),nil())) -> c_16():18
-->_4 min#(cons(0(),nil())) -> c_15():17
-->_1 min#(cons(0(),nil())) -> c_15():17
6:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
-->_1 selsort#(nil()) -> c_20():20
7:S:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),0()) -> c_12():16
-->_1 le#(0(),Y) -> c_11():15
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
8:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_2 le#(s(X),0()) -> c_12():16
-->_2 le#(0(),Y) -> c_11():15
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):3
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):2
9:S:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_1 ifrepl#(true(),N,M,cons(K,L)) -> c_8():14
-->_2 eq#(s(X),0()) -> c_3():13
-->_2 eq#(0(),s(Y)) -> c_2():12
-->_2 eq#(0(),0()) -> c_1():11
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):4
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
10:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
-->_3 min#(cons(s(N),nil())) -> c_16():18
-->_3 min#(cons(0(),nil())) -> c_15():17
-->_2 eq#(s(X),0()) -> c_3():13
-->_2 eq#(0(),s(Y)) -> c_2():12
-->_2 eq#(0(),0()) -> c_1():11
-->_3 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):6
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):5
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
11:W:eq#(0(),0()) -> c_1()
12:W:eq#(0(),s(Y)) -> c_2()
13:W:eq#(s(X),0()) -> c_3()
14:W:ifrepl#(true(),N,M,cons(K,L)) -> c_8()
15:W:le#(0(),Y) -> c_11()
16:W:le#(s(X),0()) -> c_12()
17:W:min#(cons(0(),nil())) -> c_15()
18:W:min#(cons(s(N),nil())) -> c_16()
19:W:replace#(N,M,nil()) -> c_18()
20:W:selsort#(nil()) -> c_20()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
20: selsort#(nil()) -> c_20()
19: replace#(N,M,nil()) -> c_18()
14: ifrepl#(true(),N,M,cons(K,L)) -> c_8()
17: min#(cons(0(),nil())) -> c_15()
18: min#(cons(s(N),nil())) -> c_16()
15: le#(0(),Y) -> c_11()
16: le#(s(X),0()) -> c_12()
11: eq#(0(),0()) -> c_1()
12: eq#(0(),s(Y)) -> c_2()
13: eq#(s(X),0()) -> c_3()
** Step 1.b:5: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
Problem (S)
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
*** Step 1.b:5.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
2:W:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
3:W:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
4:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
5:W:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
6:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
7:W:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
8:W:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):2
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):3
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
9:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):4
10:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):5
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):6
-->_3 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):8
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
8: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
3: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
7: le#(s(X),s(Y)) -> c_13(le#(X,Y))
*** Step 1.b:5.a:2: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
4:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
5:W:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):9
6:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):10
9:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):4
10:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):5
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):6
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
*** Step 1.b:5.a:3: DecomposeDG WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing}
+ Details:
We decompose the input problem according to the dependency graph into the upper component
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
and a lower component
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
Further, following extension rules are added to the lower component.
ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
**** Step 1.b:5.a:3.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
- Weak DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:
2: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
Consider the set of all dependency pairs
1: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
2: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
3: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{2}
These cover all (indirect) predecessors of dependency pairs
{1,2,3}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
***** Step 1.b:5.a:3.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
- Weak DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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,2},
uargs(c_10) = {1},
uargs(c_19) = {1,2}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
p(cons) = [1] x2 + [4]
p(eq) = [2] x1 + [0]
p(false) = [0]
p(ifmin) = [1] x1 + [1] x2 + [0]
p(ifrepl) = [1] x4 + [0]
p(ifselsort) = [1] x2 + [1]
p(le) = [0]
p(min) = [0]
p(nil) = [0]
p(replace) = [1] x3 + [0]
p(s) = [0]
p(selsort) = [1]
p(true) = [4]
p(eq#) = [0]
p(ifmin#) = [1] x1 + [2]
p(ifrepl#) = [1] x1 + [1] x2 + [1] x3 + [0]
p(ifselsort#) = [1] x2 + [2]
p(le#) = [1] x1 + [2]
p(min#) = [1]
p(replace#) = [0]
p(selsort#) = [1] x1 + [4]
p(c_1) = [1]
p(c_2) = [1]
p(c_3) = [0]
p(c_4) = [1] x1 + [4]
p(c_5) = [4] x1 + [0]
p(c_6) = [1] x1 + [1]
p(c_7) = [1]
p(c_8) = [4]
p(c_9) = [1] x1 + [1] x2 + [2]
p(c_10) = [1] x1 + [0]
p(c_11) = [1]
p(c_12) = [0]
p(c_13) = [4]
p(c_14) = [2] x1 + [1]
p(c_15) = [2]
p(c_16) = [0]
p(c_17) = [4] x2 + [4]
p(c_18) = [0]
p(c_19) = [1] x1 + [4] x2 + [0]
p(c_20) = [0]
Following rules are strictly oriented:
selsort#(cons(N,L)) = [1] L + [8]
> [1] L + [6]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
Following rules are (at-least) weakly oriented:
ifselsort#(false(),cons(N,L)) = [1] L + [6]
>= [1] L + [6]
= c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [1] L + [6]
>= [1] L + [4]
= c_10(selsort#(L))
ifrepl(false(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [0]
>= [0]
= nil()
***** Step 1.b:5.a:3.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
- Weak DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.a:3.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L)))):3
2:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L)))):3
3:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):2
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
3: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),eq#(N,min(cons(N,L))))
2: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
***** Step 1.b:5.a:3.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.a:3.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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 = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
The strictly oriented rules are moved into the weak component.
***** Step 1.b:5.a:3.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
NaturalMI {miDimension = 2, 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 (containing no more than 1 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_4) = {1},
uargs(c_7) = {1},
uargs(c_17) = {1,2}
Following symbols are considered usable:
{ifmin,ifrepl,min,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
[2]
p(cons) = [0 0] x1 + [0 2] x2 + [0]
[0 1] [0 1] [0]
p(eq) = [0 0] x1 + [0 1] x2 + [0]
[0 1] [0 0] [2]
p(false) = [0]
[0]
p(ifmin) = [0 0] x2 + [0]
[0 1] [0]
p(ifrepl) = [0 2] x3 + [1 1] x4 + [0]
[0 1] [0 1] [0]
p(ifselsort) = [0 2] x2 + [2]
[1 0] [0]
p(le) = [1 0] x1 + [0 3] x2 + [0]
[2 1] [1 0] [3]
p(min) = [0 0] x1 + [0]
[0 1] [0]
p(nil) = [0]
[0]
p(replace) = [0 2] x2 + [1 2] x3 + [0]
[0 1] [0 1] [0]
p(s) = [0 0] x1 + [0]
[0 1] [2]
p(selsort) = [2 1] x1 + [1]
[0 0] [0]
p(true) = [0]
[0]
p(eq#) = [0 2] x2 + [0]
[0 0] [1]
p(ifmin#) = [0 0] x1 + [1 2] x2 + [0]
[0 2] [0 1] [0]
p(ifrepl#) = [0 0] x2 + [0 1] x3 + [1 0] x4 + [0]
[3 1] [0 2] [0 2] [0]
p(ifselsort#) = [0 2] x2 + [0]
[0 0] [1]
p(le#) = [0 1] x1 + [0 0] x2 + [2]
[0 0] [0 2] [0]
p(min#) = [1]
[0]
p(replace#) = [0 1] x2 + [0 2] x3 + [0]
[0 0] [0 0] [0]
p(selsort#) = [0 2] x1 + [0]
[0 0] [1]
p(c_1) = [0]
[0]
p(c_2) = [0]
[0]
p(c_3) = [0]
[0]
p(c_4) = [1 0] x1 + [0]
[0 0] [0]
p(c_5) = [0 2] x1 + [0]
[0 1] [0]
p(c_6) = [2]
[2]
p(c_7) = [1 1] x1 + [0]
[0 0] [0]
p(c_8) = [0]
[1]
p(c_9) = [1 0] x1 + [0 0] x2 + [0]
[0 0] [0 1] [0]
p(c_10) = [1]
[1]
p(c_11) = [0]
[1]
p(c_12) = [1]
[0]
p(c_13) = [1]
[0]
p(c_14) = [1 2] x2 + [0]
[1 2] [0]
p(c_15) = [0]
[2]
p(c_16) = [2]
[0]
p(c_17) = [1 0] x1 + [1 0] x2 + [0]
[0 0] [0 0] [0]
p(c_18) = [1]
[0]
p(c_19) = [2 2] x1 + [0]
[0 2] [1]
p(c_20) = [1]
[1]
Following rules are strictly oriented:
eq#(s(X),s(Y)) = [0 2] Y + [4]
[0 0] [1]
> [0 2] Y + [0]
[0 0] [0]
= c_4(eq#(X,Y))
Following rules are (at-least) weakly oriented:
ifrepl#(false(),N,M,cons(K,L)) = [0 0] K + [0 2] L + [0 1] M + [0 0] N + [0]
[0 2] [0 2] [0 2] [3 1] [0]
>= [0 2] L + [0 1] M + [0]
[0 0] [0 0] [0]
= c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) = [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
>= [0 2] L + [0 1] N + [0]
[0 0] [0 0] [0]
= replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) = [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
>= [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
= selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
>= [0 2] L + [0]
[0 0] [1]
= selsort#(L)
replace#(N,M,cons(K,L)) = [0 2] K + [0 2] L + [0 1] M + [0]
[0 0] [0 0] [0 0] [0]
>= [0 2] K + [0 2] L + [0 1] M + [0]
[0 0] [0 0] [0 0] [0]
= c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) = [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
>= [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
= eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) = [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
>= [0 2] L + [0 2] N + [0]
[0 0] [0 0] [1]
= ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
ifmin(false(),cons(N,cons(M,L))) = [0 0] L + [0 0] M + [0 0] N + [0]
[0 1] [0 1] [0 1] [0]
>= [0 0] L + [0 0] M + [0]
[0 1] [0 1] [0]
= min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) = [0 0] L + [0 0] M + [0 0] N + [0]
[0 1] [0 1] [0 1] [0]
>= [0 0] L + [0 0] N + [0]
[0 1] [0 1] [0]
= min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) = [0 1] K + [0 3] L + [0 2] M + [0]
[0 1] [0 1] [0 1] [0]
>= [0 0] K + [0 2] L + [0 2] M + [0]
[0 1] [0 1] [0 1] [0]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [0 1] K + [0 3] L + [0 2] M + [0]
[0 1] [0 1] [0 1] [0]
>= [0 2] L + [0 0] M + [0]
[0 1] [0 1] [0]
= cons(M,L)
min(cons(N,cons(M,L))) = [0 0] L + [0 0] M + [0 0] N + [0]
[0 1] [0 1] [0 1] [0]
>= [0 0] L + [0 0] M + [0 0] N + [0]
[0 1] [0 1] [0 1] [0]
= ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) = [0]
[2]
>= [0]
[2]
= 0()
min(cons(s(N),nil())) = [0 0] N + [0]
[0 1] [2]
>= [0 0] N + [0]
[0 1] [2]
= s(N)
replace(N,M,cons(K,L)) = [0 2] K + [0 4] L + [0 2] M + [0]
[0 1] [0 1] [0 1] [0]
>= [0 1] K + [0 3] L + [0 2] M + [0]
[0 1] [0 1] [0 1] [0]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [0 2] M + [0]
[0 1] [0]
>= [0]
[0]
= nil()
***** Step 1.b:5.a:3.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.a:3.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
2:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):6
3:W:ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):6
4:W:ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
-->_1 selsort#(cons(N,L)) -> eq#(N,min(cons(N,L))):7
5:W:ifselsort#(true(),cons(N,L)) -> selsort#(L)
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
-->_1 selsort#(cons(N,L)) -> eq#(N,min(cons(N,L))):7
6:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):2
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
7:W:selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):1
8:W:selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
-->_1 ifselsort#(true(),cons(N,L)) -> selsort#(L):5
-->_1 ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L)):4
-->_1 ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L):3
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
4: ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
8: selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
5: ifselsort#(true(),cons(N,L)) -> selsort#(L)
7: selsort#(cons(N,L)) -> eq#(N,min(cons(N,L)))
3: ifselsort#(false(),cons(N,L)) -> replace#(min(cons(N,L)),N,L)
2: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
6: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
1: eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
***** Step 1.b:5.a:3.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak DPs:
eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
2:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
3:S:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):8
4:S:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):9
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):8
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
5:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):9
6:S:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
7:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):2
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):1
8:S:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):10
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):3
9:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
-->_2 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):10
-->_3 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):5
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):4
10:W:eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
-->_1 eq#(s(X),s(Y)) -> c_4(eq#(X,Y)):10
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
10: eq#(s(X),s(Y)) -> c_4(eq#(X,Y))
*** Step 1.b:5.b:2: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/2,c_18/0,c_19/3,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
2:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
3:S:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):8
4:S:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):9
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K)):8
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
5:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L))):9
6:S:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
7:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):2
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):1
8:S:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)),eq#(N,K))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):3
9:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
,eq#(N,min(cons(N,L)))
,min#(cons(N,L)))
-->_3 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):5
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):4
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
*** Step 1.b:5.b:3: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
Problem (S)
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
**** Step 1.b:5.b:3.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
2:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
3:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):8
4:W:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):9
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):8
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
5:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):9
6:S:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
7:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):1
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):2
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
8:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):3
9:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):4
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):5
-->_2 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
8: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
**** Step 1.b:5.b:3.a:2: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
2:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
4:W:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):9
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
5:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):9
6:S:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
7:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):1
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):2
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):6
9:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):4
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):5
-->_2 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):7
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
**** Step 1.b:5.b:3.a:3: DecomposeDG WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing}
+ Details:
We decompose the input problem according to the dependency graph into the upper component
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
and a lower component
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
Further, following extension rules are added to the lower component.
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
***** Step 1.b:5.b:3.a:3.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
The strictly oriented rules are moved into the weak component.
****** Step 1.b:5.b:3.a:3.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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) = {2},
uargs(c_10) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
p(cons) = [1] x1 + [1] x2 + [1]
p(eq) = [4] x1 + [0]
p(false) = [0]
p(ifmin) = [1]
p(ifrepl) = [1] x3 + [1] x4 + [0]
p(ifselsort) = [2] x2 + [1]
p(le) = [0]
p(min) = [0]
p(nil) = [2]
p(replace) = [1] x2 + [1] x3 + [0]
p(s) = [0]
p(selsort) = [1] x1 + [1]
p(true) = [0]
p(eq#) = [1] x2 + [0]
p(ifmin#) = [2]
p(ifrepl#) = [1] x1 + [0]
p(ifselsort#) = [4] x2 + [2]
p(le#) = [2]
p(min#) = [5] x1 + [3]
p(replace#) = [4] x2 + [0]
p(selsort#) = [4] x1 + [2]
p(c_1) = [0]
p(c_2) = [0]
p(c_3) = [0]
p(c_4) = [1] x1 + [1]
p(c_5) = [2] x1 + [0]
p(c_6) = [1] x1 + [1]
p(c_7) = [0]
p(c_8) = [0]
p(c_9) = [1] x2 + [0]
p(c_10) = [1] x1 + [4]
p(c_11) = [1]
p(c_12) = [2]
p(c_13) = [4] x1 + [0]
p(c_14) = [1] x1 + [0]
p(c_15) = [2]
p(c_16) = [1]
p(c_17) = [0]
p(c_18) = [2]
p(c_19) = [1] x1 + [0]
p(c_20) = [2]
Following rules are strictly oriented:
ifselsort#(false(),cons(N,L)) = [4] L + [4] N + [6]
> [4] L + [4] N + [2]
= c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
Following rules are (at-least) weakly oriented:
ifselsort#(true(),cons(N,L)) = [4] L + [4] N + [6]
>= [4] L + [6]
= c_10(selsort#(L))
selsort#(cons(N,L)) = [4] L + [4] N + [6]
>= [4] L + [4] N + [6]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
ifrepl(false(),N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] K + [1] L + [1] M + [1]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] L + [1] M + [1]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] K + [1] L + [1] M + [1]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [1] M + [2]
>= [2]
= nil()
****** Step 1.b:5.b:3.a:3.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.a:1.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
Consider the set of all dependency pairs
1: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
2: ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
3: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{1}
These cover all (indirect) predecessors of dependency pairs
{1,2,3}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
******* Step 1.b:5.b:3.a:3.a:1.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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) = {2},
uargs(c_10) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
p(cons) = [1] x2 + [4]
p(eq) = [4] x1 + [0]
p(false) = [0]
p(ifmin) = [2] x1 + [1]
p(ifrepl) = [1] x4 + [0]
p(ifselsort) = [2] x1 + [2] x2 + [1]
p(le) = [1] x2 + [5]
p(min) = [0]
p(nil) = [4]
p(replace) = [1] x3 + [0]
p(s) = [1] x1 + [0]
p(selsort) = [0]
p(true) = [0]
p(eq#) = [4] x1 + [1] x2 + [4]
p(ifmin#) = [1] x1 + [0]
p(ifrepl#) = [4] x3 + [1] x4 + [4]
p(ifselsort#) = [2] x2 + [0]
p(le#) = [1] x1 + [0]
p(min#) = [1]
p(replace#) = [4]
p(selsort#) = [2] x1 + [5]
p(c_1) = [1]
p(c_2) = [0]
p(c_3) = [1]
p(c_4) = [1]
p(c_5) = [2]
p(c_6) = [1]
p(c_7) = [2] x1 + [4]
p(c_8) = [0]
p(c_9) = [1] x1 + [1] x2 + [1]
p(c_10) = [1] x1 + [3]
p(c_11) = [0]
p(c_12) = [2]
p(c_13) = [4] x1 + [1]
p(c_14) = [1] x1 + [1]
p(c_15) = [1]
p(c_16) = [0]
p(c_17) = [1]
p(c_18) = [1]
p(c_19) = [1] x1 + [4]
p(c_20) = [2]
Following rules are strictly oriented:
selsort#(cons(N,L)) = [2] L + [13]
> [2] L + [12]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
Following rules are (at-least) weakly oriented:
ifselsort#(false(),cons(N,L)) = [2] L + [8]
>= [2] L + [7]
= c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) = [2] L + [8]
>= [2] L + [8]
= c_10(selsort#(L))
ifrepl(false(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [4]
>= [4]
= nil()
******* Step 1.b:5.b:3.a:3.a:1.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.a:1.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L)),selsort#(replace(min(cons(N,L)),N,L)),min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):3
2:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):3
3:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):2
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,min#(cons(N,L)))
3: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
2: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
******* Step 1.b:5.b:3.a:3.a:1.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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 = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
3: le#(s(X),s(Y)) -> c_13(le#(X,Y))
The strictly oriented rules are moved into the weak component.
****** Step 1.b:5.b:3.a:3.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
NaturalMI {miDimension = 3, 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 (containing no more than 1 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_5) = {1},
uargs(c_6) = {1},
uargs(c_13) = {1},
uargs(c_14) = {1,2}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
[0]
[1]
p(cons) = [0 0 0] [0 1 0] [1]
[0 0 0] x1 + [0 0 1] x2 + [0]
[0 0 1] [0 0 1] [1]
p(eq) = [0 0 1] [1]
[0 0 0] x1 + [0]
[1 0 0] [0]
p(false) = [0]
[0]
[0]
p(ifmin) = [0 0 1] [0]
[0 0 1] x2 + [0]
[0 0 0] [0]
p(ifrepl) = [0 1 1] [1 0 0] [0]
[0 1 1] x3 + [0 1 0] x4 + [0]
[0 0 1] [0 0 1] [0]
p(ifselsort) = [0]
[0]
[0]
p(le) = [0 0 0] [0]
[0 0 0] x2 + [0]
[0 0 1] [0]
p(min) = [0 0 0] [0]
[0 0 1] x1 + [0]
[0 0 0] [0]
p(nil) = [0]
[1]
[0]
p(replace) = [0 1 1] [1 0 0] [0]
[0 1 1] x2 + [0 1 0] x3 + [0]
[0 0 1] [0 0 1] [0]
p(s) = [0 1 0] [1]
[0 0 1] x1 + [0]
[0 0 1] [1]
p(selsort) = [0]
[0]
[0]
p(true) = [0]
[0]
[0]
p(eq#) = [0]
[0]
[0]
p(ifmin#) = [1 0 0] [1]
[0 0 1] x2 + [0]
[1 0 0] [0]
p(ifrepl#) = [0]
[0]
[0]
p(ifselsort#) = [0 0 1] [1]
[0 0 0] x2 + [0]
[0 0 1] [0]
p(le#) = [0 0 0] [0 0 1] [0]
[0 1 0] x1 + [0 0 0] x2 + [0]
[0 0 0] [0 1 0] [0]
p(min#) = [0 1 0] [1]
[0 0 0] x1 + [0]
[0 1 0] [1]
p(replace#) = [0]
[0]
[0]
p(selsort#) = [0 0 1] [1]
[0 0 0] x1 + [0]
[0 0 1] [1]
p(c_1) = [0]
[0]
[0]
p(c_2) = [0]
[0]
[0]
p(c_3) = [0]
[0]
[0]
p(c_4) = [0]
[0]
[0]
p(c_5) = [1 0 0] [0]
[0 0 1] x1 + [0]
[1 0 0] [0]
p(c_6) = [1 0 0] [1]
[1 0 0] x1 + [0]
[0 0 1] [0]
p(c_7) = [0]
[0]
[0]
p(c_8) = [0]
[0]
[0]
p(c_9) = [0]
[0]
[0]
p(c_10) = [0]
[0]
[0]
p(c_11) = [0]
[0]
[0]
p(c_12) = [0]
[0]
[0]
p(c_13) = [1 0 0] [0]
[0 0 0] x1 + [0]
[1 0 0] [0]
p(c_14) = [1 0 0] [1 0 0] [0]
[0 0 0] x1 + [0 0 0] x2 + [0]
[0 0 1] [1 0 0] [0]
p(c_15) = [0]
[0]
[0]
p(c_16) = [0]
[0]
[0]
p(c_17) = [0]
[0]
[0]
p(c_18) = [0]
[0]
[0]
p(c_19) = [0]
[0]
[0]
p(c_20) = [0]
[0]
[0]
Following rules are strictly oriented:
ifmin#(false(),cons(N,cons(M,L))) = [0 0 1] [0 0 0] [0 0 0] [2]
[0 0 1] L + [0 0 1] M + [0 0 1] N + [2]
[0 0 1] [0 0 0] [0 0 0] [1]
> [0 0 1] [1]
[0 0 1] L + [1]
[0 0 1] [1]
= c_5(min#(cons(M,L)))
le#(s(X),s(Y)) = [0 0 0] [0 0 1] [1]
[0 0 1] X + [0 0 0] Y + [0]
[0 0 0] [0 0 1] [0]
> [0 0 1] [0]
[0 0 0] Y + [0]
[0 0 1] [0]
= c_13(le#(X,Y))
Following rules are (at-least) weakly oriented:
ifmin#(true(),cons(N,cons(M,L))) = [0 0 1] [0 0 0] [0 0 0] [2]
[0 0 1] L + [0 0 1] M + [0 0 1] N + [2]
[0 0 1] [0 0 0] [0 0 0] [1]
>= [0 0 1] [2]
[0 0 1] L + [1]
[0 0 1] [1]
= c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [1]
>= [0 0 1] [1]
[0 0 0] L + [0]
[0 0 1] [1]
= min#(cons(N,L))
ifselsort#(false(),cons(N,L)) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [1]
>= [0 0 1] [0 0 1] [1]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [1]
= selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [1]
>= [0 0 1] [1]
[0 0 0] L + [0]
[0 0 1] [1]
= selsort#(L)
min#(cons(N,cons(M,L))) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] M + [0]
[0 0 1] [0 0 1] [2]
>= [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] M + [0]
[0 0 1] [0 0 1] [1]
= c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
selsort#(cons(N,L)) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [2]
>= [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [1]
= ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) = [0 0 1] [0 0 1] [2]
[0 0 0] L + [0 0 0] N + [0]
[0 0 1] [0 0 1] [2]
>= [0 0 1] [1]
[0 0 0] L + [0]
[0 0 1] [1]
= min#(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) = [0 0 0] [0 1 0] [0 1 1] [1]
[0 0 0] K + [0 0 1] L + [0 1 1] M + [0]
[0 0 1] [0 0 1] [0 0 1] [1]
>= [0 0 0] [0 1 0] [0 1 1] [1]
[0 0 0] K + [0 0 1] L + [0 0 1] M + [0]
[0 0 1] [0 0 1] [0 0 1] [1]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [0 0 0] [0 1 0] [0 1 1] [1]
[0 0 0] K + [0 0 1] L + [0 1 1] M + [0]
[0 0 1] [0 0 1] [0 0 1] [1]
>= [0 1 0] [0 0 0] [1]
[0 0 1] L + [0 0 0] M + [0]
[0 0 1] [0 0 1] [1]
= cons(M,L)
replace(N,M,cons(K,L)) = [0 0 0] [0 1 0] [0 1 1] [1]
[0 0 0] K + [0 0 1] L + [0 1 1] M + [0]
[0 0 1] [0 0 1] [0 0 1] [1]
>= [0 0 0] [0 1 0] [0 1 1] [1]
[0 0 0] K + [0 0 1] L + [0 1 1] M + [0]
[0 0 1] [0 0 1] [0 0 1] [1]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [0 1 1] [0]
[0 1 1] M + [1]
[0 0 1] [0]
>= [0]
[1]
[0]
= nil()
****** Step 1.b:5.b:3.a:3.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
le#(s(X),s(Y)) -> c_13(le#(X,Y))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
le#(s(X),s(Y)) -> c_13(le#(X,Y))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
2:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):3
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):1
3:W:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
4:W:ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
5:W:ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):9
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
6:W:ifselsort#(true(),cons(N,L)) -> selsort#(L)
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):9
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
7:W:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):7
8:W:selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
-->_1 ifselsort#(true(),cons(N,L)) -> selsort#(L):6
-->_1 ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L)):5
-->_1 ifselsort#(false(),cons(N,L)) -> min#(cons(N,L)):4
9:W:selsort#(cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
7: le#(s(X),s(Y)) -> c_13(le#(X,Y))
****** Step 1.b:5.b:3.a:3.b:1.b:2: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
2:S:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):3
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):1
3:W:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
4:W:ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
5:W:ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):9
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
6:W:ifselsort#(true(),cons(N,L)) -> selsort#(L)
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):9
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):8
8:W:selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
-->_1 ifselsort#(true(),cons(N,L)) -> selsort#(L):6
-->_1 ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L)):5
-->_1 ifselsort#(false(),cons(N,L)) -> min#(cons(N,L)):4
9:W:selsort#(cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):2
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
****** Step 1.b:5.b:3.a:3.b:1.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
The strictly oriented rules are moved into the weak component.
******* Step 1.b:5.b:3.a:3.b:1.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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_5) = {1},
uargs(c_6) = {1},
uargs(c_14) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
p(cons) = [1] x2 + [2]
p(eq) = [1] x1 + [6]
p(false) = [0]
p(ifmin) = [4]
p(ifrepl) = [1] x4 + [0]
p(ifselsort) = [1]
p(le) = [1] x2 + [0]
p(min) = [0]
p(nil) = [0]
p(replace) = [1] x3 + [0]
p(s) = [1]
p(selsort) = [1]
p(true) = [0]
p(eq#) = [4] x1 + [4] x2 + [1]
p(ifmin#) = [2] x2 + [0]
p(ifrepl#) = [1] x1 + [1] x2 + [2] x4 + [1]
p(ifselsort#) = [4] x2 + [0]
p(le#) = [4] x1 + [4] x2 + [4]
p(min#) = [2] x1 + [0]
p(replace#) = [1] x1 + [1] x3 + [0]
p(selsort#) = [4] x1 + [1]
p(c_1) = [4]
p(c_2) = [2]
p(c_3) = [2]
p(c_4) = [1] x1 + [0]
p(c_5) = [1] x1 + [1]
p(c_6) = [1] x1 + [2]
p(c_7) = [0]
p(c_8) = [4]
p(c_9) = [2] x3 + [1]
p(c_10) = [2] x1 + [0]
p(c_11) = [1]
p(c_12) = [0]
p(c_13) = [1] x1 + [1]
p(c_14) = [1] x1 + [0]
p(c_15) = [0]
p(c_16) = [1]
p(c_17) = [1]
p(c_18) = [2]
p(c_19) = [1]
p(c_20) = [0]
Following rules are strictly oriented:
ifmin#(true(),cons(N,cons(M,L))) = [2] L + [8]
> [2] L + [6]
= c_6(min#(cons(N,L)))
Following rules are (at-least) weakly oriented:
ifmin#(false(),cons(N,cons(M,L))) = [2] L + [8]
>= [2] L + [5]
= c_5(min#(cons(M,L)))
ifselsort#(false(),cons(N,L)) = [4] L + [8]
>= [2] L + [4]
= min#(cons(N,L))
ifselsort#(false(),cons(N,L)) = [4] L + [8]
>= [4] L + [1]
= selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [4] L + [8]
>= [4] L + [1]
= selsort#(L)
min#(cons(N,cons(M,L))) = [2] L + [8]
>= [2] L + [8]
= c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
selsort#(cons(N,L)) = [4] L + [9]
>= [4] L + [8]
= ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) = [4] L + [9]
>= [2] L + [4]
= min#(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) = [1] L + [2]
>= [1] L + [2]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] L + [2]
>= [1] L + [2]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] L + [2]
>= [1] L + [2]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [0]
>= [0]
= nil()
******* Step 1.b:5.b:3.a:3.b:1.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.b:1.b:3.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
Consider the set of all dependency pairs
1: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
2: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
3: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
4: ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
5: ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
6: ifselsort#(true(),cons(N,L)) -> selsort#(L)
7: selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
8: selsort#(cons(N,L)) -> min#(cons(N,L))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{1}
These cover all (indirect) predecessors of dependency pairs
{1,2,3}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
******** Step 1.b:5.b:3.a:3.b:1.b:3.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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_5) = {1},
uargs(c_6) = {1},
uargs(c_14) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [1]
p(cons) = [1] x2 + [4]
p(eq) = [5] x1 + [4]
p(false) = [0]
p(ifmin) = [4]
p(ifrepl) = [1] x4 + [4]
p(ifselsort) = [1] x1 + [4] x2 + [4]
p(le) = [5] x2 + [0]
p(min) = [5]
p(nil) = [1]
p(replace) = [1] x3 + [4]
p(s) = [0]
p(selsort) = [4] x1 + [1]
p(true) = [0]
p(eq#) = [1]
p(ifmin#) = [1] x2 + [0]
p(ifrepl#) = [1] x1 + [2] x2 + [1]
p(ifselsort#) = [1] x2 + [1]
p(le#) = [4]
p(min#) = [1] x1 + [1]
p(replace#) = [2]
p(selsort#) = [1] x1 + [1]
p(c_1) = [0]
p(c_2) = [0]
p(c_3) = [1]
p(c_4) = [0]
p(c_5) = [1] x1 + [1]
p(c_6) = [1] x1 + [3]
p(c_7) = [1] x1 + [0]
p(c_8) = [1]
p(c_9) = [1]
p(c_10) = [1]
p(c_11) = [0]
p(c_12) = [0]
p(c_13) = [1] x1 + [1]
p(c_14) = [1] x1 + [0]
p(c_15) = [2]
p(c_16) = [1]
p(c_17) = [2]
p(c_18) = [4]
p(c_19) = [1]
p(c_20) = [2]
Following rules are strictly oriented:
min#(cons(N,cons(M,L))) = [1] L + [9]
> [1] L + [8]
= c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
Following rules are (at-least) weakly oriented:
ifmin#(false(),cons(N,cons(M,L))) = [1] L + [8]
>= [1] L + [6]
= c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) = [1] L + [8]
>= [1] L + [8]
= c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) = [1] L + [5]
>= [1] L + [5]
= min#(cons(N,L))
ifselsort#(false(),cons(N,L)) = [1] L + [5]
>= [1] L + [5]
= selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [1] L + [5]
>= [1] L + [1]
= selsort#(L)
selsort#(cons(N,L)) = [1] L + [5]
>= [1] L + [5]
= ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) = [1] L + [5]
>= [1] L + [5]
= min#(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) = [1] L + [8]
>= [1] L + [8]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] L + [8]
>= [1] L + [4]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] L + [8]
>= [1] L + [8]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [5]
>= [1]
= nil()
******** Step 1.b:5.b:3.a:3.b:1.b:3.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.a:3.b:1.b:3.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> selsort#(L)
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
selsort#(cons(N,L)) -> min#(cons(N,L))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L)))):6
2:W:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L)))):6
3:W:ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L)))):6
4:W:ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):8
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):7
5:W:ifselsort#(true(),cons(N,L)) -> selsort#(L)
-->_1 selsort#(cons(N,L)) -> min#(cons(N,L)):8
-->_1 selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L)):7
6:W:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):2
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):1
7:W:selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
-->_1 ifselsort#(true(),cons(N,L)) -> selsort#(L):5
-->_1 ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L)):4
-->_1 ifselsort#(false(),cons(N,L)) -> min#(cons(N,L)):3
8:W:selsort#(cons(N,L)) -> min#(cons(N,L))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L)))):6
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
4: ifselsort#(false(),cons(N,L)) -> selsort#(replace(min(cons(N,L)),N,L))
7: selsort#(cons(N,L)) -> ifselsort#(eq(N,min(cons(N,L))),cons(N,L))
5: ifselsort#(true(),cons(N,L)) -> selsort#(L)
8: selsort#(cons(N,L)) -> min#(cons(N,L))
3: ifselsort#(false(),cons(N,L)) -> min#(cons(N,L))
1: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
6: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))))
2: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
******** Step 1.b:5.b:3.a:3.b:1.b:3.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/3,c_10/1,c_11/0,c_12/0,c_13/1,c_14/1,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak DPs:
ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
le#(s(X),s(Y)) -> c_13(le#(X,Y))
min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
2:S:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_4 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):9
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):9
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):5
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
3:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):5
4:S:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):1
5:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
-->_2 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):9
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):3
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):2
6:W:ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):9
7:W:ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
-->_1 min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M)):9
8:W:le#(s(X),s(Y)) -> c_13(le#(X,Y))
-->_1 le#(s(X),s(Y)) -> c_13(le#(X,Y)):8
9:W:min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
-->_2 le#(s(X),s(Y)) -> c_13(le#(X,Y)):8
-->_1 ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L))):7
-->_1 ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L))):6
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
9: min#(cons(N,cons(M,L))) -> c_14(ifmin#(le(N,M),cons(N,cons(M,L))),le#(N,M))
7: ifmin#(true(),cons(N,cons(M,L))) -> c_6(min#(cons(N,L)))
6: ifmin#(false(),cons(N,cons(M,L))) -> c_5(min#(cons(M,L)))
8: le#(s(X),s(Y)) -> c_13(le#(X,Y))
**** Step 1.b:5.b:3.b:2: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/4,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/2,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
2:S:ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L)))
-->_2 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):5
-->_3 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
3:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L))):5
4:S:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):1
5:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)),min#(cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):3
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(min#(cons(N,L))
,selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)
,min#(cons(N,L))):2
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
**** Step 1.b:5.b:3.b:3: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
Problem (S)
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
***** Step 1.b:5.b:3.b:3.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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 = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
The strictly oriented rules are moved into the weak component.
****** Step 1.b:5.b:3.b:3.a:1.a:1: NaturalMI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
NaturalMI {miDimension = 2, 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:
The following argument positions are considered usable:
uargs(c_7) = {1},
uargs(c_9) = {1,2},
uargs(c_10) = {1},
uargs(c_17) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
[0]
p(cons) = [1 0] x1 + [1 2] x2 + [1]
[0 0] [0 1] [1]
p(eq) = [0 1] x2 + [0]
[1 0] [0]
p(false) = [0]
[0]
p(ifmin) = [0 1] x1 + [0 2] x2 + [0]
[1 0] [0 1] [1]
p(ifrepl) = [1 0] x3 + [1 0] x4 + [3]
[0 0] [0 1] [0]
p(ifselsort) = [0 0] x2 + [0]
[2 1] [0]
p(le) = [1 1] x1 + [0]
[2 2] [1]
p(min) = [1 0] x1 + [3]
[0 1] [3]
p(nil) = [3]
[0]
p(replace) = [1 0] x2 + [1 0] x3 + [3]
[0 0] [0 1] [0]
p(s) = [0]
[0]
p(selsort) = [0]
[0]
p(true) = [0]
[0]
p(eq#) = [0 2] x1 + [0 0] x2 + [2]
[0 2] [2 2] [0]
p(ifmin#) = [0]
[1]
p(ifrepl#) = [0 0] x2 + [0 1] x4 + [0]
[3 1] [2 0] [3]
p(ifselsort#) = [1 1] x2 + [3]
[3 1] [2]
p(le#) = [0 0] x2 + [0]
[0 1] [2]
p(min#) = [0 0] x1 + [0]
[0 1] [0]
p(replace#) = [0 1] x3 + [0]
[1 0] [0]
p(selsort#) = [1 2] x1 + [2]
[0 0] [2]
p(c_1) = [2]
[0]
p(c_2) = [0]
[2]
p(c_3) = [0]
[0]
p(c_4) = [0 1] x1 + [2]
[1 0] [0]
p(c_5) = [0]
[2]
p(c_6) = [0]
[0]
p(c_7) = [1 0] x1 + [0]
[0 0] [0]
p(c_8) = [1]
[1]
p(c_9) = [1 0] x1 + [1 0] x2 + [0]
[1 0] [2 2] [0]
p(c_10) = [1 1] x1 + [0]
[0 0] [2]
p(c_11) = [0]
[0]
p(c_12) = [0]
[0]
p(c_13) = [0 2] x1 + [1]
[0 0] [0]
p(c_14) = [2 1] x1 + [0]
[0 0] [0]
p(c_15) = [0]
[0]
p(c_16) = [0]
[0]
p(c_17) = [1 0] x1 + [0]
[0 0] [1]
p(c_18) = [2]
[0]
p(c_19) = [1 0] x1 + [0]
[0 0] [2]
p(c_20) = [0]
[0]
Following rules are strictly oriented:
ifrepl#(false(),N,M,cons(K,L)) = [0 0] K + [0 1] L + [0 0] N + [1]
[2 0] [2 4] [3 1] [5]
> [0 1] L + [0]
[0 0] [0]
= c_7(replace#(N,M,L))
Following rules are (at-least) weakly oriented:
ifselsort#(false(),cons(N,L)) = [1 3] L + [1 0] N + [5]
[3 7] [3 0] [6]
>= [1 3] L + [1 0] N + [5]
[3 4] [1 0] [5]
= c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [1 3] L + [1 0] N + [5]
[3 7] [3 0] [6]
>= [1 2] L + [4]
[0 0] [2]
= c_10(selsort#(L))
replace#(N,M,cons(K,L)) = [0 0] K + [0 1] L + [1]
[1 0] [1 2] [1]
>= [0 1] L + [1]
[0 0] [1]
= c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) = [1 4] L + [1 0] N + [5]
[0 0] [0 0] [2]
>= [1 3] L + [1 0] N + [5]
[0 0] [0 0] [2]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
ifrepl(false(),N,M,cons(K,L)) = [1 0] K + [1 2] L + [1 0] M + [4]
[0 0] [0 1] [0 0] [1]
>= [1 0] K + [1 2] L + [1 0] M + [4]
[0 0] [0 1] [0 0] [1]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1 0] K + [1 2] L + [1 0] M + [4]
[0 0] [0 1] [0 0] [1]
>= [1 2] L + [1 0] M + [1]
[0 1] [0 0] [1]
= cons(M,L)
replace(N,M,cons(K,L)) = [1 0] K + [1 2] L + [1 0] M + [4]
[0 0] [0 1] [0 0] [1]
>= [1 0] K + [1 2] L + [1 0] M + [4]
[0 0] [0 1] [0 0] [1]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [1 0] M + [6]
[0 0] [0]
>= [3]
[0]
= nil()
****** Step 1.b:5.b:3.b:3.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:3.a:1.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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 = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
Consider the set of all dependency pairs
1: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
2: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
3: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
4: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
5: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
Processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, 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,2}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
******* Step 1.b:5.b:3.b:3.a:1.b:1.a:1: NaturalMI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
NaturalMI {miDimension = 2, 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:
The following argument positions are considered usable:
uargs(c_7) = {1},
uargs(c_9) = {1,2},
uargs(c_10) = {1},
uargs(c_17) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
[0]
p(cons) = [0 2] x1 + [1 2] x2 + [0]
[0 0] [0 1] [2]
p(eq) = [0 0] x1 + [0]
[3 0] [0]
p(false) = [0]
[0]
p(ifmin) = [0 0] x1 + [1 0] x2 + [0]
[0 1] [0 0] [0]
p(ifrepl) = [0 2] x3 + [1 1] x4 + [0]
[0 0] [0 1] [0]
p(ifselsort) = [0]
[1]
p(le) = [0 0] x1 + [0]
[2 2] [0]
p(min) = [0]
[0]
p(nil) = [2]
[2]
p(replace) = [0 2] x2 + [1 1] x3 + [0]
[0 0] [0 1] [0]
p(s) = [0 2] x1 + [0]
[0 0] [0]
p(selsort) = [0]
[0]
p(true) = [0]
[0]
p(eq#) = [2 0] x2 + [0]
[1 0] [0]
p(ifmin#) = [0]
[0]
p(ifrepl#) = [0 1] x4 + [0]
[0 0] [1]
p(ifselsort#) = [2 2] x2 + [0]
[2 2] [3]
p(le#) = [0 2] x1 + [0 1] x2 + [0]
[0 1] [2 2] [1]
p(min#) = [0]
[2]
p(replace#) = [0 1] x3 + [2]
[0 1] [0]
p(selsort#) = [2 2] x1 + [0]
[0 0] [1]
p(c_1) = [1]
[2]
p(c_2) = [0]
[0]
p(c_3) = [2]
[2]
p(c_4) = [1 2] x1 + [0]
[1 0] [2]
p(c_5) = [0]
[0]
p(c_6) = [1]
[1]
p(c_7) = [1 0] x1 + [0]
[0 0] [0]
p(c_8) = [2]
[0]
p(c_9) = [1 2] x1 + [1 1] x2 + [0]
[1 0] [0 0] [0]
p(c_10) = [1 2] x1 + [0]
[0 1] [1]
p(c_11) = [2]
[2]
p(c_12) = [0]
[0]
p(c_13) = [1]
[0]
p(c_14) = [0]
[2]
p(c_15) = [2]
[0]
p(c_16) = [2]
[1]
p(c_17) = [1 1] x1 + [0]
[0 2] [0]
p(c_18) = [1]
[0]
p(c_19) = [1 0] x1 + [0]
[0 0] [1]
p(c_20) = [1]
[1]
Following rules are strictly oriented:
replace#(N,M,cons(K,L)) = [0 1] L + [4]
[0 1] [2]
> [0 1] L + [3]
[0 0] [2]
= c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
Following rules are (at-least) weakly oriented:
ifrepl#(false(),N,M,cons(K,L)) = [0 1] L + [2]
[0 0] [1]
>= [0 1] L + [2]
[0 0] [0]
= c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) = [2 6] L + [0 4] N + [4]
[2 6] [0 4] [7]
>= [2 6] L + [0 4] N + [4]
[2 4] [0 4] [0]
= c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) = [2 6] L + [0 4] N + [4]
[2 6] [0 4] [7]
>= [2 2] L + [2]
[0 0] [2]
= c_10(selsort#(L))
selsort#(cons(N,L)) = [2 6] L + [0 4] N + [4]
[0 0] [0 0] [1]
>= [2 6] L + [0 4] N + [4]
[0 0] [0 0] [1]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
ifrepl(false(),N,M,cons(K,L)) = [0 2] K + [1 3] L + [0 2] M + [2]
[0 0] [0 1] [0 0] [2]
>= [0 2] K + [1 3] L + [0 2] M + [0]
[0 0] [0 1] [0 0] [2]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [0 2] K + [1 3] L + [0 2] M + [2]
[0 0] [0 1] [0 0] [2]
>= [1 2] L + [0 2] M + [0]
[0 1] [0 0] [2]
= cons(M,L)
replace(N,M,cons(K,L)) = [0 2] K + [1 3] L + [0 2] M + [2]
[0 0] [0 1] [0 0] [2]
>= [0 2] K + [1 3] L + [0 2] M + [2]
[0 0] [0 1] [0 0] [2]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [0 2] M + [4]
[0 0] [2]
>= [2]
[2]
= nil()
******* Step 1.b:5.b:3.b:3.a:1.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:3.a:1.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
2:W:ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):5
-->_2 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):4
3:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):5
4:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):1
5:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):3
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
5: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
3: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
1: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
4: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
******* Step 1.b:5.b:3.b:3.a:1.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak DPs:
ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
-->_2 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):5
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
2:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
3:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):2
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)):1
4:W:ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
-->_1 replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L))):5
5:W:replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
-->_1 ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L)):4
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
5: replace#(N,M,cons(K,L)) -> c_17(ifrepl#(eq(N,K),N,M,cons(K,L)))
4: ifrepl#(false(),N,M,cons(K,L)) -> c_7(replace#(N,M,L))
***** Step 1.b:5.b:3.b:3.b:2: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)),replace#(min(cons(N,L)),N,L))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/2,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
2:S:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
3:S:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):2
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))
,replace#(min(cons(N,L)),N,L)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
***** Step 1.b:5.b:3.b:3.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
The strictly oriented rules are moved into the weak component.
****** Step 1.b:5.b:3.b:3.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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},
uargs(c_10) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [0]
p(cons) = [1] x2 + [4]
p(eq) = [7] x1 + [0]
p(false) = [0]
p(ifmin) = [4] x1 + [2]
p(ifrepl) = [1] x4 + [0]
p(ifselsort) = [4] x1 + [0]
p(le) = [2] x1 + [1] x2 + [1]
p(min) = [1]
p(nil) = [4]
p(replace) = [1] x3 + [0]
p(s) = [0]
p(selsort) = [1]
p(true) = [0]
p(eq#) = [1] x1 + [2] x2 + [2]
p(ifmin#) = [2] x1 + [2]
p(ifrepl#) = [1] x1 + [2] x3 + [1] x4 + [0]
p(ifselsort#) = [1] x2 + [2]
p(le#) = [1] x2 + [0]
p(min#) = [1] x1 + [1]
p(replace#) = [1] x1 + [2] x2 + [1] x3 + [0]
p(selsort#) = [1] x1 + [2]
p(c_1) = [4]
p(c_2) = [1]
p(c_3) = [0]
p(c_4) = [1] x1 + [1]
p(c_5) = [1]
p(c_6) = [1]
p(c_7) = [2] x1 + [0]
p(c_8) = [1]
p(c_9) = [1] x1 + [3]
p(c_10) = [1] x1 + [4]
p(c_11) = [0]
p(c_12) = [0]
p(c_13) = [4] x1 + [1]
p(c_14) = [4] x2 + [4]
p(c_15) = [1]
p(c_16) = [1]
p(c_17) = [1]
p(c_18) = [4]
p(c_19) = [1] x1 + [0]
p(c_20) = [1]
Following rules are strictly oriented:
ifselsort#(false(),cons(N,L)) = [1] L + [6]
> [1] L + [5]
= c_9(selsort#(replace(min(cons(N,L)),N,L)))
Following rules are (at-least) weakly oriented:
ifselsort#(true(),cons(N,L)) = [1] L + [6]
>= [1] L + [6]
= c_10(selsort#(L))
selsort#(cons(N,L)) = [1] L + [6]
>= [1] L + [6]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
ifrepl(false(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] L + [4]
>= [1] L + [4]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [4]
>= [4]
= nil()
****** Step 1.b:5.b:3.b:3.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:3.b:3.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
2: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
Consider the set of all dependency pairs
1: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
2: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
3: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
Processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(n^1))
SPACE(?,?)on application of the dependency pairs
{1,2}
These cover all (indirect) predecessors of dependency pairs
{1,2,3}
their number of applications is equally bounded.
The dependency pairs are shifted into the weak component.
******* Step 1.b:5.b:3.b:3.b:3.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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},
uargs(c_10) = {1},
uargs(c_19) = {1}
Following symbols are considered usable:
{ifrepl,replace,eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#,selsort#}
TcT has computed the following interpretation:
p(0) = [2]
p(cons) = [1] x1 + [1] x2 + [1]
p(eq) = [5] x1 + [4]
p(false) = [0]
p(ifmin) = [2] x1 + [0]
p(ifrepl) = [1] x3 + [1] x4 + [0]
p(ifselsort) = [0]
p(le) = [2] x1 + [4] x2 + [0]
p(min) = [4]
p(nil) = [3]
p(replace) = [1] x2 + [1] x3 + [0]
p(s) = [1]
p(selsort) = [1]
p(true) = [0]
p(eq#) = [2] x1 + [4]
p(ifmin#) = [4] x2 + [0]
p(ifrepl#) = [2] x4 + [1]
p(ifselsort#) = [4] x2 + [0]
p(le#) = [4] x1 + [0]
p(min#) = [1] x1 + [2]
p(replace#) = [1]
p(selsort#) = [4] x1 + [3]
p(c_1) = [0]
p(c_2) = [1]
p(c_3) = [1]
p(c_4) = [2] x1 + [0]
p(c_5) = [1] x1 + [2]
p(c_6) = [0]
p(c_7) = [0]
p(c_8) = [1]
p(c_9) = [1] x1 + [0]
p(c_10) = [1] x1 + [0]
p(c_11) = [0]
p(c_12) = [1]
p(c_13) = [0]
p(c_14) = [0]
p(c_15) = [4]
p(c_16) = [0]
p(c_17) = [1]
p(c_18) = [0]
p(c_19) = [1] x1 + [2]
p(c_20) = [1]
Following rules are strictly oriented:
ifselsort#(true(),cons(N,L)) = [4] L + [4] N + [4]
> [4] L + [3]
= c_10(selsort#(L))
selsort#(cons(N,L)) = [4] L + [4] N + [7]
> [4] L + [4] N + [6]
= c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
Following rules are (at-least) weakly oriented:
ifselsort#(false(),cons(N,L)) = [4] L + [4] N + [4]
>= [4] L + [4] N + [3]
= c_9(selsort#(replace(min(cons(N,L)),N,L)))
ifrepl(false(),N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] K + [1] L + [1] M + [1]
= cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] L + [1] M + [1]
= cons(M,L)
replace(N,M,cons(K,L)) = [1] K + [1] L + [1] M + [1]
>= [1] K + [1] L + [1] M + [1]
= ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) = [1] M + [3]
>= [3]
= nil()
******* Step 1.b:5.b:3.b:3.b:3.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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:5.b:3.b:3.b:3.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} and constructors {0,cons,false,nil,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
2:W:ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
-->_1 selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L))):3
3:W:selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
-->_1 ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L)):2
-->_1 ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: ifselsort#(false(),cons(N,L)) -> c_9(selsort#(replace(min(cons(N,L)),N,L)))
3: selsort#(cons(N,L)) -> c_19(ifselsort#(eq(N,min(cons(N,L))),cons(N,L)))
2: ifselsort#(true(),cons(N,L)) -> c_10(selsort#(L))
******* Step 1.b:5.b:3.b:3.b:3.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
eq(0(),0()) -> true()
eq(0(),s(Y)) -> false()
eq(s(X),0()) -> false()
eq(s(X),s(Y)) -> eq(X,Y)
ifmin(false(),cons(N,cons(M,L))) -> min(cons(M,L))
ifmin(true(),cons(N,cons(M,L))) -> min(cons(N,L))
ifrepl(false(),N,M,cons(K,L)) -> cons(K,replace(N,M,L))
ifrepl(true(),N,M,cons(K,L)) -> cons(M,L)
le(0(),Y) -> true()
le(s(X),0()) -> false()
le(s(X),s(Y)) -> le(X,Y)
min(cons(N,cons(M,L))) -> ifmin(le(N,M),cons(N,cons(M,L)))
min(cons(0(),nil())) -> 0()
min(cons(s(N),nil())) -> s(N)
replace(N,M,cons(K,L)) -> ifrepl(eq(N,K),N,M,cons(K,L))
replace(N,M,nil()) -> nil()
- Signature:
{eq/2,ifmin/2,ifrepl/4,ifselsort/2,le/2,min/1,replace/3,selsort/1,eq#/2,ifmin#/2,ifrepl#/4,ifselsort#/2
,le#/2,min#/1,replace#/3,selsort#/1} / {0/0,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1
,c_6/1,c_7/1,c_8/0,c_9/1,c_10/1,c_11/0,c_12/0,c_13/1,c_14/2,c_15/0,c_16/0,c_17/1,c_18/0,c_19/1,c_20/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {eq#,ifmin#,ifrepl#,ifselsort#,le#,min#,replace#
,selsort#} 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))