## Interval Computations, Test 2 for the course CS 5391/CS 6391, Fall 2015

Name: ___________________________________________________________

1-2. Use both linearization algorithms that we studied in class (Algorithm 1 that uses partial derivatives and Algorithm 2 which does not) to estimate the range of the function f(x) = 2x + 2x2 on the interval [0, 0.2]. Compare the two estimates with the exact range -- which you should compute by using calculus.

3. If use the simplest "and"- and "or"-operations min and max, and our degrees of belief in A, B, and C are, correspondingly, 0.5, 0.6, and 0.7, what is our degree of belief in (A \/ B) & C?

4. For a membership function μ(x) = 1 − |1 − x|, what are the α-cuts corresponding to α = 0.6? to α = 0.7?

5-6. Let us assume that the quantity x is described by the membership function μ(x) = 1 − |x|, and the quantity y is described by the membership function μ(y) = 1 − |1 − y|. Use the values α = 0.2, 0.4, 0.6, 0.8, and 1.0 to form membership functions for z = x − y and t = x * y.

7. Follow the first three steps of bisection to locate the square root of 5, i.e., the solution to the equation x2 − 5 = 0 on the interval [0, 4].

8. Write down a Java method that, given a function f, values x1, ..., xn, and a number h, computes the array of values
ci = (f(x1, ..., xi − 1, xi + h, xi + 1, ..., xn) + f(x1, ..., xi − 1, xi − h, xi + 1, ..., xn) −
2f(x1, ..., xi − 1, xi, xi + 1, ..., xn))/h2.
corresponding to i = 1, ..., n.

9. Suppose that we have three alternatives, for which the gains are in the intervals [0, 5], [−4, −1], and [−3, 10]. Is there an alternative which is guaranteed to be optimal (i.e., for which the gain is the largest)?
• list all alternatives which can be optimal;
• which alternative(s) should we select if we use Hurwicz optimism-pessimism criterion with α = 0, 0.5, and 1.

10. Write down:
• an expression for which an optimizing compiler improves the estimates provided by straightforward interval computations, and
• an expression for which an optimizing compiler worsens the estimates provided by straightforward interval computations.
These expressions should be different from the examples that I gave; minor difference is OK.

11. If we use 2-digit decimal numbers, what will be the result of multiplying the intervals [0.30, 0.65] and [0.77, 1.30]?