* Step 1: Sum WORST_CASE(Omega(n^1),O(n^2))
+ Considered Problem:
- Strict TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
goal(xs) -> naiverev(xs)
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1} / {Cons/2,False/0,Nil/0,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app,goal,naiverev,notEmpty} and constructors {Cons,False
,Nil,True}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
goal(xs) -> naiverev(xs)
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1} / {Cons/2,False/0,Nil/0,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app,goal,naiverev,notEmpty} and constructors {Cons,False
,Nil,True}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
app(y,z){y -> Cons(x,y)} =
app(Cons(x,y),z) ->^+ Cons(x,app(y,z))
= C[app(y,z) = app(y,z){}]
** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
goal(xs) -> naiverev(xs)
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1} / {Cons/2,False/0,Nil/0,True/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app,goal,naiverev,notEmpty} and constructors {Cons,False
,Nil,True}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:
Strict DPs
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
app#(Nil(),ys) -> c_2()
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
naiverev#(Nil()) -> c_5()
notEmpty#(Cons(x,xs)) -> c_6()
notEmpty#(Nil()) -> c_7()
Weak DPs
and mark the set of starting terms.
** Step 1.b:2: UsableRules WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
app#(Nil(),ys) -> c_2()
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
naiverev#(Nil()) -> c_5()
notEmpty#(Cons(x,xs)) -> c_6()
notEmpty#(Nil()) -> c_7()
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
goal(xs) -> naiverev(xs)
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
notEmpty(Cons(x,xs)) -> True()
notEmpty(Nil()) -> False()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
app#(Nil(),ys) -> c_2()
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
naiverev#(Nil()) -> c_5()
notEmpty#(Cons(x,xs)) -> c_6()
notEmpty#(Nil()) -> c_7()
** Step 1.b:3: PredecessorEstimation WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
app#(Nil(),ys) -> c_2()
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
naiverev#(Nil()) -> c_5()
notEmpty#(Cons(x,xs)) -> c_6()
notEmpty#(Nil()) -> c_7()
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{2,5,6,7}
by application of
Pre({2,5,6,7}) = {1,3,4}.
Here rules are labelled as follows:
1: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
2: app#(Nil(),ys) -> c_2()
3: goal#(xs) -> c_3(naiverev#(xs))
4: naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
5: naiverev#(Nil()) -> c_5()
6: notEmpty#(Cons(x,xs)) -> c_6()
7: notEmpty#(Nil()) -> c_7()
** Step 1.b:4: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak DPs:
app#(Nil(),ys) -> c_2()
naiverev#(Nil()) -> c_5()
notEmpty#(Cons(x,xs)) -> c_6()
notEmpty#(Nil()) -> c_7()
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
-->_1 app#(Nil(),ys) -> c_2():4
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
2:S:goal#(xs) -> c_3(naiverev#(xs))
-->_1 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):3
-->_1 naiverev#(Nil()) -> c_5():5
3:S:naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
-->_2 naiverev#(Nil()) -> c_5():5
-->_1 app#(Nil(),ys) -> c_2():4
-->_2 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):3
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
4:W:app#(Nil(),ys) -> c_2()
5:W:naiverev#(Nil()) -> c_5()
6:W:notEmpty#(Cons(x,xs)) -> c_6()
7:W:notEmpty#(Nil()) -> c_7()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
7: notEmpty#(Nil()) -> c_7()
6: notEmpty#(Cons(x,xs)) -> c_6()
5: naiverev#(Nil()) -> c_5()
4: app#(Nil(),ys) -> c_2()
** Step 1.b:5: RemoveHeads WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
goal#(xs) -> c_3(naiverev#(xs))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
RemoveHeads
+ Details:
Consider the dependency graph
1:S:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
2:S:goal#(xs) -> c_3(naiverev#(xs))
-->_1 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):3
3:S:naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
-->_2 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):3
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts).
[(2,goal#(xs) -> c_3(naiverev#(xs)))]
** Step 1.b:6: Decompose WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,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:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
- Weak DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
Problem (S)
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
*** Step 1.b:6.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
- Weak DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
The strictly oriented rules are moved into the weak component.
**** Step 1.b:6.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
- Weak DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a polynomial interpretation of kind constructor-based(mixed(2)):
The following argument positions are considered usable:
uargs(c_1) = {1},
uargs(c_4) = {1,2}
Following symbols are considered usable:
{app,naiverev,app#,goal#,naiverev#,notEmpty#}
TcT has computed the following interpretation:
p(Cons) = 1 + x2
p(False) = 0
p(Nil) = 1
p(True) = 1
p(app) = x1 + x2
p(goal) = 1 + x1^2
p(naiverev) = 2*x1
p(notEmpty) = 1 + x1 + x1^2
p(app#) = 2*x1 + x1*x2
p(goal#) = 2
p(naiverev#) = 4 + 3*x1 + 5*x1^2
p(notEmpty#) = 2 + x1 + x1^2
p(c_1) = x1
p(c_2) = 0
p(c_3) = 0
p(c_4) = 1 + x1 + x2
p(c_5) = 0
p(c_6) = 0
p(c_7) = 0
Following rules are strictly oriented:
app#(Cons(x,xs),ys) = 2 + 2*xs + xs*ys + ys
> 2*xs + xs*ys
= c_1(app#(xs,ys))
Following rules are (at-least) weakly oriented:
naiverev#(Cons(x,xs)) = 12 + 13*xs + 5*xs^2
>= 5 + 11*xs + 5*xs^2
= c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
app(Cons(x,xs),ys) = 1 + xs + ys
>= 1 + xs + ys
= Cons(x,app(xs,ys))
app(Nil(),ys) = 1 + ys
>= ys
= ys
naiverev(Cons(x,xs)) = 2 + 2*xs
>= 2 + 2*xs
= app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) = 2
>= 1
= Nil()
**** Step 1.b:6.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
**** Step 1.b:6.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
2:W:naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
-->_2 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):2
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
1: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
**** Step 1.b:6.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
*** Step 1.b:6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak DPs:
app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):2
-->_2 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):1
2:W:app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
-->_1 app#(Cons(x,xs),ys) -> c_1(app#(xs,ys)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: app#(Cons(x,xs),ys) -> c_1(app#(xs,ys))
*** Step 1.b:6.b:2: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/2,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs))
-->_2 naiverev#(Cons(x,xs)) -> c_4(app#(naiverev(xs),Cons(x,Nil())),naiverev#(xs)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
*** Step 1.b:6.b:3: UsableRules WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
- Weak TRS:
app(Cons(x,xs),ys) -> Cons(x,app(xs,ys))
app(Nil(),ys) -> ys
naiverev(Cons(x,xs)) -> app(naiverev(xs),Cons(x,Nil()))
naiverev(Nil()) -> Nil()
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
*** Step 1.b:6.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,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: naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
The strictly oriented rules are moved into the weak component.
**** Step 1.b:6.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,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_4) = {1}
Following symbols are considered usable:
{app#,goal#,naiverev#,notEmpty#}
TcT has computed the following interpretation:
p(Cons) = [1] x1 + [1] x2 + [8]
p(False) = [0]
p(Nil) = [0]
p(True) = [2]
p(app) = [1] x1 + [1] x2 + [0]
p(goal) = [1] x1 + [8]
p(naiverev) = [8] x1 + [1]
p(notEmpty) = [1] x1 + [1]
p(app#) = [1] x1 + [2]
p(goal#) = [1] x1 + [1]
p(naiverev#) = [2] x1 + [0]
p(notEmpty#) = [8] x1 + [1]
p(c_1) = [2] x1 + [1]
p(c_2) = [0]
p(c_3) = [1] x1 + [4]
p(c_4) = [1] x1 + [9]
p(c_5) = [0]
p(c_6) = [4]
p(c_7) = [1]
Following rules are strictly oriented:
naiverev#(Cons(x,xs)) = [2] x + [2] xs + [16]
> [2] xs + [9]
= c_4(naiverev#(xs))
Following rules are (at-least) weakly oriented:
**** Step 1.b:6.b:4.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
**** Step 1.b:6.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
-->_1 naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs)):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: naiverev#(Cons(x,xs)) -> c_4(naiverev#(xs))
**** Step 1.b:6.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Signature:
{app/2,goal/1,naiverev/1,notEmpty/1,app#/2,goal#/1,naiverev#/1,notEmpty#/1} / {Cons/2,False/0,Nil/0,True/0
,c_1/1,c_2/0,c_3/1,c_4/1,c_5/0,c_6/0,c_7/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {app#,goal#,naiverev#,notEmpty#} and constructors {Cons
,False,Nil,True}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(Omega(n^1),O(n^2))