WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: max(L(x)) -> x max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1} / {0/0,L/1,N/2,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {max} and constructors {0,L,N,s} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs max#(L(x)) -> c_1() max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(0()),L(y))) -> c_3() max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: max#(L(x)) -> c_1() max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(0()),L(y))) -> c_3() max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak TRS: max(L(x)) -> x max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,3} by application of Pre({1,3}) = {2,4}. Here rules are labelled as follows: 1: max#(L(x)) -> c_1() 2: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) 3: max#(N(L(0()),L(y))) -> c_3() 4: max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak DPs: max#(L(x)) -> c_1() max#(N(L(0()),L(y))) -> c_3() - Weak TRS: max(L(x)) -> x max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) -->_2 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2 -->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2 -->_2 max#(N(L(0()),L(y))) -> c_3():4 -->_1 max#(N(L(0()),L(y))) -> c_3():4 -->_2 max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))):1 2:S:max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) -->_1 max#(N(L(0()),L(y))) -> c_3():4 -->_1 max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))):2 3:W:max#(L(x)) -> c_1() 4:W:max#(N(L(0()),L(y))) -> c_3() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: max#(L(x)) -> c_1() 4: max#(N(L(0()),L(y))) -> c_3() * Step 4: UsableRules WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak TRS: max(L(x)) -> x max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) * Step 5: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak TRS: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) and a lower component max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) Further, following extension rules are added to the lower component. max#(N(L(x),N(y,z))) -> max#(N(y,z)) max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z))))) ** Step 5.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) - Weak TRS: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))) -->_2 max#(N(L(x),N(y,z))) -> c_2(max#(N(L(x),L(max(N(y,z))))),max#(N(y,z))):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: max#(N(L(x),N(y,z))) -> c_2(max#(N(y,z))) ** Step 5.a:2: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(y,z))) - Weak TRS: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/1,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: max#(N(L(x),N(y,z))) -> c_2(max#(N(y,z))) ** Step 5.a:3: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(y,z))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/1,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + 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(c_2) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [1] p(L) = [4] p(N) = [1] x1 + [1] x2 + [0] p(max) = [1] x1 + [0] p(s) = [1] x1 + [1] p(max#) = [4] x1 + [9] p(c_1) = [1] p(c_2) = [1] x1 + [7] p(c_3) = [0] p(c_4) = [2] Following rules are strictly oriented: max#(N(L(x),N(y,z))) = [4] y + [4] z + [25] > [4] y + [4] z + [16] = c_2(max#(N(y,z))) Following rules are (at-least) weakly oriented: Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 5.a:4: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: max#(N(L(x),N(y,z))) -> c_2(max#(N(y,z))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/1,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 5.b:1: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak DPs: max#(N(L(x),N(y,z))) -> max#(N(y,z)) max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z))))) - Weak TRS: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + 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(L) = {1}, uargs(N) = {2}, uargs(max) = {1}, uargs(s) = {1}, uargs(max#) = {1}, uargs(c_4) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(L) = [1] x1 + [0] p(N) = [1] x1 + [1] x2 + [2] p(max) = [1] x1 + [0] p(s) = [1] x1 + [4] p(max#) = [1] x1 + [4] p(c_1) = [0] p(c_2) = [1] x1 + [2] x2 + [0] p(c_3) = [2] p(c_4) = [1] x1 + [2] Following rules are strictly oriented: max#(N(L(s(x)),L(s(y)))) = [1] x + [1] y + [14] > [1] x + [1] y + [8] = c_4(max#(N(L(x),L(y)))) Following rules are (at-least) weakly oriented: max#(N(L(x),N(y,z))) = [1] x + [1] y + [1] z + [8] >= [1] y + [1] z + [6] = max#(N(y,z)) max#(N(L(x),N(y,z))) = [1] x + [1] y + [1] z + [8] >= [1] x + [1] y + [1] z + [8] = max#(N(L(x),L(max(N(y,z))))) max(N(L(x),N(y,z))) = [1] x + [1] y + [1] z + [4] >= [1] x + [1] y + [1] z + [4] = max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) = [1] y + [2] >= [1] y + [0] = y max(N(L(s(x)),L(s(y)))) = [1] x + [1] y + [10] >= [1] x + [1] y + [6] = s(max(N(L(x),L(y)))) Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 5.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: max#(N(L(x),N(y,z))) -> max#(N(y,z)) max#(N(L(x),N(y,z))) -> max#(N(L(x),L(max(N(y,z))))) max#(N(L(s(x)),L(s(y)))) -> c_4(max#(N(L(x),L(y)))) - Weak TRS: max(N(L(x),N(y,z))) -> max(N(L(x),L(max(N(y,z))))) max(N(L(0()),L(y))) -> y max(N(L(s(x)),L(s(y)))) -> s(max(N(L(x),L(y)))) - Signature: {max/1,max#/1} / {0/0,L/1,N/2,s/1,c_1/0,c_2/2,c_3/0,c_4/1} - Obligation: innermost runtime complexity wrt. defined symbols {max#} and constructors {0,L,N,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))