WORST_CASE(?,O(n^2)) * Step 1: DependencyPairs WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1} / {dd/2,nil/0} - Obligation: innermost runtime complexity wrt. defined symbols {@,rev} and constructors {dd,nil} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) @#(nil(),xs) -> c_2() rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) rev#(nil()) -> c_4() Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) @#(nil(),xs) -> c_2() rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) rev#(nil()) -> c_4() - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,4} by application of Pre({2,4}) = {1,3}. Here rules are labelled as follows: 1: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) 2: @#(nil(),xs) -> c_2() 3: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) 4: rev#(nil()) -> c_4() * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak DPs: @#(nil(),xs) -> c_2() rev#(nil()) -> c_4() - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:@#(dd(x,xs),ys) -> c_1(@#(xs,ys)) -->_1 @#(nil(),xs) -> c_2():3 -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):1 2:S:rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) -->_2 rev#(nil()) -> c_4():4 -->_1 @#(nil(),xs) -> c_2():3 -->_2 rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)):2 -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):1 3:W:@#(nil(),xs) -> c_2() 4:W:rev#(nil()) -> c_4() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: rev#(nil()) -> c_4() 3: @#(nil(),xs) -> c_2() * Step 4: Decompose WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,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: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) - Weak DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} Problem (S) - Strict DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} ** Step 4.a:1: PredecessorEstimationCP WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) - Weak DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing}} + Details: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly: 1: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) The strictly oriented rules are moved into the weak component. *** Step 4.a:1.a:1: NaturalPI WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) - Weak DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, 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 polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_3) = {1,2} Following symbols are considered usable: {@,rev,@#,rev#} TcT has computed the following interpretation: p(@) = 1 + x1 + x2 p(dd) = 1 + x2 p(nil) = 0 p(rev) = 2*x1 p(@#) = 2*x1 + x1*x2 p(rev#) = 4*x1^2 p(c_1) = x1 p(c_2) = 4 p(c_3) = 4 + x1 + x2 p(c_4) = 1 Following rules are strictly oriented: @#(dd(x,xs),ys) = 2 + 2*xs + xs*ys + ys > 2*xs + xs*ys = c_1(@#(xs,ys)) Following rules are (at-least) weakly oriented: rev#(dd(x,xs)) = 4 + 8*xs + 4*xs^2 >= 4 + 6*xs + 4*xs^2 = c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) @(dd(x,xs),ys) = 2 + xs + ys >= 2 + xs + ys = dd(x,@(xs,ys)) @(nil(),xs) = 1 + xs >= xs = xs rev(dd(x,xs)) = 2 + 2*xs >= 2 + 2*xs = @(rev(xs),dd(x,nil())) rev(nil()) = 0 >= 0 = nil() *** Step 4.a:1.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 4.a:1.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:@#(dd(x,xs),ys) -> c_1(@#(xs,ys)) -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):1 2:W:rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) -->_2 rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)):2 -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) 1: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) *** Step 4.a:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak DPs: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):2 -->_2 rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)):1 2:W:@#(dd(x,xs),ys) -> c_1(@#(xs,ys)) -->_1 @#(dd(x,xs),ys) -> c_1(@#(xs,ys)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: @#(dd(x,xs),ys) -> c_1(@#(xs,ys)) ** Step 4.b:2: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)) -->_2 rev#(dd(x,xs)) -> c_3(@#(rev(xs),dd(x,nil())),rev#(xs)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: rev#(dd(x,xs)) -> c_3(rev#(xs)) ** Step 4.b:3: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rev#(dd(x,xs)) -> c_3(rev#(xs)) - Weak TRS: @(dd(x,xs),ys) -> dd(x,@(xs,ys)) @(nil(),xs) -> xs rev(dd(x,xs)) -> @(rev(xs),dd(x,nil())) rev(nil()) -> nil() - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: rev#(dd(x,xs)) -> c_3(rev#(xs)) ** Step 4.b:4: PredecessorEstimationCP WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rev#(dd(x,xs)) -> c_3(rev#(xs)) - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,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: rev#(dd(x,xs)) -> c_3(rev#(xs)) The strictly oriented rules are moved into the weak component. *** Step 4.b:4.a:1: NaturalMI WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: rev#(dd(x,xs)) -> c_3(rev#(xs)) - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,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_3) = {1} Following symbols are considered usable: {@#,rev#} TcT has computed the following interpretation: p(@) = [1] x1 + [8] x2 + [8] p(dd) = [1] x2 + [2] p(nil) = [1] p(rev) = [1] x1 + [2] p(@#) = [1] x2 + [2] p(rev#) = [8] x1 + [0] p(c_1) = [1] x1 + [0] p(c_2) = [2] p(c_3) = [1] x1 + [12] p(c_4) = [1] Following rules are strictly oriented: rev#(dd(x,xs)) = [8] xs + [16] > [8] xs + [12] = c_3(rev#(xs)) Following rules are (at-least) weakly oriented: *** Step 4.b:4.a:2: Assumption WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: rev#(dd(x,xs)) -> c_3(rev#(xs)) - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}} + Details: () *** Step 4.b:4.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: rev#(dd(x,xs)) -> c_3(rev#(xs)) - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:rev#(dd(x,xs)) -> c_3(rev#(xs)) -->_1 rev#(dd(x,xs)) -> c_3(rev#(xs)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: rev#(dd(x,xs)) -> c_3(rev#(xs)) *** Step 4.b:4.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Signature: {@/2,rev/1,@#/2,rev#/1} / {dd/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0} - Obligation: innermost runtime complexity wrt. defined symbols {@#,rev#} and constructors {dd,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))