Exercise2-8 <---> Exercise2-10

Exercise 2.9.

The width of an interval is half of the difference between its upper and lower bounds. The width is a measure of the uncertainty of the number specified by the interval. For some arithmetic operations the width of the result of combining two intervals is a function only of the widths of the argument intervals, whereas for others the width of the combination is not a function of the widths of the argument intervals. Show that the width of the sum (or difference) of two intervals is a function only of the widths of the intervals being added (or subtracted). Give examples to show that this is not true for multiplication or division.


Ru: Радиус (width) интервала определяется как половина расстояния между его верхней и нижней границами. Радиус является мерой неопределенности числа, которое обозначает интервал. Есть такие математические операции, для которых радиус результата зависит только от радиусов интервалов аргументов, а есть такие, для которых радиус результата не является функцией радиусов аргументов. Покажите, что радиус суммы (или разности) двух интервалов зависит только от радиусов интервалов, которые складываются (или вычитаются). Приведите примеры, которые показывают, что для умножения или деления это не так.


Solution:

Let's try to transform width of interval which is sum of two other intervals for displaying the fact that width of result-interval is sum of operand-intervals:

 (define (width interval)
   (/ (- (upper-bound interval) 
         (lower-bound interval)) 
      2))

  (width(add-interval x y))
= (width (make-interval (+ (lower-bound x) (lower-bound y))
                         (+ (upper-bound x) (upper-bound y))))
= (/ (- (+ (upper-bound x) (upper-bound y))
        (+ (lower-bound x) (lower-bound y)))
     2)
= (+ (/ (- (upper-bound x) (lower-bound x)) 2)
     (/ (- (upper-bound y) (lower-bound y)) 2))
= (+ (width x) (width y))

In much the same manner we can illustrate the same about subtracting intervals.

Width of interval which is result of multiplication is not function of widths of arguments, this can be simply illustrated by the following example:

> (mul-interval (make-interval 1 3) (make-interval 1 3))
(1 . 9)
> (mul-interval (make-interval 0 2) (make-interval 1 3))
(0 . 6)

Here widths of arguments is the same (1 and 2 for first and second arguments) but width of result differs (4 in the first case, 3 - in the second).

It is true for dividing intervals also and can be shown in similar way.

Exercise2-8 <---> Exercise2-10


Comments


:) :)) :( ;) :\ |) X-( B) Markup

Exercise2-9 (last edited 2008-05-11 11:36:08 by localhost)