* Step 1: DependencyPairs WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict TRS:
if(false(),x,y) -> y
if(true(),x,y) -> x
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y)))))
p(0()) -> 0()
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1} / {0/0,false/0,s/1,true/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if,le,minus,p} and constructors {0,false,s,true}
+ Applied Processor:
DependencyPairs {dpKind_ = DT}
+ Details:
We add the following dependency tuples:
Strict DPs
if#(false(),x,y) -> c_1()
if#(true(),x,y) -> c_2()
le#(0(),y) -> c_3()
le#(s(x),0()) -> c_4()
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,0()) -> c_6()
minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
p#(0()) -> c_8()
p#(s(x)) -> c_9()
Weak DPs
and mark the set of starting terms.
* Step 2: PredecessorEstimation WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
if#(false(),x,y) -> c_1()
if#(true(),x,y) -> c_2()
le#(0(),y) -> c_3()
le#(s(x),0()) -> c_4()
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,0()) -> c_6()
minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
p#(0()) -> c_8()
p#(s(x)) -> c_9()
- Weak TRS:
if(false(),x,y) -> y
if(true(),x,y) -> x
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y)))))
p(0()) -> 0()
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/5,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{1,2,3,4,6,8,9}
by application of
Pre({1,2,3,4,6,8,9}) = {5,7}.
Here rules are labelled as follows:
1: if#(false(),x,y) -> c_1()
2: if#(true(),x,y) -> c_2()
3: le#(0(),y) -> c_3()
4: le#(s(x),0()) -> c_4()
5: le#(s(x),s(y)) -> c_5(le#(x,y))
6: minus#(x,0()) -> c_6()
7: minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
8: p#(0()) -> c_8()
9: p#(s(x)) -> c_9()
* Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
- Weak DPs:
if#(false(),x,y) -> c_1()
if#(true(),x,y) -> c_2()
le#(0(),y) -> c_3()
le#(s(x),0()) -> c_4()
minus#(x,0()) -> c_6()
p#(0()) -> c_8()
p#(s(x)) -> c_9()
- Weak TRS:
if(false(),x,y) -> y
if(true(),x,y) -> x
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y)))))
p(0()) -> 0()
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/5,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:le#(s(x),s(y)) -> c_5(le#(x,y))
-->_1 le#(s(x),0()) -> c_4():6
-->_1 le#(0(),y) -> c_3():5
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):1
2:S:minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
-->_5 p#(s(x)) -> c_9():9
-->_3 p#(s(x)) -> c_9():9
-->_3 p#(0()) -> c_8():8
-->_4 minus#(x,0()) -> c_6():7
-->_2 le#(0(),y) -> c_3():5
-->_1 if#(true(),x,y) -> c_2():4
-->_1 if#(false(),x,y) -> c_1():3
-->_4 minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y))):2
-->_2 le#(s(x),s(y)) -> c_5(le#(x,y)):1
3:W:if#(false(),x,y) -> c_1()
4:W:if#(true(),x,y) -> c_2()
5:W:le#(0(),y) -> c_3()
6:W:le#(s(x),0()) -> c_4()
7:W:minus#(x,0()) -> c_6()
8:W:p#(0()) -> c_8()
9:W:p#(s(x)) -> c_9()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: if#(false(),x,y) -> c_1()
4: if#(true(),x,y) -> c_2()
7: minus#(x,0()) -> c_6()
8: p#(0()) -> c_8()
9: p#(s(x)) -> c_9()
5: le#(0(),y) -> c_3()
6: le#(s(x),0()) -> c_4()
* Step 4: SimplifyRHS WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
- Weak TRS:
if(false(),x,y) -> y
if(true(),x,y) -> x
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y)))))
p(0()) -> 0()
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/5,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:le#(s(x),s(y)) -> c_5(le#(x,y))
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):1
2:S:minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y)))
-->_4 minus#(x,s(y)) -> c_7(if#(le(x,s(y)),0(),p(minus(x,p(s(y)))))
,le#(x,s(y))
,p#(minus(x,p(s(y))))
,minus#(x,p(s(y)))
,p#(s(y))):2
-->_2 le#(s(x),s(y)) -> c_5(le#(x,y)):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
* Step 5: UsableRules WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
if(false(),x,y) -> y
if(true(),x,y) -> x
le(0(),y) -> true()
le(s(x),0()) -> false()
le(s(x),s(y)) -> le(x,y)
minus(x,0()) -> x
minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y)))))
p(0()) -> 0()
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
p(s(x)) -> x
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
* Step 6: Decompose WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,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:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
Problem (S)
- Strict DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
** Step 6.a:1: DecomposeDG WORST_CASE(?,O(n^3))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,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
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
and a lower component
le#(s(x),s(y)) -> c_5(le#(x,y))
Further, following extension rules are added to the lower component.
minus#(x,s(y)) -> le#(x,s(y))
minus#(x,s(y)) -> minus#(x,p(s(y)))
*** Step 6.a:1.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
The strictly oriented rules are moved into the weak component.
**** Step 6.a:1.a:1.a:1: NaturalMI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 2 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_7) = {2}
Following symbols are considered usable:
{p,if#,le#,minus#,p#}
TcT has computed the following interpretation:
p(0) = [2]
[1]
[0]
p(false) = [0]
[1]
[2]
p(if) = [0 1 0] [0 0 0] [0]
[0 0 1] x1 + [0 2 1] x3 + [2]
[0 0 1] [0 0 0] [0]
p(le) = [0 0 0] [1]
[0 0 0] x1 + [0]
[1 1 0] [0]
p(minus) = [0 0 0] [0]
[0 0 0] x2 + [2]
[0 0 1] [0]
p(p) = [1 3 2] [3]
[1 0 0] x1 + [0]
[0 1 0] [0]
p(s) = [1 2 0] [0]
[0 0 1] x1 + [0]
[0 0 1] [2]
p(true) = [2]
[0]
[0]
p(if#) = [0 0 0] [0 0 0] [0]
[0 1 1] x2 + [0 0 0] x3 + [1]
[0 2 0] [0 2 2] [0]
p(le#) = [0 3 0] [1 1 0] [0]
[0 0 0] x1 + [0 0 1] x2 + [1]
[0 0 0] [0 0 1] [2]
p(minus#) = [1 0 0] [0 0 2] [1]
[0 3 0] x1 + [1 1 0] x2 + [0]
[0 3 2] [1 0 1] [0]
p(p#) = [0 0 0] [0]
[0 0 0] x1 + [0]
[2 0 0] [0]
p(c_1) = [0]
[0]
[0]
p(c_2) = [0]
[0]
[2]
p(c_3) = [0]
[0]
[2]
p(c_4) = [0]
[0]
[2]
p(c_5) = [1]
[2]
[0]
p(c_6) = [0]
[0]
[0]
p(c_7) = [0 0 0] [1 0 0] [0]
[1 0 0] x1 + [0 0 0] x2 + [0]
[1 0 0] [0 0 0] [2]
p(c_8) = [2]
[0]
[1]
p(c_9) = [1]
[0]
[0]
Following rules are strictly oriented:
minus#(x,s(y)) = [1 0 0] [0 0 2] [5]
[0 3 0] x + [1 2 1] y + [0]
[0 3 2] [1 2 1] [2]
> [1 0 0] [0 0 2] [1]
[0 3 0] x + [1 2 1] y + [0]
[0 3 0] [1 2 1] [2]
= c_7(le#(x,s(y)),minus#(x,p(s(y))))
Following rules are (at-least) weakly oriented:
p(s(x)) = [1 2 5] [7]
[1 2 0] x + [0]
[0 0 1] [0]
>= [1 0 0] [0]
[0 1 0] x + [0]
[0 0 1] [0]
= x
**** Step 6.a:1.a:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
**** Step 6.a:1.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
-->_2 minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y)))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
**** Step 6.a:1.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
*** Step 6.a:1.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak DPs:
minus#(x,s(y)) -> le#(x,s(y))
minus#(x,s(y)) -> minus#(x,p(s(y)))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,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: le#(s(x),s(y)) -> c_5(le#(x,y))
The strictly oriented rules are moved into the weak component.
**** Step 6.a:1.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak DPs:
minus#(x,s(y)) -> le#(x,s(y))
minus#(x,s(y)) -> minus#(x,p(s(y)))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,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}
Following symbols are considered usable:
{if#,le#,minus#,p#}
TcT has computed the following interpretation:
p(0) = [0]
p(false) = [2]
p(if) = [1] x1 + [1]
p(le) = [4] x2 + [1]
p(minus) = [1] x2 + [1]
p(p) = [2] x1 + [6]
p(s) = [1] x1 + [10]
p(true) = [0]
p(if#) = [1] x2 + [1] x3 + [4]
p(le#) = [2] x1 + [0]
p(minus#) = [8] x1 + [8]
p(p#) = [1]
p(c_1) = [1]
p(c_2) = [8]
p(c_3) = [0]
p(c_4) = [0]
p(c_5) = [1] x1 + [6]
p(c_6) = [0]
p(c_7) = [0]
p(c_8) = [4]
p(c_9) = [2]
Following rules are strictly oriented:
le#(s(x),s(y)) = [2] x + [20]
> [2] x + [6]
= c_5(le#(x,y))
Following rules are (at-least) weakly oriented:
minus#(x,s(y)) = [8] x + [8]
>= [2] x + [0]
= le#(x,s(y))
minus#(x,s(y)) = [8] x + [8]
>= [8] x + [8]
= minus#(x,p(s(y)))
**** Step 6.a:1.b:1.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> le#(x,s(y))
minus#(x,s(y)) -> minus#(x,p(s(y)))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
**** Step 6.a:1.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
minus#(x,s(y)) -> le#(x,s(y))
minus#(x,s(y)) -> minus#(x,p(s(y)))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:le#(s(x),s(y)) -> c_5(le#(x,y))
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):1
2:W:minus#(x,s(y)) -> le#(x,s(y))
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):1
3:W:minus#(x,s(y)) -> minus#(x,p(s(y)))
-->_1 minus#(x,s(y)) -> minus#(x,p(s(y))):3
-->_1 minus#(x,s(y)) -> le#(x,s(y)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: minus#(x,s(y)) -> minus#(x,p(s(y)))
2: minus#(x,s(y)) -> le#(x,s(y))
1: le#(s(x),s(y)) -> c_5(le#(x,y))
**** Step 6.a:1.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
** Step 6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak DPs:
le#(s(x),s(y)) -> c_5(le#(x,y))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):2
-->_2 minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y)))):1
2:W:le#(s(x),s(y)) -> c_5(le#(x,y))
-->_1 le#(s(x),s(y)) -> c_5(le#(x,y)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: le#(s(x),s(y)) -> c_5(le#(x,y))
** Step 6.b:2: SimplifyRHS WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/2,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
SimplifyRHS
+ Details:
Consider the dependency graph
1:S:minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y))))
-->_2 minus#(x,s(y)) -> c_7(le#(x,s(y)),minus#(x,p(s(y)))):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
** Step 6.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/1,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
The strictly oriented rules are moved into the weak component.
*** Step 6.b:3.a:1: NaturalMI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict DPs:
minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/1,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
NaturalMI {miDimension = 3, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 2 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_7) = {1}
Following symbols are considered usable:
{p,if#,le#,minus#,p#}
TcT has computed the following interpretation:
p(0) = [2]
[0]
[4]
p(false) = [1]
[4]
[0]
p(if) = [0 0 0] [0 0 0] [0 0 0] [0]
[0 0 0] x1 + [0 0 0] x2 + [0 0 1] x3 + [1]
[1 1 0] [0 0 1] [4 1 0] [1]
p(le) = [0 0 0] [0 0 0] [4]
[0 0 0] x1 + [1 2 0] x2 + [0]
[0 0 1] [1 0 0] [0]
p(minus) = [1 1 0] [1]
[0 1 0] x1 + [2]
[0 0 0] [2]
p(p) = [1 0 0] [0]
[2 0 4] x1 + [1]
[0 1 0] [0]
p(s) = [1 2 2] [1]
[0 0 1] x1 + [0]
[0 0 1] [1]
p(true) = [4]
[1]
[0]
p(if#) = [2 0 0] [0 2 1] [0]
[1 0 0] x1 + [1 4 1] x3 + [0]
[1 0 2] [4 0 4] [1]
p(le#) = [0 0 0] [1 0 1] [0]
[0 1 1] x1 + [4 1 1] x2 + [1]
[0 0 1] [0 1 0] [4]
p(minus#) = [0 0 0] [4 0 4] [5]
[0 0 1] x1 + [4 0 4] x2 + [4]
[1 0 0] [4 0 0] [0]
p(p#) = [0 2 0] [1]
[4 0 1] x1 + [0]
[0 0 4] [4]
p(c_1) = [0]
[2]
[2]
p(c_2) = [2]
[1]
[0]
p(c_3) = [1]
[0]
[0]
p(c_4) = [4]
[0]
[2]
p(c_5) = [0 1 0] [1]
[1 1 0] x1 + [0]
[2 2 4] [0]
p(c_6) = [0]
[2]
[1]
p(c_7) = [1 0 0] [1]
[0 1 0] x1 + [2]
[0 0 0] [2]
p(c_8) = [1]
[1]
[2]
p(c_9) = [1]
[0]
[4]
Following rules are strictly oriented:
minus#(x,s(y)) = [0 0 0] [4 8 12] [13]
[0 0 1] x + [4 8 12] y + [12]
[1 0 0] [4 8 8] [4]
> [0 0 0] [4 8 12] [10]
[0 0 1] x + [4 8 12] y + [10]
[0 0 0] [0 0 0] [2]
= c_7(minus#(x,p(s(y))))
Following rules are (at-least) weakly oriented:
p(s(x)) = [1 2 2] [1]
[2 4 8] x + [7]
[0 0 1] [0]
>= [1 0 0] [0]
[0 1 0] x + [0]
[0 0 1] [0]
= x
*** Step 6.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/1,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
*** Step 6.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/1,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
-->_1 minus#(x,s(y)) -> c_7(minus#(x,p(s(y)))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: minus#(x,s(y)) -> c_7(minus#(x,p(s(y))))
*** Step 6.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
p(s(x)) -> x
- Signature:
{if/3,le/2,minus/2,p/1,if#/3,le#/2,minus#/2,p#/1} / {0/0,false/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/0,c_5/1
,c_6/0,c_7/1,c_8/0,c_9/0}
- Obligation:
innermost runtime complexity wrt. defined symbols {if#,le#,minus#,p#} and constructors {0,false,s,true}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^3))