* Step 1: WeightGap WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
sum(0()) -> 0()
sum(s(x)) -> +(sum(x),s(x))
- Signature:
{+/2,sum/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,sum} and constructors {0,s}
+ Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny}
+ Details:
The weightgap principle applies using the following nonconstant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(+) = {1},
uargs(s) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(+) = [1] x1 + [5]
p(0) = [0]
p(s) = [1] x1 + [8]
p(sum) = [2] x1 + [0]
Following rules are strictly oriented:
+(x,0()) = [1] x + [5]
> [1] x + [0]
= x
sum(s(x)) = [2] x + [16]
> [2] x + [5]
= +(sum(x),s(x))
Following rules are (at-least) weakly oriented:
+(x,s(y)) = [1] x + [5]
>= [1] x + [13]
= s(+(x,y))
sum(0()) = [0]
>= [0]
= 0()
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
* Step 2: MI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
+(x,s(y)) -> s(+(x,y))
sum(0()) -> 0()
- Weak TRS:
+(x,0()) -> x
sum(s(x)) -> +(sum(x),s(x))
- Signature:
{+/2,sum/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,sum} and constructors {0,s}
+ Applied Processor:
MI {miKind = MaximalMatrix (UpperTriangular (Multiplicity Nothing)), miDimension = 1, miUArgs = UArgs, miURules = URules, miSelector = Just any strict-rules}
+ Details:
We apply a matrix interpretation of kind MaximalMatrix (UpperTriangular (Multiplicity Nothing)):
The following argument positions are considered usable:
uargs(+) = {1},
uargs(s) = {1}
Following symbols are considered usable:
{+,sum}
TcT has computed the following interpretation:
p(+) = [1] x_1 + [0]
p(0) = [0]
p(s) = [1] x_1 + [0]
p(sum) = [1]
Following rules are strictly oriented:
sum(0()) = [1]
> [0]
= 0()
Following rules are (at-least) weakly oriented:
+(x,0()) = [1] x + [0]
>= [1] x + [0]
= x
+(x,s(y)) = [1] x + [0]
>= [1] x + [0]
= s(+(x,y))
sum(s(x)) = [1]
>= [1]
= +(sum(x),s(x))
* Step 3: NaturalPI WORST_CASE(?,O(n^2))
+ Considered Problem:
- Strict TRS:
+(x,s(y)) -> s(+(x,y))
- Weak TRS:
+(x,0()) -> x
sum(0()) -> 0()
sum(s(x)) -> +(sum(x),s(x))
- Signature:
{+/2,sum/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,sum} and constructors {0,s}
+ Applied Processor:
NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just any strict-rules}
+ Details:
We apply a polynomial interpretation of kind constructor-based(mixed(2)):
The following argument positions are considered usable:
uargs(+) = {1},
uargs(s) = {1}
Following symbols are considered usable:
{+,sum}
TcT has computed the following interpretation:
p(+) = x1 + 2*x2
p(0) = 0
p(s) = 1 + x1
p(sum) = 2*x1 + 2*x1^2
Following rules are strictly oriented:
+(x,s(y)) = 2 + x + 2*y
> 1 + x + 2*y
= s(+(x,y))
Following rules are (at-least) weakly oriented:
+(x,0()) = x
>= x
= x
sum(0()) = 0
>= 0
= 0()
sum(s(x)) = 4 + 6*x + 2*x^2
>= 2 + 4*x + 2*x^2
= +(sum(x),s(x))
* Step 4: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
sum(0()) -> 0()
sum(s(x)) -> +(sum(x),s(x))
- Signature:
{+/2,sum/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,sum} and constructors {0,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^2))