WORST_CASE(?,O(n^1)) * Step 1: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: sqr(x) -> *(x,x) sum(0()) -> 0() sum(s(x)) -> +(*(s(x),s(x)),sum(x)) sum(s(x)) -> +(sqr(s(x)),sum(x)) - Signature: {sqr/1,sum/1} / {*/2,+/2,0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr,sum} and constructors {*,+,0,s} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak innermost dependency pairs: Strict DPs sqr#(x) -> c_1() sum#(0()) -> c_2() sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) Weak DPs and mark the set of starting terms. * Step 2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(x) -> c_1() sum#(0()) -> c_2() sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) - Strict TRS: sqr(x) -> *(x,x) sum(0()) -> 0() sum(s(x)) -> +(*(s(x),s(x)),sum(x)) sum(s(x)) -> +(sqr(s(x)),sum(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/2} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: sqr#(x) -> c_1() sum#(0()) -> c_2() sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) * Step 3: PredecessorEstimation WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sqr#(x) -> c_1() sum#(0()) -> c_2() sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/2} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,2} by application of Pre({1,2}) = {3,4}. Here rules are labelled as follows: 1: sqr#(x) -> c_1() 2: sum#(0()) -> c_2() 3: sum#(s(x)) -> c_3(sum#(x)) 4: sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) * Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) - Weak DPs: sqr#(x) -> c_1() sum#(0()) -> c_2() - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/2} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:sum#(s(x)) -> c_3(sum#(x)) -->_1 sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)):2 -->_1 sum#(0()) -> c_2():4 -->_1 sum#(s(x)) -> c_3(sum#(x)):1 2:S:sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) -->_2 sum#(0()) -> c_2():4 -->_1 sqr#(x) -> c_1():3 -->_2 sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)):2 -->_2 sum#(s(x)) -> c_3(sum#(x)):1 3:W:sqr#(x) -> c_1() 4:W:sum#(0()) -> c_2() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: sqr#(x) -> c_1() 4: sum#(0()) -> c_2() * Step 5: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/2} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:sum#(s(x)) -> c_3(sum#(x)) -->_1 sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)):2 -->_1 sum#(s(x)) -> c_3(sum#(x)):1 2:S:sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)) -->_2 sum#(s(x)) -> c_4(sqr#(s(x)),sum#(x)):2 -->_2 sum#(s(x)) -> c_3(sum#(x)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: sum#(s(x)) -> c_4(sum#(x)) * Step 6: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} 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: sum#(s(x)) -> c_3(sum#(x)) The strictly oriented rules are moved into the weak component. ** Step 6.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} 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}, uargs(c_4) = {1} Following symbols are considered usable: {sqr#,sum#} TcT has computed the following interpretation: p(*) = [0] p(+) = [1] x2 + [0] p(0) = [2] p(s) = [1] x1 + [4] p(sqr) = [1] x1 + [0] p(sum) = [1] p(sqr#) = [4] x1 + [1] p(sum#) = [1] x1 + [0] p(c_1) = [1] p(c_2) = [1] p(c_3) = [1] x1 + [2] p(c_4) = [1] x1 + [4] Following rules are strictly oriented: sum#(s(x)) = [1] x + [4] > [1] x + [2] = c_3(sum#(x)) Following rules are (at-least) weakly oriented: sum#(s(x)) = [1] x + [4] >= [1] x + [4] = c_4(sum#(x)) ** Step 6.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_4(sum#(x)) - Weak DPs: sum#(s(x)) -> c_3(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ** Step 6.b:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_4(sum#(x)) - Weak DPs: sum#(s(x)) -> c_3(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} 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: sum#(s(x)) -> c_4(sum#(x)) The strictly oriented rules are moved into the weak component. *** Step 6.b:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: sum#(s(x)) -> c_4(sum#(x)) - Weak DPs: sum#(s(x)) -> c_3(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} 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}, uargs(c_4) = {1} Following symbols are considered usable: {sqr#,sum#} TcT has computed the following interpretation: p(*) = [1] x1 + [1] p(+) = [1] x1 + [1] p(0) = [1] p(s) = [1] x1 + [8] p(sqr) = [2] x1 + [4] p(sum) = [1] x1 + [1] p(sqr#) = [0] p(sum#) = [2] x1 + [0] p(c_1) = [1] p(c_2) = [0] p(c_3) = [1] x1 + [0] p(c_4) = [1] x1 + [8] Following rules are strictly oriented: sum#(s(x)) = [2] x + [16] > [2] x + [8] = c_4(sum#(x)) Following rules are (at-least) weakly oriented: sum#(s(x)) = [2] x + [16] >= [2] x + [0] = c_3(sum#(x)) *** Step 6.b:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 6.b:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: sum#(s(x)) -> c_3(sum#(x)) sum#(s(x)) -> c_4(sum#(x)) - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:sum#(s(x)) -> c_3(sum#(x)) -->_1 sum#(s(x)) -> c_4(sum#(x)):2 -->_1 sum#(s(x)) -> c_3(sum#(x)):1 2:W:sum#(s(x)) -> c_4(sum#(x)) -->_1 sum#(s(x)) -> c_4(sum#(x)):2 -->_1 sum#(s(x)) -> c_3(sum#(x)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: sum#(s(x)) -> c_3(sum#(x)) 2: sum#(s(x)) -> c_4(sum#(x)) *** Step 6.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {sqr/1,sum/1,sqr#/1,sum#/1} / {*/2,+/2,0/0,s/1,c_1/0,c_2/0,c_3/1,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {sqr#,sum#} and constructors {*,+,0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))