/export/starexec/sandbox2/solver/bin/starexec_run_tct_rc /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1),O(n^3)) * Step 1: Sum. WORST_CASE(Omega(n^1),O(n^3)) + Considered Problem: - Strict TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1} / {add/2,nil/0} - Obligation: runtime complexity wrt. defined symbols {app,reverse,shuffle} and constructors {add,nil} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: Sum. WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1} / {add/2,nil/0} - Obligation: runtime complexity wrt. defined symbols {app,reverse,shuffle} and constructors {add,nil} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:2: DecreasingLoops. WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1} / {add/2,nil/0} - Obligation: runtime complexity wrt. defined symbols {app,reverse,shuffle} and constructors {add,nil} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: app(y,z){y -> add(x,y)} = app(add(x,y),z) ->^+ add(x,app(y,z)) = C[app(y,z) = app(y,z){}] ** Step 1.b:1: ToInnermost. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1} / {add/2,nil/0} - Obligation: runtime complexity wrt. defined symbols {app,reverse,shuffle} and constructors {add,nil} + Applied Processor: ToInnermost + Details: switch to innermost, as the system is overlay and right linear and does not contain weak rules ** Step 1.b:2: DependencyPairs. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1} / {add/2,nil/0} - Obligation: innermost runtime complexity wrt. defined symbols {app,reverse,shuffle} and constructors {add,nil} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs app#(add(n,x),y) -> c_1(app#(x,y)) app#(nil(),y) -> c_2() reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) reverse#(nil()) -> c_4() shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) shuffle#(nil()) -> c_6() Weak DPs and mark the set of starting terms. ** Step 1.b:3: UsableRules. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) app#(nil(),y) -> c_2() reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) reverse#(nil()) -> c_4() shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) shuffle#(nil()) -> c_6() - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() shuffle(add(n,x)) -> add(n,shuffle(reverse(x))) shuffle(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() app#(add(n,x),y) -> c_1(app#(x,y)) app#(nil(),y) -> c_2() reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) reverse#(nil()) -> c_4() shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) shuffle#(nil()) -> c_6() ** Step 1.b:4: PredecessorEstimation. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) app#(nil(),y) -> c_2() reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) reverse#(nil()) -> c_4() shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) shuffle#(nil()) -> c_6() - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: app#(add(n,x),y) -> c_1(app#(x,y)) 2: app#(nil(),y) -> c_2() 3: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) 4: reverse#(nil()) -> c_4() 5: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) 6: shuffle#(nil()) -> c_6() ** Step 1.b:5: RemoveWeakSuffixes. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak DPs: app#(nil(),y) -> c_2() reverse#(nil()) -> c_4() shuffle#(nil()) -> c_6() - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:app#(add(n,x),y) -> c_1(app#(x,y)) -->_1 app#(nil(),y) -> c_2():4 -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):1 2:S:reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) -->_2 reverse#(nil()) -> c_4():5 -->_1 app#(nil(),y) -> c_2():4 -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):2 -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):1 3:S:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(nil()) -> c_6():6 -->_2 reverse#(nil()) -> c_4():5 -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):3 -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):2 4:W:app#(nil(),y) -> c_2() 5:W:reverse#(nil()) -> c_4() 6:W:shuffle#(nil()) -> c_6() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: shuffle#(nil()) -> c_6() 5: reverse#(nil()) -> c_4() 4: app#(nil(),y) -> c_2() ** Step 1.b:6: Decompose. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2 ,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} Problem (S) - Strict DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak DPs: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2 ,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} *** Step 1.b:6.a:1: DecomposeDG. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) and a lower component app#(add(n,x),y) -> c_1(app#(x,y)) reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) Further, following extension rules are added to the lower component. shuffle#(add(n,x)) -> reverse#(x) shuffle#(add(n,x)) -> shuffle#(reverse(x)) **** Step 1.b:6.a:1.a:1: PredecessorEstimationCP. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.a:1.a:1.a:1: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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} Following symbols are considered usable: {app,reverse,app#,reverse#,shuffle#} TcT has computed the following interpretation: p(add) = [1] x2 + [1] p(app) = [1] x1 + [1] x2 + [0] p(nil) = [0] p(reverse) = [1] x1 + [0] p(shuffle) = [1] x1 + [1] p(app#) = [1] x1 + [1] x2 + [1] p(reverse#) = [0] p(shuffle#) = [8] x1 + [0] p(c_1) = [1] p(c_2) = [0] p(c_3) = [4] x1 + [1] x2 + [0] p(c_4) = [1] p(c_5) = [1] x1 + [4] x2 + [4] p(c_6) = [8] Following rules are strictly oriented: shuffle#(add(n,x)) = [8] x + [8] > [8] x + [4] = c_5(shuffle#(reverse(x)),reverse#(x)) Following rules are (at-least) weakly oriented: app(add(n,x),y) = [1] x + [1] y + [1] >= [1] x + [1] y + [1] = add(n,app(x,y)) app(nil(),y) = [1] y + [0] >= [1] y + [0] = y reverse(add(n,x)) = [1] x + [1] >= [1] x + [1] = app(reverse(x),add(n,nil())) reverse(nil()) = [0] >= [0] = nil() ***** Step 1.b:6.a:1.a:1.a:2: Assumption. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown, timeBCUB = Unknown, timeBCLB = Unknown}} + Details: () ***** Step 1.b:6.a:1.a:1.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) ***** Step 1.b:6.a:1.a:1.b:2: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). **** Step 1.b:6.a:1.b:1: PredecessorEstimationCP. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> reverse#(x) shuffle#(add(n,x)) -> shuffle#(reverse(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: app#(add(n,x),y) -> c_1(app#(x,y)) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.a:1.b:1.a:1: NaturalPI. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> reverse#(x) shuffle#(add(n,x)) -> shuffle#(reverse(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: {app,reverse,app#,reverse#,shuffle#} TcT has computed the following interpretation: p(add) = 1 + x2 p(app) = x1 + x2 p(nil) = 0 p(reverse) = x1 p(shuffle) = 1 + x1 + x1^2 p(app#) = 2*x1 + 5*x2^2 p(reverse#) = 1 + 7*x1 + 2*x1^2 p(shuffle#) = 3 + 6*x1 + 2*x1^2 p(c_1) = x1 p(c_2) = 0 p(c_3) = 4 + x1 + x2 p(c_4) = 0 p(c_5) = 0 p(c_6) = 1 Following rules are strictly oriented: app#(add(n,x),y) = 2 + 2*x + 5*y^2 > 2*x + 5*y^2 = c_1(app#(x,y)) Following rules are (at-least) weakly oriented: reverse#(add(n,x)) = 10 + 11*x + 2*x^2 >= 10 + 9*x + 2*x^2 = c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) = 11 + 10*x + 2*x^2 >= 1 + 7*x + 2*x^2 = reverse#(x) shuffle#(add(n,x)) = 11 + 10*x + 2*x^2 >= 3 + 6*x + 2*x^2 = shuffle#(reverse(x)) app(add(n,x),y) = 1 + x + y >= 1 + x + y = add(n,app(x,y)) app(nil(),y) = y >= y = y reverse(add(n,x)) = 1 + x >= 1 + x = app(reverse(x),add(n,nil())) reverse(nil()) = 0 >= 0 = nil() ***** Step 1.b:6.a:1.b:1.a:2: Assumption. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: app#(add(n,x),y) -> c_1(app#(x,y)) reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> reverse#(x) shuffle#(add(n,x)) -> shuffle#(reverse(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown, timeBCUB = Unknown, timeBCLB = Unknown}} + Details: () ***** Step 1.b:6.a:1.b:1.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: app#(add(n,x),y) -> c_1(app#(x,y)) reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> reverse#(x) shuffle#(add(n,x)) -> shuffle#(reverse(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:app#(add(n,x),y) -> c_1(app#(x,y)) -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):1 2:W:reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):2 -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):1 3:W:shuffle#(add(n,x)) -> reverse#(x) -->_1 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):2 4:W:shuffle#(add(n,x)) -> shuffle#(reverse(x)) -->_1 shuffle#(add(n,x)) -> shuffle#(reverse(x)):4 -->_1 shuffle#(add(n,x)) -> reverse#(x):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: shuffle#(add(n,x)) -> shuffle#(reverse(x)) 3: shuffle#(add(n,x)) -> reverse#(x) 2: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) 1: app#(add(n,x),y) -> c_1(app#(x,y)) ***** Step 1.b:6.a:1.b:1.b:2: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak DPs: app#(add(n,x),y) -> c_1(app#(x,y)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):3 -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):1 2:S:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):2 -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):1 3:W:app#(add(n,x),y) -> c_1(app#(x,y)) -->_1 app#(add(n,x),y) -> c_1(app#(x,y)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: app#(add(n,x),y) -> c_1(app#(x,y)) *** Step 1.b:6.b:2: SimplifyRHS. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)) -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):1 2:S:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):2 -->_2 reverse#(add(n,x)) -> c_3(app#(reverse(x),add(n,nil())),reverse#(x)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: reverse#(add(n,x)) -> c_3(reverse#(x)) *** Step 1.b:6.b:3: Decompose. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: reverse#(add(n,x)) -> c_3(reverse#(x)) - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2 ,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} Problem (S) - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2 ,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} **** Step 1.b:6.b:3.a:1: PredecessorEstimationCP. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: reverse#(add(n,x)) -> c_3(reverse#(x)) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.b:3.a:1.a:1: NaturalPI. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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_3) = {1}, uargs(c_5) = {1,2} Following symbols are considered usable: {app,reverse,app#,reverse#,shuffle#} TcT has computed the following interpretation: p(add) = 2 + x2 p(app) = x1 + x2 p(nil) = 0 p(reverse) = x1 p(shuffle) = 1 p(app#) = x1 + 4*x1*x2 + x2 + x2^2 p(reverse#) = 4*x1 p(shuffle#) = x1^2 p(c_1) = 1 + x1 p(c_2) = 0 p(c_3) = x1 p(c_4) = 0 p(c_5) = x1 + x2 p(c_6) = 0 Following rules are strictly oriented: reverse#(add(n,x)) = 8 + 4*x > 4*x = c_3(reverse#(x)) Following rules are (at-least) weakly oriented: shuffle#(add(n,x)) = 4 + 4*x + x^2 >= 4*x + x^2 = c_5(shuffle#(reverse(x)),reverse#(x)) app(add(n,x),y) = 2 + x + y >= 2 + x + y = add(n,app(x,y)) app(nil(),y) = y >= y = y reverse(add(n,x)) = 2 + x >= 2 + x = app(reverse(x),add(n,nil())) reverse(nil()) = 0 >= 0 = nil() ***** Step 1.b:6.b:3.a:1.a:2: Assumption. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown, timeBCUB = Unknown, timeBCLB = Unknown}} + Details: () ***** Step 1.b:6.b:3.a:1.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:reverse#(add(n,x)) -> c_3(reverse#(x)) -->_1 reverse#(add(n,x)) -> c_3(reverse#(x)):1 2:W:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):2 -->_2 reverse#(add(n,x)) -> c_3(reverse#(x)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) 1: reverse#(add(n,x)) -> c_3(reverse#(x)) ***** Step 1.b:6.b:3.a:1.b:2: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). **** Step 1.b:6.b:3.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak DPs: reverse#(add(n,x)) -> c_3(reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_2 reverse#(add(n,x)) -> c_3(reverse#(x)):2 -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):1 2:W:reverse#(add(n,x)) -> c_3(reverse#(x)) -->_1 reverse#(add(n,x)) -> c_3(reverse#(x)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: reverse#(add(n,x)) -> c_3(reverse#(x)) **** Step 1.b:6.b:3.b:2: SimplifyRHS. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/2,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x)),reverse#(x)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) **** Step 1.b:6.b:3.b:3: PredecessorEstimationCP. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/1,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) The strictly oriented rules are moved into the weak component. ***** Step 1.b:6.b:3.b:3.a:1: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/1,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,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} Following symbols are considered usable: {app,reverse,app#,reverse#,shuffle#} TcT has computed the following interpretation: p(add) = [1] x2 + [4] p(app) = [1] x1 + [1] x2 + [0] p(nil) = [0] p(reverse) = [1] x1 + [0] p(shuffle) = [1] p(app#) = [8] x1 + [1] x2 + [1] p(reverse#) = [8] p(shuffle#) = [4] x1 + [4] p(c_1) = [0] p(c_2) = [1] p(c_3) = [0] p(c_4) = [2] p(c_5) = [1] x1 + [14] p(c_6) = [8] Following rules are strictly oriented: shuffle#(add(n,x)) = [4] x + [20] > [4] x + [18] = c_5(shuffle#(reverse(x))) Following rules are (at-least) weakly oriented: app(add(n,x),y) = [1] x + [1] y + [4] >= [1] x + [1] y + [4] = add(n,app(x,y)) app(nil(),y) = [1] y + [0] >= [1] y + [0] = y reverse(add(n,x)) = [1] x + [4] >= [1] x + [4] = app(reverse(x),add(n,nil())) reverse(nil()) = [0] >= [0] = nil() ***** Step 1.b:6.b:3.b:3.a:2: Assumption. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/1,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown, timeBCUB = Unknown, timeBCLB = Unknown}} + Details: () ***** Step 1.b:6.b:3.b:3.b:1: RemoveWeakSuffixes. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/1,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:W:shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) -->_1 shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: shuffle#(add(n,x)) -> c_5(shuffle#(reverse(x))) ***** Step 1.b:6.b:3.b:3.b:2: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: app(add(n,x),y) -> add(n,app(x,y)) app(nil(),y) -> y reverse(add(n,x)) -> app(reverse(x),add(n,nil())) reverse(nil()) -> nil() - Signature: {app/2,reverse/1,shuffle/1,app#/2,reverse#/1,shuffle#/1} / {add/2,nil/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/1,c_6/0} - Obligation: innermost runtime complexity wrt. defined symbols {app#,reverse#,shuffle#} and constructors {add,nil} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^3))