MAYBE * Step 1: DependencyPairs MAYBE + Considered Problem: - Strict TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() qsort(.(x,y)) -> ++(qsort(lowers(x,y)),.(x,qsort(greaters(x,y)))) qsort(nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1} / {++/2,./2,<=/2,if/3,nil/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters,lowers,qsort} and constructors {++,.,<=,if,nil} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) greaters#(x,nil()) -> c_2() lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) lowers#(x,nil()) -> c_4() qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) qsort#(nil()) -> c_6() Weak DPs and mark the set of starting terms. * Step 2: UsableRules MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) greaters#(x,nil()) -> c_2() lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) lowers#(x,nil()) -> c_4() qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) qsort#(nil()) -> c_6() - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() qsort(.(x,y)) -> ++(qsort(lowers(x,y)),.(x,qsort(greaters(x,y)))) qsort(nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) greaters#(x,nil()) -> c_2() lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) lowers#(x,nil()) -> c_4() qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) qsort#(nil()) -> c_6() * Step 3: PredecessorEstimation MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) greaters#(x,nil()) -> c_2() lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) lowers#(x,nil()) -> c_4() qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) qsort#(nil()) -> c_6() - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4,6} by application of Pre({2,4,6}) = {1,3,5}. Here rules are labelled as follows: 1: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) 2: greaters#(x,nil()) -> c_2() 3: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) 4: lowers#(x,nil()) -> c_4() 5: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) 6: qsort#(nil()) -> c_6() * Step 4: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak DPs: greaters#(x,nil()) -> c_2() lowers#(x,nil()) -> c_4() qsort#(nil()) -> c_6() - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) -->_2 greaters#(x,nil()) -> c_2():4 -->_1 greaters#(x,nil()) -> c_2():4 -->_2 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 -->_1 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 2:S:lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) -->_2 lowers#(x,nil()) -> c_4():5 -->_1 lowers#(x,nil()) -> c_4():5 -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_1 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 3:S:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) -->_3 qsort#(nil()) -> c_6():6 -->_1 qsort#(nil()) -> c_6():6 -->_2 lowers#(x,nil()) -> c_4():5 -->_4 greaters#(x,nil()) -> c_2():4 -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_4 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 4:W:greaters#(x,nil()) -> c_2() 5:W:lowers#(x,nil()) -> c_4() 6:W:qsort#(nil()) -> c_6() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: qsort#(nil()) -> c_6() 5: lowers#(x,nil()) -> c_4() 4: greaters#(x,nil()) -> c_2() * Step 5: Decompose MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} Problem (S) - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} ** Step 5.a:1: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) -->_2 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 -->_1 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 2:W:lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_1 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 3:W:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) -->_4 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) ** Step 5.a:2: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) -->_2 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 -->_1 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 3:W:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) -->_4 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):1 -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):3 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) ** Step 5.a:3: DecomposeDG MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) and a lower component greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) Further, following extension rules are added to the lower component. qsort#(.(x,y)) -> greaters#(x,y) qsort#(.(x,y)) -> qsort#(greaters(x,y)) qsort#(.(x,y)) -> qsort#(lowers(x,y)) *** Step 5.a:3.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) The strictly oriented rules are moved into the weak component. **** Step 5.a:3.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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,2} Following symbols are considered usable: {greaters,lowers,greaters#,lowers#,qsort#} TcT has computed the following interpretation: p(++) = [1] x2 + [0] p(.) = [1] x1 + [9] p(<=) = [1] x1 + [4] p(greaters) = [4] p(if) = [0] p(lowers) = [0] p(nil) = [0] p(qsort) = [1] x1 + [8] p(greaters#) = [4] x1 + [8] p(lowers#) = [1] p(qsort#) = [1] x1 + [0] p(c_1) = [1] x1 + [1] p(c_2) = [1] p(c_3) = [0] p(c_4) = [1] p(c_5) = [4] x1 + [2] x2 + [0] p(c_6) = [2] Following rules are strictly oriented: qsort#(.(x,y)) = [1] x + [9] > [8] = c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) Following rules are (at-least) weakly oriented: greaters(x,.(y,z)) = [4] >= [0] = if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) = [4] >= [0] = nil() lowers(x,.(y,z)) = [0] >= [0] = if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) = [0] >= [0] = nil() **** Step 5.a:3.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 5.a:3.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) -->_2 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)):1 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y)),greaters#(x,y)) **** Step 5.a:3.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 5.a:3.b:1: Failure MAYBE + Considered Problem: - Strict DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak DPs: qsort#(.(x,y)) -> greaters#(x,y) qsort#(.(x,y)) -> qsort#(greaters(x,y)) qsort#(.(x,y)) -> qsort#(lowers(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: EmptyProcessor + Details: The problem is still open. ** Step 5.b:1: RemoveWeakSuffixes MAYBE + Considered Problem: - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak DPs: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 -->_1 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 2:S:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) -->_4 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):3 -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):2 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):2 -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 3:W:greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) -->_2 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):3 -->_1 greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: greaters#(x,.(y,z)) -> c_1(greaters#(x,z),greaters#(x,z)) ** Step 5.b:2: SimplifyRHS MAYBE + Considered Problem: - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/4,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 -->_1 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 2:S:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)) -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):2 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y)),greaters#(x,y)):2 -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) ** Step 5.b:3: Decompose MAYBE + Considered Problem: - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} Problem (S) - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} *** Step 5.b:3.a:1: DecomposeDG MAYBE + Considered Problem: - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) and a lower component lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) Further, following extension rules are added to the lower component. qsort#(.(x,y)) -> lowers#(x,y) qsort#(.(x,y)) -> qsort#(greaters(x,y)) qsort#(.(x,y)) -> qsort#(lowers(x,y)) **** Step 5.b:3.a:1.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) The strictly oriented rules are moved into the weak component. ***** Step 5.b:3.a:1.a:1.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + 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,3} Following symbols are considered usable: {greaters,lowers,greaters#,lowers#,qsort#} TcT has computed the following interpretation: p(++) = [1] p(.) = [1] x1 + [12] p(<=) = [1] p(greaters) = [0] p(if) = [0] p(lowers) = [0] p(nil) = [0] p(qsort) = [2] x1 + [1] p(greaters#) = [2] p(lowers#) = [1] x1 + [0] p(qsort#) = [1] x1 + [0] p(c_1) = [2] x1 + [1] x2 + [1] p(c_2) = [0] p(c_3) = [1] x1 + [4] p(c_4) = [2] p(c_5) = [4] x1 + [1] x2 + [1] x3 + [11] p(c_6) = [1] Following rules are strictly oriented: qsort#(.(x,y)) = [1] x + [12] > [1] x + [11] = c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) Following rules are (at-least) weakly oriented: greaters(x,.(y,z)) = [0] >= [0] = if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) = [0] >= [0] = nil() lowers(x,.(y,z)) = [0] >= [0] = if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) = [0] >= [0] = nil() ***** Step 5.b:3.a:1.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () ***** Step 5.b:3.a:1.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) ***** Step 5.b:3.a:1.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). **** Step 5.b:3.a:1.b:1: Failure MAYBE + Considered Problem: - Strict DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) - Weak DPs: qsort#(.(x,y)) -> lowers#(x,y) qsort#(.(x,y)) -> qsort#(greaters(x,y)) qsort#(.(x,y)) -> qsort#(lowers(x,y)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: EmptyProcessor + Details: The problem is still open. *** Step 5.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak DPs: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 2:W:lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) -->_2 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 -->_1 lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: lowers#(x,.(y,z)) -> c_3(lowers#(x,z),lowers#(x,z)) *** Step 5.b:3.b:2: SimplifyRHS WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/3,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))) -->_3 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),lowers#(x,y),qsort#(greaters(x,y))):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) *** Step 5.b:3.b:3: PredecessorEstimationCP WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) The strictly oriented rules are moved into the weak component. **** Step 5.b:3.b:3.a:1: NaturalMI WORST_CASE(?,O(1)) + Considered Problem: - Strict DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 0, 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 0 non-zero interpretation-entries in the diagonal of the component-wise maxima): The following argument positions are considered usable: uargs(c_5) = {1,2} Following symbols are considered usable: {greaters,lowers,greaters#,lowers#,qsort#} TcT has computed the following interpretation: p(++) = [1] p(.) = [1] p(<=) = [2] p(greaters) = [0] p(if) = [0] p(lowers) = [0] p(nil) = [0] p(qsort) = [1] p(greaters#) = [2] x1 + [2] p(lowers#) = [8] x2 + [4] p(qsort#) = [1] x1 + [0] p(c_1) = [1] p(c_2) = [2] p(c_3) = [2] p(c_4) = [0] p(c_5) = [4] x1 + [8] x2 + [0] p(c_6) = [1] Following rules are strictly oriented: qsort#(.(x,y)) = [1] > [0] = c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) Following rules are (at-least) weakly oriented: greaters(x,.(y,z)) = [0] >= [0] = if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) = [0] >= [0] = nil() lowers(x,.(y,z)) = [0] >= [0] = if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) = [0] >= [0] = nil() **** Step 5.b:3.b:3.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () **** Step 5.b:3.b:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) -->_2 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))):1 -->_1 qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: qsort#(.(x,y)) -> c_5(qsort#(lowers(x,y)),qsort#(greaters(x,y))) **** Step 5.b:3.b:3.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: greaters(x,.(y,z)) -> if(<=(y,x),greaters(x,z),.(y,greaters(x,z))) greaters(x,nil()) -> nil() lowers(x,.(y,z)) -> if(<=(y,x),.(y,lowers(x,z)),lowers(x,z)) lowers(x,nil()) -> nil() - Signature: {greaters/2,lowers/2,qsort/1,greaters#/2,lowers#/2,qsort#/1} / {++/2,./2,<=/2,if/3,nil/0,c_1/2,c_2/0,c_3/2 ,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {greaters#,lowers#,qsort#} and constructors {++,.,<=,if ,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). MAYBE