*** 1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: 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)) Weak DP Rules: Weak TRS Rules: Signature: {bits/1,half/1} / {0/0,s/1} Obligation: Innermost basic terms: {bits,half}/{0,s} Applied Processor: DependencyPairs {dpKind_ = WIDP} Proof: 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. *** 1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: 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 Rules: 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)) Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: UsableRules Proof: 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)) *** 1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: 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 Rules: half(0()) -> 0() half(s(0())) -> 0() half(s(s(x))) -> s(half(x)) Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs} Proof: 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: {} 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. *** 1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: 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 Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} Proof: 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)) *** 1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: bits#(0()) -> c_1() half#(0()) -> c_3() half#(s(0())) -> c_4() Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: RemoveWeakSuffixes Proof: 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() *** 1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} Proof: 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 DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Strict TRS Rules: Weak DP Rules: half#(s(s(x))) -> c_5(half#(x)) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Problem (S) Strict DP Rules: half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} *** 1.1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Strict TRS Rules: Weak DP Rules: half#(s(s(x))) -> c_5(half#(x)) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: RemoveWeakSuffixes Proof: 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)) *** 1.1.1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{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, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} 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. *** 1.1.1.1.1.1.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: NaturalMI {miDimension = 3, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: 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) = [1] [2] [2] p(bits) = [0] [1] [0] p(half) = [0 1 0] [0] [0 1 0] x1 + [1] [1 0 0] [2] p(s) = [0 1 0] [3] [0 1 0] x1 + [2] [0 0 0] [0] p(bits#) = [1 0 0] [2] [0 0 0] x1 + [0] [0 0 0] [0] p(half#) = [2 0 0] [0] [0 2 2] x1 + [0] [0 0 0] [0] p(c_1) = [2] [1] [1] p(c_2) = [1 0 0] [0] [0 2 2] x1 + [0] [0 2 1] [0] p(c_3) = [0] [0] [2] p(c_4) = [0] [1] [0] p(c_5) = [0 0 0] [1] [0 1 1] x1 + [0] [0 0 2] [0] Following rules are strictly oriented: bits#(s(x)) = [0 1 0] [5] [0 0 0] x + [0] [0 0 0] [0] > [0 1 0] [4] [0 0 0] x + [0] [0 0 0] [0] = c_2(bits#(half(s(x)))) Following rules are (at-least) weakly oriented: half(0()) = [2] [3] [3] >= [1] [2] [2] = 0() half(s(0())) = [4] [5] [7] >= [1] [2] [2] = 0() half(s(s(x))) = [0 1 0] [4] [0 1 0] x + [5] [0 1 0] [7] >= [0 1 0] [4] [0 1 0] x + [3] [0 0 0] [0] = s(half(x)) *** 1.1.1.1.1.1.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.1.1.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: RemoveWeakSuffixes Proof: 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)))) *** 1.1.1.1.1.1.1.1.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1). *** 1.1.1.1.1.1.2 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: bits#(s(x)) -> c_2(bits#(half(s(x)))) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: RemoveWeakSuffixes Proof: 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)))) *** 1.1.1.1.1.1.2.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: UsableRules Proof: We replace rewrite rules by usable rules: half#(s(s(x))) -> c_5(half#(x)) *** 1.1.1.1.1.1.2.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{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, greedy = NoGreedy}} Proof: We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: half#(s(s(x))) -> c_5(half#(x)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.1.2.1.1.1 Progress [(?,O(n^1))] *** Considered Problem: Strict DP Rules: half#(s(s(x))) -> c_5(half#(x)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: 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) = [1] p(bits) = [1] x1 + [1] p(half) = [1] p(s) = [1] x1 + [1] p(bits#) = [2] x1 + [0] p(half#) = [1] x1 + [0] p(c_1) = [1] p(c_2) = [1] x1 + [0] p(c_3) = [0] p(c_4) = [4] p(c_5) = [1] x1 + [1] Following rules are strictly oriented: half#(s(s(x))) = [1] x + [2] > [1] x + [1] = c_5(half#(x)) Following rules are (at-least) weakly oriented: *** 1.1.1.1.1.1.2.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: half#(s(s(x))) -> c_5(half#(x)) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.2.1.1.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: half#(s(s(x))) -> c_5(half#(x)) Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: RemoveWeakSuffixes Proof: 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)) *** 1.1.1.1.1.1.2.1.1.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: 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 basic terms: {bits#,half#}/{0,s} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1).