WORST_CASE(?,O(n^3)) * Step 1: DependencyPairs WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys goal(xs) -> shuffle(xs) reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() shuffle(Cons(x,xs)) -> Cons(x,shuffle(reverse(xs))) shuffle(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1} / {Cons/2,Nil/0} - Obligation: innermost runtime complexity wrt. defined symbols {append,goal,reverse,shuffle} and constructors {Cons,Nil} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) append#(Nil(),ys) -> c_2() goal#(xs) -> c_3(shuffle#(xs)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) reverse#(Nil()) -> c_5() shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) shuffle#(Nil()) -> c_7() Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) append#(Nil(),ys) -> c_2() goal#(xs) -> c_3(shuffle#(xs)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) reverse#(Nil()) -> c_5() shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) shuffle#(Nil()) -> c_7() - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys goal(xs) -> shuffle(xs) reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() shuffle(Cons(x,xs)) -> Cons(x,shuffle(reverse(xs))) shuffle(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {2,5,7} by application of Pre({2,5,7}) = {1,3,4,6}. Here rules are labelled as follows: 1: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) 2: append#(Nil(),ys) -> c_2() 3: goal#(xs) -> c_3(shuffle#(xs)) 4: reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) 5: reverse#(Nil()) -> c_5() 6: shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) 7: shuffle#(Nil()) -> c_7() * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) goal#(xs) -> c_3(shuffle#(xs)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) - Weak DPs: append#(Nil(),ys) -> c_2() reverse#(Nil()) -> c_5() shuffle#(Nil()) -> c_7() - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys goal(xs) -> shuffle(xs) reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() shuffle(Cons(x,xs)) -> Cons(x,shuffle(reverse(xs))) shuffle(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) -->_1 append#(Nil(),ys) -> c_2():5 -->_1 append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)):1 2:S:goal#(xs) -> c_3(shuffle#(xs)) -->_1 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)):4 -->_1 shuffle#(Nil()) -> c_7():7 3:S:reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) -->_2 reverse#(Nil()) -> c_5():6 -->_1 append#(Nil(),ys) -> c_2():5 -->_2 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):3 -->_1 append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)):1 4:S:shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) -->_1 shuffle#(Nil()) -> c_7():7 -->_2 reverse#(Nil()) -> c_5():6 -->_1 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)):4 -->_2 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):3 5:W:append#(Nil(),ys) -> c_2() 6:W:reverse#(Nil()) -> c_5() 7:W:shuffle#(Nil()) -> c_7() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: reverse#(Nil()) -> c_5() 7: shuffle#(Nil()) -> c_7() 5: append#(Nil(),ys) -> c_2() * Step 4: RemoveHeads WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) goal#(xs) -> c_3(shuffle#(xs)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys goal(xs) -> shuffle(xs) reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() shuffle(Cons(x,xs)) -> Cons(x,shuffle(reverse(xs))) shuffle(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) -->_1 append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)):1 2:S:goal#(xs) -> c_3(shuffle#(xs)) -->_1 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)):4 3:S:reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) -->_2 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):3 -->_1 append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)):1 4:S:shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) -->_1 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)):4 -->_2 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):3 Following roots of the dependency graph are removed, as the considered set of starting terms is closed under reduction with respect to these rules (modulo compound contexts). [(2,goal#(xs) -> c_3(shuffle#(xs)))] * Step 5: UsableRules WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys goal(xs) -> shuffle(xs) reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() shuffle(Cons(x,xs)) -> Cons(x,shuffle(reverse(xs))) shuffle(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) * Step 6: DecomposeDG WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + 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 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) and a lower component append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) Further, following extension rules are added to the lower component. shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) ** Step 6.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)) -->_1 shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs)),reverse#(xs)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs))) ** Step 6.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs))) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/1,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + 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(Cons) = {2}, uargs(append) = {1}, uargs(shuffle#) = {1}, uargs(c_6) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(Cons) = [1] x2 + [8] p(Nil) = [0] p(append) = [1] x1 + [1] x2 + [0] p(goal) = [1] p(reverse) = [1] x1 + [4] p(shuffle) = [1] p(append#) = [2] x1 + [1] x2 + [0] p(goal#) = [1] x1 + [1] p(reverse#) = [1] x1 + [1] p(shuffle#) = [1] x1 + [12] p(c_1) = [1] p(c_2) = [1] p(c_3) = [1] x1 + [0] p(c_4) = [1] x1 + [1] p(c_5) = [1] p(c_6) = [1] x1 + [0] p(c_7) = [1] Following rules are strictly oriented: shuffle#(Cons(x,xs)) = [1] xs + [20] > [1] xs + [16] = c_6(shuffle#(reverse(xs))) Following rules are (at-least) weakly oriented: append(Cons(x,xs),ys) = [1] xs + [1] ys + [8] >= [1] xs + [1] ys + [8] = Cons(x,append(xs,ys)) append(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys reverse(Cons(x,xs)) = [1] xs + [12] >= [1] xs + [12] = append(reverse(xs),Cons(x,Nil())) reverse(Nil()) = [4] >= [0] = Nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. ** Step 6.a:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: shuffle#(Cons(x,xs)) -> c_6(shuffle#(reverse(xs))) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/1,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). ** Step 6.b:1: DecomposeDG WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) - Weak DPs: shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + 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 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) and a lower component append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) Further, following extension rules are added to the lower component. reverse#(Cons(x,xs)) -> append#(reverse(xs),Cons(x,Nil())) reverse#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) *** Step 6.b:1.a:1: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) - Weak DPs: shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)) -->_2 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):1 2:W:shuffle#(Cons(x,xs)) -> reverse#(xs) -->_1 reverse#(Cons(x,xs)) -> c_4(append#(reverse(xs),Cons(x,Nil())),reverse#(xs)):1 3:W:shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) -->_1 shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)):3 -->_1 shuffle#(Cons(x,xs)) -> reverse#(xs):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: reverse#(Cons(x,xs)) -> c_4(reverse#(xs)) *** Step 6.b:1.a:2: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: reverse#(Cons(x,xs)) -> c_4(reverse#(xs)) - Weak DPs: shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/1,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + 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(Cons) = {2}, uargs(append) = {1}, uargs(shuffle#) = {1}, uargs(c_4) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(Cons) = [1] x1 + [1] x2 + [2] p(Nil) = [0] p(append) = [1] x1 + [1] x2 + [0] p(goal) = [2] x1 + [2] p(reverse) = [1] x1 + [2] p(shuffle) = [2] x1 + [0] p(append#) = [2] x1 + [4] x2 + [1] p(goal#) = [1] p(reverse#) = [1] x1 + [2] p(shuffle#) = [1] x1 + [0] p(c_1) = [1] x1 + [2] p(c_2) = [4] p(c_3) = [1] x1 + [8] p(c_4) = [1] x1 + [1] p(c_5) = [2] p(c_6) = [1] x1 + [8] x2 + [4] p(c_7) = [0] Following rules are strictly oriented: reverse#(Cons(x,xs)) = [1] x + [1] xs + [4] > [1] xs + [3] = c_4(reverse#(xs)) Following rules are (at-least) weakly oriented: shuffle#(Cons(x,xs)) = [1] x + [1] xs + [2] >= [1] xs + [2] = reverse#(xs) shuffle#(Cons(x,xs)) = [1] x + [1] xs + [2] >= [1] xs + [2] = shuffle#(reverse(xs)) append(Cons(x,xs),ys) = [1] x + [1] xs + [1] ys + [2] >= [1] x + [1] xs + [1] ys + [2] = Cons(x,append(xs,ys)) append(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys reverse(Cons(x,xs)) = [1] x + [1] xs + [4] >= [1] x + [1] xs + [4] = append(reverse(xs),Cons(x,Nil())) reverse(Nil()) = [2] >= [0] = Nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 6.b:1.a:3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: reverse#(Cons(x,xs)) -> c_4(reverse#(xs)) shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/1,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 6.b:1.b:1: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) - Weak DPs: reverse#(Cons(x,xs)) -> append#(reverse(xs),Cons(x,Nil())) reverse#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + 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(Cons) = {2}, uargs(append) = {1}, uargs(append#) = {1}, uargs(shuffle#) = {1}, uargs(c_1) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(Cons) = [1] x2 + [2] p(Nil) = [0] p(append) = [1] x1 + [1] x2 + [0] p(goal) = [1] p(reverse) = [1] x1 + [0] p(shuffle) = [1] x1 + [1] p(append#) = [1] x1 + [1] x2 + [1] p(goal#) = [1] x1 + [1] p(reverse#) = [1] x1 + [1] p(shuffle#) = [1] x1 + [0] p(c_1) = [1] x1 + [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [1] x2 + [0] p(c_5) = [2] p(c_6) = [1] x1 + [4] x2 + [0] p(c_7) = [1] Following rules are strictly oriented: append#(Cons(x,xs),ys) = [1] xs + [1] ys + [3] > [1] xs + [1] ys + [1] = c_1(append#(xs,ys)) Following rules are (at-least) weakly oriented: reverse#(Cons(x,xs)) = [1] xs + [3] >= [1] xs + [3] = append#(reverse(xs),Cons(x,Nil())) reverse#(Cons(x,xs)) = [1] xs + [3] >= [1] xs + [1] = reverse#(xs) shuffle#(Cons(x,xs)) = [1] xs + [2] >= [1] xs + [1] = reverse#(xs) shuffle#(Cons(x,xs)) = [1] xs + [2] >= [1] xs + [0] = shuffle#(reverse(xs)) append(Cons(x,xs),ys) = [1] xs + [1] ys + [2] >= [1] xs + [1] ys + [2] = Cons(x,append(xs,ys)) append(Nil(),ys) = [1] ys + [0] >= [1] ys + [0] = ys reverse(Cons(x,xs)) = [1] xs + [2] >= [1] xs + [2] = append(reverse(xs),Cons(x,Nil())) reverse(Nil()) = [0] >= [0] = Nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. *** Step 6.b:1.b:2: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: append#(Cons(x,xs),ys) -> c_1(append#(xs,ys)) reverse#(Cons(x,xs)) -> append#(reverse(xs),Cons(x,Nil())) reverse#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> reverse#(xs) shuffle#(Cons(x,xs)) -> shuffle#(reverse(xs)) - Weak TRS: append(Cons(x,xs),ys) -> Cons(x,append(xs,ys)) append(Nil(),ys) -> ys reverse(Cons(x,xs)) -> append(reverse(xs),Cons(x,Nil())) reverse(Nil()) -> Nil() - Signature: {append/2,goal/1,reverse/1,shuffle/1,append#/2,goal#/1,reverse#/1,shuffle#/1} / {Cons/2,Nil/0,c_1/1,c_2/0 ,c_3/1,c_4/2,c_5/0,c_6/2,c_7/0} - Obligation: innermost runtime complexity wrt. defined symbols {append#,goal#,reverse#,shuffle#} and constructors {Cons ,Nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^3))