* Step 1: Sum WORST_CASE(Omega(n^1),O(n^1))
+ Considered Problem:
- Strict TRS:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} 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:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} and constructors {0,s}
+ Applied Processor:
DecreasingLoops {bound = AnyLoop, narrow = 10}
+ Details:
The system has following decreasing Loops:
minus(x,y){x -> s(x),y -> s(y)} =
minus(s(x),s(y)) ->^+ minus(x,y)
= C[minus(x,y) = minus(x,y){}]
** Step 1.b:1: WeightGap WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} 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(quot) = {1},
uargs(s) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(0) = [4]
p(minus) = [1] x1 + [2]
p(plus) = [6] x1 + [6] x2 + [0]
p(quot) = [1] x1 + [4] x2 + [4]
p(s) = [1] x1 + [4]
Following rules are strictly oriented:
minus(x,0()) = [1] x + [2]
> [1] x + [0]
= x
minus(s(x),s(y)) = [1] x + [6]
> [1] x + [2]
= minus(x,y)
plus(0(),y) = [6] y + [24]
> [1] y + [0]
= y
plus(s(x),y) = [6] x + [6] y + [24]
> [6] x + [6] y + [4]
= s(plus(x,y))
quot(0(),s(y)) = [4] y + [24]
> [4]
= 0()
Following rules are (at-least) weakly oriented:
plus(minus(x,s(0())),minus(y,s(s(z)))) = [6] x + [6] y + [24]
>= [6] x + [6] y + [24]
= plus(minus(y,s(s(z))),minus(x,s(0())))
quot(s(x),s(y)) = [1] x + [4] y + [24]
>= [1] x + [4] y + [26]
= s(quot(minus(x,y),s(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:
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Weak TRS:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} 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(quot) = {1},
uargs(s) = {1}
Following symbols are considered usable:
{minus,plus,quot}
TcT has computed the following interpretation:
p(0) = [0]
p(minus) = [1] x_1 + [0]
p(plus) = [1] x_1 + [1] x_2 + [0]
p(quot) = [8] x_1 + [10]
p(s) = [1] x_1 + [2]
Following rules are strictly oriented:
quot(s(x),s(y)) = [8] x + [26]
> [8] x + [12]
= s(quot(minus(x,y),s(y)))
Following rules are (at-least) weakly oriented:
minus(x,0()) = [1] x + [0]
>= [1] x + [0]
= x
minus(s(x),s(y)) = [1] x + [2]
>= [1] x + [0]
= minus(x,y)
plus(0(),y) = [1] y + [0]
>= [1] y + [0]
= y
plus(minus(x,s(0())),minus(y,s(s(z)))) = [1] x + [1] y + [0]
>= [1] x + [1] y + [0]
= plus(minus(y,s(s(z))),minus(x,s(0())))
plus(s(x),y) = [1] x + [1] y + [2]
>= [1] x + [1] y + [2]
= s(plus(x,y))
quot(0(),s(y)) = [10]
>= [0]
= 0()
** Step 1.b:3: MI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
- Weak TRS:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} and constructors {0,s}
+ Applied Processor:
MI {miKind = MaximalMatrix (UpperTriangular (Multiplicity Nothing)), miDimension = 3, 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(quot) = {1},
uargs(s) = {1}
Following symbols are considered usable:
{minus,plus,quot}
TcT has computed the following interpretation:
p(0) = [3]
[0]
[0]
p(minus) = [1 0 0] [0 0 0] [0]
[2 2 2] x_1 + [0 0 2] x_2 + [0]
[2 1 1] [0 0 0] [1]
p(plus) = [0 0 2] [2 1 0] [1]
[0 1 0] x_1 + [0 1 0] x_2 + [0]
[0 0 1] [0 0 1] [1]
p(quot) = [1 0 0] [0 0 0] [2]
[0 0 0] x_1 + [1 1 2] x_2 + [0]
[1 0 0] [0 3 0] [0]
p(s) = [1 0 0] [1]
[0 1 0] x_1 + [0]
[0 0 1] [1]
Following rules are strictly oriented:
plus(minus(x,s(0())),minus(y,s(s(z)))) = [4 2 2] [4 2 2] [0 0 2] [7]
[2 2 2] x + [2 2 2] y + [0 0 2] z + [6]
[2 1 1] [2 1 1] [0 0 0] [3]
> [4 2 2] [4 2 2] [0 0 0] [5]
[2 2 2] x + [2 2 2] y + [0 0 2] z + [6]
[2 1 1] [2 1 1] [0 0 0] [3]
= plus(minus(y,s(s(z))),minus(x,s(0())))
Following rules are (at-least) weakly oriented:
minus(x,0()) = [1 0 0] [0]
[2 2 2] x + [0]
[2 1 1] [1]
>= [1 0 0] [0]
[0 1 0] x + [0]
[0 0 1] [0]
= x
minus(s(x),s(y)) = [1 0 0] [0 0 0] [1]
[2 2 2] x + [0 0 2] y + [6]
[2 1 1] [0 0 0] [4]
>= [1 0 0] [0 0 0] [0]
[2 2 2] x + [0 0 2] y + [0]
[2 1 1] [0 0 0] [1]
= minus(x,y)
plus(0(),y) = [2 1 0] [1]
[0 1 0] y + [0]
[0 0 1] [1]
>= [1 0 0] [0]
[0 1 0] y + [0]
[0 0 1] [0]
= y
plus(s(x),y) = [0 0 2] [2 1 0] [3]
[0 1 0] x + [0 1 0] y + [0]
[0 0 1] [0 0 1] [2]
>= [0 0 2] [2 1 0] [2]
[0 1 0] x + [0 1 0] y + [0]
[0 0 1] [0 0 1] [2]
= s(plus(x,y))
quot(0(),s(y)) = [0 0 0] [5]
[1 1 2] y + [3]
[0 3 0] [3]
>= [3]
[0]
[0]
= 0()
quot(s(x),s(y)) = [1 0 0] [0 0 0] [3]
[0 0 0] x + [1 1 2] y + [3]
[1 0 0] [0 3 0] [1]
>= [1 0 0] [0 0 0] [3]
[0 0 0] x + [1 1 2] y + [3]
[1 0 0] [0 3 0] [1]
= s(quot(minus(x,y),s(y)))
** Step 1.b:4: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
minus(x,0()) -> x
minus(s(x),s(y)) -> minus(x,y)
plus(0(),y) -> y
plus(minus(x,s(0())),minus(y,s(s(z)))) -> plus(minus(y,s(s(z))),minus(x,s(0())))
plus(s(x),y) -> s(plus(x,y))
quot(0(),s(y)) -> 0()
quot(s(x),s(y)) -> s(quot(minus(x,y),s(y)))
- Signature:
{minus/2,plus/2,quot/2} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {minus,plus,quot} 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))