WORST_CASE(Omega(n^1),O(n^2)) * Step 1: Sum WORST_CASE(Omega(n^1),O(n^2)) + Considered Problem: - Strict TRS: fac(s(x)) -> *(fac(p(s(x))),s(x)) p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1} / {*/2,0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac,p} 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: fac(s(x)) -> *(fac(p(s(x))),s(x)) p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1} / {*/2,0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac,p} and constructors {*,0,s} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: p(s(x)){x -> s(x)} = p(s(s(x))) ->^+ s(p(s(x))) = C[p(s(x)) = p(s(x)){}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: fac(s(x)) -> *(fac(p(s(x))),s(x)) p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1} / {*/2,0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac,p} and constructors {*,0,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(0())) -> c_2() p#(s(s(x))) -> c_3(p#(s(x))) Weak DPs and mark the set of starting terms. ** Step 1.b:2: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(0())) -> c_2() p#(s(s(x))) -> c_3(p#(s(x))) - Weak TRS: fac(s(x)) -> *(fac(p(s(x))),s(x)) p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(0())) -> c_2() p#(s(s(x))) -> c_3(p#(s(x))) ** Step 1.b:3: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(0())) -> c_2() p#(s(s(x))) -> c_3(p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2} by application of Pre({2}) = {1,3}. Here rules are labelled as follows: 1: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) 2: p#(s(0())) -> c_2() 3: p#(s(s(x))) -> c_3(p#(s(x))) ** Step 1.b:4: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(s(x))) -> c_3(p#(s(x))) - Weak DPs: p#(s(0())) -> c_2() - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) -->_2 p#(s(s(x))) -> c_3(p#(s(x))):2 -->_2 p#(s(0())) -> c_2():3 -->_1 fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))):1 2:S:p#(s(s(x))) -> c_3(p#(s(x))) -->_1 p#(s(0())) -> c_2():3 -->_1 p#(s(s(x))) -> c_3(p#(s(x))):2 3:W:p#(s(0())) -> c_2() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: p#(s(0())) -> c_2() ** Step 1.b:5: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) p#(s(s(x))) -> c_3(p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) and a lower component p#(s(s(x))) -> c_3(p#(s(x))) Further, following extension rules are added to the lower component. fac#(s(x)) -> fac#(p(s(x))) fac#(s(x)) -> p#(s(x)) *** Step 1.b:5.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) The strictly oriented rules are moved into the weak component. **** Step 1.b:5.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: NaturalMI {miDimension = 3, miDegree = 1, 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 1 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_1) = {1} Following symbols are considered usable: {p,fac#,p#} TcT has computed the following interpretation: p(*) = [0 0 0] [0] [0 0 2] x2 + [2] [0 0 0] [0] p(0) = [0] [0] [0] p(fac) = [2 2 0] [1] [0 0 0] x1 + [2] [1 0 1] [2] p(p) = [0 0 0] [1] [0 1 0] x1 + [3] [0 1 0] [0] p(s) = [0 0 0] [0] [0 0 1] x1 + [0] [0 0 1] [1] p(fac#) = [0 0 1] [0] [0 0 0] x1 + [0] [0 0 0] [0] p(p#) = [2 1 2] [1] [0 3 1] x1 + [0] [1 2 1] [1] p(c_1) = [1 0 2] [0] [0 0 0] x1 + [0] [0 1 1] [0] p(c_2) = [0] [0] [2] p(c_3) = [1] [2] [0] Following rules are strictly oriented: fac#(s(x)) = [0 0 1] [1] [0 0 0] x + [0] [0 0 0] [0] > [0 0 1] [0] [0 0 0] x + [0] [0 0 0] [0] = c_1(fac#(p(s(x))),p#(s(x))) Following rules are (at-least) weakly oriented: p(s(0())) = [1] [3] [0] >= [0] [0] [0] = 0() p(s(s(x))) = [0 0 0] [1] [0 0 1] x + [4] [0 0 1] [1] >= [0 0 0] [0] [0 0 1] x + [0] [0 0 1] [1] = s(p(s(x))) **** Step 1.b:5.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 1.b:5.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) -->_1 fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: fac#(s(x)) -> c_1(fac#(p(s(x))),p#(s(x))) **** Step 1.b:5.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:5.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: p#(s(s(x))) -> c_3(p#(s(x))) - Weak DPs: fac#(s(x)) -> fac#(p(s(x))) fac#(s(x)) -> p#(s(x)) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: p#(s(s(x))) -> c_3(p#(s(x))) The strictly oriented rules are moved into the weak component. **** Step 1.b:5.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: p#(s(s(x))) -> c_3(p#(s(x))) - Weak DPs: fac#(s(x)) -> fac#(p(s(x))) fac#(s(x)) -> p#(s(x)) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, 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: The following argument positions are considered usable: uargs(c_3) = {1} Following symbols are considered usable: {p,fac#,p#} TcT has computed the following interpretation: p(*) = [1] x1 + [2] p(0) = [7] p(fac) = [4] x1 + [0] p(p) = [1] x1 + [0] p(s) = [1] x1 + [1] p(fac#) = [8] x1 + [2] p(p#) = [1] x1 + [0] p(c_1) = [1] x2 + [0] p(c_2) = [8] p(c_3) = [1] x1 + [0] Following rules are strictly oriented: p#(s(s(x))) = [1] x + [2] > [1] x + [1] = c_3(p#(s(x))) Following rules are (at-least) weakly oriented: fac#(s(x)) = [8] x + [10] >= [8] x + [10] = fac#(p(s(x))) fac#(s(x)) = [8] x + [10] >= [1] x + [1] = p#(s(x)) p(s(0())) = [8] >= [7] = 0() p(s(s(x))) = [1] x + [2] >= [1] x + [2] = s(p(s(x))) **** Step 1.b:5.b:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fac#(s(x)) -> fac#(p(s(x))) fac#(s(x)) -> p#(s(x)) p#(s(s(x))) -> c_3(p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 1.b:5.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: fac#(s(x)) -> fac#(p(s(x))) fac#(s(x)) -> p#(s(x)) p#(s(s(x))) -> c_3(p#(s(x))) - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} and constructors {*,0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:fac#(s(x)) -> fac#(p(s(x))) -->_1 fac#(s(x)) -> p#(s(x)):2 -->_1 fac#(s(x)) -> fac#(p(s(x))):1 2:W:fac#(s(x)) -> p#(s(x)) -->_1 p#(s(s(x))) -> c_3(p#(s(x))):3 3:W:p#(s(s(x))) -> c_3(p#(s(x))) -->_1 p#(s(s(x))) -> c_3(p#(s(x))):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: fac#(s(x)) -> fac#(p(s(x))) 2: fac#(s(x)) -> p#(s(x)) 3: p#(s(s(x))) -> c_3(p#(s(x))) **** Step 1.b:5.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: p(s(0())) -> 0() p(s(s(x))) -> s(p(s(x))) - Signature: {fac/1,p/1,fac#/1,p#/1} / {*/2,0/0,s/1,c_1/2,c_2/0,c_3/1} - Obligation: innermost runtime complexity wrt. defined symbols {fac#,p#} 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^2))