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