* Step 1: MI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
f(0(),y,0(),u) -> true()
f(0(),y,s(z),u) -> false()
f(s(x),0(),z,u) -> f(x,u,minus(z,s(x)),u)
f(s(x),s(y),z,u) -> if(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u))
perfectp(0()) -> false()
perfectp(s(x)) -> f(x,s(0()),s(x),s(x))
- Signature:
{f/4,perfectp/1} / {0/0,false/0,if/3,le/2,minus/2,s/1,true/0}
- Obligation:
runtime complexity wrt. defined symbols {f,perfectp} and constructors {0,false,if,le,minus,s,true}
+ 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(if) = {3}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(0) = [9]
p(f) = [2] x_1 + [1]
p(false) = [0]
p(if) = [1] x_3 + [0]
p(le) = [1] x_1 + [0]
p(minus) = [2]
p(perfectp) = [2] x_1 + [12]
p(s) = [1] x_1 + [2]
p(true) = [1]
Following rules are strictly oriented:
f(0(),y,0(),u) = [19]
> [1]
= true()
f(0(),y,s(z),u) = [19]
> [0]
= false()
f(s(x),0(),z,u) = [2] x + [5]
> [2] x + [1]
= f(x,u,minus(z,s(x)),u)
f(s(x),s(y),z,u) = [2] x + [5]
> [2] x + [1]
= if(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u))
perfectp(0()) = [30]
> [0]
= false()
perfectp(s(x)) = [2] x + [16]
> [2] x + [1]
= f(x,s(0()),s(x),s(x))
Following rules are (at-least) weakly oriented:
* Step 2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
f(0(),y,0(),u) -> true()
f(0(),y,s(z),u) -> false()
f(s(x),0(),z,u) -> f(x,u,minus(z,s(x)),u)
f(s(x),s(y),z,u) -> if(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u))
perfectp(0()) -> false()
perfectp(s(x)) -> f(x,s(0()),s(x),s(x))
- Signature:
{f/4,perfectp/1} / {0/0,false/0,if/3,le/2,minus/2,s/1,true/0}
- Obligation:
runtime complexity wrt. defined symbols {f,perfectp} and constructors {0,false,if,le,minus,s,true}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^1))