WORST_CASE(?,O(n^1)) * Step 1: DependencyPairs WORST_CASE(?,O(n^1)) + Considered Problem: - Strict TRS: divp(x,y) -> =(rem(x,y),0()) prime(0()) -> false() prime(s(0())) -> false() prime(s(s(x))) -> prime1(s(s(x)),s(x)) prime1(x,0()) -> false() prime1(x,s(0())) -> true() prime1(x,s(s(y))) -> and(not(divp(s(s(y)),x)),prime1(x,s(y))) - Signature: {divp/2,prime/1,prime1/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {divp,prime,prime1} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs divp#(x,y) -> c_1() prime#(0()) -> c_2() prime#(s(0())) -> c_3() prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,0()) -> c_5() prime1#(x,s(0())) -> c_6() prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) Weak DPs and mark the set of starting terms. * Step 2: PredecessorEstimation WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: divp#(x,y) -> c_1() prime#(0()) -> c_2() prime#(s(0())) -> c_3() prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,0()) -> c_5() prime1#(x,s(0())) -> c_6() prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) - Weak TRS: divp(x,y) -> =(rem(x,y),0()) prime(0()) -> false() prime(s(0())) -> false() prime(s(s(x))) -> prime1(s(s(x)),s(x)) prime1(x,0()) -> false() prime1(x,s(0())) -> true() prime1(x,s(s(y))) -> and(not(divp(s(s(y)),x)),prime1(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,2,3,5,6} by application of Pre({1,2,3,5,6}) = {4,7}. Here rules are labelled as follows: 1: divp#(x,y) -> c_1() 2: prime#(0()) -> c_2() 3: prime#(s(0())) -> c_3() 4: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) 5: prime1#(x,0()) -> c_5() 6: prime1#(x,s(0())) -> c_6() 7: prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) * Step 3: RemoveWeakSuffixes WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) - Weak DPs: divp#(x,y) -> c_1() prime#(0()) -> c_2() prime#(s(0())) -> c_3() prime1#(x,0()) -> c_5() prime1#(x,s(0())) -> c_6() - Weak TRS: divp(x,y) -> =(rem(x,y),0()) prime(0()) -> false() prime(s(0())) -> false() prime(s(s(x))) -> prime1(s(s(x)),s(x)) prime1(x,0()) -> false() prime1(x,s(0())) -> true() prime1(x,s(s(y))) -> and(not(divp(s(s(y)),x)),prime1(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) -->_1 prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))):2 -->_1 prime1#(x,s(0())) -> c_6():7 2:S:prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) -->_2 prime1#(x,s(0())) -> c_6():7 -->_1 divp#(x,y) -> c_1():3 -->_2 prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))):2 3:W:divp#(x,y) -> c_1() 4:W:prime#(0()) -> c_2() 5:W:prime#(s(0())) -> c_3() 6:W:prime1#(x,0()) -> c_5() 7:W:prime1#(x,s(0())) -> c_6() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: prime1#(x,0()) -> c_5() 5: prime#(s(0())) -> c_3() 4: prime#(0()) -> c_2() 3: divp#(x,y) -> c_1() 7: prime1#(x,s(0())) -> c_6() * Step 4: SimplifyRHS WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) - Weak TRS: divp(x,y) -> =(rem(x,y),0()) prime(0()) -> false() prime(s(0())) -> false() prime(s(s(x))) -> prime1(s(s(x)),s(x)) prime1(x,0()) -> false() prime1(x,s(0())) -> true() prime1(x,s(s(y))) -> and(not(divp(s(s(y)),x)),prime1(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/2} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) -->_1 prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))):2 2:S:prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))) -->_2 prime1#(x,s(s(y))) -> c_7(divp#(s(s(y)),x),prime1#(x,s(y))):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) * Step 5: UsableRules WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) - Weak TRS: divp(x,y) -> =(rem(x,y),0()) prime(0()) -> false() prime(s(0())) -> false() prime(s(s(x))) -> prime1(s(s(x)),s(x)) prime1(x,0()) -> false() prime1(x,s(0())) -> true() prime1(x,s(s(y))) -> and(not(divp(s(s(y)),x)),prime1(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) * Step 6: RemoveHeads WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: RemoveHeads + Details: Consider the dependency graph 1:S:prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))) -->_1 prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))):2 2:S:prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) -->_1 prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))):2 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). [(1,prime#(s(s(x))) -> c_4(prime1#(s(s(x)),s(x))))] * Step 7: WeightGap WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_7) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(=) = [1] x1 + [1] x2 + [0] p(and) = [0] p(divp) = [1] x1 + [2] x2 + [2] p(false) = [0] p(not) = [1] p(prime) = [1] x1 + [1] p(prime1) = [1] x1 + [1] x2 + [1] p(rem) = [1] x1 + [1] p(s) = [1] x1 + [8] p(true) = [1] p(divp#) = [2] x1 + [1] x2 + [1] p(prime#) = [1] p(prime1#) = [1] x2 + [9] p(c_1) = [8] p(c_2) = [4] p(c_3) = [1] p(c_4) = [1] x1 + [0] p(c_5) = [0] p(c_6) = [1] p(c_7) = [1] x1 + [7] Following rules are strictly oriented: prime1#(x,s(s(y))) = [1] y + [25] > [1] y + [24] = c_7(prime1#(x,s(y))) Following rules are (at-least) weakly oriented: Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 8: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: prime1#(x,s(s(y))) -> c_7(prime1#(x,s(y))) - Signature: {divp/2,prime/1,prime1/2,divp#/2,prime#/1,prime1#/2} / {0/0,=/2,and/2,false/0,not/1,rem/2,s/1,true/0,c_1/0 ,c_2/0,c_3/0,c_4/1,c_5/0,c_6/0,c_7/1} - Obligation: innermost runtime complexity wrt. defined symbols {divp#,prime#,prime1#} and constructors {0,=,and,false,not ,rem,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^1))