* Step 1: DependencyPairs WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
f(k(a()),k(b()),X) -> f(X,X,X)
g(X) -> u(h(X),h(X),X)
h(d()) -> c(a())
h(d()) -> c(b())
u(d(),c(Y),X) -> k(Y)
- Signature:
{f/3,g/1,h/1,u/3} / {a/0,b/0,c/1,d/0,k/1}
- Obligation:
runtime complexity wrt. defined symbols {f,g,h,u} and constructors {a,b,c,d,k}
+ Applied Processor:
DependencyPairs {dpKind_ = WIDP}
+ Details:
We add the following weak dependency pairs:
Strict DPs
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
h#(d()) -> c_3()
h#(d()) -> c_4()
u#(d(),c(Y),X) -> c_5(Y)
Weak DPs
and mark the set of starting terms.
* Step 2: UsableRules WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
h#(d()) -> c_3()
h#(d()) -> c_4()
u#(d(),c(Y),X) -> c_5(Y)
- Strict TRS:
f(k(a()),k(b()),X) -> f(X,X,X)
g(X) -> u(h(X),h(X),X)
h(d()) -> c(a())
h(d()) -> c(b())
u(d(),c(Y),X) -> k(Y)
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
h(d()) -> c(a())
h(d()) -> c(b())
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
h#(d()) -> c_3()
h#(d()) -> c_4()
u#(d(),c(Y),X) -> c_5(Y)
* Step 3: WeightGap WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
h#(d()) -> c_3()
h#(d()) -> c_4()
u#(d(),c(Y),X) -> c_5(Y)
- Strict TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs}
+ Details:
The weightgap principle applies using the following constant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(u#) = {1,2},
uargs(c_2) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(a) = [0]
p(b) = [0]
p(c) = [0]
p(d) = [0]
p(f) = [0]
p(g) = [0]
p(h) = [5]
p(k) = [1] x1 + [0]
p(u) = [0]
p(f#) = [0]
p(g#) = [0]
p(h#) = [0]
p(u#) = [1] x1 + [1] x2 + [0]
p(c_1) = [8] x1 + [0]
p(c_2) = [1] x1 + [0]
p(c_3) = [0]
p(c_4) = [0]
p(c_5) = [0]
Following rules are strictly oriented:
h(d()) = [5]
> [0]
= c(a())
h(d()) = [5]
> [0]
= c(b())
Following rules are (at-least) weakly oriented:
f#(k(a()),k(b()),X) = [0]
>= [0]
= c_1(f#(X,X,X))
g#(X) = [0]
>= [10]
= c_2(u#(h(X),h(X),X))
h#(d()) = [0]
>= [0]
= c_3()
h#(d()) = [0]
>= [0]
= c_4()
u#(d(),c(Y),X) = [0]
>= [0]
= c_5(Y)
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
* Step 4: PredecessorEstimation WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
h#(d()) -> c_3()
h#(d()) -> c_4()
u#(d(),c(Y),X) -> c_5(Y)
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
+ Details:
We estimate the number of application of
{3,4}
by application of
Pre({3,4}) = {5}.
Here rules are labelled as follows:
1: f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
2: g#(X) -> c_2(u#(h(X),h(X),X))
3: h#(d()) -> c_3()
4: h#(d()) -> c_4()
5: u#(d(),c(Y),X) -> c_5(Y)
* Step 5: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
u#(d(),c(Y),X) -> c_5(Y)
- Weak DPs:
h#(d()) -> c_3()
h#(d()) -> c_4()
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
-->_1 f#(k(a()),k(b()),X) -> c_1(f#(X,X,X)):1
2:S:g#(X) -> c_2(u#(h(X),h(X),X))
-->_1 u#(d(),c(Y),X) -> c_5(Y):3
3:S:u#(d(),c(Y),X) -> c_5(Y)
-->_1 h#(d()) -> c_4():5
-->_1 h#(d()) -> c_3():4
-->_1 u#(d(),c(Y),X) -> c_5(Y):3
-->_1 g#(X) -> c_2(u#(h(X),h(X),X)):2
-->_1 f#(k(a()),k(b()),X) -> c_1(f#(X,X,X)):1
4:W:h#(d()) -> c_3()
5:W:h#(d()) -> c_4()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
4: h#(d()) -> c_3()
5: h#(d()) -> c_4()
* Step 6: PredecessorEstimationCP WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
u#(d(),c(Y),X) -> c_5(Y)
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
3: u#(d(),c(Y),X) -> c_5(Y)
Consider the set of all dependency pairs
1: f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
2: g#(X) -> c_2(u#(h(X),h(X),X))
3: u#(d(),c(Y),X) -> c_5(Y)
Processor NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}induces the complexity certificateTIME (?,O(1))
SPACE(?,?)on application of the dependency pairs
{1,3}
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 6.a:1: NaturalMI WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
u#(d(),c(Y),X) -> c_5(Y)
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 0, 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 0 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_2) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(a) = [0]
p(b) = [0]
p(c) = [0]
p(d) = [1]
p(f) = [1] x1 + [1] x2 + [8] x3 + [1]
p(g) = [1]
p(h) = [0]
p(k) = [2]
p(u) = [1] x1 + [2] x2 + [8] x3 + [8]
p(f#) = [14] x1 + [0]
p(g#) = [1] x1 + [15]
p(h#) = [0]
p(u#) = [4] x1 + [1]
p(c_1) = [0]
p(c_2) = [8] x1 + [7]
p(c_3) = [2]
p(c_4) = [2]
p(c_5) = [1]
Following rules are strictly oriented:
f#(k(a()),k(b()),X) = [28]
> [0]
= c_1(f#(X,X,X))
u#(d(),c(Y),X) = [5]
> [1]
= c_5(Y)
Following rules are (at-least) weakly oriented:
g#(X) = [1] X + [15]
>= [15]
= c_2(u#(h(X),h(X),X))
h(d()) = [0]
>= [0]
= c(a())
h(d()) = [0]
>= [0]
= c(b())
** Step 6.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
g#(X) -> c_2(u#(h(X),h(X),X))
- Weak DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
u#(d(),c(Y),X) -> c_5(Y)
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
** Step 6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
g#(X) -> c_2(u#(h(X),h(X),X))
u#(d(),c(Y),X) -> c_5(Y)
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
-->_1 f#(k(a()),k(b()),X) -> c_1(f#(X,X,X)):1
2:W:g#(X) -> c_2(u#(h(X),h(X),X))
-->_1 u#(d(),c(Y),X) -> c_5(Y):3
3:W:u#(d(),c(Y),X) -> c_5(Y)
-->_1 u#(d(),c(Y),X) -> c_5(Y):3
-->_1 g#(X) -> c_2(u#(h(X),h(X),X)):2
-->_1 f#(k(a()),k(b()),X) -> c_1(f#(X,X,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_2(u#(h(X),h(X),X))
3: u#(d(),c(Y),X) -> c_5(Y)
1: f#(k(a()),k(b()),X) -> c_1(f#(X,X,X))
** Step 6.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
h(d()) -> c(a())
h(d()) -> c(b())
- Signature:
{f/3,g/1,h/1,u/3,f#/3,g#/1,h#/1,u#/3} / {a/0,b/0,c/1,d/0,k/1,c_1/1,c_2/1,c_3/0,c_4/0,c_5/1}
- Obligation:
runtime complexity wrt. defined symbols {f#,g#,h#,u#} and constructors {a,b,c,d,k}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^1))