Question

I have an algorithm that has the following cost:

C(Alg) <= t * Z

I've found on the web an exercise that state the following :

if t>=x,     I can say that     C(Alg) <= x * Z  <= t * Z

but it looks strange.. do you agree?

Was it helpful?

Solution

This is in general not true. Think about the case where $Z$ is negative, then this does not hold true:

$$\text{if} x \leq Z, \text{then} xZ \leq tZ$$
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top