1. Field of the Invention
The present invention relates to performing arithmetic operations on interval operands within a computer system. More specifically, the present invention relates to a method and an apparatus for using a computer system to find the roots of a polynomial equation with interval coefficients.
2. Related Art
Rapid advances in computing technology make it possible to perform trillions of computational operations each second. This tremendous computational speed makes it practical to perform computationally intensive tasks as diverse as predicting the weather and optimizing the design of an aircraft engine. Such computational tasks are typically performed using machine-representable floating-point numbers to approximate values of real numbers. (For example, see the Institute of Electrical and Electronics Engineers (IEEE) standard 754 for binary floating-point numbers.)
In spite of their limitations, floating-point numbers are generally used to perform most computational tasks.
One limitation is that machine-representable floating-point numbers have a fixed-size word length, which limits their accuracy. Note that a floating-point number is typically encoded using a 32, 64 or 128-bit binary number, which means that there are only 232, 264 or 2128 possible symbols that can be used to specify a floating-point number. Hence, most real number values can only be approximated with a corresponding floating-point number. This creates estimation errors that can be magnified through even a few computations, thereby adversely affecting the accuracy of a computation.
A related limitation is that floating-point numbers contain no information about their accuracy. Most measured data values include some amount of error that arises from the measurement process itself. This error can often be quantified as an accuracy parameter, which can subsequently be used to determine the accuracy of a computation. However, floating-point numbers are not designed to keep track of accuracy information, whether from input data measurement errors or machine rounding errors. Hence, it is not possible to determine the accuracy of a computation by merely examining the floating-point number that results from the computation.
Interval arithmetic has been developed to solve the above-described problems. Interval arithmetic represents numbers as intervals specified by a first (left) endpoint and a second (right) endpoint. For example, the interval [a, b], where a<b, is a closed, bounded subset of the real numbers, R, which includes a and b as well as all real numbers between a and b. Arithmetic operations on interval operands (interval arithmetic) are defined so that interval results always contain the entire set of possible values. The result is a mathematical system for rigorously bounding numerical errors from all sources, including measurement data errors, machine rounding errors and their interactions.
Note that the first endpoint normally contains the “infimum”, which is the largest number that is less than or equal to each of a given set of real numbers. Similarly, the second endpoint normally contains the “supremum”, which is the smallest number that is greater than or equal to each of the given set of real numbers. Also note that within the following disclosure, the infimum of an interval A can be represented as either AL or A. Similarly, the supremum can be represented as either AU or Ā.
When solving systems of nonlinear equations and optimization problems, we frequently want to compute the real roots of a polynomial equation in which the coefficients are intervals. These roots may be finite intervals, semi-infinite intervals, or the entire real line. A naïve procedure for determining the roots can be surprisingly complicated. Consider the quadratic equation Ax2+Bx+C=0 where A=[AL, AU], B=[BL, BU] and C=[CL, CU] are intervals. The interval roots of this quadratic equation are the set of real roots x of the quadratic equation ax2+bx+c=0 for all a∈A, b∈B and c∈C.
When the coefficients are degenerate intervals, we can express the roots as:
If we compute interval roots in this way, they are not sharp except in special cases. This is because the intervals A and B occur more than once in this expression and dependence causes loss of sharpness. It does not help to write the roots in the algebraically equivalent form
What is needed is a method and an apparatus for computing the roots quadratic and polynomial equations with interval coefficients but without the problem of losing sharpness due to dependence.
One embodiment of the present invention provides a system for finding the roots of a quadratic equation with interval coefficients. The system operates by receiving a representation of the quadratic equation of the form F(x)=Ax2+Bx+C=0, wherein A=[AL, AU], B=[BL, BU] and C=[CL, CU] are interval coefficients. Next, the system computes intervals containing roots of the functions F1(x), F2(x), F3(x) and F4(x), wherein F1(x)=ALx2+BLx+CL, F2(x)=AUx2+BUx+CU, F3(x)=ALx2+BUx+CL and F4(x)=AUx2+BLx+CU. The system then places the computed intervals into a list, L, and orders the computed intervals in L by their left endpoints, so that for a each entry, Si=[SiL, SiU], SiL≦Si+1,L. Next, the system establishes interval roots for F(x) from the interval entries in list L.
In one embodiment of the present invention, establishing interval roots from the list L involves: establishing one interval root, [S1,L, S2U], if L contains two entries, S1 and S2; establishing two interval roots, [S1,L, S2U], and [S3L, S4U], if L contains four entries, S1, S2, S3 and S4; and establishing three interval roots, [−∞, S2U], [S3L, S4U] and [S5L, +∞], if L contains six entries, S1, S2, S3, S4, S5 and S6.
In one embodiment of the present invention, placing the computed intervals into the list, L, generally involves entering a double root twice, unless CL=0, in which case the root of F1(x) and F3(x) at x=0 is entered only once, and unless CU=0, in which case the root of F2(x) and F4(x) at x=0 is entered only once.
In one embodiment of the present invention, if AL<0, or if AL=0 and BU>0, or if AL=0 and BU=0 and CL≦0, the system places −∞ into the list L. Furthermore, if AL<0, or if AL=0 and BL>0, or if AL=0 and BL=0 and CL≦0, the system places +∞ into the list L.
In one embodiment of the present invention, the system determines if a first special case holds in which, A≧0, B≦0, C≧0 and B2−4AC≧0. If so, the system computes the interval roots as (−B+(B2−4AC)1/2)/2A and 2C/(−B+(B2−4AC)1/2).
In one embodiment of the present invention, the system determines if a second special case holds in which, A≧0, B≧0, C≧0 and B2−4AC≧0. If so, the system computes the interval roots as (−B−(B2−4AC)1/2)/2A and 2C/(B(B24AC)1/2.
One embodiment of the present invention provides a system for finding the roots of a polynomial equation with interval coefficients. The system operates by receiving a representation of the polynomial equation of the form F(x)=Σk=0 to n (Akxk), wherein each Ak=[AkL, AkU] is an interval coefficient. Next, the system computes intervals containing roots of the functions F1(x), F2(x), F3(x) and F4(x), wherein
F1(x)=Σk=0 to n (AkLxk),
F2(x)=Σk=0 to n (AkUxk),
F3(x)=Σk=0 to [n/2] (A2kLx2k)+Σk=0 to [(n−1)/2] (A(2k+1)Ux2k+1), and
F4(x)−Σk=0 to [n/2] (A2kUx2k)+Σk=0 to [(n−1)/2] (A(2k+1)Lx2k+1).
The system then places the computed intervals into a list, L, and then orders the computed intervals in L by the left endpoints so that for a each entry, Si=[SiL, SiU], SiL≦Si+1,L. Next, the system establishes interval roots for F(x) from the interval entries in list L.
The following description is presented to enable any person skilled in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The data structures and code described in this detailed description are typically stored on a computer readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. This includes, but is not limited to, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs) and DVDs (digital versatile discs or digital video discs), and computer instruction signals embodied in a transmission medium (with or without a carrier wave upon which the signals are modulated). For example, the transmission medium may include a communications network, such as the Internet.
Computer System
Processor 102 can include any type of processor, including, but not limited to, a microprocessor, a mainframe computer, a digital signal processor, a personal organizer, a device controller and a computational engine within an appliance. Processor 102 includes an arithmetic unit 104, which is capable of performing computational operations using floating-point numbers.
Processor 102 communicates with storage device 108 through bridge 106 and peripheral bus 110. Storage device 108 can include any type of non-volatile storage device that can be coupled to a computer system. This includes, but is not limited to, magnetic, optical, and magneto-optical storage devices, as well as storage devices based on flash memory and/or battery-backed up memory.
Processor 102 communicates with memory 112 through bridge 106. Memory 112 can include any type of memory that can store code and data for execution by processor 102. As illustrated in
Note that although the present invention is described in the context of computer system 100 illustrated in
Compiling and Using Interval Code
Processor 102 also retrieves interval values 115 from memory 112 and passes these interval values 115 through arithmetic unit 104 to produce results 212. Results 212 can also include interval values.
Note that the term “compilation” as used in this specification is to be construed broadly to include pre-compilation and just-in-time compilation, as well as use of an interpreter that interprets instructions at run-time. Hence, the term “compiler” as used in the specification and the claims refers to pre-compilers, just-in-time compilers and interpreters.
Arithmetic Unit for Intervals
In the embodiment illustrated in
Note that arithmetic unit 104 includes circuitry for performing the interval operations that are outlined in FIG. 5. This circuitry enables the interval operations to be performed efficiently.
However, note that the present invention can also be applied to computing devices that do not include special-purpose hardware for performing interval operations. In such computing devices, compiler 204 converts interval operations into a executable code that can be executed using standard computational hardware that is not specially designed for interval operations.
Interval Operations
The interval X is a closed subset of the extended (including −∞ and +∞) real numbers R* (see line 1 of FIG. 5). Similarly the interval Y also has two endpoints and is a closed subset of the extended real numbers R* (see line 2 of FIG. 5).
Note that an interval is a point or degenerate interval if X=[x, x]. Also note that the left endpoint of an interior interval is always less than or equal to the right endpoint. The set of extended real numbers, R* is the set of real numbers, R, extended with the two ideal points negative infinity and positive infinity:
R*=R∪{−∞}∪{+∞}.
In the equations that appear in
The addition operation X+Y adds the left endpoint of X to the left endpoint of Y and rounds down to the nearest floating-point number to produce a resulting left endpoint, and adds the right endpoint of X to the right endpoint of Y and rounds up to the nearest floating-point number to produce a resulting right endpoint.
Similarly, the subtraction operation X−Y subtracts the right endpoint of Y from the left endpoint of X and rounds down to produce a resulting left endpoint, and subtracts the left endpoint of Y from the right endpoint of X and rounds up to produce a resulting right endpoint.
The multiplication operation selects the minimum value of four different terms (rounded down) to produce the resulting left endpoint. These terms are: the left endpoint of X multiplied by the left endpoint of Y; the left endpoint of X multiplied by the right endpoint of Y; the right endpoint of X multiplied by the left endpoint of Y; and the right endpoint of X multiplied by the right endpoint of Y. This multiplication operation additionally selects the maximum of the same four terms (rounded up) to produce the resulting right endpoint.
Similarly, the division operation selects the minimum of four different terms (rounded down) to produce the resulting left endpoint. These terms are: the left endpoint of X divided by the left endpoint of Y; the left endpoint of X divided by the right endpoint of Y; the right endpoint of X divided by the left endpoint of Y; and the right endpoint of X divided by the right endpoint of Y. This division operation additionally selects the maximum of the same four terms (rounded up) to produce the resulting right endpoint. For the special case where the interval Y includes zero, X/Y is an exterior interval that is nevertheless contained in the interval R*.
Note that the result of any of these interval operations is the empty interval if either of the intervals, X or Y, are the empty interval. Also note, that in one embodiment of the present invention, extended interval operations never cause undefined outcomes, which are referred to as “exceptions” in the IEEE 754 standard.
Computing Interval Roots for a Quadratic Function
Next, the system determines if a first special case holds in which, A≧0, B≦0, C≧0 and B2−4AC≧0. If so, the system computes the interval roots directly as (−B+(B2−4AC)1/2)/2A and 2C/(−B+(B2−4AC)1/2) (step 602).
Next, the system determines if a second special case holds in which, A≧0, B≧0, C≧0 and B2−4AC≧0. If so, the system computes to interval roots directly as (−B−(B2−4AC)1/2)/2A and 2C/(−B−(B2−4AC)1/2) (step 603).
If neither the first special case nor the second special case holds, the system computes intervals containing roots of the following four equations (step 604):
F1(x)=ALx2+BLx+CL;
F2(x)=AUx2+BUx+CU;
F3(x)=ALx2+BUx+CL; and
F4(x)=AUx2+BLx+CU.
Note that Ax2=[ALx2, AUx2]. Furthermore, note that Bx=[BLx, BUx] if x≧0, and Bx=[BUx, BLx] if x≦0. Hence, we can rewrite F(x) as [F1(x), F2(x)]=0 when x≧0, and [F3(x), F4(x)]=0 when x≦0.
Next, the system places the computed intervals into a list L (step 606). In doing so, the system enters a double root twice, unless CL=0, in which case the root of F1(x) and F3(x) at x=0 is entered only once, and unless CU=0, in which case the root of F2(x) and F4(x) at x=0 is entered only once. Furthermore, if AL<0, or if AL=0, and BU>0, or if AL=0 and BU=0 and CL≦0, the system places −∞ into L. Similarly, if AL<0, or if AL=0 and BL>0, or if AL=0 and BL=0 and CL≦0, the system places +∞ into L.
The system then orders the computed intervals in L by the left endpoints so that for a each entry, Si=[SiL, SiU], SiL≦Si+1,L (step 608).
Next, the system establishes interval roots for F(x) from the interval entries in L. If L contains two entries, S1 and S2, the system establishes one interval root, [S1,L, S2U] (step 610). If L contains four entries, S1, S2, S3 and S4, the system establishes two interval roots, [S1,L, S2U], and [S3L, S4U] (step 612). Finally, if L contains six entries, S1, S2, S3, S4, S5 and S6, the system establishes three interval roots, [−∞, S2U], [S3L, S4U] and [S5L, +∞] (step 614).
Example Functions
Note that the function F(x) illustrated in
Extension to Higher Order Polynomials
Note that the methodology described above can be applied to compute the real interval roots of a polynomial with interval coefficients of any degree.
Denote an interval polynomial by F(x)=Σk=0 to n (Akxk). The functions F1(x), F2(x), F3(x) and F4(x) now become:
F1(x)=Σk=0 to n (AkLxk);
F2(x)=Σk=0 to n (AkUxk);
F3(x)=Σk=0 to [n/2] (A2kLx2k)+Σk=0 to [(n−1)/2] (A(2k+1)Ux2k+1); and
F4(x)=Σk=0 to [n/2] (A2kUx2k)+Σk=0 to [(n−1)/2] (A(2k+1)Lx2k+1);
where [n/2] is the integer part of n/2, and [(n−1)/2] is the integer part of [(n−1)/2].
As in the quadratic case, we put the non-negative roots of F1(x) and F2(x) and the non-positive roots of F3(x) and F4(x) into a list L. Depending upon whether the degree of F1(x) is even or odd and depending on the sign of its leading coefficient, we can determine its behavior for large values of |x|. Therefore (as before), we can determine whether a root in the list L is a lower bound or an upper bound on an interval root. As in the quadratic case, this is simplified by assuming that AnU>0.
The foregoing descriptions of embodiments of the present invention have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the present invention to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the present invention. The scope of the present invention is defined by the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
5008672 | Leedy | Apr 1991 | A |
5014230 | Sinha et al. | May 1991 | A |
6327581 | Platt | Dec 2001 | B1 |
6560623 | Smith | May 2003 | B1 |
6563566 | Rosenbluth et al. | Aug 2003 | B2 |
Number | Date | Country | |
---|---|---|---|
20030055857 A1 | Mar 2003 | US |