* Step 1: Sum WORST_CASE(Omega(n^1),O(n^1))
+ Considered Problem:
- Strict TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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^1))
+ Considered Problem:
- Strict TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
if#(false(),x,y) -> c_6()
if#(true(),x,y) -> c_7()
Weak DPs
and mark the set of starting terms.
** Step 1.b:2: PredecessorEstimation WORST_CASE(?,O(n^1))
+ 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,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
if#(false(),x,y) -> c_6()
if#(true(),x,y) -> c_7()
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:
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,g(s(c(y)),y)),g#(s(c(y)),y))
5: g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
6: if#(false(),x,y) -> c_6()
7: if#(true(),x,y) -> c_7()
** Step 1.b:3: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(s(x)) -> c_3(f#(x))
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
- Weak DPs:
f#(0()) -> c_1()
f#(1()) -> c_2()
if#(false(),x,y) -> c_6()
if#(true(),x,y) -> c_7()
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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: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,g(s(c(y)),y)),g#(s(c(y)),y))
-->_2 g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x)):3
-->_1 g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x)):3
-->_2 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
-->_1 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
3:S:g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
-->_1 if#(true(),x,y) -> c_7():7
-->_1 if#(false(),x,y) -> c_6():6
-->_2 f#(1()) -> c_2():5
-->_2 f#(0()) -> c_1():4
-->_2 f#(s(x)) -> c_3(f#(x)):1
4:W:f#(0()) -> c_1()
5:W:f#(1()) -> c_2()
6:W:if#(false(),x,y) -> c_6()
7:W:if#(true(),x,y) -> c_7()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
6: if#(false(),x,y) -> c_6()
7: if#(true(),x,y) -> c_7()
4: f#(0()) -> c_1()
5: f#(1()) -> c_2()
** Step 1.b:4: SimplifyRHS WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(s(x)) -> c_3(f#(x))
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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: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,g(s(c(y)),y)),g#(s(c(y)),y))
-->_2 g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x)):3
-->_1 g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x)):3
-->_2 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
-->_1 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
3:S:g#(s(x),s(y)) -> c_5(if#(f(x),s(x),s(y)),f#(x))
-->_2 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#(s(x),s(y)) -> c_5(f#(x))
** Step 1.b:5: Decompose WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(s(x)) -> c_3(f#(x))
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:
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,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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}
Problem (S)
- Strict DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak DPs:
f#(s(x)) -> c_3(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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}
*** Step 1.b:5.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(s(x)) -> c_3(f#(x))
- Weak DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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 = 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: f#(s(x)) -> c_3(f#(x))
The strictly oriented rules are moved into the weak component.
**** Step 1.b:5.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(s(x)) -> c_3(f#(x))
- Weak DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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 = 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_3) = {1},
uargs(c_4) = {1,2},
uargs(c_5) = {1}
Following symbols are considered usable:
{f#,g#,if#}
TcT has computed the following interpretation:
p(0) = [0]
[0]
[0]
p(1) = [0]
[0]
[0]
p(c) = [0 0 0] [1]
[0 0 1] x1 + [1]
[0 0 0] [0]
p(f) = [1 0 1] [0]
[1 1 0] x1 + [0]
[0 1 1] [0]
p(false) = [0]
[0]
[0]
p(g) = [0 1 1] [0 1 1] [0]
[0 0 0] x1 + [1 1 1] x2 + [0]
[1 0 0] [0 0 0] [0]
p(if) = [1 1 1] [0 0 0] [0]
[0 0 0] x1 + [0 0 0] x3 + [0]
[0 0 0] [0 0 1] [0]
p(s) = [0 1 0] [1]
[0 0 1] x1 + [0]
[0 0 1] [1]
p(true) = [0]
[0]
[0]
p(f#) = [0 0 1] [0]
[1 0 1] x1 + [0]
[0 1 0] [0]
p(g#) = [0 1 0] [0]
[1 0 0] x1 + [0]
[0 0 0] [1]
p(if#) = [0]
[0]
[0]
p(c_1) = [0]
[0]
[0]
p(c_2) = [0]
[0]
[0]
p(c_3) = [1 0 0] [0]
[0 0 0] x1 + [0]
[0 0 0] [0]
p(c_4) = [1 0 0] [1 0 0] [0]
[0 0 0] x1 + [0 0 0] x2 + [0]
[0 0 0] [0 0 0] [1]
p(c_5) = [1 0 0] [0]
[0 0 1] x1 + [0]
[0 0 0] [1]
p(c_6) = [0]
[0]
[0]
p(c_7) = [0]
[0]
[0]
Following rules are strictly oriented:
f#(s(x)) = [0 0 1] [1]
[0 1 1] x + [2]
[0 0 1] [0]
> [0 0 1] [0]
[0 0 0] x + [0]
[0 0 0] [0]
= c_3(f#(x))
Following rules are (at-least) weakly oriented:
g#(x,c(y)) = [0 1 0] [0]
[1 0 0] x + [0]
[0 0 0] [1]
>= [0 1 0] [0]
[0 0 0] x + [0]
[0 0 0] [1]
= c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) = [0 0 1] [0]
[0 1 0] x + [1]
[0 0 0] [1]
>= [0 0 1] [0]
[0 1 0] x + [0]
[0 0 0] [1]
= c_5(f#(x))
**** Step 1.b:5.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,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:5.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,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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: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,g(s(c(y)),y)),g#(s(c(y)),y))
-->_2 g#(s(x),s(y)) -> c_5(f#(x)):3
-->_1 g#(s(x),s(y)) -> c_5(f#(x)):3
-->_2 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
-->_1 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):2
3:W:g#(s(x),s(y)) -> c_5(f#(x))
-->_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,g(s(c(y)),y)),g#(s(c(y)),y))
3: g#(s(x),s(y)) -> c_5(f#(x))
1: f#(s(x)) -> c_3(f#(x))
**** Step 1.b:5.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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).
*** Step 1.b:5.b:1: PredecessorEstimation WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak DPs:
f#(s(x)) -> c_3(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{2}
by application of
Pre({2}) = {1}.
Here rules are labelled as follows:
1: g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
2: g#(s(x),s(y)) -> c_5(f#(x))
3: f#(s(x)) -> c_3(f#(x))
*** Step 1.b:5.b:2: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
- Weak DPs:
f#(s(x)) -> c_3(f#(x))
g#(s(x),s(y)) -> c_5(f#(x))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:S:g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
-->_2 g#(s(x),s(y)) -> c_5(f#(x)):3
-->_1 g#(s(x),s(y)) -> c_5(f#(x)):3
-->_2 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):1
-->_1 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):1
2:W:f#(s(x)) -> c_3(f#(x))
-->_1 f#(s(x)) -> c_3(f#(x)):2
3:W:g#(s(x),s(y)) -> c_5(f#(x))
-->_1 f#(s(x)) -> c_3(f#(x)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: g#(s(x),s(y)) -> c_5(f#(x))
2: f#(s(x)) -> c_3(f#(x))
*** Step 1.b:5.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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,g(s(c(y)),y)),g#(s(c(y)),y))
The strictly oriented rules are moved into the weak component.
**** Step 1.b:5.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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,2}
Following symbols are considered usable:
{g,if,f#,g#,if#}
TcT has computed the following interpretation:
p(0) = [0]
p(1) = [2]
p(c) = [1] x1 + [5]
p(f) = [8] x1 + [4]
p(false) = [1]
p(g) = [4]
p(if) = [2] x2 + [1] x3 + [0]
p(s) = [1]
p(true) = [1]
p(f#) = [1] x1 + [1]
p(g#) = [4] x2 + [0]
p(if#) = [1] x1 + [1] x3 + [1]
p(c_1) = [8]
p(c_2) = [8]
p(c_3) = [2]
p(c_4) = [1] x1 + [1] x2 + [0]
p(c_5) = [2]
p(c_6) = [1]
p(c_7) = [1]
Following rules are strictly oriented:
g#(x,c(y)) = [4] y + [20]
> [4] y + [16]
= c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
Following rules are (at-least) weakly oriented:
g(x,c(y)) = [4]
>= [4]
= g(x,g(s(c(y)),y))
g(s(x),s(y)) = [4]
>= [3]
= if(f(x),s(x),s(y))
if(false(),x,y) = [2] x + [1] y + [0]
>= [1] y + [0]
= y
if(true(),x,y) = [2] x + [1] y + [0]
>= [1] x + [0]
= x
**** Step 1.b:5.b:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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:5.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y))
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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,g(s(c(y)),y)),g#(s(c(y)),y))
-->_2 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),y)):1
-->_1 g#(x,c(y)) -> c_4(g#(x,g(s(c(y)),y)),g#(s(c(y)),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,g(s(c(y)),y)),g#(s(c(y)),y))
**** Step 1.b:5.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
f(0()) -> true()
f(1()) -> false()
f(s(x)) -> f(x)
g(x,c(y)) -> g(x,g(s(c(y)),y))
g(s(x),s(y)) -> if(f(x),s(x),s(y))
if(false(),x,y) -> y
if(true(),x,y) -> 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/2,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^1))