* Step 1: Sum WORST_CASE(Omega(n^1),O(n^1)) + Considered Problem: - Strict TRS: bits(0()) -> 0() bits(s(x)) -> s(bits(half(s(x)))) half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1} / {0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits,half} 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: bits(0()) -> 0() bits(s(x)) -> s(bits(half(s(x)))) half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1} / {0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits,half} and constructors {0,s} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: half(x){x -> s(s(x))} = half(s(s(x))) ->^+ s(half(x)) = C[half(x) = half(x){}] ** Step 1.b:1: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: bits(0()) -> 0() bits(s(x)) -> s(bits(half(s(x)))) half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1} / {0/0,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits,half} and constructors {0,s} + Applied Processor: DependencyPairs {dpKind_ = WIDP} + Details: We add the following weak innermost dependency pairs: Strict DPs bits#(0()) -> c_1() bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(0()) -> c_3() half#(s(0())) -> c_4() half#(s(s(x))) -> c_5(half#(x)) Weak DPs and mark the set of starting terms. ** Step 1.b:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(0()) -> c_1() bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(0()) -> c_3() half#(s(0())) -> c_4() half#(s(s(x))) -> c_5(half#(x)) - Strict TRS: bits(0()) -> 0() bits(s(x)) -> s(bits(half(s(x)))) half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) bits#(0()) -> c_1() bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(0()) -> c_3() half#(s(0())) -> c_4() half#(s(s(x))) -> c_5(half#(x)) ** Step 1.b:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(0()) -> c_1() bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(0()) -> c_3() half#(s(0())) -> c_4() half#(s(s(x))) -> c_5(half#(x)) - Strict TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(s) = {1}, uargs(bits#) = {1}, uargs(c_2) = {1}, uargs(c_5) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(bits) = [0] p(half) = [1] x1 + [1] p(s) = [1] x1 + [10] p(bits#) = [1] x1 + [0] p(half#) = [0] p(c_1) = [0] p(c_2) = [1] x1 + [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] Following rules are strictly oriented: half(0()) = [1] > [0] = 0() half(s(0())) = [11] > [0] = 0() half(s(s(x))) = [1] x + [21] > [1] x + [11] = s(half(x)) Following rules are (at-least) weakly oriented: bits#(0()) = [0] >= [0] = c_1() bits#(s(x)) = [1] x + [10] >= [1] x + [11] = c_2(bits#(half(s(x)))) half#(0()) = [0] >= [0] = c_3() half#(s(0())) = [0] >= [0] = c_4() half#(s(s(x))) = [0] >= [0] = c_5(half#(x)) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 1.b:4: PredecessorEstimation WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(0()) -> c_1() bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(0()) -> c_3() half#(s(0())) -> c_4() half#(s(s(x))) -> c_5(half#(x)) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,3,4} by application of Pre({1,3,4}) = {2,5}. Here rules are labelled as follows: 1: bits#(0()) -> c_1() 2: bits#(s(x)) -> c_2(bits#(half(s(x)))) 3: half#(0()) -> c_3() 4: half#(s(0())) -> c_4() 5: half#(s(s(x))) -> c_5(half#(x)) ** Step 1.b:5: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(s(s(x))) -> c_5(half#(x)) - Weak DPs: bits#(0()) -> c_1() half#(0()) -> c_3() half#(s(0())) -> c_4() - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:bits#(s(x)) -> c_2(bits#(half(s(x)))) -->_1 bits#(0()) -> c_1():3 -->_1 bits#(s(x)) -> c_2(bits#(half(s(x)))):1 2:S:half#(s(s(x))) -> c_5(half#(x)) -->_1 half#(s(0())) -> c_4():5 -->_1 half#(0()) -> c_3():4 -->_1 half#(s(s(x))) -> c_5(half#(x)):2 3:W:bits#(0()) -> c_1() 4:W:half#(0()) -> c_3() 5:W:half#(s(0())) -> c_4() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: half#(0()) -> c_3() 5: half#(s(0())) -> c_4() 3: bits#(0()) -> c_1() ** Step 1.b:6: Decompose WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(s(s(x))) -> c_5(half#(x)) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} + Details: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak DPs: half#(s(s(x))) -> c_5(half#(x)) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} Problem (S) - Strict DPs: half#(s(s(x))) -> c_5(half#(x)) - Weak DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} *** Step 1.b:6.a:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak DPs: half#(s(s(x))) -> c_5(half#(x)) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:bits#(s(x)) -> c_2(bits#(half(s(x)))) -->_1 bits#(s(x)) -> c_2(bits#(half(s(x)))):1 2:W:half#(s(s(x))) -> c_5(half#(x)) -->_1 half#(s(s(x))) -> c_5(half#(x)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: half#(s(s(x))) -> c_5(half#(x)) *** Step 1.b:6.a:2: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 2, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: bits#(s(x)) -> c_2(bits#(half(s(x)))) The strictly oriented rules are moved into the weak component. **** Step 1.b:6.a:2.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: NaturalMI {miDimension = 2, 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_2) = {1} Following symbols are considered usable: {half,bits#,half#} TcT has computed the following interpretation: p(0) = [0] [1] p(bits) = [0 1] x1 + [0] [1 1] [0] p(half) = [0 1] x1 + [0] [0 1] [0] p(s) = [0 1] x1 + [5] [0 1] [4] p(bits#) = [2 0] x1 + [0] [0 2] [0] p(half#) = [1] [0] p(c_1) = [2] [1] p(c_2) = [1 0] x1 + [0] [0 0] [0] p(c_3) = [2] [4] p(c_4) = [1] [0] p(c_5) = [0 1] x1 + [0] [0 1] [1] Following rules are strictly oriented: bits#(s(x)) = [0 2] x + [10] [0 2] [8] > [0 2] x + [8] [0 0] [0] = c_2(bits#(half(s(x)))) Following rules are (at-least) weakly oriented: half(0()) = [1] [1] >= [0] [1] = 0() half(s(0())) = [5] [5] >= [0] [1] = 0() half(s(s(x))) = [0 1] x + [8] [0 1] [8] >= [0 1] x + [5] [0 1] [4] = s(half(x)) **** Step 1.b:6.a:2.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 1.b:6.a:2.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:bits#(s(x)) -> c_2(bits#(half(s(x)))) -->_1 bits#(s(x)) -> c_2(bits#(half(s(x)))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: bits#(s(x)) -> c_2(bits#(half(s(x)))) **** Step 1.b:6.a:2.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: half#(s(s(x))) -> c_5(half#(x)) - Weak DPs: bits#(s(x)) -> c_2(bits#(half(s(x)))) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:half#(s(s(x))) -> c_5(half#(x)) -->_1 half#(s(s(x))) -> c_5(half#(x)):1 2:W:bits#(s(x)) -> c_2(bits#(half(s(x)))) -->_1 bits#(s(x)) -> c_2(bits#(half(s(x)))):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: bits#(s(x)) -> c_2(bits#(half(s(x)))) *** Step 1.b:6.b:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: half#(s(s(x))) -> c_5(half#(x)) - Weak TRS: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: half#(s(s(x))) -> c_5(half#(x)) *** Step 1.b:6.b:3: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: half#(s(s(x))) -> c_5(half#(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} 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: half#(s(s(x))) -> c_5(half#(x)) The strictly oriented rules are moved into the weak component. **** Step 1.b:6.b:3.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: half#(s(s(x))) -> c_5(half#(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} 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_5) = {1} Following symbols are considered usable: {bits#,half#} TcT has computed the following interpretation: p(0) = [4] p(bits) = [0] p(half) = [0] p(s) = [1] x1 + [1] p(bits#) = [0] p(half#) = [8] x1 + [2] p(c_1) = [1] p(c_2) = [2] x1 + [2] p(c_3) = [1] p(c_4) = [1] p(c_5) = [1] x1 + [14] Following rules are strictly oriented: half#(s(s(x))) = [8] x + [18] > [8] x + [16] = c_5(half#(x)) Following rules are (at-least) weakly oriented: **** Step 1.b:6.b:3.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: half#(s(s(x))) -> c_5(half#(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 1.b:6.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: half#(s(s(x))) -> c_5(half#(x)) - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} and constructors {0,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:half#(s(s(x))) -> c_5(half#(x)) -->_1 half#(s(s(x))) -> c_5(half#(x)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: half#(s(s(x))) -> c_5(half#(x)) **** Step 1.b:6.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {bits/1,half/1,bits#/1,half#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/0,c_5/1} - Obligation: innermost runtime complexity wrt. defined symbols {bits#,half#} 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))