311.79/291.57 WORST_CASE(Omega(n^1), ?) 311.79/291.58 proof of /export/starexec/sandbox/benchmark/theBenchmark.xml 311.79/291.58 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 311.79/291.58 311.79/291.58 311.79/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 311.79/291.58 311.79/291.58 (0) CpxTRS 311.79/291.58 (1) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] 311.79/291.58 (2) TRS for Loop Detection 311.79/291.58 (3) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] 311.79/291.58 (4) BEST 311.79/291.58 (5) proven lower bound 311.79/291.58 (6) LowerBoundPropagationProof [FINISHED, 0 ms] 311.79/291.58 (7) BOUNDS(n^1, INF) 311.79/291.58 (8) TRS for Loop Detection 311.79/291.58 311.79/291.58 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (0) 311.79/291.58 Obligation: 311.79/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 311.79/291.58 311.79/291.58 311.79/291.58 The TRS R consists of the following rules: 311.79/291.58 311.79/291.58 qsort(xs) -> qs(half(length(xs)), xs) 311.79/291.58 qs(n, nil) -> nil 311.79/291.58 qs(n, cons(x, xs)) -> append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs))))) 311.79/291.58 filterlow(n, nil) -> nil 311.79/291.58 filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) 311.79/291.58 if1(true, n, x, xs) -> filterlow(n, xs) 311.79/291.58 if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) 311.79/291.58 filterhigh(n, nil) -> nil 311.79/291.58 filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) 311.79/291.58 if2(true, n, x, xs) -> filterhigh(n, xs) 311.79/291.58 if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) 311.79/291.58 ge(x, 0) -> true 311.79/291.58 ge(0, s(x)) -> false 311.79/291.58 ge(s(x), s(y)) -> ge(x, y) 311.79/291.58 append(nil, ys) -> ys 311.79/291.58 append(cons(x, xs), ys) -> cons(x, append(xs, ys)) 311.79/291.58 length(nil) -> 0 311.79/291.58 length(cons(x, xs)) -> s(length(xs)) 311.79/291.58 half(0) -> 0 311.79/291.58 half(s(0)) -> 0 311.79/291.58 half(s(s(x))) -> s(half(x)) 311.79/291.58 get(n, nil) -> 0 311.79/291.58 get(n, cons(x, nil)) -> x 311.79/291.58 get(0, cons(x, cons(y, xs))) -> x 311.79/291.58 get(s(n), cons(x, cons(y, xs))) -> get(n, cons(y, xs)) 311.79/291.58 311.79/291.58 S is empty. 311.79/291.58 Rewrite Strategy: FULL 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (1) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) 311.79/291.58 Transformed a relative TRS into a decreasing-loop problem. 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (2) 311.79/291.58 Obligation: 311.79/291.58 Analyzing the following TRS for decreasing loops: 311.79/291.58 311.79/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 311.79/291.58 311.79/291.58 311.79/291.58 The TRS R consists of the following rules: 311.79/291.58 311.79/291.58 qsort(xs) -> qs(half(length(xs)), xs) 311.79/291.58 qs(n, nil) -> nil 311.79/291.58 qs(n, cons(x, xs)) -> append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs))))) 311.79/291.58 filterlow(n, nil) -> nil 311.79/291.58 filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) 311.79/291.58 if1(true, n, x, xs) -> filterlow(n, xs) 311.79/291.58 if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) 311.79/291.58 filterhigh(n, nil) -> nil 311.79/291.58 filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) 311.79/291.58 if2(true, n, x, xs) -> filterhigh(n, xs) 311.79/291.58 if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) 311.79/291.58 ge(x, 0) -> true 311.79/291.58 ge(0, s(x)) -> false 311.79/291.58 ge(s(x), s(y)) -> ge(x, y) 311.79/291.58 append(nil, ys) -> ys 311.79/291.58 append(cons(x, xs), ys) -> cons(x, append(xs, ys)) 311.79/291.58 length(nil) -> 0 311.79/291.58 length(cons(x, xs)) -> s(length(xs)) 311.79/291.58 half(0) -> 0 311.79/291.58 half(s(0)) -> 0 311.79/291.58 half(s(s(x))) -> s(half(x)) 311.79/291.58 get(n, nil) -> 0 311.79/291.58 get(n, cons(x, nil)) -> x 311.79/291.58 get(0, cons(x, cons(y, xs))) -> x 311.79/291.58 get(s(n), cons(x, cons(y, xs))) -> get(n, cons(y, xs)) 311.79/291.58 311.79/291.58 S is empty. 311.79/291.58 Rewrite Strategy: FULL 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (3) DecreasingLoopProof (LOWER BOUND(ID)) 311.79/291.58 The following loop(s) give(s) rise to the lower bound Omega(n^1): 311.79/291.58 311.79/291.58 The rewrite sequence 311.79/291.58 311.79/291.58 append(cons(x, xs), ys) ->^+ cons(x, append(xs, ys)) 311.79/291.58 311.79/291.58 gives rise to a decreasing loop by considering the right hand sides subterm at position [1]. 311.79/291.58 311.79/291.58 The pumping substitution is [xs / cons(x, xs)]. 311.79/291.58 311.79/291.58 The result substitution is [ ]. 311.79/291.58 311.79/291.58 311.79/291.58 311.79/291.58 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (4) 311.79/291.58 Complex Obligation (BEST) 311.79/291.58 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (5) 311.79/291.58 Obligation: 311.79/291.58 Proved the lower bound n^1 for the following obligation: 311.79/291.58 311.79/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 311.79/291.58 311.79/291.58 311.79/291.58 The TRS R consists of the following rules: 311.79/291.58 311.79/291.58 qsort(xs) -> qs(half(length(xs)), xs) 311.79/291.58 qs(n, nil) -> nil 311.79/291.58 qs(n, cons(x, xs)) -> append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs))))) 311.79/291.58 filterlow(n, nil) -> nil 311.79/291.58 filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) 311.79/291.58 if1(true, n, x, xs) -> filterlow(n, xs) 311.79/291.58 if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) 311.79/291.58 filterhigh(n, nil) -> nil 311.79/291.58 filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) 311.79/291.58 if2(true, n, x, xs) -> filterhigh(n, xs) 311.79/291.58 if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) 311.79/291.58 ge(x, 0) -> true 311.79/291.58 ge(0, s(x)) -> false 311.79/291.58 ge(s(x), s(y)) -> ge(x, y) 311.79/291.58 append(nil, ys) -> ys 311.79/291.58 append(cons(x, xs), ys) -> cons(x, append(xs, ys)) 311.79/291.58 length(nil) -> 0 311.79/291.58 length(cons(x, xs)) -> s(length(xs)) 311.79/291.58 half(0) -> 0 311.79/291.58 half(s(0)) -> 0 311.79/291.58 half(s(s(x))) -> s(half(x)) 311.79/291.58 get(n, nil) -> 0 311.79/291.58 get(n, cons(x, nil)) -> x 311.79/291.58 get(0, cons(x, cons(y, xs))) -> x 311.79/291.58 get(s(n), cons(x, cons(y, xs))) -> get(n, cons(y, xs)) 311.79/291.58 311.79/291.58 S is empty. 311.79/291.58 Rewrite Strategy: FULL 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (6) LowerBoundPropagationProof (FINISHED) 311.79/291.58 Propagated lower bound. 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (7) 311.79/291.58 BOUNDS(n^1, INF) 311.79/291.58 311.79/291.58 ---------------------------------------- 311.79/291.58 311.79/291.58 (8) 311.79/291.58 Obligation: 311.79/291.58 Analyzing the following TRS for decreasing loops: 311.79/291.58 311.79/291.58 The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). 311.79/291.58 311.79/291.58 311.79/291.58 The TRS R consists of the following rules: 311.79/291.58 311.79/291.58 qsort(xs) -> qs(half(length(xs)), xs) 311.79/291.58 qs(n, nil) -> nil 311.79/291.58 qs(n, cons(x, xs)) -> append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs))))) 311.79/291.58 filterlow(n, nil) -> nil 311.79/291.58 filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) 311.79/291.58 if1(true, n, x, xs) -> filterlow(n, xs) 311.79/291.58 if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) 311.79/291.58 filterhigh(n, nil) -> nil 311.79/291.58 filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) 311.79/291.58 if2(true, n, x, xs) -> filterhigh(n, xs) 311.79/291.58 if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) 311.79/291.58 ge(x, 0) -> true 311.79/291.58 ge(0, s(x)) -> false 311.79/291.58 ge(s(x), s(y)) -> ge(x, y) 311.79/291.58 append(nil, ys) -> ys 311.79/291.58 append(cons(x, xs), ys) -> cons(x, append(xs, ys)) 311.79/291.58 length(nil) -> 0 311.79/291.58 length(cons(x, xs)) -> s(length(xs)) 311.79/291.58 half(0) -> 0 311.79/291.58 half(s(0)) -> 0 311.79/291.58 half(s(s(x))) -> s(half(x)) 311.79/291.58 get(n, nil) -> 0 311.79/291.58 get(n, cons(x, nil)) -> x 311.79/291.58 get(0, cons(x, cons(y, xs))) -> x 311.79/291.58 get(s(n), cons(x, cons(y, xs))) -> get(n, cons(y, xs)) 311.79/291.58 311.79/291.58 S is empty. 311.79/291.58 Rewrite Strategy: FULL 311.79/291.62 EOF