* Step 1: Sum WORST_CASE(Omega(n^1),O(n^1))
+ Considered Problem:
- Strict TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} and constructors {0,s}
+ Applied Processor:
Sum {left = someStrategy, right = someStrategy}
+ Details:
()
** Step 1.a:1: DecreasingLoops WORST_CASE(Omega(n^1),?)
+ Considered Problem:
- Strict TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} and constructors {0,s}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
+(x,y){y -> s(y)} =
+(x,s(y)) ->^+ s(+(x,y))
= C[+(x,y) = +(x,y){}]
** Step 1.b:1: WeightGap WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} 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(s) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(+) = [6] x1 + [0]
p(0) = [1]
p(double) = [6] x1 + [8]
p(s) = [1] x1 + [3]
Following rules are strictly oriented:
+(s(x),y) = [6] x + [18]
> [6] x + [3]
= s(+(x,y))
double(x) = [6] x + [8]
> [6] x + [0]
= +(x,x)
double(0()) = [14]
> [1]
= 0()
double(s(x)) = [6] x + [26]
> [6] x + [14]
= s(s(double(x)))
Following rules are (at-least) weakly oriented:
+(x,0()) = [6] x + [0]
>= [1] x + [0]
= x
+(x,s(y)) = [6] x + [0]
>= [6] x + [3]
= s(+(x,y))
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
** Step 1.b:2: MI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
- Weak TRS:
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} 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(s) = {1}
Following symbols are considered usable:
{+,double}
TcT has computed the following interpretation:
p(+) = [8] x_1 + [1] x_2 + [0]
p(0) = [2]
p(double) = [9] x_1 + [1]
p(s) = [1] x_1 + [0]
Following rules are strictly oriented:
+(x,0()) = [8] x + [2]
> [1] x + [0]
= x
Following rules are (at-least) weakly oriented:
+(x,s(y)) = [8] x + [1] y + [0]
>= [8] x + [1] y + [0]
= s(+(x,y))
+(s(x),y) = [8] x + [1] y + [0]
>= [8] x + [1] y + [0]
= s(+(x,y))
double(x) = [9] x + [1]
>= [9] x + [0]
= +(x,x)
double(0()) = [19]
>= [2]
= 0()
double(s(x)) = [9] x + [1]
>= [9] x + [1]
= s(s(double(x)))
** Step 1.b:3: WeightGap WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
+(x,s(y)) -> s(+(x,y))
- Weak TRS:
+(x,0()) -> x
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} 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(s) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(+) = [6] x1 + [3] x2 + [0]
p(0) = [0]
p(double) = [10] x1 + [8]
p(s) = [1] x1 + [1]
Following rules are strictly oriented:
+(x,s(y)) = [6] x + [3] y + [3]
> [6] x + [3] y + [1]
= s(+(x,y))
Following rules are (at-least) weakly oriented:
+(x,0()) = [6] x + [0]
>= [1] x + [0]
= x
+(s(x),y) = [6] x + [3] y + [6]
>= [6] x + [3] y + [1]
= s(+(x,y))
double(x) = [10] x + [8]
>= [9] x + [0]
= +(x,x)
double(0()) = [8]
>= [0]
= 0()
double(s(x)) = [10] x + [18]
>= [10] x + [10]
= s(s(double(x)))
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
** Step 1.b:4: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
+(x,0()) -> x
+(x,s(y)) -> s(+(x,y))
+(s(x),y) -> s(+(x,y))
double(x) -> +(x,x)
double(0()) -> 0()
double(s(x)) -> s(s(double(x)))
- Signature:
{+/2,double/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {+,double} and constructors {0,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(Omega(n^1),O(n^1))