WORST_CASE(?,O(n^2)) * Step 1: WeightGap WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: -(x,0()) -> x -(x,s(y)) -> if(greater(x,s(y)),s(-(x,p(s(y)))),0()) -(0(),y) -> 0() p(0()) -> 0() p(s(x)) -> x - Signature: {-/2,p/1} / {0/0,greater/2,if/3,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {-,p} and constructors {0,greater,if,s} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following nonconstant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(-) = {2}, uargs(if) = {2}, uargs(s) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(-) = [9] x1 + [1] x2 + [8] p(0) = [2] p(greater) = [0] p(if) = [1] x2 + [0] p(p) = [1] x1 + [11] p(s) = [1] x1 + [0] Following rules are strictly oriented: -(x,0()) = [9] x + [10] > [1] x + [0] = x -(0(),y) = [1] y + [26] > [2] = 0() p(0()) = [13] > [2] = 0() p(s(x)) = [1] x + [11] > [1] x + [0] = x Following rules are (at-least) weakly oriented: -(x,s(y)) = [9] x + [1] y + [8] >= [9] x + [1] y + [19] = if(greater(x,s(y)),s(-(x,p(s(y)))),0()) Further, it can be verified that all rules not oriented are covered by the weightgap condition. * Step 2: Ara WORST_CASE(?,O(n^2)) + Considered Problem: - Strict TRS: -(x,s(y)) -> if(greater(x,s(y)),s(-(x,p(s(y)))),0()) - Weak TRS: -(x,0()) -> x -(0(),y) -> 0() p(0()) -> 0() p(s(x)) -> x - Signature: {-/2,p/1} / {0/0,greater/2,if/3,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {-,p} and constructors {0,greater,if,s} + Applied Processor: Ara {heuristics_ = NoHeuristics, minDegree = 2, maxDegree = 2, araTimeout = 15, araFindStrictRules = Just 1} + Details: Signatures used: ---------------- - :: [A(12, 2) x A(15, 0)] -(1)-> A(9, 0) 0 :: [] -(0)-> A(15, 0) 0 :: [] -(0)-> A(12, 2) 0 :: [] -(0)-> A(0, 15) 0 :: [] -(0)-> A(7, 13) 0 :: [] -(0)-> A(15, 7) greater :: [A(0, 0) x A(0, 0)] -(1)-> A(1, 12) if :: [A(0, 0) x A(0, 0) x A(0, 0)] -(0)-> A(9, 0) p :: [A(0, 15)] -(0)-> A(15, 0) s :: [A(15, 0)] -(15)-> A(15, 0) s :: [A(15, 0)] -(0)-> A(0, 15) s :: [A(0, 0)] -(0)-> A(0, 0) s :: [A(2, 0)] -(0)-> A(0, 2) Cost-free Signatures used: -------------------------- - :: [A_cf(0, 0) x A_cf(0, 0)] -(1)-> A_cf(0, 0) 0 :: [] -(0)-> A_cf(0, 0) 0 :: [] -(0)-> A_cf(3, 3) 0 :: [] -(0)-> A_cf(11, 11) 0 :: [] -(0)-> A_cf(10, 10) greater :: [A_cf(0, 0) x A_cf(0, 0)] -(0)-> A_cf(0, 4) if :: [A_cf(0, 0) x A_cf(0, 0) x A_cf(0, 0)] -(0)-> A_cf(3, 0) p :: [A_cf(0, 0)] -(0)-> A_cf(0, 0) s :: [A_cf(0, 0)] -(0)-> A_cf(0, 0) Base Constructor Signatures used: --------------------------------- 0_A :: [] -(0)-> A(1, 0) 0_A :: [] -(0)-> A(0, 1) greater_A :: [A(0, 0) x A(0, 0)] -(1)-> A(1, 0) greater_A :: [A(0, 0) x A(0, 0)] -(0)-> A(0, 1) if_A :: [A(0, 0) x A(0, 0) x A(0, 0)] -(0)-> A(1, 0) if_A :: [A(1, 0) x A(1, 0) x A(1, 1)] -(0)-> A(0, 1) s_A :: [A(1, 0)] -(1)-> A(1, 0) s_A :: [A(1, 0)] -(0)-> A(0, 1) Following Still Strict Rules were Typed as: ------------------------------------------- 1. Strict: -(x,s(y)) -> if(greater(x,s(y)),s(-(x,p(s(y)))),0()) 2. Weak: * Step 3: EmptyProcessor WORST_CASE(?,O(1)) + Considered Problem: - Weak TRS: -(x,0()) -> x -(x,s(y)) -> if(greater(x,s(y)),s(-(x,p(s(y)))),0()) -(0(),y) -> 0() p(0()) -> 0() p(s(x)) -> x - Signature: {-/2,p/1} / {0/0,greater/2,if/3,s/1} - Obligation: innermost runtime complexity wrt. defined symbols {-,p} and constructors {0,greater,if,s} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(?,O(n^2))