2006 ÒÐÓÄÛ ÂÑÅÐÎÑÑÈÉÑÊÎÃÎ ÑÎÂÅÙÀÍÈß ÏÎ ÈÍÒÅÐÂÀËÜÍÎÉ ÌÀÒÅÌÀÒÈÊÅ ÓÄÊ 519.6 Ã. Ã. Ìåíüøèêîâ ÄÀËÜÍÅÉØÈÅ ÈÍÒÅÐÂÀËÜÍÛÅ ÌÎÄÈÔÈÊÀÖÈÈ ÁÂÏ-ÏÐÈÌÅÐÀ Êëþ÷åâûå ñëîâà: ëîêàëèçóþùèå âû÷èñëåíèÿ, èíòåðâàëüíûå âû÷èñëåíèÿ, ëîêàëèçàòîð, èíòåðâàë, îòðåçîê, ìîíîòîííîñòü ïî âêëþ÷åíèþ, Áàáóøêà, Âèòàñåê, Ïðàãåð. Keywords: localizing computing, interval computing, localizator, interval, segment, inclusion monotonicity, Babuska, Vitasek, Prager. Àííîòàöèÿ. Êàê èçâåñòíî, ïðèìåðîì Áàáóøêè-Âèòàñåêà-Ïðàãåðà çàäà¼òñÿ íåóñòîé÷èâûé âû÷èñëèòåëüíûé ïðîöåññ òî÷å÷íîãî òèïà. Íàéäåíî, ÷òî íåóñòîé÷èâîñòü ìîæåò ñîõðàíèòüñÿ ïðè ïåðåõîäå ê èíòåðâàëüíîé ìàíåðå âû÷èñëåíèé. Îäíàêî àâòîðîì ïîêàçàíî, ÷òî â èíòåðâàëüíî-ëîêàëèçóþùåì âàðèàíòå âîçìîæíî ñòàáèëèçèðóþùåå óñîâåðøåíñòâîâàíèå ïðèìåðà çà ñ÷åò ïðèìåíåíèÿ ïåðåñå÷åíèé ëîêàëèçàòîðîâ.  ðàáîòå îïèñûâàåòñÿ åù¼ îäíî óñîâåðøåíñòâîâàíèå ïðèìåðà.  èçâåñòíîé êíèãå [1] ðàññìîòðåí ïðèìåð íàõîæäåíèÿ ÷èñåë Z 1 1 n x x e dx, n = 0, 1, . . . . (1) In = e 0 −1 ßñíî, ÷òî I0 = 1 − e . Âûðàçèì In ÷åðåç In−1 . Èíòåãðèðóÿ ïî ÷àñòÿì, ïîëó÷àåì ðåêóððåíòíîå ðàâåíñòâî In = 1 − nIn−1 . (2) Åñëè ïðîâîäèòü âû÷èñëåíèå I1 , I2 , . . . ïî ôîðìóëå (2) íà ðåàëüíîì êîìïüþòåðå, ò. å. ñ ó÷åòîì îêðóãëåíèé, òî óæå ïðè n ïîðÿäêà 15-30 ïîÿâëÿþòñÿ çàâåäîìî íåïðàâäîïîäîáíûå (îòðèöàòåëüíûå) çíà÷åíèÿ In (ñì. ñòîëáöû 4, 6 òàáë. 1). Ìîæíî ïîêàçàòü [2], ÷òî âûçûâàåòñÿ ýòà íåïðèÿòíîñòü âû÷èòàíèåì áëèçêèõ çíà÷åíèé. Ñ äðóãîé ñòîðîíû, ÿñíî, ÷òî èòåðàöèîíûé ïðîöåññ (2) íåóñòîé÷èâ. 1. Ââåäåíèå. Òàáëèöà 1. Ðåçóëüòàòû îñíîâíîé ðàçíîâèäíîñòè ïðèìåðà ÁÂÏ n In 0 1 2 3 4 5 6 .632 .367 .207 .170 .145 .126 .112 1205 8795 2786 8932 534 7958 4296 n In n In 7 8 9 10 11 12 13 .112 4296 .100 563 9.493 256 E-02 5.067 444 .442 5812 -4.310 974 57.042 16 E-05 14 15 16 17 18 19 20 -597. 5973 119 6496 -194 38.3 325 4453 -485 8015 E+07 1.113 023 E+09 -2.226 046 E+10 Èç ïåðâîãî è òðåòüåãî ñòîëáöîâ òàáë. 1 â [4] âèäíî, ÷òî ïåðåõîä ê óäëèíåííîé ìàíòèññå íå ñïàñàåò îò êàòàñòðîôû. Îíà ëèøü ñëåãêà îòêëàäûâàåòñÿ. 2. Èíòåðâàëüíî-ëîêàëèçóþùåå èñïîëíåíèå ïðèìåðà ÁÂÏ. Ïîâòîðèì òîò æå ïðèìåð, íà ýòîò ðàç â èíòåðâàëüíî-ëîêàëèçóþùåé ìàíåðå. Ñëåäóÿ âòîðîé òåîðåìå î êîìïîçèöèÿõ [2], çàïèøåì ïðàâóþ ÷àñòü ðåêóððåíòíîãî ñîîòíîøåíèÿ â îòðåçêàõ-ëîêàëèçàòîðàõ. Ïîëó÷èì âêëþ÷åíèå In ∈ 1 − n [In−1 ] (n = 0, 1, . . .). (3)  íåì ïîä [In−1 ] èìååòñÿ â âèäó íàõîäèìûé ìàøèíîé èíòåðâàë-ëîêàëèçàòîð äëÿ In−1 . Òàê êàê ïðàâàÿ ÷àñòü ïî óïîìÿíóòîé âòîðîé òåîðåìå ÿâëÿåòñÿ ëîêàëèçàòîðîì äëÿ In , òî ìîæíî åå òàê è îáîçíà÷èòü: [In ]. Òîãäà, ïðèíèìàÿ âî âíèìàíèå ìàæîðèçàöèþ (ò. å. âñïîìîãàòåëüíîå ðàñøèðåíèå ëîêàëèçàòîðà ïðè âûïîëíåíèè ñòàíäàðòíûõ îïåðàöèé, ñâÿçàííûõ ñ ïîÿâëåíèåì ïîãðåøíîñòåé), çàïèøåì äàëüíåéøóþ ðàçíîâèäíîñòü ñîîòíîøåíèÿ (2): [In ] = 1 − n [In−1 ] (n = 0, 1, . . .). (4) c Ã.Ã. Ìåíüøèêîâ, 2005 Ñàíêò-Ïåòåðáóðãñêèé Ãîñ. Óíèâåðñèòåò, ôàêóëüòåò ÏÌ-ÏÓ. GregoryG.Menshikov@pobox.spbu.ru 1 [4]. Ñîîòâåòñòâóþùàÿ ïðîãðàììà íà ÿçûêå èíòåðâàëüíîãî àññåìáëåðà [2] îôîðìëåíà â [3], òàáë. 212.1. Ðåçóëüòàòû æå íåñêîëüêèõ øàãîâ èíòåðâàëüíîãî ðàñ÷åòà ïðèâåäåíû â ñòîëáöàõ 2-3 òàáëèöû 1 â Íåóñòîé÷èâîñòü ïðîöåññà (2) ïåðåíîñèòñÿ, åñòåñòâåííî, íà ïðîöåññ (4). Èìåííî, ïðè âîçðàñòàíèè n øèðèíà ëîêàëèçàòîðà ðàñòåò, ïðè÷åì ñ óñêîðåíèåì. Íàêîíåö, óæå ïðè n = 9 ìîæíî êîíñòàòèðîâàòü, ÷òî äàëüíåéøèé ðàñ÷åò áåñïðåäìåòåí èç-çà ðåçêîãî ïàäåíèÿ òî÷íîñòè. Èòàê, èíòåðâàëüíî-ëîêàëèçóþùèé ðàñ÷åò ïîçâîëÿåò âñå âðåìÿ êîíòðîëèðîâàòü òî÷íîñòü (÷åãî íåò ïðè îáû÷íûõ, òî÷å÷íûõ âû÷èñëåíèÿõ), ïîñêîëüêó îí îáëàäàåò ñâîéñòâîì äîêàçàòåëüíîñòè. Íî åìó ìîæåò áûòü ñâîéñòâåííà íåíîðìàëüíî áîëüøàÿ øèðèíà ëîêàëèçàòîðà, à çíà÷èò, íèçêèé èíòåðâàëüíûé êðèòåðèé êà÷åñòâà. Îòìåòèì, ÷òî ñ ïîçèöèé óñòîé÷èâîñòè ÷èñëåííûõ ðàñ÷¼òîâ èíà÷å íå ìîãëî è áûòü. 3. Ëîêàëèçóþùåå óñîâåðøåíñòâîâàíèå ïðèìåðà ÁÂÏ. Íàêîíåö, â [4] ñäåëàí ðåøèòåëüíûé ïðîðûâ èñïîëüçîâàíû òå ïðåèìóùåñòâà, êàêèå äà¼ò ïåðåñå÷åíèå ðàçíûõ ëîêàëèçàòîðîâ îäíîãî è òîãî æå ÷èñëà èëè ìíîæåñòâà. Ïîïóòíî ðàññìîòðåíî, êàê ìîæåò óòî÷íèòü ðàñ÷åòû ëîêàëèçàöèÿ, ïîëó÷åííàÿ àíàëèòè÷åñêè. Òðàäèöèîííûå âû÷èñëåíèÿ ýòîé âîçìîæíîñòè íå èìåþò. Ñ îäíîé ñòîðîíû, ïî èíòåðâàëüíîìó àíàëîãó (4) ðåêóððåíòíîé ôîðìóëû (2) òîëüêî ÷òî âû÷èñëÿëècü ëîêàëèçàòîðû è ïîäòâåðæäåíà âû÷èñëèòåëüíàÿ íåóñòîé÷èâîñòü äàííîãî ïðîöåññà. Ñ äðóãîé ñòîðîíû, òåîðåòè÷åñêèì ïóòåì â [2] äîêàçàíà îãðàíè÷åííîñòü {In} ïîëó÷åíî íåðàâåíñòâî 1/(n + 1) < In < 1/n. Ñîîòâåòñòâóþùèé îòðåçîê íå ÷òî èíîå êàê åùå îäíà ñèñòåìà ëîêàëèçàòîðîâ: [In ]0 = [1/(n + 2), 1/(n + 1)] 3 In . Ñ èõ ïîìîùüþ ìîæíî "óíÿòü"êàòàñòðîôè÷åñêèé ðîñò øèðèíû.  ñàìîì äåëå, ïåðåñå÷åíèå èíòåðâàëüíûõ ëîêàëèçàòîðîâ åñòü èíòåðâàëüíûé ëîêàëèçàòîð: In ∈ (1 − n [In−1 ]) ∩ [In ]0 . Ïîëîæèì [I0 ]∗ = [I0 ], ∗ ∗ [In ] = 1 − n [In−1 ] ∩ [In ]0 (n = 1, 2, ...). Êàê âèäíî (â èäåàëüíîé ìîäåëè èíòåðâàëüíûõ âû÷èñëåíèé [3]), 1 1 1 ∗ , = . w [In ] ≤ w n+2 n+1 (n + 1)(n + 2) Îòñþäà ñëåäóåò, ÷òî w (In ) → 0. Òàáëèöà 2. Ïåðâàÿ ìîäèôèêàöèÿ ïðèìåðà ÁÂÏ 1000 1200 1210 1220 1230 1240 1250 1260 1270 1275 1280 1290 1300 1310 D=0 A=1: A=0: A=1: PRINT A=0: A=1: D=D+1 A=D: A=1: A=1: QB-ñòðîêè CLS G2 G 86 G 16 G9 G 80 ∗ ”n = ”; D, ” [In ] = ”; G 50.1 G 40 G 82 G 80 G 40 1 1 : L(0) = :G7 D+2 D+1 1320 K(0) = 1380 A=1: 1390 G 34 GOTO 1260 2 Êîììåíòàðèè Î÷èñòêà ýêðàíà Èíèöèàëèçàöèÿ Çàíóëåíèå n 1⇒ ïàðà 0 e−1 ⇒ ïàðà 0 e−1 ⇒ ïàðà 0 1 − e−1 ⇒ ïàðà 0 Ïå÷àòü: n ∗ Ïå÷àòü: [In ] ∗ [In ] ⇒ïàðà 1 Óâåëè÷åíèå n íà 1 ∗ −(n + 1) [In ] ⇒ ïàðà 0 ∗ [In+1 ] = 1 − (n + 1) [In ] ⇒ ïàðà 0 ∗ 1 − (n + 1) [In ] ⇒ ïàðà 1 1 1 0 [In ] = , ⇒ ïàðà 0 n+2 n+1 ∗ ∗ 0 [In+1 ] = [In+1 ] ∩ [In+1 ] ⇒ ïàðà 0 Ïåðåõîä ê ñòðîêå 1260 (5) (6) (7) Ïîñðåäñòâîì ýòîé óñîâåðøåíñòâîâàííîé èíòåðâàëüíîé àëãîðèòìèêè ïðÿìîãî õîäà (òàáë. 1) ïðîâåäåì åù¼ îäíó ñåðèþ ÷èñëåííûõ ýêñïåðèìåíòîâ. Ñëåäóÿ ýòîé ïðîãðàììå, ïðîäåëàåì âû÷èñëåíèÿ ïðè òåõ æå n, ÷òî ðàíåå. Ðåçóëüòàòû ñîäåðæàòñÿ â 1, 4, 5 ñòîëáöàõ òàáëèöû 1 â [4]. Íà ýòîò ðàç øèðèíà íå òîëüêî íå âîçðàñòàåò, íî, áîëåå òîãî, èìååò òåíäåíöèþ ê îòíîñèòåëüíî ñêîëü óãîäíî ìàëûì çíà÷åíèÿì. Áîëåå òîãî, îòíîñèòåëüíàÿ øèðèíà òàêæå ÿâëÿåòñÿ áåñêîíå÷íî ìàëîé: ∗ ∗ w [In ] w [In ] 1 ≤ ≤ →0 (n → +∞). (8) |In | (n + 1) (n + 2) Òàêèì îáðàçîì, ðåçóëüòàòû [In ]∗ ñòàíîâÿòñÿ âñ¼ áîëåå òî÷íûìè. Èòàê, óñîâåðøåíñòâîâàíèå èíòåðâàëüíîãî ïîäõîäà ïîçâîëÿåò ýêñïåðèìåíòàëüíî èññëåäîâàòü òî÷íîñòü è óïðàâëÿòü åþ. Çàìåòèì, ÷òî ïðîãðàììà òàáë. 1 íàïèñàíà íà ÿçûêå èíòåðâàëüíîãî àññåìáëåðà, â îñíîâó êîòîðîãî ïîëîæåí QBasic [2]. Çàìåòèì, ÷òî â òàáëèöàõ 1 è 2 àááðåâèàòóðà G îáîçíà÷àåò îïåðàòîð GOSUB. 4. Åù¼ îäíà ìîäèôèêàöèÿ, îñíîâàííàÿ íà ñâîéñòâàõ ïåðåñå÷åíèÿ. Ïðåäïîëîæèì, ÷òî ïîëó÷àåìûå íà "ïðÿìîì õîäå"çíà÷åíèÿ [In ]∗ çàíîñÿòñÿ â ïàìÿòü. Èìåííî, çàäà¼ìñÿ ïåðåä ïðîöåññîì (2) íåêîòîðûì íàòóðàëüíûì ÷èñëîì n(max). Ïóñòü ñíà÷àëà n âàðüèðóåòñÿ íà ìíîæåñòâå 0 ≤ n ≤ n(max). Çàíîñèì [I0 ]∗ = [1 − e−1 ] â 5-þ ïàðó, [I1 ]∗ â 6-þ ïàðó, ... , [In(max) ]∗ â n(max) + 5-þ ïàðó. Òàáëèöà 3. Âòîðàÿ ìîäèôèêàöèÿ ïðèìåðà ÁÂÏ 1000 1200 1210 1220 1230 1240 1250 1255 1260 1270 1280 1290 1300 1310 QB-ñòðîêè CLS INPUT "n(max)="; DA; G 2 D=0 A=1: G 86 A=0: G 16 G9 A=1: G 80 A=5: G 40 ∗ PRINT ”n = ”; D, ” [In ] (.) = ”; A=0:G 50.1 D=D+1 A=D: G 82 A=1: G 80 A=1: G 40 1320 K(0)=1/(D+2): L(0)=1/(D+1): G 7 1380 1385 1390 1400 1402 1404 1406 1408 1410 1420 1430 1440 A=1: G 34 A=D+5: G 60 GOTO 1260 A=D+4: G 60 G9 A=1: G 80 A=D-1: G 83 A=G+3: G 34 PRINT "n="; D-1; "[In ]∗∗ (îá. õîä) ="; A=0: G 50.1 D=D-1 IF D>-1 THEN 1400 ELSE END 3 Êîììåíòàðèè Î÷èñòêà ýêðàíà Ââîä n(max), èíèöèàëèçàöèÿ Çàíóëåíèå n 1⇒ ïàðà 0 e−1 ⇒ ïàðà 0 e−1 ⇒ ïàðà 0 1 − e−1 ⇒ ïàðà 0 ⇒ ïàðà 5 Ïå÷àòü: n ∗ Ïå÷àòü: [In ] Óâåëè÷åíèå n íà 1 ∗ −(n + 1) [In ] ⇒ ïàðà 0 ∗ ∗ [In+1 ] = 1 − (n + 1) [In ] ⇒ ïàðà 0 ∗ [In+1 ] ⇒ ïàðà 1 1 1 [In ]0 = , ⇒ ïàðà 0 n+2 n+1 (Ïàðà 1) ∩[In ]0 ⇒ ïàðà 0 Ïàðà n+5⇒ ïàðà 0 Ïåðåõîä ê ñòðîêå 1260 Ïàðà n+4⇒ ïàðà 0 Ïåðåìåíà çíàêà â ïàðå 0 1+ïàðà 0⇒ ïàðà 0 (Ïàðà 0)/(n-1)⇒ ïàðà 0 (Ïàðà 0) ∩ (ïàðà n=3) ⇒ ïàðà 0 Ïå÷àòü íà ýêðàíå (ïðîäîëæåíèå) Çàìåíà n íà n-1 Ïåðåõîä ê 1400, åñëè n>-1, è êîíåö, åñëè èíà÷å Ïîñëå òîãî, êàê n äîñòèãíåò çíà÷åíèÿ n(max), íà÷èíàåòñÿ îáðàòíûé õîä, îïðåäåëÿåìûé ôîðìóëîé (9) ïðè n = n(max), n(max) − 1, n(max) − 2, ..., 1 1 − [In ] [In−1 ] = . (9) n Áîëåå òîãî, îáîçíà÷èì [1 − In ]∗∗ [In−1 ]∗∗ = ∩ [In−1 ]∗ . (10) n Òàêèì îáðàçîì, ïðè ïîëó÷åíèè êàæäîãî [In−1 ]∗∗ ïðîèçâîäèòñÿ ïåðåñå÷åíèå ñ ðàíåå çàïàñ¼ííûì íà ïðÿìîì õîäå [In−1 ]∗ . Ðåçóëüòàòû âòîðîé ìîäèôèêàöèè ïðèìåðå ÁÂÏ ñì. â òàáë. 4 äëÿ n(max)=15. Ïðÿìîé õîä (ïîëó÷åíèå [In ]∗ ) äåìîíñòðèðóåòñÿ ñòîëáöàìè 1 5. Îáðàòíûé õîä (ïîëó÷åíèå [In ]∗∗ ) ñòîëáöàìè 6 9. Ñòðåëêè ïîêàçûâàþò íàïðàâëåíèå èçìåíåíèÿ n. Îòìåòèì ñîâïàäåíèå ðåçóëüòàòîâ ïðè 0 ≤ n ≤ 5 â òî âðåìÿ, êàê w([In ]∗∗ 0) < w([In ]∗ 0) ïðè 6 ≤ n ≤ 13. Òàáëèöà 4. Ðåçóëüòàòû âòîðîé ìîäèôèêàöèè ïðèìåðà ÁÂÏ 1 2 3 4 5 6 7 8 9 n ↓ [In ]∗ [In ]∗ w([In ]∗ ) [In ]∗∗ [In ]∗∗ w([In ]∗∗ ) ↑ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ .632 .367 .264 .207 .170 .145 .126 .111 9.99 9.09 8.33 7.69 7.14 6.66 6.24 4.77E-07 4.01E-07 2.56E-07 8.52E-07 3.48E-05 1.75E-04 1.05E-03 4.99E-03 1.11E-02 9.09E-03 7.58E-03 6.41E-03 5.49E-03 7.76E-03 4.17E-03 .632 .367 .264 .207 .170 .145 .126 .111 9.99 9.09 8.33 7.69 7.14 6.66 .632 1208 .367 88 .264 2424 .207 281 .170 9106 .145 6215 .126 9842 .112 5001 .101 0102 9.10 9971E-02 8.39 1612E-02 7.73 8099E-02 .0717 949 6.66 6430E-02 4.77E-07 1.01E-06 2.56E-06 8.52E-06 3.48E-05 1.75E-04 7.14-04 1.39E-03 1.01E-03 7.58E-04 5.53E-04 4.58E-04 3.66E-04 2.98E-06 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ 1203 8789 2398 2724 8758 4466 2766 1111 9999E-02 0909E-02 3333E-02 2307E-02 2857E-02 6666E-02 9999E-02 .632 .367 .264 .207 .170 .145 .127 .116 .111 .1 .090 8.33 7.69 7.14 6.66 1208 88 2424 281 9106 6215 3209 1059 1111 9091 3334E-02 2309E-02 2857E-02 6668E-02 1203 8789 2398 2724 8758 4466 2706 1111 9999E-02 0909E-02 3333E-02 2307E-02 2857E-02 6666E-02 Summary Men'shikov G. G. Further interval modications of BPV-example. We show on this well-known example that the interval computations (even the proving, localizing ones) themselves does not yet guarantee a high quality of the computational work. The matter is the stability of the "outer"algorithm. The interaections may help to stabilize one. Ëèòåðàòóðà 1. Áàáóøêà È., Âèòàñåê Ý., Ïðàãåð Ì. ×èñëåííûå ïðîöåññû ðåøåíèÿ äèôôåðåíöèàëüíûõ óðàâíåíèé. Ì.; 1969. 368 c. 2. Ìåíüøèêîâ Ã.Ã. Ëîêàëèçóþùèå âû÷èñëåíèÿ: Êîíñïåêò ëåêöèé. Âûï. 1. Ââåäåíèå â èíòåðâàëüíî-ëîêàëèçóþùóþ îðãàíèçàöèþ âû÷èñëåíèé. ÑÏá.; 2003. 89 ñ. 3. Ìåíüøèêîâ Ã.Ã. Ëîêàëèçóþùèå âû÷èñëåíèÿ: Êîíñïåêò ëåêöèé. Âûï. 2. Çàäà÷è êîìïîçèöèîííîãî ðàñ÷¼òà è ïðîáëåìà ãðóáîñòè èõ èíòåðâàëüíî-ëîêàëèçóþùåãî ðåøåíèÿ. ÑÏá.; 2003. 59 ñ. 4. Men'shikov G.G. Example of Babuska, Pr ager and Vitasek in Interval Computations. //Proceedings of the International Conference on Computational Mathematics ICCMÌ-2004. Workshops/ Eds.: Yu. I. Shokin and oths. Novosibirsk: ICM& MG Publisher, 2004, pp. 285288. 4