Удовлетворение ограничений и программирование в

реклама
ÓÄÊ 519.68
Óäîâëåòâîðåíèå îãðàíè÷åíèé è
ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ1
Î.À. Ùåðáèíà
University of Vienna,
Vienna 1090, Austria. E-mail: oleg.shcherbina@univie.ac.at
Àííîòàöèÿ.  ñòàòüå ïðåäñòàâëåí îáçîð îñíîâíûõ íàïðàâëåíèé óäîâëåòâîðåíèÿ îãðàíè÷åíèé
(ÓÎ) è ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ. Öåëüþ çàäà÷è ÓÎ ÿâëÿåòñÿ íàõîæäåíèå çíà÷åíèé
ïåðåìåííûõ, óäîâëåòâîðÿþùèõ îïðåäåëåííûì îãðàíè÷åíèÿì.  èñêóññòâåííîì èíòåëëåêòå ïàðàäèãìà ÓÎ ïðèçíàíà â êà÷åñòâå óäîáíîãî è ýôôåêòèâíîãî ñïîñîáà ìîäåëèðîâàíèÿ è ðåøåíèÿ
ìíîãèõ ïðèêëàäíûõ êîìáèíàòîðíûõ çàäà÷. Âàæíàÿ çàäà÷à îöåíêè êîíúþíêòèâíûõ çàïðîñîâ â
òåîðèè áàç äàííûõ ìîæåò ðàññìàòðèâàòüñÿ êàê çàäà÷à ÓÎ. Êðîìå òîãî, çàäà÷è ÓÎ ïðèâëåêàþò
áîëüøîå âíèìàíèå â òåîðèè ñëîæíîñòè, òàê êàê ðàçëè÷íûå âåðñèè çàäà÷ ÓÎ íàõîäÿòñÿ â ñåðåäèíå ìíîãèõ ñòàíäàðòíûõ êëàññîâ ñëîæíîñòè, è ïîñêîëüêó ó íèõ èìååòñÿ òåíäåíöèÿ íå èìåòü
ïðîìåæóòî÷íîé ñëîæíîñòè, òî åñòü îíè áûâàþò ëèáî ëåãêî ðàçðåøèìûìè, ëèáî ïîëíûìè äëÿ
ñòàíäàðòíûõ êëàññîâ ñëîæíîñòè. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ ÿâëÿåòñÿ ïàðàäèãìîé ïðîãðàììèðîâàíèÿ äëÿ äåêëàðàòèâíîãî îïèñàíèÿ è ýôôåêòèâíîãî ðåøåíèÿ êîìáèíàòîðíûõ çàäà÷,
òåñíî ñâÿçàííîé ñ òåîðèåé ÓÎ. Ðàññìîòðåíû ïðèìåðû èñïîëüçîâàíèÿ ìîäåëåé ÓÎ è êîíêðåòíûå
ïðèëîæåíèÿ.
1. Ââåäåíèå
1.1. Óäîâëåòâîðåíèå îãðàíè÷åíèé
Èñïîëüçîâàíèå ïîäõîäîâ è àëãîðèòìîâ èñêóññòâåííîãî èíòåëëåêòà (ÈÈ) ïîçâîëÿåò ðåøàòü ìíîãèå ïðèêëàäíûå çàäà÷è, òàêèå, êàê çàäà÷è òåîðèè ðàñïèñàíèé
[45], çàäà÷è ïðîåêòèðîâàíèÿ ýêñïåðòíûõ ñèñòåì è ñèñòåì ïîääåðæêè ïðèíÿòèÿ ðåøåíèé [13], äîêàçàòåëüñòâî òåîðåì, çàäà÷è òåñòèðîâàíèÿ ýëåêòðîííûõ ñõåì, îáðàáîòêà èçîáðàæåíèé. Îäíîé èç âàæíûõ çàäà÷ ÈÈ ÿâëÿåòñÿ çàäà÷à óäîâëåòâîðåíèÿ
îãðàíè÷åíèé (ÓÎ) (constraint satisfaction problem) [142], [171], [364].
Òåîðèÿ ÓÎ ïðåäëàãàåò óäîáíûé àïïàðàò è ïðîñòóþ ôîðìàëüíóþ ñõåìó äëÿ
ïðåäñòàâëåíèÿ è ðåøåíèÿ êîìáèíàòîðíûõ çàäà÷ èñêóññòâåííîãî èíòåëëåêòà. Öåëüþ ðåøåíèÿ çàäà÷è ÓÎ ÿâëÿåòñÿ íàõîæäåíèå çíà÷åíèé ïåðåìåííûõ, óäîâëåòâîðÿþùèõ îïðåäåëåííûì îãðàíè÷åíèÿì. Ïàðàäèãìà ÓÎ ÿâëÿåòñÿ îáîáùåíèåì ïðîïîçèöèîíàëüíîé ëîãèêè, â êîòîðîé ïåðåìåííûì ìîãóò áûòü ïðèñâîåíû çíà÷åíèÿ
1 Ðàáîòà
N13
âûïîëíåíà ïðè ôèíàíñîâîé ïîääåðæêå àâñòðèéñêîãî ôîíäà FWF, ãðàíò No. P20900-
1
èç ìíîæåñòâà ëþáîãî ÷èñëà ïåðåìåííûõ, à íå òîëüêî ¾èñòèíà¿ è ¾ëîæü¿ [138].
Ïðîáëåìà ñóùåñòâîâàíèÿ ðåøåíèé çàäà÷è ÓÎ ÿâëÿåòñÿ NP-ïîëíîé.
 èñêóññòâåííîì èíòåëëåêòå ïàðàäèãìà ÓÎ ïðèçíàíà â êà÷åñòâå óäîáíîãî è ýôôåêòèâíîãî ñïîñîáà ìîäåëèðîâàíèÿ è ðåøåíèÿ ìíîãèõ ïðèêëàäíûõ çàäà÷, òàêèõ
êàê ïëàíèðîâàíèå [240] è êàëåíäàðíîå ïëàíèðîâàíèå [343], [166], [74], [49], [308],
[321], [357], çàäà÷è íàçíà÷åíèÿ ÷àñòîòû [157], îáðàáîòêà èçîáðàæåíèé [289], ïðè
òåñòèðîâàíèè ñâåðõáîëüøèõ èíòåãðàëüíûõ ñõåì ÑÁÈÑ (VLSI) [211], àíàëèç ÿçûêîâ ïðîãðàììèðîâàíèÿ [294] è ïîíèìàíèÿ åñòåñòâåííîãî ÿçûêà [31]. Â òåîðèè áàç
äàííûõ ïîêàçàíî, ÷òî êëþ÷åâàÿ çàäà÷à îöåíêè êîíúþíêòèâíûõ çàïðîñîâ ìîæåò
ðàññìàòðèâàòüñÿ êàê çàäà÷à ÓÎ [196], [247]. Êðîìå òîãî, íåêîòîðûå öåíòðàëüíûå
çàäà÷è êîìáèíàòîðíîé îïòèìèçàöèè ìîãóò áûòü ïðåäñòàâëåíû â âèäå çàäà÷ ÓÎ
[125], [161], [225], [241]. Îïûò ïðèìåíåíèÿ íåäîîïðåäåëåííûõ ìîäåëåé ê èññëåäîâàíèÿì ýêîíîìèêè Ðîññèè ÿâëÿåòñÿ âïîëíå îáíàäåæèâàþùèì [9]. Ïîìèìî ýòîãî,
çàäà÷è ÓÎ ïðèâëåêàþò áîëüøîå âíèìàíèå â òåîðèè ñëîæíîñòè, òàê êàê ðàçëè÷íûå
âåðñèè çàäà÷ ÓÎ íàõîäÿòñÿ â ñåðåäèíå ìíîãèõ ñòàíäàðòíûõ êëàññîâ ñëîæíîñòè, è
òàê êàê ó íèõ èìååòñÿ òåíäåíöèÿ íå èìåòü ïðîìåæóòî÷íîé ñëîæíîñòè, òî åñòü îíè
áûâàþò ëèáî ëåãêî ðàçðåøèìûìè, ëèáî ïîëíûìè äëÿ ñòàíäàðòíûõ êëàññîâ ñëîæíîñòè [76], [77], [89], [94], [95], [125], [161], [234], [244], [314]. Ïðîãðàììèðîâàíèå â
îãðàíè÷åíèÿõ ÿâëÿåòñÿ ïàðàäèãìîé ïðîãðàììèðîâàíèÿ äëÿ äåêëàðàòèâíîãî îïèñàíèÿ è ýôôåêòèâíîãî ðåøåíèÿ êîìáèíàòîðíûõ çàäà÷, òåñíî ñâÿçàííîé ñ òåîðèåé
ÓÎ (ñì. [19], [266], [322], [377]).
ÓÎ ÿâëÿåòñÿ ìîùíîé ïàðàäèãìîé, ïîçâîëÿþùåé àäåêâàòíî ìîäåëèðîâàòü ìíîãèå êîìáèíàòîðíûå çàäà÷è [125], [263], [266], [364].
Ìíîãèå êëàññè÷åñêèå êîìáèíàòîðíûå çàäà÷è, òàêèå êàê èçâåñòíàÿ òåîðåìà Ôåðìà, çàäà÷à âûïîëíèìîñòè (SAT) èç ïðîïîçèöèîíàëüíîé ëîãèêè, çàäà÷à ðàñêðàñêè
ãðàôà è çàäà÷à èçîìîðôèçìà ãðàôîâ èç òåîðèè ãðàôîâ, çàäà÷à BANDWIDTH èç
èññëåäîâàíèÿ îïåðàöèé ìîãóò ôîðìóëèðîâàòüñÿ â âèäå çàäà÷ ÓÎ (ÇÓÎ). Îñòàíîâèìñÿ ïîäðîáíåå íà îäíîé èç äàâíî ïîñòàâëåííûõ çàäà÷ â ìàòåìàòèêå çàäà÷å
î ðàñêðàñêå ãðàôà (ðàñêðàñêà êàðòû ÷àñòíûé ñëó÷àé ýòîé çàäà÷è). Ñîãëàñíî
äàííûì, ïðèâåäåííûì â (Biggs et al., 1986) [67], ãèïîòåçó î ÷åòûðåõ öâåòàõ (â ñîîòâåòñòâèè ñ êîòîðîé ëþáîé ïëàíàðíûé ãðàô ìîæíî ðàñêðàñèòü ñ ïîìîùüþ ÷åòûðåõ
èëè ìåíüøåãî êîëè÷åñòâà öâåòîâ) âïåðâûå âûäâèíóë Ôðåíñèñ Ãóòðè â 1852 ãîäó.
Ýòà çàäà÷à íå ïîääàâàëàñü ðåøåíèþ äî òåõ ïîð, ïîêà äîêàçàòåëüñòâî íå áûëî ïîëó÷åíî ñ ïîìîùüþ êîìïüþòåðà â (Appel & Haken, 1977) [33]. Ôîðìóëèðîâêà çàäà÷è
î ðàñêðàñêå â âèäå çàäà÷è ÓÎ ñòàâèò â ñîîòâåòñòâèå âåðøèíàì ðàñêðàøèâàåìîãî
ãðàôà ïåðåìåííûå, âîçìîæíûå öâåòà ïðåäñòàâëÿþò ñîáîé äîìåíû (îáëàñòè îïðåäåëåíèÿ) ïåðåìåííûõ, à îãðàíè÷åíèÿ-íåðàâåíñòâà ìåæäó ñìåæíûìè âåðøèíàìè
ÿâëÿþòñÿ îãðàíè÷åíèÿìè çàäà÷è.
Áîëåå ñëîæíûì, íî è áîëåå ðåàëèñòè÷åñêèì ïðèìåðîì ðàñïðåäåëåíèÿ ðåñóðñîâ
ÿâëÿåòñÿ çàäà÷à ðàçìåùåíèÿ âûõîäîâ â àýðîïîðòó. Îáû÷íî íåîáõîäèìî ðàññìàòðèâàòü êàê ôèçè÷åñêèå îãðàíè÷åíèÿ (íàïðèìåð, òåëåòðàïû îïðåäåëåííîãî âèäà
ìîãóò ïîäõîäèòü òîëüêî äëÿ îïðåäåëåííûõ òèïîâ ñàìîëåòîâ), òàê è ïîëüçîâàòåëüñêèå ïðåäïî÷òåíèÿ (íàïðèìåð, ðàçëè÷íûå àâèàëèíèè ïðåäïî÷èòàþò ïàðêîâêó â
2
îïðåäåëåííûõ ÷àñòÿõ àýðîïîðòà). Îïèñàííàÿ çàäà÷à ìîæåò áûòü ïðåäñòàâëåíà â
âèäå çàäà÷è ÓÎ.
Ñïåöèàëüíûå êëàññû çàäà÷ ÓÎ ðàññìàòðèâàëèñü íà ïðîòÿæåíèè âñåé èñòîðèè
ðàçâèòèÿ èíôîðìàòèêè. Îäíèì èç ñàìûõ ïåðâûõ ïðèìåðîâ ðåøåíèÿ òàêèõ çàäà÷
áûëà ñèñòåìà Sketchpad (Sutherland, 1963) [356], êîòîðàÿ ðåøàëà ãåîìåòðè÷åñêèå
îãðàíè÷åíèÿ íà ÷åðòåæàõ è áûëà ïðåäøåñòâåííèöåé ñîâðåìåííûõ ïðîãðàìì ðèñîâàíèÿ è èíñòðóìåíòàëüíûõ ñðåäñòâ ÑÀÏÐ.
Ñïèñîê ïðèëîæåíèé ÓÎ è ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ äîñòàòî÷íî îáøèðåí. Çäåñü è âåðîÿòíîñòíûå ñåòè (belief maintenance) ((de Kleer, 1989 ) [130];
(Dechter, 1987) [131]; (Dechter & Dechter, 1988) [132]; (Doyle, 1979) [152]; (McDermott,
1991) [272]), êðîññâîðäû ((Nadel, 1989) [293]), òåìïîðàëüíûé âûâîä ((Allen, 1984)
[30]; (Rit, 1986) [319]; (Tsang, 1987) [363]), ãðàôîâûå çàäà÷è ((Bruynooghe, 1985) [87];
(Fowler & Haralick, 1983) [165]; (McGregor, 1979) [273]; (Ullman, 1976) [366]), çàäà÷è ïðîïîçèöèîíàëüíîé âûïîëíèìîñòè ((Ginsberg & McAllester, 1994) [190]; (Zabih
& McAllester, 1988) [387]), ëîãè÷åñêîå ïðîãðàììèðîâàíèå ((Borning et al., 1989)
[79]; (van Hentenryck, 1989) [368]), èìèòàöèîííîå ìîäåëèðîâàíèå ñèñòåì ((Kuipers,
1994) [254]; (Miguel & Shen, 1998) [282]; (Shen & Leitch, 1993) [341]), àíàëèç ýëåêòðîííûõ ñõåì ((Stallman & Sussman, 1977) [355]), îáðàáîòêà åñòåñòâåííîãî ÿçûêà
[277], ïðîåêòèðîâàíèå ýêñïåðòíûõ ñèñòåì (Bartak, 1997) [51].
 ïîñëåäíåå âðåìÿ ìåòîäû ãðàôîâîé äåêîìïîçèöèè è àëãîðèòìû ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé áûëè òàêæå èñïîëüçîâàíû è äëÿ çàäà÷ ÓÎ ñ íåïðåðûâíûìè
ïåðåìåííûìè [73], [117], [331] è äëÿ çàäà÷ ñ îãðàíè÷åíèÿìè â âèäå äèôôåðåíöèàëüíûõ óðàâíåíèé [148] .
 ëèòåðàòóðå ìîæíî íàéòè íåñêîëüêî õîðîøèõ îáçîðîâ ñ îïèñàíèåì ìåòîäîâ
ðåøåíèÿ çàäà÷ ÓÎ, âêëþ÷àÿ (Kumar, 1992) [255], (Dechter & Frost, 1999) [138],
(Bartak, 2001) [46], [278], [284], à òàêæå ñòàòüè â ýíöèêëîïåäè÷åñêèõ ñáîðíèêàõ
(Dechter, 1992) [135], [214] è (Mackworth, 1992) [263].
Ê ñîæàëåíèþ îáçîðîâ íà ðóññêîì ÿçûêå, ïîñâÿùåííûõ ïðîáëåìàì òåîðèè ÓÎ,
â íàñòîÿùåå âðåìÿ íåò, õîòÿ èìåþòñÿ ïóáëèêàöèè, ïîñâÿùåííûå îòäåëüíûì àñïåêòàì ÓÎ [1], [5], [6], [8], [7], [10], [11], [14], [15], [16], [17], [18], [20], [22], [24].
Ðàçóìååòñÿ, â ðàìêàõ äàííîé îáçîðíîé ñòàòüè íåâîçìîæíî ïîäðîáíî îïèñàòü
âñå àñïåêòû è íàïðàâëåíèÿ òåîðèè óäîâëåòâîðåíèÿ îãðàíè÷åíèé è ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, ïîýòîìó áîëåå ïîëíóþ èíôîðìàöèþ ìîæíî íàéòè â ìîíîãðàôèÿõ [34], [142], [176], [266], [324], [368], [371], [374], [376].
Ê ÷èñëó ïåðåâîäíûõ ìîíîãðàôèé, â êîòîðûõ îñâåùàþòñÿ âîïðîñû ÓÎ ìîæíî îòíåñòè êíèãó Ðàññåë Ñ., Íîðâèã Ï. Èñêóññòâåííûé èíòåëëåêò: ñîâðåìåííûé
ïîäõîä. 2å èçä.: Ïåð. ñ àíãë. Ì.: Âèëüÿìñ, 2006. 1408 ñ. [12]. Îáçîð îñíîâíûõ íàïðàâëåíèé ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ äî 2000 ã. ñäåëàí â ðàáîòå [19].
Íàñòîÿùàÿ ñòàòüÿ ïðèçâàíà çàïîëíèòü óêàçàííûé ïðîáåë è äàòü íàøåìó ÷èòàòåëþ ïðåäñòàâëåíèå îá îñíîâíûõ íàïðàâëåíèÿõ òåîðèè ÓÎ è ïðîãðàììèðîâàíèÿ â
îãðàíè÷åíèÿõ.
Êîñíåìñÿ âíà÷àëå òåðìèíîëîãèè è èñòîðèè âîçíèêíîâåíèÿ ìåòîäîâ ÓÎ. Montanari [289] ïðåäëîæèë èñïîëüçîâàòü ìîäåëè ÓÎ äëÿ îïèñàíèÿ ðÿäà êîìáèíàòîð3
íûõ çàäà÷, âîçíèêàþùèõ ïðè êîìïüþòåðíîé îáðàáîòêå èçîáðàæåíèé, è íàçâàë ýòè
çàäà÷è ÓÎ ¾ñåòÿìè îãðàíè÷åíèé ¿ (networks of constraints). Ýòî ñâÿçàíî ñ òåì,
÷òî ñèñòåìó îãðàíè÷åíèé ìîæíî ïðåäñòàâèòü â âèäå íåîðèåíòèðîâàííîãî ãðàôà
ñ âåðøèíàìè-ïåðåìåííûìè è ðåáðàìè, ñîîòâåòñòâóþùèìè îãðàíè÷åíèÿì ìåæäó
äâóìÿ ïåðåìåííûìè. Ïî ìíåíèþ Dechter [142], ñåòè îãðàíè÷åíèé ÿâëÿþòñÿ ãðàôîâûì ïðåäñòàâëåíèåì, èñïîëüçóåìûì äëÿ ïîèñêà ñòðàòåãèé ðåøåíèÿ çàäà÷ ÓÎ.
Äîñòàòî÷íî áûñòðî ýòîò ïîäõîä áûë èñïîëüçîâàí äëÿ ðåøåíèÿ ãîðàçäî áîëåå
øèðîêîãî êëàññà çàäà÷. Â ëèòåðàòóðå èñïîëüçóþòñÿ îáà ýòèõ òåðìèíà ñåòè
îãðàíè÷åíèé è çàäà÷è óäîâëåòâîðåíèÿ îãðàíè÷åíèé (Mackworth [263]).
1.2. Î ñâÿçè çàäà÷ ÓÎ ñ äðóãèìè ìàòåìàòè÷åñêèìè ìåòîäàìè
Íåêîòîðûå èç ïðèêëàäíûõ çàäà÷, ðåøàåìûõ ñ ïîìîùüþ ìåòîäîâ ÓÎ, ìîãóò
áûòü òàêæå ðåøåíû ñ ïîìîùüþ ìåòîäîâ èññëåäîâàíèÿ îïåðàöèé: ÓÎ ïðåäëàãàåò
îáùíîñòü, ãèáêîñòü, ñðåäó ìîäåëèðîâàíèÿ âûñîêîãî óðîâíÿ, óïðàâëåíèå ïîèñêîì,
êîìïàêòíîñòü ïðåäñòàâëåíèÿ çàäà÷è, ðàñïðîñòðàíåíèå îãðàíè÷åíèé, áûñòðûå ìåòîäû íàõîæäåíèÿ ðåøåíèÿ, â òî âðåìÿ êàê èññëåäîâàíèå îïåðàöèé èíîãäà ÿâëÿåòñÿ
åäèíñòâåííûì ñïîñîáîì ïîèñêà îïòèìàëüíîãî ðåøåíèÿ [194]. Ñëåäîâàòåëüíî, ðàçóìíî ïîïûòàòüñÿ âçÿòü ëó÷øåå ó êàæäîé èç óêàçàííûõ òåõíîëîãèé, ïóòåì ñîçäàíèÿ ãèáðèäíûõ ñèñòåì, èñïîëüçóþùèõ îáå òåõíîëîãèè äëÿ ðåøåíèÿ çàäà÷è [212],
[213]. Ýòîò ïîäõîä óæå èñïîëüçîâàí â íåêîòîðûõ ñèñòåìàõ, òàêèõ êàê 2LP [270],
[271], à òàêæå â ðàáîòå [127], â êîòîðîé ýòîò ãèáðèäíûé ïîäõîä èñïîëüçîâàí äëÿ
ðåøåíèÿ êîíêðåòíûõ òåëåêîììóíèêàöèîííûõ çàäà÷.
Çàìåòèì, ÷òî ðåøåíèå îïòèìèçàöèîííîé çàäà÷è ìîæåò áûòü ñâåäåíî ê ðåøåíèþ ïîñëåäîâàòåëüíîñòè çàäà÷ ÓÎ ñëåäóþùèì îáðàçîì. Íàõîäèòñÿ äîïóñòèìîå
ðåøåíèå, ïîñëå ÷åãî äîáàâëÿåòñÿ îãðàíè÷åíèå, ñîîòâåòñòâóþùåå öåëåâîé ôóíêöèè,
êîòîðîå âûðàæàåò óñëîâèå, ÷òî çíà÷åíèå öåëåâîé ôóíêöèè äîëæíî áûòü ëó÷øå,
÷åì äëÿ ýòîãî ðåøåíèÿ. Ïîñëåäîâàòåëüíûå êîððåêòèðîâêè ýòîãî ïîðîãîâîãî çíà÷åíèÿ, ïðîèçâîäèìûå äî òåõ ïîð, ïîêà çàäà÷à íå ñòàíåò íåðàçðåøèìîé, ïîçâîëÿþò
íàéòè îïòèìàëüíîå ðåøåíèå.
1.2.1. Çàäà÷è âûïîëíèìîñòè è óäîâëåòâîðåíèå îãðàíè÷åíèé
Çàäà÷à ÓÎ ìîæåò áûòü ïðåîáðàçîâàíà â çàäà÷ó âûïîëíèìîñòè SAT íåñêîëüêèìè ñïîñîáàìè (Walsh, 2000) [382] . Îäíèì èç íèõ ÿâëÿåòñÿ ïðÿìîå îòîáðàæåíèå.
Äëÿ äàííîé ÇÓÎ P =< V, D, C >2 ïîñòðîèì çàäà÷ó âûïîëíèìîñòè SAT ñëåäóþùèì îáðàçîì. Ââåäåì |V | · |D| ïåðåìåííûõ xi,j . Ïåðåìåííûå xi,j ïðèíèìàþò çíà÷åíèå ¾èñòèíà¿ òîãäà è òîëüêî òîãäà, êîãäà ïåðåìåííîé Vi ïðèñâîåíî çíà÷åíèå j .
Äëÿ êàæäîé ïåðåìåííîé äîáàâëÿåì êëàóçû (äèçúþíêòû) x̄i,j ∨ x̄i,k äëÿ âñåõ ïàð
çíà÷åíèé îäíîé è òîé æå ïåðåìåííîé, ÷òîáû ãàðàíòèðîâàòü íåâîçìîæíîñòü îäíîâðåìåííîãî ïðèíÿòèÿ ïåðåìåííîé äâóõ ðàçëè÷íûõ çíà÷åíèé. Äîáàâëÿåì äèçúþíêò
2V
= {x1 , . . . , xn } ìíîæåñòâî ïåðåìåííûõ, D = {D1 , . . . , Dn } ìíîæåñòâî äîìåíîâ ïåðåìåííûõ, C = {C1 , . . . , Cm } ìíîæåñòâî îãðàíè÷åíèé.
4
(xi,0 ∨ xi,1 ∨ . . . xi,d ), ÷òîáû ãàðàíòèðîâàòü, ÷òî ïåðåìåííîé ïðèñâîåíî õîòÿ áû îäíî
çíà÷åíèå.
1.2.2. Ïðèìåðû
Ïðèâåäåì ðÿä ïðèìåðîâ, èëëþñòðèðóþùèõ ïîñòàíîâêè çàäà÷ ÓÎ â äðóãèõ îáëàñòÿõ ìàòåìàòèêè [253].
Ïðèìåð 1. Íàèáîëåå òðèâèàëüíûì àëãåáðàè÷åñêèì ïðèìåðîì çàäà÷è ÓÎ ÿâëÿåòñÿ çàäà÷à ðåøåíèÿ ñèñòåìû óðàâíåíèé. Äàíà ñèñòåìà ëèíåéíûõ óðàâíåíèé
íàä êîíå÷íûì ïîëåì F . Èìååò ëè îíà ðåøåíèå? ßñíî, ÷òî â ýòîì ïðèìåðå êàæäîå îòäåëüíîå óðàâíåíèå ÿâëÿåòñÿ îãðàíè÷åíèåì, ïðè÷åì ïåðåìåííûå óðàâíåíèÿ
îáðàçóþò äèàïàçîí, à ìíîæåñòâî âñåõ êîðòåæåé, ñîîòâåòñòâóþùèõ ðåøåíèÿì óðàâíåíèÿ, îáðàçóåò îòíîøåíèå îãðàíè÷åíèÿ.
Ïðèìåð 2. Çàäà÷à ñòàíäàðòíîé ïðîïîçèöèîíàëüíîé 3-âûïîëíèìîñòè (3-SAT)
[3], [300] îïðåäåëÿåòñÿ çàäàíèåì ôîðìóëû ïðîïîçèöèîíàëüíîé ëîãèêè, ñîñòîÿùåé
èç êîíúþíêöèè äèçúþíêòîâ, ïðè÷åì êàæäûé äèçúþíêò ñîäåðæèò 3 ëèòåðàëà (ëèòåðàë ýòî ïåðåìåííàÿ èëè åå îòðèöàíèå), è îòâåòîì íà âîïðîñ, èìåþòñÿ ëè
çíà÷åíèÿ ïåðåìåííûõ, êîòîðûå äåëàþò ôîðìóëó èñòèííîé.
Ïóñòü Φ = ϕ1 ∧· · ·∧ϕn òàêàÿ ôîðìóëà, ãäå ϕi äèçúþíêòû. Çàäà÷à âûïîëíèìîñòè äëÿ Φ ìîæåò áûòü âûðàæåíà â âèäå çàäà÷è ÓÎ (V, {0, 1}, C), ãäå V ìíîæåñòâî âñåõ ïåðåìåííûõ â ôîðìóëå, à C ìíîæåñòâî îãðàíè÷åíèé {(s1 , ρ1 ), . . . , (sn , ρn )},
ãäå êàæäîå îãðàíè÷åíèå (sk , ρk ) ïîñòðîåíî ñëåäóþùèì îáðàçîì: sk ñïèñîê ïåðåìåííûõ, âõîäÿùèõ â ϕk , à ρk ñîñòîèò èç âñåõ êîðòåæåé, êîòîðûå äåëàþò äèçúþíêò ϕk èñòèííûì (k = 1, . . . , n). Ðåøåíèÿ ýòîé çàäà÷è ÓÎ ïðèñâîåíèÿ çíà÷åíèé ïåðåìåííûì, êîòîðûå äåëàþò ôîðìóëó Φ èñòèííîé. Çíà÷èò, ëþáàÿ çàäà÷à
3-âûïîëíèìîñòè ìîæåò áûòü âûðàæåíà â âèäå çàäà÷è ÓÎ.
Ïðèìåð 3. Ëþáàÿ êîíêðåòíàÿ çàäà÷à ÓÎ ìîæåò áûòü âûðàæåíà â ëîãè÷åñêîé
ôîðìå. Äåéñòâèòåëüíî, èñïîëüçóÿ ñòàíäàðòíîå ñîîòâåòñòâèå ìåæäó îòíîøåíèÿìè
è ïðåäèêàòàìè, ìîæíî ïåðåïèñàòü çàäà÷ó ÓÎ â âèäå ôîðìóëû ïåðâîãî ïîðÿäêà
ρ1 (s1 ) ∧ · · · ∧ ρq (sq ), ãäå ρi ïðåäèêàòû íà D è ρi (si ) îçíà÷àåò ïðåäèêàò ρi , ïðèìåíåííûé ê êîðòåæó si ïåðåìåííûõ (1 ≤ i ≤ q). Âîïðîñ ñîñòîèò â òîì, ÿâëÿåòñÿ ëè
ýòà ôîðìóëà âûïîëíèìîé [332].
Ýòà çàäà÷à îáû÷íî èñïîëüçóåòñÿ â òåîðèè áàç äàííûõ (ÁÄ), ïîñêîëüêó îíà
ñîîòâåòñòâóåò îöåíêå êîíúþíêòèâíîãî çàïðîñà [247], êàê ïîêàçàíî â ñëåäóþùåì
ïðèìåðå.
Ïðèìåð 4. Ðåëÿöèîííàÿ ÁÄ ìîæåò áûòü ðàññìîòðåíà êàê êîíå÷íîå ìíîæåñòâî òàáëèö. Òàáëèöà ñîñòîèò èç ñõåìû è êîíêðåòíûõ äàííûõ, ãäå ñõåìà êîíå÷íîå ìíîæåñòâî àòðèáóòîâ, ïðè÷åì êàæäûé àòðèáóò èìååò ñîîòâåòñòâóþùåå åìó
ìíîæåñòâî âîçìîæíûõ çíà÷åíèé, íàçûâàåìîå äîìåíîì. Êîíêðåòíûå äàííûå ýòî
êîíå÷íîå ìíîæåñòâî ñòðîê, ãäå êàæäàÿ ñòðîêà îòîáðàæåíèå, ñòàâÿùåå â ñîîòâåòñòâèå êàæäîìó àòðèáóòó ñõåìû çíà÷åíèå èç åå äîìåíà. Ñòàíäàðòíîé çàäà÷åé äëÿ
ðåëÿöèîííûõ ÁÄ ÿâëÿåòñÿ çàäà÷à îöåíêè êîíúþíêòèâíîãî çàïðîñà [196], [247], â
êîòîðîé ñïðàøèâàåòñÿ, èìååò ëè ðåøåíèå êîíúþíêòèâíûé çàïðîñ, ò.å. çàïðîñ âèäà
ρ1 ∧ · · · ∧ ρq , ãäå ρ1 , . . . , ρq àòîìàðíûå ôîðìóëû. Êîíúþíêòèâíûé çàïðîñ íàä
5
ðåëÿöèîííîé ÁÄ ñîîòâåòñòâóåò êîíêðåòíîìó ïðèìåðó çàäà÷è ÓÎ, ÷òî äîñòèãàåòñÿ
ïðîñòîé çàìåíîé òåðìèíîâ: ¾àòðèáóòû¿ çàìåíÿþòñÿ íà ¾ïåðåìåííûå¿, ¾òàáëèöû¿
íà ¾îãðàíè÷åíèÿ¿, ¾ñõåìà¿ íà ¾äèàïàçîí¿, ¾êîíêðåòíûå äàííûå¿ íà ¾îòíîøåíèå îãðàíè÷åíèÿ¿, à ¾ñòðîêè¿ íà ¾êîðòåæè¿. Çíà÷èò, êîíúþíêòèâíûé çàïðîñ
ýêâèâàëåíòåí êîíêðåòíîìó ïðèìåðó çàäà÷è ÓÎ, ïåðåìåííûå êîòîðîé ýòî àòðèáóòû çàïðîñà. Äëÿ êàæäîé àòîìàðíîé ôîðìóëû ρi â çàïðîñå íàéäåòñÿ îãðàíè÷åíèå
C òàêîå, ÷òî äèàïàçîí îãðàíè÷åíèÿ C ýòî ñïèñîê ïåðåìåííûõ ôîðìóëû ρi è îòíîøåíèå îãðàíè÷åíèÿ C ýòî ìíîæåñòâî ìîäåëåé ρi .
Ïðèìåð 5. Äðóãîé âàæíîé ïåðåôîðìóëèðîâêîé â âèäå çàäà÷è ÓÎ ÿâëÿåòñÿ
çàäà÷à î ãîìîìîðôèçìå, ñîñòîÿùàÿ â îòâåòå íà âîïðîñ, ñóùåñòâóåò ëè ãîìîìîðôèçì ìåæäó äâóìÿ ñòðóêòóðàìè îòíîøåíèé (ñì. [161], [197], [247]). Ïóñòü τ =
(R1 , . . . , Rk ) ñèãíàòóðà, ò.å. ñïèñîê èìåí îòíîøåíèé ñ ôèêñèðîâàííîé àðíîñòüþ,
ïðèïèñàííîé êàæäîìó èìåíè. Ïóñòü A = (A; R1A , . . . , RkA ) è B = (B; R1B , . . . , RkB )
ñòðóêòóðû îòíîøåíèé èç ñèãíàòóðû τ . Îòîáðàæåíèå h : A → B íàçûâàåòñÿ
ãîìîìîðôèçìîì èç A â B , åñëè äëÿ âñåõ 1 ≤ i ≤ k , (h(a1 ), . . . , h(am )) ∈ RiB âñÿêèé
ðàç, êîãäà (a1 , . . . , am ) ∈ RiA .  ýòîì ñëó÷àå ìû çàïèñûâàåì h : A → B . ×òîáû óáåäèòüñÿ, ÷òî çàäà÷à î ãîìîìîðôèçìå ñâîäèòñÿ ê çàäà÷å ÓÎ, ïðåäñòàâèì ýëåìåíòû
A â âèäå ïåðåìåííûõ, ýëåìåíòû B â âèäå çíà÷åíèé, êîðòåæè â îòíîøåíèÿõ A â âèäå äèàïàçîíîâ îãðàíè÷åíèé, à îòíîøåíèÿ èç B â âèäå îòíîøåíèé îãðàíè÷åíèé.
Î÷åâèäíî, ÷òî ðåøåíèÿ ýòîé çàäà÷è ÓÎ â òî÷íîñòè ñîîòâåòñòâóþò ãîìîìîðôèçìàì
èç A â B .
Ïðèìåð 6. Èíòåðâàëüíûå çàäà÷è ÓÎ. Îäíèì èç âèäîì çàäà÷ ÓÎ ñ áåñêîíå÷íûì ÷èñëîì çíà÷åíèé, èíòåíñèâíî èçó÷àåìûõ â ÈÈ, ÿâëÿþòñÿ çàäà÷è ÓÎ, â
êîòîðûõ çíà÷åíèÿ, ïðèíèìàåìûå ïåðåìåííûìè, ÿâëÿþòñÿ èíòåðâàëàìè äåéñòâèòåëüíîé ïðÿìîé. Ýòè çàäà÷è èñïîëüçóþòñÿ äëÿ ìîäåëèðîâàíèÿ ïîâåäåíèÿ âî âðåìåíè ñèñòåì, ãäå èíòåðâàëû ïðåäñòàâëÿþò èíòåðâàëû âðåìåíè, â òå÷åíèå êîòîðûõ
ïðîèñõîäÿò ñîáûòèÿ. Íàèáîëåå ïîïóëÿðíîé ôîðìàëüíîé ñòðóêòóðîé òàêîãî ðîäà
ÿâëÿåòñÿ èíòåðâàëüíàÿ àëãåáðà Àëëåíà (ÈÀÀ), ââåäåííàÿ â [29], îïèñûâàþùàÿ
áèíàðíûå êà÷åñòâåííûå îòíîøåíèÿ ìåæäó èíòåðâàëàìè. ÈÀÀ ñîäåðæèò 13 áàçîâûõ îòíîøåíèé, ñîîòâåòñòâóþùèõ 13 ðàçëè÷íûì ñïîñîáàì, ñîãëàñíî êîòîðûì
ìîãóò ñîîòíîñèòüñÿ äâà èíòåðâàëà. Ïîëíàÿ ñèñòåìà îòíîøåíèé â ÈÀÀ ñîñòîèò èç
213 = 8192 âîçìîæíûõ îáúåäèíåíèé áàçîâûõ îòíîøåíèé. Èíòåðâàëüíàÿ àëãåáðà
Àëëåíà èìååò òðè îïåðàöèè íàä îòíîøåíèÿìè: êîìïîçèöèÿ, ïåðåñå÷åíèå è èíâåðñèÿ.
Ïðèìåð 7. Ìîäåëü óäîâëåòâîðåíèÿ îãðàíè÷åíèé äëÿ çàäà÷è
¾SEND MORE MONEY¿
Ñòóäåíò ïîñûëàåò äîìîé çàêîäèðîâàííóþ òåëåãðàììó:
SEND
+ MORE
MONEY
Çàäà÷à ñîñòîèò â íàõîæäåíèè 8 ðàçëè÷íûõ öèôð, çàêîäèðîâàííûõ 8 áóêâàìè, èñ6
ïîëüçîâàííûìè â òåëåãðàììå, òàê, ÷òîáû ïîëó÷àëñÿ àðèôìåòè÷åñêè ïðàâèëüíûé
ðåçóëüòàò.
Çàìåòèì, ÷òî ýòà çàäà÷à ìîæåò áûòü çàïèñàíà ñ ïîìîùüþ ìîäåëè öåëî÷èñëåííîãî ïðîãðàììèðîâàíèÿ (ÖÏ), íî îíà ñîäåðæèò îêîëî ñîòíè öåëî÷èñëåííûõ ïåðåìåííûõ, ïðè÷åì ýòà ìîäåëü ÖÏ òðóäíà äëÿ ðåøåíèÿ ñ ïîìîùüþ êëàññè÷åñêèõ
ïîäõîäîâ ÖÏ, òàêèõ, êàê àëãîðèòìû âåòâåé è ãðàíèö.
 òî æå âðåìÿ ëîãè÷åñêèé àíàëèç çàäà÷è ïîçâîëÿåò íàéòè åå ðåøåíèå. Òàê,
çàìå÷àÿ, ÷òî íè S , íè M íå ìîãóò áûòü íóëÿìè, ïîëó÷èì: S 6= 0, M 6= 0. Äàëåå,
åäèíñòâåííîé âîçìîæíîñòüþ äëÿ M ÿâëÿåòñÿ çíà÷åíèå 1, ò.å. M = 1. Çàòåì, èç
ðàâåíñòâà M = 1 ïîëó÷àåì, ÷òî S ìîæåò áûòü ðàâíî òîëüêî 9. Ìîæíî ïîêàçàòü,
÷òî ñèìâîëó O ñîîòâåòñòâóåò öèôðà 0, ò.å. O = 0. Äàëåå, ïåðåõîäÿ ê ñîòíÿì, èç
O = 0 è óñëîâèÿ, ÷òî E è N äîëæíû áûòü ðàçè÷íûìè, ïîëó÷èì N = E + 1.
Ïðîäîëæàÿ àíàëîãè÷íî ëîãè÷åñêèé àíàëèç îãðàíè÷åíèé, íàéäåì ðåøåíèå çàäà÷è:
E = 5, N = 6, D = 7, R = 8, Y = 2. Îñíîâíàÿ ñëîæíîñòü ýòîé çàäà÷è ñîñòîèò â íåîáõîäèìîñòè ó÷åòà îãðàíè÷åíèÿ ¾âñå öèôðû ðàçëè÷íû¿ (òàê íàçûâàåìîå
ãëîáàëüíîå îãðàíè÷åíèå all-dierent).
Çàïèøåì îãðàíè÷åíèÿ çàäà÷è.
Ïåðâàÿ ôîðìóëèðîâêà.
Ïåðåìåííûå: {S, E, N, D, M, O, R, Y }
Äîìåíû: {0, 1, . . . , 9}
Îãðàíè÷åíèÿ:
C1 : ∀x, y ∈ {S, E, N, D, M, O, R, Y }, x 6= y
C2 : M = 0 or M = 1
C3 : (1000 × S + 100 × E + 10 × N + D) + (1000 × M + 100 × O + 10 × R + E) =
= (10000 × M + 1000 × O + 100 × N + 10 × E + Y )
Âòîðàÿ ôîðìóëèðîâêà.
Ïåðåìåííûå: {S, E, N, D, M, O, R, Y } + {C1, C2, C3}
Äîìåíû: ∀x ∈ S, E, N, D, M, O, R, Y , Dx = 0, . . . , 9
∀y ∈ {C1, C2, C3}, Dy = 0, 1
Îãðàíè÷åíèÿ:
C1 : ∀x, y ∈ {S, E, N, D, M, O, R, Y }, x 6= y
C2 : M = 0 or M = 1
C3 : D + E = 10 × C1 + Y
C4 : N + R + C1 = 10 × C2 + E
C5 : E + O + C2 = 10 × C3 + N
C6 : S + M + C3 = 10 × M + O
Íèæå, â ðàçäåëå 5, ïðèâåäåíà ïðîãðàììà ðåøåíèÿ ýòîé çàäà÷è íà ÿçûêå PROLOG.
Ïðèìåð 8. Çàäà÷à î N ôåðçÿõ
Çàäà÷à î N ôåðçÿõ ñîñòîèò â ðàçìåùåíèè N ôåðçåé íà øàõìàòíîé äîñêå N ×N
òàê, ÷òîáû îíè íå óãðîæàëè äðóã äðóãó (ñì. ðèñ. 1).
Ìîäåëü óäîâëåòâîðåíèÿ îãðàíè÷åíèé:
ôåðçè â âåðòèêàëüíûõ ñòîëáöàõ: ∀i r(i) ∈ {1, . . . , N }
7
îòñóòñòâèå êîíôëèêòîâ:
∀i 6= j, r(i) 6= r(j) & |i − j| 6= |r(i) − r(j)|.
A
B
C
D
E
F
G
H
1
2
3
4
5
6
7
8
Ðèñ. 1. Îäíî èç ðåøåíèé çàäà÷è î 8 ôåðçÿõ
Îäíèì èç ïðèìåðîâ èñïîëüçîâàíèÿ ÓÎ ÿâëÿåòñÿ ðåøåíèå êðîññâîðäîâ.
Ïðèìåð 9. Ïðèìåð ñîñòàâëåíèÿ êðîññâîðäà
Ðàññìîòðèì ïðèìåð ñîñòàâëåíèÿ êðîññâîðäà èç [142]. Çàäà÷à ñîñòîèò â âåðòèêàëüíîé èëè ãîðèçîíòàëüíîé çàïèñè ñëîâ èç çàäàííîãî ìíîæåñòâà ñëîâ (ñëîâàðÿ)
â òàáëèöó ñ ó÷åòîì íåêîòîðûõ îãðàíè÷åíèé. Åñëè ðàçðåøåíî âñòàâëÿòü êàæäîå
ñëîâî íà ïóñòîå ìåñòî ñîîòâåòñòâóþùåé äëèíû, âîçìîæíàÿ ôîðìóëèðîâêà çàäà÷è î êðîññâîðäå â âèäå çàäà÷è ÓÎ âûãëÿäèò ñëåäóþùèì îáðàçîì. Äëÿ êàæäîãî
êâàäðàòà êðîññâîðäà ââîäèòñÿ ïåðåìåííàÿ, ïðèíèìàþùàÿ áóêâåííûå çíà÷åíèÿ èç
àëôàâèòà, ïðè÷åì ìîãóò áûòü çàäàíû âîçìîæíûå çíà÷åíèÿ äëÿ ãðóïï ñìåæíûõ ïåðåìåííûõ. Ïðèâåäåì ôîðìàëüíóþ ôîðìóëèðîâêó çàäà÷è î êðîññâîðäå â òåðìèíàõ
1
2
3
4
6
8
5
7
9
10
12
13
11
Ðèñ. 2. Êðîññâîðä.
îãðàíè÷åíèé. Êàæäîìó êâàäðàòó i êðîññâîðäà, êîòîðûé äîëæåí áûòü çàïîëíåí
8
(ñì. ðèñ. 2) ïîñòàâèì â ñîîòâåòñòâèå ïåðåìåííóþ xi (i = 1, . . . , 13). Ïåðåìåííûå
x1 , . . . , x13 â êà÷åñòâå äîìåíîâ èìåþò áóêâû àëôàâèòà, â êà÷åñòâå îãðàíè÷åíèé
ñëóæàò äîïóñòèìûå ñëîâà. Íàïðèìåð, îãðàíè÷åíèÿ ìîãóò áûòü çàäàíû ñëåäóþùèì îáðàçîì [142]:
R1,2,3,4,5 = {(H, O, S, E, S), (L, A, S, E, S), (S, H, E, E, T ), (S, N, A, I, L), (S, T, E, E, R)}
R3,6,9,12 = {(A, L, S, O), (E, A, R, N ), (H, I, K, E), (I, R, O, N ), (S, A, M, E)},
R5,7,11 = {(E, A, T ), (L, E, T ), (R, U, N ), (S, U, N ), (T, E, N ), (Y, E, S)},
R8,9,10,11 = R3,6,9,12 ,
R10,13 = {(B, E), (I, T ), (N, O), (U, S)},
R12,13 = R10,13 .
Ïðèìåð 10. Çàäà÷à ñîñòàâëåíèÿ ðàñïèñàíèÿ
Âàæíîé äëÿ ïðàêòè÷åñêèõ ïðèëîæåíèé ÿâëÿåòñÿ çàäà÷à ñîñòàâëåíèÿ ðàñïèñàíèÿ, ñîñòîÿùàÿ â óïîðÿäî÷åíèè íàáîðà çàäàíèé (ðàáîò).  ýòîé çàäà÷å çàäàíû
ñïèñîê çàäàíèé è îãðàíè÷åíèÿ, êàêèå çàäà÷è ìîãóò áûòü âûïîëíåíû îäíîâðåìåííî, âûïîëíåíèå êàêèõ çàäàíèé äîëæíî ïðåäøåñòâîâàòü âûïîëíåíèþ äðóãèõ è ò.ä.
Äëÿ ðåøåíèÿ ýòîé çàäà÷è íóæíî íàéòè íàçíà÷åíèå âðåìåí íà÷àë ðàáîò çàäàíèÿì òàê, ÷òîáû âñå îãðàíè÷åíèÿ óäîâëåòâîðÿëèñü [367].
Ðàññìîòðèì çàäà÷ó ñîñòàâëåíèÿ ðàñïèñàíèÿ äëÿ ïÿòè çàäàíèé T 1, T 2, T 3, T 4, T 5,
êàæäîå èç êîòîðûõ ìîæåò áûòü âûïîëíåíî çà îäèí ÷àñ. Çàäàíèÿ ìîãóò íà÷èíàòüñÿ
â 1:00, 2:00 èëè 3:00. Ëþáûå ðàáîòû ìîãóò âûïîëíÿòüñÿ îäíîâðåìåííî, ó÷èòûâàÿ
îãðàíè÷åíèÿ íà òî, ÷òî T 1 ìîæåò íà÷èíàòüñÿ ïîñëå T 3, T 3 ìîæåò íà÷èíàòüñÿ äî
T 4 è ïîñëå T 5, T 2 íå ìîæåò íà÷èíàòüñÿ â òî æå âðåìÿ, ÷òî T 1 èëè T 4, T 4 íå ìîæåò
íà÷èíàòüñÿ â 2:00.
Ìîæíî ïîñòðîèòü ìîäåëü ñîñòàâëåíèÿ ãðàôèêà, ââåäÿ ïÿòü ïåðåìåííûõ, ñîîòâåòñòâóþùèõ çàäàíèÿì ñ äîìåíàìè {1 : 00, 2 : 00, 3 : 00}. Ñîîòâåòñòâóþùèé ãðàô
îãðàíè÷åíèé ïîêàçàí íà ðèñ. 3.
Ïðèìåð 11. Ðàçìåòêà èçîáðàæåíèé
Çàäà÷à ðàçìåòêè èçîáðàæåíèé [384] ÿâëÿåòñÿ, ïî-âèäèìîìó, îäíîé èç ïåðâûõ
ôîðìàëèçîâàííûõ çàäà÷ ÓÎ. Öåëü ýòîé çàäà÷è ñîñòîèò â ðàñïîçíàâàíèè îáúåêòîâ
3-ìåðíîãî èçîáðàæåíèÿ ñ ïîìîùüþ èíòåðïðåòàöèè ëèíèé íà 2-ìåðíûõ ðèñóíêàõ.
Ëèíèè èëè ðåáðà äîëæíû áûòü ïîìå÷åíû, ò.å. îíè ðàçáèòû íà íåñêîëüêî òèïîâ,
à èìåííî íà âûïóêëûå (+), âîãíóòûå (-) è çàìûêàþùèå ðåáðà (<).  áîëåå ñëîæíûõ ñèñòåìàõ ðàñïîçíàåòñÿ òàêæå òåíåâîé êðàé. Èìååòñÿ ìíîãî ñïîñîáîâ ðàçìåòêè èçîáðàæåíèÿ (â òî÷íîñòè 3n , ãäå n ÷èñëî ðåáåð), íî òîëüêî íåìíîãèå èç íèõ
èìåþò ñìûñë äëÿ òðåõìåðíîãî èçîáðàæåíèÿ. Èäåÿ ðåøåíèÿ ýòîé êîìáèíàòîðíîé
çàäà÷è ñîñòîèò â íàõîæäåíèè äîïóñòèìûõ ìåòîê äëÿ òî÷åê ïåðåñå÷åíèÿ, óäîâëåòâîðÿþùèõ îãðàíè÷åíèÿì, ÷òî ðåáðî èìååò òó æå ìåòêó íà îáîèõ êîíöàõ. Ýòî
íàìíîãî ñíèæàåò ïåðåáîð, òàê êàê èìååòñÿ ëèøü îãðàíè÷åííîå ÷èñëî äîïóñòèìûõ
ìåòîê äëÿ òî÷åê ïåðåñå÷åíèÿ.
9
ɍɧɚɪɧɨɟ ɨɝɪɚɧɢɱɟɧɢɟ DT4={(1:00, 3:00)}.
T1
Ȼɢɧɚɪɧɵɟ ɨɝɪɚɧɢɱɟɧɢɹ
RT2,T1={(1:00, 2:00), (1:00, 3:00), (2:00, 1:00),
(2:00, 3:00), (3:00, 1:00), (3:00, 2:00)},
T2
T5
RT2,T4={(1:00, 2:00), (1:00, 3:00), (2:00, 1:00),
(2:00, 3:00), (3:00, 1:00), (3:00, 2:00)},
RT1,T3={(2:00, 1:00), (3:00, 1:00), (3:00, 2:00)},
RT3,T4={(1:00, 2:00), (1:00, 3:00), (3:00, 2:00)},
T3
T4
RT3,T5={(2:00, 1:00), (3:00, 1:00), (3:00, 2:00)}.
Ðèñ. 3. Ãðàô îãðàíè÷åíèé è îòíîøåíèÿ çàäà÷è ñîñòàâëåíèÿ ãðàôèêà.
+ +
+
+
+
+
Ðèñ. 4. Ðàçìåòêà èçîáðàæåíèé.
+
<
+
<
Figure 2
-
Ðèñ. 5. Äîïóñòèìûå âàðèàíòû ðàçìåòêè ïðè ñîåäèíåíèè â âåðøèíå.
10
Îñíîâíûå àëãîðèòìû ðåøåíèÿ îïèñàííîé çàäà÷è (ïîäîáíî àëãîðèòìó ðàçìåòêè
Waltz [384]) îòíîñÿòñÿ ê äîñòèæåíèþ íåêîòîðûõ ôîðì ñîâìåñòèìîñòè.
Äðóãèå ïðàêòè÷åñêèå ïðèëîæåíèÿ ÓÎ è ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ
ïðèâåäåíû íèæå, â ðàçäåëå 5.
2. Îñíîâíûå ïîíÿòèÿ òåîðèè óäîâëåòâîðåíèÿ îãðàíè÷åíèé
2.1. Áàçîâûå ïîíÿòèÿ
2.1.1. Çàäà÷à óäîâëåòâîðåíèÿ îãðàíè÷åíèé
 äàííîé ñòàòüå ðàññìàòðèâàþòñÿ çàäà÷è ÓÎ ñ äèñêðåòíûìè ïåðåìåííûìè.
Çàäà÷è ÓÎ ïðîñòåéøåãî âèäà õàðàêòåðèçóþòñÿ òåì, ÷òî â íèõ èñïîëüçóþòñÿ äèñêðåòíûå ïåðåìåííûå, êîòîðûå èìåþò êîíå÷íûå äîìåíû (îáëàñòè îïðåäåëåíèÿ).
Ê òàêîìó âèäó îòíîñèòñÿ çàäà÷à ðàñêðàñêè êàðòû. Çàäà÷à ñ âîñåìüþ ôåðçÿìè,
îïèñàííàÿ â ãëàâå 1, òàêæå ìîæåò ðàññìàòðèâàòüñÿ êàê çàäà÷à ÓÎ ñ êîíå÷íîé
îáëàñòüþ îïðåäåëåíèÿ, ãäå ïåðåìåííûå Q1 , . . . , Q8 ïðåäñòàâëÿþò ñîáîé ïîçèöèè
êàæäîãî ôåðçÿ íà ñòîëáöàõ 1, . . . , 8, à êàæäàÿ ïåðåìåííàÿ èìååò îáëàñòü îïðåäåëåíèÿ {1, 2, 3, 4, 5, 6, 7, 8}. Ïî îöåíêå Bartak [47], âåðîÿòíî, áîëåå 95% ïðèëîæåíèé
ÓÎ èñïîëüçóþò êîíå÷íûå äîìåíû.
Åñëè ìàêñèìàëüíûé ðàçìåð äîìåíîâ ïåðåìåííûõ â çàäà÷å ÓÎ ðàâåí d, òî êîëè÷åñòâî âîçìîæíûõ ïîëíûõ ïðèñâàèâàíèé çíà÷åíèé ïåðåìåííûì èçìåðÿåòñÿ âåëè÷èíîé O(Dn ), ò.å. çàâèñèò ýêñïîíåíöèàëüíî îò êîëè÷åñòâà ïåðåìåííûõ. Ê êàòåãîðèè çàäà÷ ÓÎ ñ êîíå÷íîé îáëàñòüþ îïðåäåëåíèÿ îòíîñÿòñÿ áóëåâû çàäà÷è ÓÎ,
â êîòîðûõ ïåðåìåííûå ìîãóò èìåòü çíà÷åíèÿ ëèáî èñòèíà, ëèáî ëîæü. Áóëåâû
çàäà÷è ÓÎ âêëþ÷àþò â êà÷åñòâå ÷àñòíûõ ñëó÷àåâ íåêîòîðûå N P -ïîëíûå çàäà÷è,
òàêèå êàê çàäà÷è 3-âûïîëíèìîñòè 3SAT .
Äèñêðåòíûå ïåðåìåííûå ìîãóò èìåòü áåñêîíå÷íûå îáëàñòè îïðåäåëåíèÿ, íàïðèìåð, òàêèå, êàê ìíîæåñòâî âñåõ öåëûõ ÷èñåë èëè ìíîæåñòâî âñåõ ñòðîê. Â
èññëåäîâàíèè îïåðàöèé ÷àñòî âñòðå÷àþòñÿ çàäà÷è ÓÎ ñ íåïðåðûâíûìè îáëàñòÿìè
îïðåäåëåíèÿ.  ÷àñòíîñòè, ïðè êàëåíäàðíîì ïëàíèðîâàíèè ñòðîèòåëüíûõ ðàáîò
äàòà íà÷àëà êàæäîé ðàáîòû ïðåäñòàâëÿåò ñîáîé ïåðåìåííóþ, à åå âîçìîæíûìè
çíà÷åíèÿìè ÿâëÿþòñÿ öåëî÷èñëåííûå èíòåðâàëû âðåìåíè â ñóòêàõ, îòñ÷èòûâàåìûå îò òåêóùåé äàòû. Ïðè ðåøåíèè çàäà÷ ñ áåñêîíå÷íûìè îáëàñòÿìè îïðåäåëåíèÿ áîëüøå íåò âîçìîæíîñòè îïèñûâàòü îãðàíè÷åíèÿ, ïåðå÷èñëÿÿ âñå äîïóñòèìûå
êîìáèíàöèè çíà÷åíèé. Âìåñòî ýòîãî äîëæåí èñïîëüçîâàòüñÿ ñïåöèàëüíûé ÿçûê
îãðàíè÷åíèé. Íàïðèìåð, åñëè ðàáîòà Job1 êîòîðàÿ çàíèìàåò ïÿòü äíåé, äîëæíà
ïðåäøåñòâîâàòü ðàáîòå Job3 , òî äëÿ îïèñàíèÿ ýòîãî óñëîâèÿ ïîòðåáóåòñÿ ÿçûê
îãðàíè÷åíèé, ïðåäñòàâëÿþùèé ýòè óñëîâèÿ â âèäå StartJob1 + 5 ≤ StartJob3 . Êðîìå òîãî, óæå íåò âîçìîæíîñòè ðåøàòü òàêèå îãðàíè÷åíèÿ, ïðîñòî ïåðå÷èñëÿÿ âñå
11
âîçìîæíûå ïðèñâàèâàíèÿ, ïîñêîëüêó èìååòñÿ áåñêîíå÷íî ìíîãî âîçìîæíûõ ïðèñâàèâàíèé. Äëÿ ëèíåéíûõ îãðàíè÷åíèé ñ öåëî÷èñëåííûìè ïåðåìåííûìè ñóùåñòâóþò ñïåöèàëüíûå àëãîðèòìû ïîèñêà ðåøåíèé.  íåêîòîðûõ ñëó÷àÿõ çàäà÷è ñ öåëî÷èñëåííûìè îãðàíè÷åíèÿìè ìîæíî ñâåñòè ê çàäà÷àì ñ êîíå÷íîé îáëàñòüþ îïðåäåëåíèÿ, óñòàíàâëèâàÿ ïðåäåëû çíà÷åíèé ýòèõ ïåðåìåííûõ. Íàïðèìåð, â çàäà÷å
ïëàíèðîâàíèÿ ìîæíî óñòàíîâèòü âåðõíèé ïðåäåë, ðàâíûé îáùåé ïðîäîëæèòåëüíîñòè âñåõ çàïëàíèðîâàííûõ ðàáîò.
Ñåòü îãðàíè÷åíèé èëè çàäà÷à óäîâëåòâîðåíèÿ îãðàíè÷åíèé (ÓÎ) ñîñòîèò èç
ìíîæåñòâà ïåðåìåííûõ V = {x1 , . . . , xn }, ìíîæåñòâà äîìåíîâ çíà÷åíèé Di äëÿ
êàæäîé ïåðåìåííîé xi , è ìíîæåñòâà îãðàíè÷åíèé è îòíîøåíèé. Êàæäûé äîìåí
çíà÷åíèé ÿâëÿåòñÿ êîíå÷íûì ìíîæåñòâîì çíà÷åíèé, êîòîðûå ìîæåò ïðèíèìàòü
ñîòâåòñòâóþùàÿ ïåðåìåííàÿ. Îãðàíè÷åíèå RS íàä S ⊆ X ýòî ïîäìíîæåñòâî
äåêàðòîâà ïðîèçâåäåíèÿ äîìåíîâ ïåðåìåííûõ â S . Åñëè S = {xi1 , . . . , xir }, òî RS ⊆
Di1 × · · · × Dir . S íàçûâàåòñÿ äèàïàçîíîì (scope) îãðàíè÷åíèÿ RS .
 áèíàðíîé ñåòè îãðàíè÷åíèé âñå îãðàíè÷åíèÿ çàäàíû íàä ïàðàìè ïåðåìåííûõ.
Ãðàô îãðàíè÷åíèé ñòàâèò â ñîîòâåòñòâèå êàæäîé ïåðåìåííîé âåðøèíó, ïðè÷åì
äâå âåðøèíû ñîåäèíÿþòñÿ ðåáðîì, åñëè ñîîòâåòñòâóþùèå ïåðåìåííûå èìåþòñÿ â
äèàïàçîíå êàêîãî-ëèáî îãðàíè÷åíèÿ.
Ïðè çàäàíèè îãðàíè÷åíèé èñïîëüçóþòñÿ îòíîøåíèÿ.
Îïðåäåëåíèå. Äëÿ äàííûõ ìíîæåñòâà ïåðåìåííûõ V = {x1 , . . . , xn } è ñîîòâåò-
ñòâóþùèõ èõ îáëàñòåé çíà÷åíèé D1 , . . . , Dn îòíîøåíèåì R íà ìíîæåñòâå ïåðåìåííûõ íàçûâàåòñÿ ëþáîå ïîäìíîæåñòâî äåêàðòîâà ïðîèçâåäåíèÿ èõ îáëàñòåé çíà÷åíèé. Ìíîæåñòâî ïåðåìåííûõ, íà êîòîðîì îïðåäåëåíî îòíîøåíèå R, íàçûâàåòñÿ
äèàïàçîíîì îòíîøåíèÿ è îáîçíà÷àåòñÿ scope(R).
Åñëè R = D1 × . . . × Dn , òî R íàçûâàåòñÿ óíèâåðñàëüíûì îòíîøåíèåì.
Îòíîøåíèÿ ìîãóò çàäàâàòüñÿ ñ ïîìîùüþ òàáëèö, îïèñûâàþùèõ äîïóñòèìûå
ñî÷åòàíèÿ çíà÷åíèé ïåðåìåííûõ.
Îïðåäåëåíèå. Çàäà÷à ÓÎ (ÇÓÎ) îïðåäåëÿåòñÿ ìíîæåñòâîì äèñêðåòíûõ ïåðåìåí-
íûõ V = {x1 , . . . , xn }, äëÿ êàæäîé èç êîòîðûõ çàäàíà îáëàñòü îïðåäåëåíèÿ èëè äî(p )
(1)
ìåí Dj = {dj , . . . , dj j } (j = 1, . . . , n), è ìíîæåñòâîì îãðàíè÷åíèé. Îãðàíè÷åíèåì
íàçûâàåòñÿ ïàðà (R, S), ãäå R îòíîøåíèå, îïðåäåëåííîå íà äèàïàçîíå S . ÇÓÎ
ìîæåò ðàññìàòðèâàòüñÿ êàê òðîéêà (V, D, C), ãäå V = {x1 , . . . , xn } ìíîæåñòâî ïåðåìåííûõ, D = {D1 , . . . , Dn } ìíîæåñòâî äîìåíîâ ïåðåìåííûõ, C = {C1 , . . . , Cm }
ìíîæåñòâî îãðàíè÷åíèé. Ðåøåíèåì ÇÓÎ íàçûâàåòñÿ ïðèñâîåíèå çíà÷åíèé âñåì
ïåðåìåííûì, êîòîðîå óäîâëåòâîðÿåò âñåì îãðàíè÷åíèÿì. Öåëüþ ðåøåíèÿ ÇÓÎ ìîæåò áûòü íàõîæäåíèå îäíîãî èëè âñåõ ðåøåíèé.
12
2.1.2. Äåéñòâèÿ íàä îòíîøåíèÿìè
Ïóñòü R1 , R2 äâà îòíîøåíèÿ ñ îäèíàêîâûì äèàïàçîíîì. Òîãäà ïåðåñå÷åíèåì R1 ∩ R2 íàçûâàåòñÿ îòíîøåíèå, ñîäåðæàùåå âñå íàáîðû çíà÷åíèé ïåðåìåííûõ,
êîòîðûå èìåþòñÿ îäíîâðåìåííî â îáîèõ îòíîøåíèÿõ R1 è R2 .
Îáúåäèíåíèå R1 ∪ R2 îòíîøåíèå, ñîäåðæàùåå âñå íàáîðû çíà÷åíèé ïåðåìåííûõ, êîòîðûå èìåþòñÿ ëèáî â R1 , ëèáî â R2 , èëè â îáîèõ îòíîøåíèÿõ.
Ðàçíîñòüþ R1 − R2 íàçûâàåòñÿ îòíîøåíèå, ñîäåðæàùåå íàáîðû çíà÷åíèé ïåðåìåííûõ, ñîäåðæàùèåñÿ â R1 , íî íå ñîäåðæàùèåñÿ â R2 .
Ïðîåêöèÿ ΠY (R) îòíîøåíèÿ R íà ìíîæåñòâî ïåðåìåííûõ Y ⊆ scope(R) ÿâëÿåòñÿ îòíîøåíèåì, ñîäåðæàùèì íàáîðû çíà÷åíèé òîëüêî ïåðåìåííûõ, ñîäåðæàùèõñÿ
â Y .  òàáëè÷íîì ïðåäñòàâëåíèè îòíîøåíèé ïðîåêöèÿ âûáèðàåò ïîäìíîæåñòâî
ñòîëáöîâ, ñîîòâåòñòâóþùèõ ìíîæåñòâó Y .
Ñîåäèíåíèå îòíîøåíèé. Îïåðàòîð ñîåäèíåíèÿ RS ./ RT èç äâóõ îòíîøåíèé
RS ñ äèàïàçîíîì S è RT ñ äèàïàçîíîì T ñòðîèò íîâîå îòíîøåíèå, ñîñòîÿùåå èç
èõ îáùèõ ïåðåìåííûõ â S è T . Íàáîð r èç ñîåäèíåíèÿ RS ./ RT îòíîøåíèé RS
è RT ìîæíî ïîñòðîèòü, èñïîëüçóÿ ñëåäóþùèå øàãè: (1) âçÿòü íàáîð s èç RS ; (2)
âûáðàòü íàáîð t èç RT òàêîé, ÷òî êîìïîíåíòû s è t ñîãëàñóþòñÿ ïî ïåðåìåííûì
èç S ∩ T , îáùèì äëÿ RS è RT ; (3) îáðàçîâàòü íîâûé íàáîð r, êîìáèíèðóÿ êîìïîíåíòû s è t, ñîõðàíÿÿ ëèøü îäèí èç ïîëó÷åííûõ îäèíàêîâûõ íàáîðîâ. Äèàïàçîí
ïîëó÷àþùåãîñÿ îòíîøåíèÿ S ∪ T . Ñîåäèíåíèå äâóõ îòíîøåíèé ñ îäèíàêîâûìè
äèàïàçîíàìè ýêâèâàëåíòíî ïåðåñå÷åíèþ ýòèõ îòíîøåíèé.
2.2. Âèäû îãðàíè÷åíèé
Ðàññìîòðèì ðàçëè÷íûå âèäû îãðàíè÷åíèé. Ïðîñòåéøèì òèïîì îãðàíè÷åíèÿ
ÿâëÿåòñÿ óíàðíîå îãðàíè÷åíèå, êîòîðîå îãðàíè÷èâàåò çíà÷åíèå îäíîé ïåðåìåííîé.
Ëþáîå óíàðíîå îãðàíè÷åíèå ìîæíî óñòðàíèòü, âûïîëíÿÿ ïðåäâàðèòåëüíóþ îáðàáîòêó îáëàñòè îïðåäåëåíèÿ ñîîòâåòñòâóþùåé ïåðåìåííîé, ÷òîáû óäàëèòü çíà÷åíèÿ, íàðóøàþùèå ýòî îãðàíè÷åíèå. Áèíàðíîå îãðàíè÷åíèå ñâÿçûâàåò ìåæäó ñîáîé
äâå ïåðåìåííûå. Íàïðèìåð, áèíàðíûì îãðàíè÷åíèåì ÿâëÿåòñÿ x 6= y . Áèíàðíîé çàäà÷åé ÓÎ íàçûâàåòñÿ çàäà÷à, â êîòîðîé èìåþòñÿ òîëüêî áèíàðíûå îãðàíè÷åíèÿ;
îíà ìîæåò áûòü ïðåäñòàâëåíà â âèäå ãðàôà îãðàíè÷åíèé.  îãðàíè÷åíèÿõ âûñîêîãî ïîðÿäêà ó÷àñòâóþò òðè èëè áîëüøå ïåðåìåííûõ. Îäíèì èç èçâåñòíûõ ïðèìåðîâ òàêèõ çàäà÷ ÿâëÿþòñÿ êðèïòîàðèôìåòè÷åñêèå ãîëîâîëîìêè, íàçûâàåìûå
òàêæå ÷èñëîâûìè ðåáóñàìè (ñì. ðàçäåë 1). Îáû÷íî íàêëàäûâàåòñÿ òðåáîâàíèå,
÷òîáû êàæäàÿ áóêâà â êðèïòîàðèôìåòè÷åñêîé ãîëîâîëîìêå ïðåäñòàâëÿëà îòäåëüíóþ öèôðó.  ñëó÷àå çàäà÷è SEND+MORE=MONEY èç ïðèìåðà 7 ðàçäåëà 1,
òàêîå òðåáîâàíèå ìîæåò áûòü âûðàæåíî ñ ïîìîùüþ îãðàíè÷åíèÿ ñ âîñåìüþ ïåðåìåííûìè all − dif f erent(S, E, N, D, M, O, R, Y ). Èíûì îáðàçîì ýòî òðåáîâàíèå
ìîæåò áûòü ïðåäñòàâëåíî â âèäå íàáîðà áèíàðíûõ îãðàíè÷åíèé, òàêèõ êàê S 6= E .
13
2.2.1. Ãëîáàëüíûå îãðàíè÷åíèÿ
Ðÿä èññëåäîâàíèé ïî óäîâëåòâîðåíèþ îãðàíè÷åíèé ñ êîíå÷íûìè äîìåíàìè èñïîëüçóåò ãëîáàëüíûå îãðàíè÷åíèÿ [325]. Ïîíÿòèå ãëîáàëüíîãî îãðàíè÷åíèÿ ñîñòîèò
â ñëåäóþùåì: èìåþòñÿ ñëó÷àè, êîãäà íàëè÷èå îäíîãî áîëüøåãî îãðàíè÷åíèÿ (ïî
÷èñëó ïåðåìåííûõ â íåì) ìîæåò áûòü ëó÷øå, ÷åì íàëè÷èå ìíîæåñòâà ìåíüøèõ
îãðàíè÷åíèé. Òèïè÷íûì ïðèìåðîì ñëóæèò ìíîæåñòâî îãðàíè÷åíèé-íåðàâåíñòâ,
êîòîðîå ðåäêî ïîçâîëÿåò ïðèìåíèòü óñïåøíîå ðàñïðîñòðàíåíèå îãðàíè÷åíèé.  ïîäîáíûõ ñëó÷àÿõ íåîáõîäèìî èñïîëüçîâàòü ïîëíûé ïîèñê ïî äîìåíàì âñåõ ïåðåìåííûõ äëÿ íàõîæäåíèÿ îäíîãî ðåøåíèÿ. Ìîæíî èçáåæàòü ýòîãî áåñïîëåçíîãî ïîèñêà,
èñïîëüçóÿ îãðàíè÷åíèå all-dierent, â êîòîðîå âõîäÿò âñå ïåðåìåííûå. Äåéñòâèòåëüíî, èñïîëüçóÿ îäíî òàêîå îãðàíè÷åíèå, çàäà÷à ïîèñêà ðåøåíèÿ ìîæåò áûòü
ïåðåôîðìóëèðîâàíà â âèäå çàäà÷è ïàðîñî÷åòàíèÿ â äâóäîëüíîì ãðàôå (bipartite
matching) ìåæäó ïåðåìåííûìè è çíà÷åíèÿìè, äëÿ ðåøåíèÿ êîòîðîé ìîãóò áûòü
èñïîëüçîâàíû êëàññè÷åñêèå ãðàôîâûå àëãîðèòìû, ÷òî ìîæåò ñíèçèòü ïåðåáîð. Â
îáùåì, ââåäåíèå ãëîáàëüíûõ ïåðåìåííûõ ðàáîòàåò ñëåäóþùèì îáðàçîì: âìåñòî çàïèñè çàäà÷è ñ ïîìîùüþ ìíîãèõ èñõîäíûõ áèíàðíûõ îãðàíè÷åíèé, ìû îïèñûâàåì
åå ñ ïîìîùüþ íåáîëüøîãî ÷èñëà ãëîáàëüíûõ îãðàíè÷åíèé äëÿ ìíîæåñòâ ïåðåìåííûõ. Òàêèì îáðàçîì, ìû ìîæåì ïðîùå ìîäåëèðîâàòü çàäà÷ó ñ ìåíüøèì ÷èñëîì
îãðàíè÷åíèé, ïðè ýòîì ìîãóò áûòü èñïîëüçîâàíû áîëåå ñîâåðøåííûå àëãîðèòìû.
Òèïè÷íûìè ïðèìåðàìè ñëóæàò îãðàíè÷åíèÿ all-dierent è atmost, óñòàíàâëèâàþùåå ëèìèò íà ÷èñëî ïåðåìåííûõ ñ îïðåäåëåííûì çíà÷åíèåì, à òàêæå êóìóëÿòèâíîå îãðàíè÷åíèå.
Íåñìîòðÿ íà òî, ÷òî ãëîáàëüíûå îãðàíè÷åíèÿ ÿâëÿþòñÿ âàæíûì àñïåêòîì òåîðèè ÓÎ, äîñòàòî÷íî ÷åòêîãî èõ îïðåäåëåíèÿ íåò. Ãëîáàëüíîå îãðàíè÷åíèå ýòî
îãðàíè÷åíèå íàä ïîäìíîæåñòâîì ïåðåìåííûõ. Ó ãëîáàëüíûõ îãðàíè÷åíèé åñòü äâà
ïðåèìóùåñòâà. Âî-ïåðâûõ, ãëîáàëüíûå îãðàíè÷åíèÿ îáëåã÷àþò çàäà÷ó ìîäåëèðîâàíèÿ ïðèêëàäíîé ïðîáëåìû â âèäå ÇÓÎ. Âî-âòîðûõ, ìîæíî ðàçðàáîòàòü àëãîðèòì ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé ñïåöèàëüíîãî âèäà, ó÷èòûâàþùèé îñîáåííîñòè îãðàíè÷åíèÿ è ïîýòîìó íàìíîãî áîëåå ýôôåêòèâíûé. Íàïîìíèì, ÷òî âûíóæäåíèå äóãîâîé ñîâìåñòèìîñòè íà ïðîèçâîëüíîé çàäà÷å èìååò âðåìåííóþ ñëîæíîñòü
O(rdr ) â íàèõóäøåì ñëó÷àå, ãäå r àðíîñòü îãðàíè÷åíèÿ, à d ðàçìåð äîìåíîâ ïåðåìåííûõ.  òî æå âðåìÿ all-dierent-îãðàíè÷åíèå ìîæåò áûòü ñäåëàíî
âåðøèííî-ñîâìåñòíûì çà âðåìÿ O(r2 d) â õóäøåì ñëó÷àå [311].
Êëàññè÷åñêèì ïðèìåðîì ãëîáàëüíîãî îãðàíè÷åíèÿ ñëóæèò all-dierent-îãðàíè÷åíèå, êîòîðîå îïðåäåëÿåò, ÷òî ïåðåìåííûå äîëæíû áûòü ïîïàðíî ðàçëè÷íûìè.
all-dierent-îãðàíè÷åíèå ÷àñòî èñïîëüçóåòñÿ íà ïðàêòèêå è â ñâÿçè ñ ýòèì ïðåäëàãàåòñÿ êàê âñòðîåííîå îãðàíè÷åíèå âî ìíîãèõ îñíîâíûõ êîììåð÷åñêèõ è èññëåäîâàòåëüñêèõ ñèñòåìàõ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ. Íà÷èíàÿ ñ ïåðâûõ ãëîáàëüíûõ îãðàíè÷åíèé â ñèñòåìå ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ CHIP [27],
ïîçäíåå áûëè ïðåäëîæåíû è âíåäðåíû ñîòíè ãëîáàëüíûõ îãðàíè÷åíèé (ñì. [58]).
Äðóãèìè ïðèìåðàìè ãëîáàëüíûõ îãðàíè÷åíèé ÿâëÿþòñÿ ãëîáàëüíîå êàðäèíàëüíîå îãðàíè÷åíèå (global cardinality constraint (gcc)) [312] è êóìóëÿòèâíîå îãðàíè14
÷åíèå [27]. Ãëîáàëüíîå êàðäèíàëüíîå îãðàíè÷åíèå íàä ìíîæåñòâîì ïåðåìåííûõ
è çíà÷åíèé îïðåäåëÿåò óñëîâèå, ÷òî ÷èñëî ïåðåìåííûõ, êîòîðûì ïðèñâîåíû çíà÷åíèÿ, äîëæíî áûòü ìåæäó çàäàííûìè âåðõíåé è íèæíåé ãðàíèöàìè, ïðè÷åì ýòè
ãðàíèöû ìîãóò áûòü ðàçëè÷íû äëÿ êàæäîãî çíà÷åíèÿ. Êóìóëÿòèâíîå îãðàíè÷åíèå
íàä ìíîæåñòâîì ïåðåìåííûõ, ïðåäñòàâëÿþùèõ âðåìåíà âûïîëíåíèÿ ðàçëè÷íûõ
ðàáîò, ãàðàíòèðóåò, ÷òî ðàáîòû óïîðÿäî÷åíû òàê, ÷òî íå ïðåâûøàþòñÿ èìåþùèåñÿ
â íàëè÷èè âåëè÷èíû ðåñóðñîâ, èñïîëüçóåìûå â ëþáûå ïåðèîäû âðåìåíè. Îãðàíè÷åíèÿ îáîèõ óêàçàííûõ òèïîâ îáû÷íî èñïîëüçóþòñÿ ïðè ñîñòàâëåíèè ðàñïèñàíèé,
óïîðÿäî÷åíèè ðàáîò è â êàëåíäàðíîì ïëàíèðîâàíèè.
2.2.2. Ìÿãêèå îãðàíè÷åíèÿ
Ñëåäóåò çàìåòèòü, ÷òî îãðàíè÷åíèé ñ êîíå÷íûìè äîìåíàìè íåäîñòàòî÷íî äëÿ
òî÷íîãî ìîäåëèðîâàíèÿ ðåàëüíûõ çàäà÷. Ïðîáëåìà ñîñòîèò â òîì, ÷òî ðåàëüíûå
çàäà÷è îáû÷íî íå ìîãóò áûòü îïèñàíû òîëüêî ñ ïîìîùüþ êëàññè÷åñêèõ îãðàíè÷åíèé, êîòîðûå ìîãóò áûòü èñòèííû ëèáî ëîæíû, ïîñêîëüêó îíè èìåþò òàêèå õàðàêòåðèñòèêè, êàê ïðåäïî÷òåíèÿ, âåðîÿòíîñòè, ñòîèìîñòè, à òàêæå ñòåïåíü íåîïðåäåëåííîñòè. Ìíîãèå ïðèêëàäíûå çàäà÷è ÓÎ îáû÷íî ÿâëÿþòñÿ ïåðåîãðàíè÷åííûìè
(overconstrained) [223]: ïîëüçîâàòåëü çàäàåò ñëèøêîì ìíîãî îãðàíè÷åíèé, òàê ÷òî
âñå èõ îäíîâðåìåííî óäîâëåòâîðèòü íåâîçìîæíî.  òàêèõ ñëó÷àÿõ, âíà÷àëå íóæíî
âûÿñíèòü, èìåþòñÿ ëè ðåøåíèÿ çàäà÷è ÓÎ âîîáùå (äëÿ ýòîãî ìîæåò ïîòðåáîâàòüñÿ ìíîãî âðåìåíè!), à çàòåì íóæíî ðåøèòü, êàêèå èç îãðàíè÷åíèé îñëàáèòü, ÷òîáû
çàäà÷à ñòàëà ðàçðåøèìîé.  ñâÿçè ñ ýòèì áûëî ââåäåíî ïîíÿòèå ìÿãêîãî îãðàíè÷åíèÿ (soft constraint) [50]: ìÿãêîå îãðàíè÷åíèå ýòî îáû÷íîå îãðàíè÷åíèå ïëþñ åãî
äîïîëíèòåëüíàÿ õàðàêòåðèñòèêà (êðèòåðèé), êîòîðàÿ ìîæåò èíòåðïðåòèðîâàòüñÿ
êàê ñòîèìîñòü, óðîâåíü âàæíîñòè, ñòåïåíü íåîïðåäåëåííîñòè è ò.ï. Íàõîæäåíèå
ðåøåíèÿ ÇÓÎ ñ ìÿãêèìè îãðàíè÷åíèÿìè íå îçíà÷àåò íàõîæäåíèå òàêîâîãî, óäîâëåòâîðÿþùåãî âñåì îãðàíè÷åíèÿì, íî ïîëó÷åíèå çíà÷åíèé ïåðåìåííûõ, äëÿ êîòîðûõ äîñòèãàåòñÿ ¾íàèëó÷øåå¿ çíà÷åíèå äëÿ âûáðàííîãî êðèòåðèÿ. Èññëåäîâàíèÿ
â ýòîé îáëàñòè íà÷àëîñü ñ èåðàðõè÷åñêîé ñèñòåìû ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ [79], ÿçûêà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, â êîòîðîì êàæäîå îãðàíè÷åíèå èìååò óðîâåíü âàæíîñòè è ðåøåíèå çàäà÷è ÓÎ íàõîäèòñÿ ñ ó÷åòîì èåðàõèè
îãðàíè÷åíèé. Äëÿ ôîðìàëèçàöèè ýòîé íîâîé ìîäåëè è èññëåäîâàíèÿ ýôôåêòèâíîñòè àëãîðèòìîâ åå ðåøåíèÿ â [154], [328], [160], [333] áûëè ðàçðàáîòàíû íå÷åòêèå
îãðàíè÷åíèÿ, ó êîòîðûõ êàæäîìó îãðàíè÷åíèþ ïðèñâîåíî çíà÷åíèå ìåæäó 0 è 1.
 [235] ðàññìàòðèâàåòñÿ êîìáèíàöèÿ èåðàðõèè îãðàíè÷åíèé è íå÷åòêèõ îãðàíè÷åíèé. Ïåðåîãðàíè÷åííûå çàäà÷è ðåøàëèñü òàêæå â [172] ñ èñïîëüçîâàíèåì ïîíÿòèÿ
÷àñòè÷íîãî ÓÎ, ïðè ýòîì â ÇÓÎ ââîäèëàñü ìåòðèêà, ÷òî ïîçâîëèëî íàõîäèòü ðåøåíèå, óäîâëåòâîðÿþùåå âîçìîæíî áîëüøåìó ÷èñëó îãðàíè÷åíèé.
Áûëè ïðîâåäåíû òåîðåòè÷åñêèå èññëåäîâàíèÿ ïî ðàçðàáîòêå áîëåå îáùèõ ñõåì
äëÿ ìÿãêèõ îãðàíè÷åíèé, èñïîëüçóÿ àïïàðàò ïîëóêîëåö [68], [69], [70] (ãäå êîðòåæó êàæäîãî îãðàíè÷åíèÿ ïîñòàâëåí â ñîîòâåòñòâèå ýëåìåíò ïîëóêîëüöà), à òàêæå
àïïàðàò îãðàíè÷åíèé ñ îöåíêàìè (valued constraint), â êîòîðîì êàæäîìó îãðàíè÷åíèþ ïîñòàâëåí â ñîîòâåòñòâèå ýëåìåíò èç âïîëíå óïîðÿäî÷åííîãî ìíîæåñòâà
15
x1, D1={4, 5}
a)
>
x2
x2, D2={3, 4, 5}
b)
>
x2 = x4
x1 > x2
x2
x2
=
x2 > x3
x3, D3={1, 2}
x4, D4={4, 5}
Ðèñ. 6. a) Ãðàô îãðàíè÷åíèé è b) äâîéñòâåííûé ãðàô.
[98], [143], [334]. Äëÿ ýòèõ îáùèõ ñõåì ïîëó÷åíû îáîáùåíèÿ è ïðîèçâåäåíà àäàïòàöèÿ ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé è ìåòîäîâ ðåøåíèÿ, îáû÷íî èñïîëüçóåìûõ äëÿ
îãðàíè÷åíèé ñ êîíå÷íûìè äîìåíàìè, è èçó÷åíû èõ ñâîéñòâà.
2.2.3. Ïðèâåäåíèå çàäà÷ ÓÎ âûñîêîãî ïîðÿäêà ê áèíàðíûì çàäà÷àì ÓÎ
Êàæäîå îãðàíè÷åíèå âûñîêîãî ïîðÿäêà ñ êîíå÷íûìè äîìåíàìè ìîæíî ñâåñòè
ê ìíîæåñòâó áèíàðíûõ îãðàíè÷åíèé, ââåäÿ äîñòàòî÷íîå êîëè÷åñòâî âñïîìîãàòåëüíûõ ïåðåìåííûõ. Íåòðóäíî çàìåòèòü, ÷òî îãðàíè÷åíèå all-dierent ìîæåò áûòü
ðàçáèòî íà áèíàðíûå îãðàíè÷åíèÿ S 6= E, S 6= N è ò.ä.
Äâîéñòâåííîå ïðåîáðàçîâàíèå áûëî ïåðåíåñåíî èç òåîðèè ÁÄ â òåîðèþ ÓÎ
Dechter & Pearl [141]. Ïåðâûå ïîïûòêè ïðèâåäåíèÿ çàäà÷ ÓÎ âûñîêîãî ïîðÿäêà ê ÷èñòî áèíàðíûì çàäà÷àì ÓÎ ñ ïîìîùüþ âñïîìîãàòåëüíûõ ïåðåìåííûõ áûëè
âïåðâûå ïðåäïðèíÿòû â XIX âåêå ëîãèêîì ×àðëüçîì Ñàíäåðñîì Ïèðñîì (Peirce).
Îñíîâó ìåòîäà ñêðûòîãî ïðåîáðàçîâàíèÿ ñîñòàâëÿåò ìåòîä Peirce [302] ïðåäñòàâëåíèÿ íåáèíàðíûõ îòíîøåíèé ñ ïîìîùüþ ñèñòåìû áèíàðíûõ îòíîøåíèé. Rossi et
al. [323] íà îñíîâå ìåòîäà Peirce [302] âïåðâûå ïîêàçàëè, ÷òî áèíàðíûå îòíîøåíèÿ
èìåþò òå æå âûðàçèòåëüíûå âîçìîæíîñòè, ÷òî è íåáèíàðíûå îòíîøåíèÿ. Ñîîòâåòñòâóþùèå ìåòîäû áûëè ââåäåíû â òåìàòèêó ÓÎ â ðàáîòå Dechter (1990) [134]
è äîðàáîòàíû Bacchus & van Beek [39].
2.3. Ãðàôû îãðàíè÷åíèé
2.3.1. Ãðàô îãðàíè÷åíèé, äâîéñòâåííûé ãðàô îãðàíè÷åíèé, ãèïåðãðàô
îãðàíè÷åíèé
Ñòðóêòóðà èëè òîïîëîãèÿ çàäà÷ ÓÎ ìîæåò îïèñûâàòüñÿ ñ ïîìîùüþ ðàçëè÷íûõ ãðàôîâûõ ñòðóêòóð: (ïåðâè÷íîãî) ãðàôà îãðàíè÷åíèé, ãèïåðãðàôà îãðàíè÷åíèé, äâîéñòâåííîãî ãðàôà îãðàíè÷åíèé.
16
Îïðåäåëåíèå. Ïåðâè÷íûé ãðàô îãðàíè÷åíèé ÇÓÎ (V, D, C) ýòî íåîðèåíòèðîâàííûé ãðàô G = (V, E), âåðøèíû V êîòîðîãî ñîîòâåòñòâóþò ïåðåìåííûì ÇÓÎ,
ïðè÷åì äâå âåðøèíû ñîåäèíÿþòñÿ ðåáðîì â ãðàôå G, åñëè ñîîòâåòñòâóþùèå ïåðåìåííûå èìåþòñÿ â îäíîì è òîì æå îãðàíè÷åíèè (ò.å. â îäíîì è òîì æå äèàïàçîíå
êàêîãî-òî îòíîøåíèÿ).
Ãðàô îãðàíè÷åíèé îïðåäåëåí êàê äëÿ áèíàðíûõ, òàê è äëÿ íåáèíàðíûõ îãðàíè÷åíèé. Îäíàêî äëÿ íåáèíàðíîãî ñëó÷àÿ ñòðóêòóðà îãðàíè÷åíèé ìîæåò áûòü áîëåå
òî÷íî ïåðåäàíà ñ ïîìîùüþ ãèïåðãðàôà îãðàíè÷åíèé.
Ãèïåðãðàô îãðàíè÷åíèé ÇÓÎ ýòî ãèïåðãðàô GP , âåðøèíû êîòîðîãî ñîîòâåòñòâóþò ïåðåìåííûì çàäà÷è ÓÎ, à ãèïåð-ðåáðà îãðàíè÷åíèÿì C , âåðíåå, ïîäìíîæåñòâàì ïåðåìåííûõ èç äèàïàçîíîâ îãðàíè÷åíèé scope(C).
Åñëè àðíîñòü êàæäîãî îãðàíè÷åíèÿ â C íå áîëåå 2, òî çàäà÷à ÓÎ íàçûâàåòñÿ áèíàðíîé çàäà÷åé ÓÎ. Ãèïåðãðàô, ñîîòâåòñòâóþùèé áèíàðíîé ÇÓÎ, ÿâëÿåòñÿ îáû÷íûì ãðàôîì. Ãèïåðãðàô, ñîîòâåòñòâóþùèé íåáèíàðíîé ÇÓÎ, ìîæåò áûòü
ïðåîáðàçîâàí ê îáû÷íîìó ãðàôó îãðàíè÷åíèé ïóòåì çàìåíû êàæäîãî ãèïåððåáðà
êëèêîé, ñîñòîÿùåé èç âåðøèí ãèïåðãðàôà è ñîåäèíÿþùèõ èõ ðåáåð [239].
 ðÿäå ñëó÷àåâ óäîáíî èñïîëüçîâàòü äâîéñòâåííûé ãðàô îãðàíè÷åíèé 3 , âåðøèíû êîòîðîãî ñîîòâåòñòâóþò äèàïàçîíàì îãðàíè÷åíèé, à ðåáðà ñîåäèíÿþò âåðøèíû
ïðè íàëè÷èè â íèõ îáùèõ ïåðåìåííûõ. Ïðè ýòîì ðåáðà ïîìå÷àþòñÿ ìíîæåñòâàìè
îáùèõ ïåðåìåííûõ. Çàìåòèì, ÷òî äâîéñòâåííûé ãðàô îãðàíè÷åíèé òåñíî ñâÿçàí
ñ äâîéñòâåííîé ÇÓÎ, â êîòîðîé ïåðåìåííûìè (òàê íàçûâàåìûìè c-ïåðåìåííûìè )
ÿâëÿþòñÿ îãðàíè÷åíèÿ èñõîäíîé çàäà÷è. Îãðàíè÷åíèÿ äâîéñòâåííîé çàäà÷è âûíóæäàþò îáùèå ïåðåìåííûå èç îãðàíè÷åíèé ïðèíèìàòü îäíè è òå æå çíà÷åíèÿ,
ò.å. äâîéñòâåííûå îãðàíè÷åíèÿ áèíàðíû. Îòñþäà âèäíî, ÷òî ñ ïîìîùüþ äâîéñòâåííûõ çàäà÷ ÓÎ ìîæíî ëþáóþ íåáèíàðíóþ ÇÓÎ ñâåñòè ê áèíàðíîé è ðåøèòü åå ñ
ïîìîùüþ ìåòîäîâ ðåøåíèÿ áèíàðíûõ ÓÎ.
2.3.2. Èíäóöèðîâàííûé ãðàô è èíäóöèðîâàííàÿ øèðèíà çàäà÷è ÓÎ
Ââåäåì ïîíÿòèÿ èíäóöèðîâàííîãî ãðàôà è èíäóöèðîâàííîé øèðèíû (induced
width) çàäà÷è ÓÎ, âàæíûå äëÿ ïðèìåíåíèÿ ñòðóêòóðíûõ ìåòîäîâ ðåøåíèÿ çàäà÷
ÓÎ. Èíäóöèðîâàííàÿ øèðèíà îïðåäåëÿåòñÿ â òåðìèíàõ ãðàôà îãðàíè÷åíèé çàäà÷è
ÓÎ.
Ïîïóòíî ââåäåì ïîíÿòèå óïîðÿäî÷åíèÿ ãðàôà èëè çàäà÷è ÓÎ.
Îïðåäåëåíèå. Ðàññìîòðèì çàäà÷ó ÓÎ (V, D, C), ãäå |V | = n, è ñîîòâåòñòâóþùèé ãðàô îãðàíè÷åíèé G = (V, E). Óïîðÿäî÷åíèåì äëÿ çàäà÷è ÓÎ è ãðàôà
G = (V, E) íàçûâàåòñÿ áèåêöèÿ h : V ↔ {1, 2, . . . , n}, êîòîðàÿ ñîîòâåòñòâóåò âåðøèíàì èëè ïåðåìåííûì, ïðîñìàòðèâàåìûì â ïîðÿäêå (h−1 (1), h−1 (2), . . . , h−1 (n)). Åñëè äâå ïåðåìåííûå ñîåäèíåíû â ãðàôå ðåáðîì, èíîãäà ïîëåçíî ïðåäñòàâèòü ïåðâóþ
3 Äâîéñòâåííûé
ãðàô îãðàíè÷åíèé ïî ñóòè ñîâïàäàåò ñ ðåáåðíûì ãðàôîì ãèïåðãðàôà : ðåáåðíûì ãðàôîì ãèïåðãðàôà H = (V, E) ñîãëàñíî [4] íàçûâàåòñÿ ãðàô L(H) = (E, E) ìíîæåñòâî
âåðøèí êîòîðîãî ñîâïàäàåò ñ ìíîæåñòâîì ðåáåð E ãèïåðãðàôà H , ïðè ýòîì äâå âåðøèíû ãðàôà
L(H) ñìåæíû òîãäà è òîëüêî òîãäà, êîãäà ñìåæíû ñîîòâåòñòâóþùèå èì ðåáðà ãèïåðãðàôà H .
Òàêèì îáðàçîì, L(H) ãðàô ïåðåñå÷åíèé ðåáåð ãèïåðãðàôà H .
17
ïåðåìåííóþ, êîòîðàÿ ñòîèò ðàíüøå â óïîðÿäî÷åíèè, â âèäå ¾ðîäèòåëÿ¿, à âòîðóþ
êàê ¾ñûíà¿ ïåðâîé âåðøèíû.
Ïåðåä îïðåäåëåíèåì èíäóöèðîâàííîé øèðèíû ââåäåì áîëåå ïðîñòîå ïîíÿòèå
øèðèíû ãðàôà.
Îïðåäåëåíèå. Ïóñòü G = (V, E) ãðàô, à h íåêîòîðîå óïîðÿäî÷åíèå âåðøèí ýòîãî ãðàôà. Øèðèíîé âåðøèíû v äëÿ ýòîãî óïîðÿäî÷åíèÿ h íàçûâàåòñÿ ÷èñëî âåðøèí, ñîåäèíåííûõ ñ v è ïðåäøåñòâóþùèõ åé â ýòîì óïîðÿäî÷åíèè (ò.å. ÷èñëî
ðîäèòåëåé âåðøèíû v ). Øèðèíîé ãðàôà äëÿ óïîðÿäî÷åíèÿ h íàçûâàåòñÿ ìàêñèìàëüíàÿ øèðèíà âñåõ âåðøèí äëÿ ýòîãî óïîðÿäî÷åíèÿ. È íàêîíåö, øèðèíîé ãðàôà
íàçûâàåòñÿ ìèíèìàëüíàÿ øèðèíà äëÿ âñåõ óïîðÿäî÷åíèé. Íàïðèìåð, äåðåâî èìååò øèðèíó 1, à ïîëíûé ãðàô ñ n âåðøèíàìè èìååò øèðèíó n − 1. Ââåäåì äàëåå
ñëåäóþùèå îïðåäåëåíèÿ:
Îïðåäåëåíèå. Øèðèíîé çàäà÷è ÓÎ äëÿ äàííîãî óïîðÿäî÷åíèÿ íàçûâàåòñÿ
øèðèíà åãî ãðàôà îãðàíè÷åíèé äëÿ ýòîãî óïîðÿäî÷åíèÿ, à øèðèíà ÇÓÎ îïðåäåëÿåòñÿ êàê øèðèíà åå ãðàôà îãðàíè÷åíèé.
Ââåäåì ñîãëàñíî Dechter & Pearl [140] ïîíÿòèå èíäóöèðîâàííîãî ãðàôà ïî îòíîøåíèþ ê äàííîìó óïîðÿäî÷åíèþ.
Îïðåäåëåíèå. Äëÿ äàííîãî ãðàôà G = (V, E) è óïîðÿäî÷åíèÿ h, èíäóöèðîâàííûé ãðàô G∗ = (V, E ∗ ) îïðåäåëÿåòñÿ êàê ãðàô ñ ìèíèìàëüíûì ìíîæåñòâîì ðåáåð
E ∗ , òàêèõ ÷òî E ∗ ⊇ E , è åñëè {x, v} ∈ E ∗ , {y, v} ∈ E ∗ , h(x) < h(v), h(y) < h(v),
è x 6= y , òî {x, y} ∈ E ∗ .
Èíäóöèðîâàííûé ãðàô ìîæåò áûòü ïîñòðîåí çà îäèí ïðîõîä, îáðàáàòûâàÿ âåðøèíû èñõîäíîãî ãðàôà â îáðàòíîì ïîðÿäêå; òî åñòü âíà÷àëå ñîåäèíÿåì ðîäèòåëåé
ïîñëåäíåé âåðøèíû, çàòåì ðîäèòåëåé ïðåäïîñëåäíåé âåðøèíû è ò.ä.
Îïðåäåëåíèå. Èíäóöèðîâàííàÿ øèðèíà w(h) ãðàôà G = (V, E) ïî îòíîøåíèþ
ê óïîðÿäî÷åíèþ h ýòî øèðèíà èíäóöèðîâàííîãî ãðàôà (G∗ , h) ïî îòíîøåíèþ ê
ýòîìó óïîðÿäî÷åíèþ. Èíäóöèðîâàííàÿ øèðèíà w∗ ãðàôà ýòî åãî ìèíèìàëüíàÿ
èíäóöèðîâàííàÿ øèðèíà ïî âñåì óïîðÿäî÷åíèÿì. Èíäóöèðîâàííàÿ øèðèíà çàäà÷è
ÓÎ ïî îòíîøåíèþ ê óïîðÿäî÷åíèþ h ýòî èíäóöèðîâàííàÿ øèðèíà åå ãðàôà
îãðàíè÷åíèé ïî îòíîøåíèþ ê ýòîìó óïîðÿäî÷åíèþ, à èíäóöèðîâàííàÿ øèðèíà
çàäà÷è ÓÎ ýòî èíäóöèðîâàííàÿ øèðèíà åå ãðàôà îãðàíè÷åíèé.
Ñèíîíèì èíäóöèðîâàííîé øèðèíû äðåâîâèäíàÿ øèðèíà [23]. Ðîäñòâåííûì
ÿâëÿåòñÿ ïîíÿòèå òàêæå ÷àñòè÷íîãî k -äåðåâà4 . Dechter & Pearl [140] ïîêàçàëè, ÷òî
äàííàÿ çàäà÷à ÓÎ ïðè çàäàííîì óïîðÿäî÷åíèè ìîæåò áûòü ðåøåíà çà âðåìÿ, ýêñïîíåíöèàëüíîå îò èíäóöèðîâàííîé øèðèíû ïî îòíîøåíèþ ê ýòîìó óïîðÿäî÷åíèþ.
2.3.3. Õîðäàëüíûå ãðàôû
Âû÷èñëåíèå èíäóöèðîâàííîé øèðèíû äîñòàòî÷íî íåñëîæíî äëÿ õîðäàëüíûõ
ãðàôîâ. Íàïîìíèì, ÷òî ãðàô íàçûâàåòñÿ õîðäàëüíûì, åñëè â íåì êàæäûé öèêë
äëèíû 4 èìååò õîðäó.
4 ×àñòè÷íîå
k -äåðåâî ýòî ãðàô, èíäóöèðîâàííàÿ øèðèíà êîòîðîãî íå ïðåâûøàåò k [38].
18
Ìíîãèå òðóäíûå ãðàôîâûå çàäà÷è ëåãêî ðåøàþòñÿ íà õîðäàëüíûõ ãðàôàõ. Íàïðèìåð, íàõîæäåíèå âñåõ ìàêñèìàëüíûõ êëèê â ãðàôå, ÷òî ÿâëÿåòñÿ NP-ïîëíîé
çàäà÷åé íà ãðàôàõ îáùåãî âèäà, ëåãêî ïðîèçâåñòè äëÿ õîðäàëüíûõ ãðàôîâ. Ýòà
çàäà÷à (ïîèñê ìàêñèìàëüíûõ êëèê â õîðäàëüíûõ ãðàôàõ) îáëåã÷àåòñÿ çà ñ÷åò èñïîëüçîâàíèÿ ïðîöåäóðû óïîðÿäî÷åíèÿ max-cardinality 5 .
Óïîðÿäî÷åíèå max-cardinality ãðàôà óïîðÿäî÷èâàåò âåðøèíû, íà÷èíàÿ îò ïåðâîé, ñîãëàñíî ñëåäóþùåìó ïðàâèëó: ïåðâàÿ âåðøèíà âûáèðàåòñÿ ïðîèçâîëüíî. Ïîñëå ýòîãî, ñëåäóþùåé âûáèðàåòñÿ âåðøèíà, ñîåäèíåííàÿ ñ ìàêñèìàëüíûì ÷èñëîì
óæå óïîðÿäî÷åííûõ âåðøèí è ò.ä. Óïîðÿäî÷åíèå max-cardinality ìîæåò áûòü èñïîëüçîâàíî äëÿ ðàñïîçíàâàíèÿ õîðäàëüíûõ ãðàôîâ. Èìåííî, ãðàô õîðäàëüíûé,
òîãäà è òîëüêî òîãäà, êîãäà ïðè óïîðÿäî÷åíèè max-cardinality êàæäàÿ âåðøèíà
âìåñòå ñ åå ðîäèòåëÿìè îáðàçóåò êëèêó. Ìîæíî òàêèì îáðàçîì ïåðå÷èñëèòü âñå
ìàêñèìàëüíûå êëèêè, ñîîòâåòñòâóþùèå êàæäîé âåðøèíå (çàïèñûâàÿ ìíîæåñòâà,
ñîñòîÿùèå èç êàæäîé âåðøèíû è åå ðîäèòåëåé, è îïðåäåëÿÿ çàòåì ìàêñèìàëüíûé
ðàçìåð êëèêè). Çàìåòèì, ÷òî èìååòñÿ íå áîëåå n êëèê, ñîñòîÿùèõ èç âåðøèí è
èõ ðîäèòåëåé. Êðîìå òîãî, ïðè èñïîëüçîâàíèè óïîðÿäî÷åíèÿ max-cardinality õîðäàëüíîãî ãðàôà, óïîðÿäî÷åííûé ãðàô èäåíòè÷åí åãî èíäóöèðîâàííîìó ãðàôó è,
çíà÷èò, åãî øèðèíà ðàâíà åãî èíäóöèðîâàííîé øèðèíå. Ñïðàâåäëèâî
Ïðåäëîæåíèå. Åñëè G∗ èíäóöèðîâàííûé ãðàô ãðàôà G äëÿ íåêîòîðîãî
óïîðÿäî÷åíèÿ, òîãäà ãðàô G∗ õîðäàëüíûé.
3. Ìåòîäû ïîèñêà ðåøåíèÿ ÇÓÎ
3.1. Îñíîâíûå ìåòîäû ðåøåíèÿ
Ìåòîäû ïîñòðîåíèÿ ðåøåíèÿ çàäà÷è ÓÎ ìîãóò áûòü ðàçáèòû íà òðè êëàññà
[329]: 1) Ïåðâûé êëàññ ñîäåðæèò âàðèàíòû ïîèñêà ñ âîçâðàòàìè. Ýòè àëãîðèòìû ñòðîÿò ðåøåíèå ñ ïîìîùüþ ðàñøèðåíèÿ ÷àñòè÷íîãî ðåøåíèÿ øàã çà øàãîì,
èñïîëüçóÿ ðàçëè÷íûå ýâðèñòèêè è ïðèìåíÿÿ ðàçóìíûå ñòðàòåãèè âîçâðàòà èç òóïèêîâûõ âåðøèí. Ñíèæåíèå ðàçìåðà çàäà÷è ïîçâîëÿåò óìåíüøèòü ðàçìåðû ïðîñòðàíñòâà ïîèñêà. 2) Àëãîðèòìû ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé èñêëþ÷àþò íåêîòîðûå ýëåìåíòû, íå âõîäÿùèå â ðåøåíèÿ, èç ïðîñòðàíñòâà ïîèñêà.  îáùåì, ýòè
àëãîðèòìû íå èñêëþ÷àþò âñå ýëåìåíòû, íå âõîäÿùèå â ðåøåíèÿ è, ñëåäîâàòåëüíî, îíè íå ñòðîÿò ñàìè ïî ñåáå ðåøåíèÿ, à èñïîëüçóþòñÿ ëèáî äëÿ ïðåïðîöåññèíãà
çàäà÷è äî èñïîëüçîâàíèÿ àëãîðèòìà äðóãîãî òèïà, èëè ïåðåìåæàþòñÿ ñ øàãàìè
àëãîðèòìà äðóãîãî òèïà íàïðèìåð, ïîèñêà ñ âîçâðàòàìè äëÿ ïîâûøåíèÿ ïðîèçâîäèòåëüíîñòè ïîñëåäíåãî. 3) Íàêîíåö, ñòðóêòóðíûå àëãîðèòìû èñïîëüçóþò
èíôîðìàöèþ î ñòðóêòóðå ïåðâè÷íîãî èëè äâîéñòâåííîãî ãðàôà îãðàíè÷åíèé çàäà÷è. Èìåþòñÿ ðàçëè÷íûå àëãîðèòìû ýòîãî êëàññà, ïðè ýòîì íåêîòîðûå ïðîèçâîäÿò
äåêîìïîçèöèþ èñõîäíîé çàäà÷è ÓÎ íà ñëàáî ñâÿçàííûå ïîäçàäà÷è, êîòîðûå ìîãóò
áûòü ðåøåíû ñ ïîìîùüþ ìåòîäîâ èç ïðåäûäóùèõ äâóõ êëàññîâ. Òàêèì îáðàçîì,
5 max-cardinality
ìàêñèìàëüíîå êîëè÷åñòâî ýëåìåíòîâ.
19
ñòðóêòóðíûå àëãîðèòìû ìîãóò òàêæå èñïîëüçîâàòüñÿ â ñî÷åòàíèè ñ àëãîðèòìàìè
äðóãèõ òèïîâ. Âñå àëãîðèòìû èç óêàçàííûõ âûøå òðåõ êëàññîâ ñèñòåìàòè÷åñêè
èññëåäóþò ïðîñòðàíñòâî ðåøåíèé. Ýòè àëãîðèòìû:
• êîððåêòíû, òî åñòü îíè çàêàí÷èâàþò ðàáîòó ñ ïðèñâîåíèåì çíà÷åíèé âñåì
ïåðåìåííûì, êîòîðîå ÿâëÿåòñÿ ðåøåíèåì;
• ïîëíû, ò.å. îíè ñïîñîáíû èññëåäîâàòü âñå ïðîñòðàíñòâî ïîèñêà è íàéòè âñå
ðåøåíèÿ.
Îáñóäèì ìåòîäû ïîèñêà ñ âîçâðàòàìè.
3.2. Ïîèñê ñ âîçâðàòàìè (Backtrack Search) è åãî ïðîèçâîäíûå
3.2.1. Ïîèñê ñ âîçâðàòàìè
Ôîðìóëèðîâêà çàäà÷è ÓÎ â âèäå çàäà÷ ïîèñêà ïîçâîëÿåò ðåøàòü çàäà÷è ÓÎ ñ
ïîìîùüþ àëãîðèòìîâ ïîèñêà.
Ïîèñê â ãëóáèíó, â êîòîðîì êàæäûé ðàç âûáèðàþòñÿ çíà÷åíèÿ äëÿ îäíîé ïåðåìåííîé è âûïîëíÿåòñÿ âîçâðàò, åñëè áîëüøå íå îñòàåòñÿ äîïóñòèìûõ çíà÷åíèé,
êîòîðûå ìîæíî áûëî áû ïðèñâîèòü ïåðåìåííîé, íàçûâàåòñÿ ïîèñêîì ñ âîçâðàòàìè
(backtracking)6 .
Äåðåâî ïðèñâîåíèé çíà÷åíèé ïåðåìåííûì ýòî äåðåâî, â êîòîðîì êàæäàÿ âåðøèíà ñîîòâåòñòâóåò ìíîæåñòâó ïðèñâîåíèé. Êîðåíü äåðåâà îòâå÷àåò ïóñòîìó ìíîæåñòâó ïðèñâîåíèé.  êàæäîé âåðøèíå v âûáèðàåòñÿ ïåðåìåííàÿ, êîòîðîé â v íå
áûëî ïðèñâîåíî çíà÷åíèå. Àëãîðèòìû ïîèñêà ñ âîçâðàòàìè âûïîëíÿþò ïîèñê â
ãëóáèíó â ýòèõ äåðåâüÿõ ïðèñâîåíèé çíà÷åíèé.
Ïðîñòåéøèì ìåòîäîì ðåøåíèÿ çàäà÷ ÓÎ ÿâëÿåòñÿ ìåòîä Generate and Test,
êîòîðûé ïîðîæäàåò êàæäîå âîçìîæíîå ðåøåíèå ïóòåì ïðèñâîåíèÿ âñåõ âîçìîæíûõ çíà÷åíèé äëÿ êàæäîé ïåðåìåííîé è ïðîâåðÿåò, óäîâëåòâîðÿåò ëè ýòî ðåøåíèå âñåì îãðàíè÷åíèÿì.  íàèõóäøåì ñëó÷àå ÷èñëî âñåõ âîçìîæíûõ ïðîâåðåííûõ
ðåøåíèé ðàâíî ðàçìåðó äåêàðòîâà ïðîèçâåäåíèÿ äîìåíîâ âñåõ ïåðåìåííûõ7 . Ïîíÿòíî, ÷òî ìåòîä ïîëíîãî ïåðåáîðà ìîæåò òðåáîâàòü áîëüøèõ çàòðàò âðåìåíè ïðè
ðåøåíèè çàäà÷.
Àëãîðèòìû ïîèñêà ñ âîçâðàòàìè ýòî àëãîðèòìû ñèñòåìàòè÷åñêîãî ïîèñêà
äëÿ çàäà÷ ÓÎ, êîòîðûå èñïîëüçóþò ÷àñòè÷íûå ðåøåíèÿ, êîòîðûå ñòðîÿòñÿ ïóòåì
ïîî÷åðåäíîãî ïðèñâàèâàíèÿ çíà÷åíèé ïåðåìåííûì. Åñëè àëãîðèòì îáíàðóæèâàåò
òóïèêîâóþ âåðøèíó, â êîòîðîì ÷àñòè÷íîå ðåøåíèå íå èìååò ñîâìåñòíîãî ðàñøèðåíèÿ, òî âûáîð ïîñëåäíåãî ïðèñâîåíèÿ îòìåíÿåòñÿ è äåëàåòñÿ ïîïûòêà ïðèñâîåíèÿ
äðóãîãî çíà÷åíèÿ. Ýòîò ïðîöåññ ïîâòîðÿåòñÿ äî òåõ ïîð, ïîêà íå áóäóò èñ÷åðïàíû
âñå âîçìîæíîñòè è/èëè íå áóäåò íàéäåíî ðåøåíèå. Àëãîðèòìû ïîèñêà ñ âîçâðàòàìè
6 Èñïîëüçîâàíèå
ïîèñêà ñ âîçâðàòàìè äëÿ óäîâëåòâîðåíèÿ îãðàíè÷åíèé áûëî ïðåäëîæåíî
Bitner & Reingold (1975) â [71].
7 Åñëè äîìåíû âñåõ n ïåðåìåííûõ èìåþò ðàçìåð d, òî ýòà âåëè÷èíà ñîñòàâëÿåò dn .
20
Procedure BT(i)
Foreach Val In D[i]
Assignments[i]:= Val
Consistent:=True
For h:=1 To i-1 While Consistent
Consistent:=Test(i,h)
If Consistent
If i=n
Show - Solution()
Else
BT(i+1)
Return False
End Procedure
Ðèñ. 7. Ïîèñê ñ âîçâðàòàìè.
ÿâëÿþòñÿ ïîëíûìè â òîì ñìûñëå, ÷òî îíè íàõîäÿò ðåøåíèå, åñëè îíî ñóùåñòâóåò.
Ðàçëè÷íûå àëãîðèòìû ïîèñêà ñ âîçâðàòàìè ðàçëè÷àþòñÿ ïî ñêîðîñòè îáíàðóæåíèÿ òóïèêîâûõ âåðøèí, à òàêæå ïî òîìó, íàñêîëüêî äàëåêî îíè ñïîñîáíû äåëàòü
âîçâðàò. Àëãîðèòì ïîèñêà ñ âîçâðàòàìè õàðàêòåðèçóåòñÿ ýêñïîíåíöèàëüíîé âðåìåííîé ñëîæíîñòüþ, íî ÿâëÿåòñÿ ëèíåéíûì ïî èñïîëüçóåìîé ïàìÿòè (Mackworth,
1977) [262].
 õðîíîëîãè÷åñêîì ïîèñêå ñ âîçâðàòàìè (chronological backtracking) ïðîöåññ
ïîèñêà ðàññìàòðèâàåòñÿ êàê ïîñòåïåííîå ðàñøèðåíèå ÷àñòè÷íûõ ðåøåíèé (Bitner
& Reingold, 1975) [71]. Ïîðÿäîê çàäàíèÿ çíà÷åíèé ýòî ïîðÿäîê, â êîòîðîì ïðèñâàèâàþòñÿ çíà÷åíèÿ ïåðåìåííûì âî âðåìÿ ïîèñêà. Íà óðîâíå i ïîðÿäêà ïðèñâàèâàíèÿ ïðîøëûå ïåðåìåííûå èìåþò èíäåêñû, ìåíüøèå ÷åì i, ïðè÷åì èì óæå ïðèñâîåíû çíà÷åíèÿ. Áóäóùèå ïåðåìåííûå èìåþò èíäåêñû, áîëüøèå ÷åì i è èì åùå
íå ïðèñâîåíû çíà÷åíèÿ. Íà ðèñ. 7 îïèñàí àëãîðèòì ïîèñêà ñ âîçâðàòàìè. Äëÿ
ïðîñòîòû, çàïèñàííûé çäåñü ïñåâäîêîä íå ðàçëè÷àåò ñëó÷àåâ, êîãäà íå íàéäåíî
ðåøåíèé èëè êîãäà íå íàéäåíî áîëüøå ðåøåíèé, çíà÷åíèå ëîæü âîçâðàùàåòñÿ â
îáîèõ óêàçàííûõ ñëó÷àÿõ. Àëãîðèòì îïèñàí äëÿ ñëó÷àÿ áèíàðíûõ îãðàíè÷åíèé
c(xi , xj ). Èñïîëüçóþòñÿ ñëåäóþùèå îáîçíà÷åíèÿ:
• n ÷èñëî ïåðåìåííûõ çàäà÷è.
• Assignments [ ]. Ýòîò ìàññèâ ðàçìåðíîñòè n çàïîìèíàåò çíà÷åíèå, ïðèñâîåííîå â íàñòîÿùèé ìîìåíò êàæäîé ïåðåìåííîé.
• D[ ]. i-é ýëåìåíò ýòîãî ìàññèâà ðàçìåðíîñòè n ñîäåðæèò ïîñëåäîâàòåëüíîñòü
ýëåìåíòîâ äîìåíà, ñîîòâåòñòâóþùåãî ïåðåìåííîé xi .
Ôóíêöèÿ T est(i, j) ïðèíèìàåò çíà÷åíèå èñòèíà, åñëè îãðàíè÷åíèå c(xi , xj ) óäîâëåòâîðÿåòñÿ òåêóùèìè ïðèñâîåíèÿìè çíà÷åíèé ïåðåìåííûì xi è xj . Åñëè îãðàíè÷å21
- «ɦɟɬɚɧɢɹ»
x1
5
4
4
5
3
2
2
1
1
4
5
4
4
3
5
4
5
4
x2
1
x3
4
x4
5
Ðèñ. 8. Ïîèñê ñ âîçâðàòàìè êàê îáõîä äåðåâà.
íèÿ c(xi , xj ) íå ñóùåñòâóåò, Test( ) ïðèíèìàåò èñòèíà (ýòî íå ñ÷èòàåòñÿ ïðîâåðêîé
îãðàíè÷åíèÿ). Êàæäûé ýëåìåíò äîìåíà Di ïîî÷åðåäíî ïðèñâàèâàåòñÿ ïåðåìåííîé
xi , ðàñøèðÿÿ ïðèñâîåíèå çíà÷åíèé ïåðåìåííûì x1 , . . . , xi−1 . Åñëè ïðîâåðêà îãðàíè÷åíèÿ äëÿ ïðåäûäóùåé ïåðåìåííîé íå ïðîõîäèò, ýòî ÷àñòè÷íîå ïðèñâîåíèå áîëüøå
íå ðàñøèðÿåòñÿ. Åñëè äîìåí Di èñ÷åðïàí (òóïèê èëè ïîëíîå óíè÷òîæåíèå äîìåíà),
àëãîðèòì äåëàåò âîçâðàò äî óðîâíÿ i − 1 ñ öåëüþ íàõîæäåíèÿ äðóãîãî ñîâìåñòíîãî
ïðèñâîåíèÿ äëÿ xi−1 . Åñëè æå òàêîâîãî íåò, äåëàåòñÿ âîçâðàò ê xi−2 , è ò.ä. ïîêà íå
áóäåò íàéäåíà ïåðåìåííàÿ ñ äðóãèì ñîâìåñòíûì ïðèñâîåíèåì èëè áóäåò ïîêàçàíî,
÷òî ÇÓÎ íå èìååò ðåøåíèÿ. Äëÿ äàííîãî ñîâìåñòíîãî ïðèñâîåíèÿ (âñå ïðîâåðêè
îãðàíè÷åíèé áûëè óñïåøíû), äåëàåòñÿ ðåêóðñèâíûé âûçîâ BT(i + 1) èëè, åñëè
íå îñòàåòñÿ ñâîáîäíûõ ïåðåìåííûõ, ïîëó÷åíî ðåøåíèå. Ïîèñê ñ âîçâðàòàìè ìîæåò ðàññìàòðèâàòüñÿ êàê îáõîä âåðøèí äåðåâà. Íà ðèñ. 8 ïîêàçàíî, êàê ïîèñê ñ
âîçâðàòàìè ðåøàåò çàäà÷ó, îïèñàííóþ íà íà ðèñ. 6. Êàæäàÿ âåòâü ñîîòâåòñòâóåò
÷àñòè÷íîìó ïðèñâîåíèþ (êîòîðîå ñòàíîâèòñÿ ïîëíûì, êîãäà âåòâü äîõîäèò äî n-é
ïåðåìåííîé) è óðîâåíü i äåðåâà ïðåäñòàâëÿåò âûáîðû çíà÷åíèé, ñäåëàííûå äëÿ
i-é (ñîãëàñíî óïîðÿäî÷åíèþ) ïåðåìåííîé. ×åðíûå è áåëûå âåðøèíû ïðåäñòàâëÿþò
ñîîòâåòñòâåííî óñïåøíûå è íåóäà÷íûå ïðèñâîåíèÿ â äàííîé òî÷êå ïîèñêà. Âåðøèíû ñíàáæåíû îïèñàíèåì çíà÷åíèé äîìåíîâ, ïðèïèñàííûõ äàííîé ïåðåìåííîé
â ðàññìàòðèâàåìîé òî÷êå ïîèñêà. Ïóòü ïîèñêà ïîêàçàí ïóíêòèðíîé íàïðàâëåííîé
ëèíèåé.
Ïîèñê ñ âîçâðàòàìè íåýôôåêòèâåí â òîì ñìûñëå, ÷òî òðåáóåò âûïîëíåíèÿ
áîëüøåãî ÷èñëà îïåðàöèé, ÷åì ýòî íóæíî äëÿ íàõîæäåíèÿ ðåøåíèÿ.
3.2.2. Ïðîáëåìà ìå÷óùåãîñÿ ïîâåäåíèÿ àëãîðèòìà ñ âîçâðàòàìè
Ìåòàíèÿ (Gaschnig, 1979) [181] ÿâëÿþòñÿ ãëàâíûì ôàêòîðîì ïëîõîãî ïîâåäåíèÿ ïîèñêà ñ âîçâðàòàìè: ïîèñê áûâàåò áåçóñïåøåí ïîâòîðíî ïî òîé æå ïðè÷èíå.
Íàïðèìåð, ïóñòü c(xg , xi ) óñëîâèå òîãî, ÷òî êîíêðåòíîå ïðèñâîåíèå ïåðåìåííîé
xg çàïðåùàåò âñå ïîòåíöèàëüíûå çíà÷åíèÿ äëÿ xi . Ïîèñê ñ âîçâðàòàìè áåçóñïåøåí
22
íà óðîâíå i äëÿ êàæäîãî ýëåìåíòà Di , ïðè÷åì ýòà íåóäà÷à ïîâòîðÿåòñÿ äëÿ êàæäîé
êîìáèíàöèè ïðèñâîåíèé íà ïðîìåæóòî÷íûõ óðîâíÿõ ïåðåìåííîé xh , ãäå g < h < i.
Ìåòàíèå íàáëþäàåòñÿ â ïîïûòêå ïîèñêà ñ âîçâðàòàìè ðåøèòü çàäà÷ó íà ðèñ. 6.
Ðèñ. 8 ïîêàçûâàåò ïîâòîðÿþùèåñÿ íåóäà÷íûå ïîïûòêè ïîèñêà â ñâÿçè ñ óñëîâèåì c(x2 , x4 ). Ìåòàíèé ñòàíîâèòñÿ áîëüøå ïðè óâåëè÷åíèè ÷èñëà ïðîìåæóòî÷íûõ
ïåðåìåííûõ (è âåëè÷èí èõ äîìåíîâ).
3.2.3. Èíòåëëåêòóàëüíûé ïîèñê ñ âîçâðàòàìè
Èíòåëëåêòóàëüíûé ïîèñê ñ âîçâðàòàìè (intelligent backtracking) [42], [86] ýòî ñîáèðàòåëüíûé òåðìèí, îáúåäèíÿþùèé àëãîðèòìû ïîèñêà ñ âîçâðàòàìè, ïîçâîëÿþùèå ðåøàòåëþ îáíàðóæèòü, ÷òî êîíêðåòíàÿ òóïèêîâàÿ âåðøèíà äåðåâà ïðèñâîåíèÿ çíà÷åíèé íå ñâÿçàíà ñ íåêîòîðûìè ïðèñâîåíèÿìè. À èìåííî, åñëè òóïèêîâàÿ âåðøèíà áûëà îáíàðóæåíà íà óðîâíå l è àëãîðèòì ìîæåò âûÿñíèòü, ÷òî
ïðèñâîåíèÿ, ñäåëàííûå íà óðîâíÿõ j ∈ {k + 1, . . . , l} íå îòíîñÿòñÿ ê ýòîé òóïèêîâîé âåðøèíå, îí ìîæåò ïåðåéòè îáðàòíî ê óðîâíþ k , ïîñêîëüêó ïîïûòêà ðàçëè÷íûõ ïðèñâîåíèé ýòèì ïåðåìåííûì ïîñòîÿííî ïðèâîäèëà áû ê òóïèêîâîé âåðøèíå.
Òàêèì îáðàçîì, âìåñòî õðîíîëîãè÷åñêîãî ïîèñêà ñ âîçâðàòàìè íà óðîâíå l − 1,
ýòîò àëãîðèòì ïîçâîëÿåò èçáåæàòü ëèøíåé ðàáîòû, ñâÿçàííîé ñ ïîïûòêîé ïðèñâàèâàíèÿ ðàçëè÷íûõ ïðèñâîåíèé ïåðåìåííûì íà ýòèõ óðîâíÿõ, è âìåñòî ýòîãî ïðè
âîçâðàòå ïðÿìî ïûòàåòñÿ ïðèñâîèòü äðóãîå çíà÷åíèå íà áîëåå ðàííåì óðîâíå k .
Ê ðàçëè÷íûì ìåòîäàì èíòåëëåêòóàëüíîãî ïîèñêà ñ âîçâðàòàìè îòíîñÿòñÿ îáðàòíûé ïåðåõîä (backjumping), îáðàòíûé ïåðåõîä, óïðàâëÿåìûé êîíôëèêòàìè
(conict-directed backjumping), îáðàòíàÿ ïðîâåðêà (backchecking), ïðîñòàâëåíèå
îáðàòíûõ îòìåòîê (backmarking).
Îñíîâíîé ìåòîä îáðàòíîãî ïåðåõîäà (backjumping) áûë ðàçðàáîòàí â ðàáîòàõ
(Gaschnig, 1977, 1979) [180], [181]. Ìåòîäû îáðàòíîãî ïåðåõîäà ÿâëÿþòñÿ îäíèì èç
ãëàâíûõ ñðåäñòâ äëÿ ïðåîäîëåíèÿ òåíäåíöèé ïîèñêà ñ âîçâðàòàìè ê ïîâòîðíîìó
íàõîæäåíèþ îäíèõ è òåõ æå òóïèêîâûõ âåðøèí. Òóïèêîâàÿ âåðøèíà âñòðå÷àåòñÿ, êîãäà ó xi íå îñòàåòñÿ ñîâìåñòíûõ çíà÷åíèé, â ýòîì ñëó÷àå àëãîðèòì ïîèñêà ñ
âîçâðàòàìè âîçâðàùàåòñÿ â âåðøèíó xi−1 . Ïóñòü ñóùåñòâóåò íîâîå çíà÷åíèå äëÿ
xi−1 , íî íåò îãðàíè÷åíèé ìåæäó xi è xi−1 . Òóïèêîâàÿ âåðøèíà áóäåò â xi äëÿ
ëþáîãî çíà÷åíèÿ ïåðåìåííîé xi−1 , ïîêà íå áóäóò èñ÷åðïàíû âñå çíà÷åíèÿ ïåðåìåííîé xi−1 . Ìû ìîæåì îáîéòè ýòó ñèòóàöèþ ïóòåì îïðåäåëåíèÿ ïåðåìåííîé âèíîâíèöû çà òóïèê è ïîñëåäóþùèì íåìåäëåííûì îáðàòíûì ïåðåõîäîì ê ïðèñâîåíèþ çíà÷åíèÿ ïåðåìåííîé-âèíîâíèöû òóïèêà (êîíôëèêòà), âìåñòî ïîâòîðíîãî
ôèêñèðîâàíèÿ çíà÷åíèÿ õðîíîëîãè÷åñêè ïðåäøåñòâóþùåé ïåðåìåííîé. Îïðåäåëåíèå ïåðåìåííîé-âèíîâíèöû òóïèêà â àëãîðèòìå ïîèñêà ñ âîçâðàòàìè îñíîâàíî íà
ïîíÿòèè êîíôëèêòíîãî ìíîæåñòâà. Äëÿ ïðîñòîòû èçëîæåíèÿ áóäåì ïðåäïîëàãàòü, ÷òî ïåðåìåííûå óïîðÿäî÷åíû ñëåäóþùèì îáðàçîì: h = {x1 , . . . , xn }.
−
Âìåñòî òîãî, ÷òîáû äîæèäàòüñÿ òóïèêîâîé âåðøèíû →
a i 8 , ìåòîä îáðàòíîãî ïåðåõîäà Gaschnig'à [181] çàïîìèíàåò íåêîòîðóþ èíôîðìàöèþ â ïðîöåññå ïîñòðîåíèÿ
−
8→
a
i
òóïèêîâûé êîðòåæ, ïðåäñòàâëÿþùèé ñîáîé íàáîð ïðèñâîåíèé çíà÷åíèé ïåðåìåííûì.
23
4
5
3
3
1
4
1
Ɉɛɪɚɬɧɵɣ
ɩɟɪɟɯɨɞ
5
x1
5
4
4
5
Ɉɛɪɚɬɧɵɣ
ɩɟɪɟɯɨɞ
4
x2
1
x3
4
x4
Ðèñ. 9. Ìåòîä îáðàòíîãî ïåðåõîäà.
−
→
a i , è èñïîëüçóåò ýòó èíôîðìàöèþ äëÿ îïðåäåëåíèÿ ïåðåìåííîé xb âèíîâíèöû
òóïèêîâîé âåðøèíû (ñì. ðèñ. 9). Àëãîðèòì èñïîëüçóåò ìåòîä ïðîñòàâëåíèÿ îòìåòîê, ïîñðåäñòâîì êîòîðîãî äëÿ êàæäîé ïåðåìåííîé èñïîëüçóåòñÿ óêàçàòåëü íà
ïîñëåäíåãî ïðåäøåñòâåííèêà, êîòîðûé îêàçàëñÿ íåñîâìåñòíûì ñ ëþáûì èç çíà÷å−
íèé ïåðåìåííîé. Ïðè ïîñòðîåíèè êîðòåæåé →
a íà ïðÿìîì øàãå àëãîðèòì ñîõðàíÿåò
óêàçàòåëü highi äëÿ êàæäîé ïåðåìåííîé xi . Ýòîò óêàçàòåëü îïðåäåëÿåò ïîñëåäíþþ
ïåðåìåííóþ, ïðîâåðåííóþ íà ñîâìåñòíîñòü ñ xi , åñëè áûëî îáíàðóæåíî, ÷òî îíà ÿâ0
ëÿåòñÿ ñàìîé ïåðâîé ïåðåìåííîé, êîíôëèêòóþùåé ñî çíà÷åíèåì â Di . Íàïðèìåð,
â ñëó÷àå, êîãäà íåò ñðàâíèìûõ çíà÷åíèé äëÿ xi è åñëè highi = 3, ýòî ïîêàçûâàåò,
→
→
÷òî −
a 3 êîíôëèêòíîå ìíîæåñòâî ïåðåìåííîé xi . Åñëè −
a i èìååò ñîâìåñòíîå çíà÷åíèå, òî highi ïðèïèñûâàåòñÿ çíà÷åíèå i − 1. Àëãîðèòì ïåðåõîäèò èç òóïèêîâîãî
→
ëèñòà −
a i , êîòîðûé íåñîâìåñòåí ñ xi+1 , îáðàòíî ê ïåðåìåííîé xhighi+1 âèíîâíèöå
êîíôëèêòà, òàê êàê òóïèêîâàÿ ïåðåìåííàÿ xi+1 .
Äâå èäåè: îáðàòíûé ïåðåõîä ê ïåðåìåííîé, êîòîðàÿ, áóäó÷è çàôèêñèðîâàíà,
íàõîäèòñÿ â êîíôëèêòå ñ òåêóùåé ïåðåìåííîé, è îáðàòíûé ïåðåõîä ê âíóòðåííèì
òóïèêàì, èíòåãðèðîâàíû â îäíîì àëãîðèòìå îáðàòíîãî ïåðåõîäà, óïðàâëÿåìîãî
êîíôëèêòàìè (Prosser, 1993) [309]. Ýòîò àëãîðèòì èñïîëüçóåò ñõåìó îáðàòíîãî ïåðåõîäà, èñïîëüçóÿ èíôîðìàöèþ, ñîáðàííóþ â ïðîöåññå ïîèñêà. Äëÿ êàæäîé ïåðåìåííîé àëãîðèòì ïîääåðæèâàåò èíäóöèðîâàííîå ìíîæåñòâî îáðàòíûõ ïåðåõîäîâ.
→
Äëÿ äàííîãî òóïèêîâîãî êîðòåæà −
a i , îïðåäåëèì ìíîæåñòâî îáðàòíûõ ïåðåõîäîâ
−
→
äëÿ a i (èëè äëÿ xi+1 ) êàê ìíîæåñòâî ïåðåìåííûõ, ó÷àñòâóþùèõ â ñàìîì ðàííåì
→
ìèíèìàëüíîì êîíôëèêòíîì ìíîæåñòâå −
a i . Îáðàòíûé ïåðåõîä, óïðàâëÿåìûé êîíôëèêòàìè, âêëþ÷àåò âî ìíîæåñòâî ïåðåõîäîâ ïåðåìåííóþ, åñëè åå òåêóùåå çíà÷åíèå êîíôëèêòóåò ñî çíà÷åíèåì òåêóùåé ïåðåìåííîé, êîòîðàÿ íå áûëà â êîíôëèêòå
íè ñ îäíèì áîëåå ðàííèì ïðèñâîåíèåì ïåðåìåííîé.
Ïðåäëîæåííûé Ñòàëìàíîì è Çþññìàíîì (Stallman & Sussman, 1977) [355] ìåòîä ïîèñêà ñ âîçâðàòàìè óïðàâëÿåìîãî çàâèñèìîñòÿìè, ÿâëÿþùèéñÿ îáùåé è
ìîùíîé ôîðìîé èíòåëëåêòóàëüíîãî ïîèñêà ñ âîçâðàòàìè, ïðèâåë ê ðàçðàáîòêå
24
ñèñòåì îáåñïå÷åíèÿ èñòèííîñòè (truth maintenance systems) (Doyle, 1979) [152].
Ñâÿçü ìåæäó ýòèìè äâóìÿ íàïðàâëåíèÿìè ïðîàíàëèçèðîâàíà â (Kleer, 1989) [130].
 óêàçàííîé ðàáîòå [355] áûëà òàêæå ïðåäëîæåíà èäåÿ ðåãèñòðàöèè îãðàíè÷åíèÿ
(constraint recording), â ñîîòâåòñòâèè ñ êîòîðîé ÷àñòè÷íûå ðåçóëüòàòû, ïîëó÷åííûå â õîäå ïîèñêà, ìîæíî ñîõðàíÿòü è ïîâòîðíî èñïîëüçîâàòü íà ïîñëåäóþùèõ
ýòàïàõ ýòîãî ïîèñêà. Äàííàÿ èäåÿ áûëà ââåäåíà ôîðìàëüíî â ïîèñê ñ âîçâðàòàìè
â ðàáîòå (Dechter, 1990 a) [133].
Îñîáåííî ïðîñòûì ìåòîäîì ÿâëÿåòñÿ ïðîñòàâëåíèå îáðàòíûõ îòìåòîê (backmarking) (Gaschnig, 1979) [181], â êîòîðîì äëÿ ïðåäîòâðàùåíèÿ ïîâòîðíîé ïðîâåðêè îãðàíè÷åíèé ñîõðàíÿþòñÿ è èñïîëüçóþòñÿ ñîâìåñòíûå è íåñîâìåñòíûå ïîïàðíûå ïðèñâàèâàíèÿ. Ïðîñòàâëåíèå îáðàòíûõ îòìåòîê [181] ýòî àëãîðèòì òèïà
êýøèðîâàíèÿ, ñíèæàþùèé ÷èñëî ïðîâåðîê íà ñîâìåñòíîñòü, íåîáõîäèìûõ äëÿ ïîñòðîåíèÿ êàæäîé âåðøèíû, íå ïûòàÿñü îòñå÷ü ÷àñòü ïðîñòðàíñòâà ïîèñêà ñàìîãî
ïî ñåáå. Ñîõðàíÿÿ èíôîðìàöèþ î òîì, ãäå ïðîâåðêà íà ñîâìåñòíîñòü íå ïðîøëà
ðàíåå, ïðîñòàâëåíèå îáðàòíûõ îòìåòîê ìîæåò èñêëþ÷èòü íåîáõîäèìîñòü èçëèøíå
ïîâòîðÿòü âûïîëíåííûå ðàíåå ïðîâåðêè.
Îïèøåì ýòîò àëãîðèòì êàê óñîâåðøåíñòâîâàíèå íàèâíîãî àëãîðèòìà ïîèñêà ñ
âîçâðàòàìè. Íàïîìíèì, ÷òî àëãîðèòì ïîèñêà ñ âîçâðàòàìè äâèæåòñÿ ëèáî âïåðåä,
ëèáî íàçàä â ïðîñòðàíñòâå ïîèñêà. Äîïóñòèì, ÷òî òåêóùàÿ ïåðåìåííàÿ xi , à
xp ñàìàÿ ïåðâàÿ ïåðåìåííàÿ (ñîãëàñíî óïîðÿäî÷åíèþ), êîòîðàÿ èçìåíèëà ñâîå
çíà÷åíèå ïîñëå ïîñëåäíåãî çàõîäà â xi . Ïîíÿòíî, ÷òî ëþáàÿ ïðîâåðêà çíà÷åíèé
xi ïî îòíîøåíèþ ê ïåðåìåííûì, ïðåäøåñòâóþùèì xp äàñò òå æå ðåçóëüòàòû: åñëè îíà áûëà íåóäà÷íîé ïî îòíîøåíèþ ê áîëåå ðàííèì ïðèñâîåíèÿì, òî îíà áóäåò
íåóäà÷íà ñíîâà; åñëè îíà áûëà óñïåøíîé, òî îíà îïÿòü áóäåò óñïåøíîé. Ñëåäîâàòåëüíî, ïðè ñîõðàíåíèè ïðàâèëüíîé èíôîðìàöèè èç áîëåå ðàííèõ ÷àñòåé ïîèñêà, çíà÷åíèÿ â äîìåíå ïåðåìåííîé xi ìîãóò áûòü ëèáî íåìåäëåííî ðàñïîçíàíû,
êàê íåñîâìåñòíûå, ëèáî åùå ïðîâåðåíû òîëüêî ïî îòíîøåíèþ ê ïðåäøåñòâóþùèì
ïðèñâîåíèÿì, íà÷èíàÿ ñ xp . Ïðîñòàâëåíèå îáðàòíûõ îòìåòîê ðåàëèçóåò ýòó èäåþ
ñ ïîìîùüþ èñïîëüçîâàíèÿ äâóõ íîâûõ òàáëèö. Âíà÷àëå äëÿ êàæäîé ïåðåìåííîé
xi è äëÿ êàæäîãî èç åå çíà÷åíèé av , ïðîñòàâëåíèå îáðàòíûõ îòìåòîê çàïîìèíàåò
ñàìóþ ïåðâóþ ïðåäøåñòâóþùóþ ïåðåìåííóþ xp , òàêóþ, ÷òî òåêóùåå ÷àñòè÷íîå
→
ïðèñâàèâàíèå −
a p êîíôëèêòóåò ñ xi = av . Ýòà èíôîðìàöèÿ ñîäåðæèòñÿ â òàáëèöå
ñ ýëåìåíòàìè Mi,v . (Çàìåòèì, ÷òî ýòî ïðåäïîëàãàåò, ÷òî îãðàíè÷åíèÿ, âêëþ÷àþùèå áîëåå ðàííèå ïåðåìåííûå, ïðîòåñòèðîâàíû äî îãðàíè÷åíèé, âêëþ÷àþùèõ
áîëåå ïîçäíèå ïåðåìåííûå). Åñëè xi = av ñîâìåñòíî ñî âñåìè ðàíåå âûïîëíåííûìè
→
÷àñòè÷íûìè ïðèñâîåíèÿìè −
a j , j < i, òî Mi,v = i. Íàïðèìåð, M10,2 = 4 îçíà÷àåò,
−
→
→
→
÷òî a 4 îêàçàëîñü íåñîâìåñòíûì ñ x10 = a2 ïîñëå çàäàíèÿ çíà÷åíèé è ÷òî −
a 1, −
a 2,
−
→
a 3 íå êîíôëèêòîâàëè ñ x10 = a2 . Âòîðàÿ òàáëèöà ñ ýëåìåíòàìè lowi çàïîìèíàåò ñàìûé ïåðâûé ýëåìåíò, èçìåíèâøèé çíà÷åíèå ïîñëå òîãî, êàê ïåðåìåííîé xi â
ïîñëåäíèé ðàç áûëî ïðèñâîåíî çíà÷åíèå. Ýòà èíôîðìàöèÿ âêëþ÷åíà â èñïîëüçîâàíèå íà êàæäîì øàãå ïîðîæäåíèÿ âåðøèíû. Åñëè Mi,v ìåíüøå lowi , òî àëãîðèòì
çíàåò, ÷òî ïåðåìåííàÿ, íà êîòîðóþ óêàçûâàåò Mi,v , íå èçìåíÿëàñü è ÷òî xi = av
→
áóäåò ïðèâîäèòü ê òóïèêó ñíîâà ïðè ïðîâåðêå ñ −
a Mi,v , òàê ÷òî íèêàêîé äàëüíåé25
øåé ïðîâåðêè â ýòîé âåðøèíå íà ñîâìåñòíîñòü íå òðåáóåòñÿ. Åñëè Mi,v íå ìåíüøå
→
lowi , òî xi = av ñîâìåñòíî ñ −
a j äëÿ âñåõ j < lowi , è ýòè ïðîâåðêè ìîãóò áûòü
ïðîïóùåíû.
Ïðîñòàâëåíèå îáðàòíûõ îòìåòîê ìîæíî êîìáèíèðîâàòü ñ îáðàòíûì ïåðåõîäîì, óïðàâëÿåìûì êîíôëèêòàìè; â [248] ïðåäëîæåí ãèáðèäíûé àëãîðèòì, êîòîðûé ïðåâîñõîäèò ëþáîé èç ýòèõ îòäåëüíî âçÿòûõ ìåòîäîâ (÷òî ïîäòâåðæäàåòñÿ
ôîðìàëüíûì äîêàçàòåëüñòâîì). Ïðèìåíåíèå ëîêàëüíîãî ïîèñêà ïðè ðåøåíèè çàäà÷ óäîâëåòâîðåíèÿ îãðàíè÷åíèé áûëî ïîêàçàíî (Kirkpatrick et al., 1983) â [243],
ãäå îïèñàí ìåòîä ýìóëÿöèè îòæèãà.
Ýâðèñòèêà ñ ìèíèìàëüíûìè êîíôëèêòàìè (minimal conicts) áûëà âïåðâûå
ïðåäëîæåíà (Gu, 1989) â [200] è íåçàâèñèìî ðàçðàáîòàíà â [285] (Minton et al.,
1992).  (Sosic & Gu, 1994) [354] çàäà÷à ñ 3 000 000 ôåðçåé áûëà ðåøåíà áûñòðåå, ÷åì çà ìèíóòó. Ýòî ïðèâåëî ê ïåðåîöåíêå õàðàêòåðà è ðàñïðîñòðàíåííîñòè
¾ëåãêèõ¿ è ¾òðóäíûõ¿ çàäà÷.  (Cheeseman et al., 1991) [104] èññëåäîâàëàñü ñëîæíîñòü çàäà÷ ÓÎ, ñôîðìèðîâàííûõ ñëó÷àéíûì îáðàçîì, è áûëî îáíàðóæåíî, ÷òî
ïî÷òè âñå òàêèå çàäà÷è ÿâëÿþòñÿ ëèáî òðèâèàëüíî ëåãêèìè, ëèáî íå èìåþò ðåøåíèé. ¾Òðóäíûå¿ ýêçåìïëÿðû çàäà÷ âñòðå÷àþòñÿ, òîëüêî åñëè ïàðàìåòðû ãåíåðàòîðà çàäà÷ óñòàíàâëèâàþòñÿ â íåêîòîðîì óçêîì äèàïàçîíå, â ïðåäåëàõ êîòîðîãî
ëèøü ïðèìåðíî ïîëîâèíà çàäà÷ ÿâëÿåòñÿ ðàçðåøèìîé. Äëÿ ðåøåíèÿ çàäà÷ ñ îãðàíè÷åíèÿìè âåñüìà óñïåøíî ìîæåò áûòü èñïîëüçîâàí ëîêàëüíûé ïîèñê íà îñíîâå
ýâðèñòèêè ñ ìèíèìàëüíûìè êîíôëèêòàìè.
 ðàáîòå [88] ïîêàçàíî, êàê ìîæåò áûòü óñîâåðøåíñòâîâàíà ïðîãðàììà õðîíîëîãè÷åñêîãî ïîèñêà ñ âîçâðàòàìè íà ÿçûêå Prolog, äëÿ ðàáîòû ñ èíòåëëåêòóàëüíûì
ïîèñêîì ñ âîçâðàòàìè.
3.2.4. Çàïîìèíàíèå êîíôëèêòîâ
 òóïèêîâîé âåðøèíå ïðèñâîåíèÿ ïåðåìåííûõ x1 , . . . , xi−1 îáðàçóþò êîíôëèêòíîå ìíîæåñòâî (ÊÌ) (conict set) ñ xi . Ýòà èíôîðìàöèÿ èñïîëüçóåòñÿ äëÿ çàïîìèíàíèÿ îäíîãî èëè íåñêîëüêèõ îãðàíè÷åíèé (èëè ìíîæåñòâ íåïåðñïåêòèâíûõ
íàáîðîâ çíà÷åíèé (ÌÍÍÇ) (nogoods) ñì. íèæå ïàðàãðàô 3.2.5), êîòîðûå ïðè
äàëüíåéøåì ïîèñêå íå äîïóñêàþò íåñîâìåñòíîñòåé, ïðèâîäÿùèõ ê ýòîé òóïèêîâîé
âåðøèíå. Ðàññìîòðèì ðèñ. 6 è äåðåâî ïîèñêà, ïîñòðîåííîå ïîèñêîì ñ âîçâðàòàìè
(ðèñ. 8). Â ïåðâîé òóïèêîâîé âåðøèíå ÊÌ {x1 = 4, x2 = 3, x3 = 1} êîíôëèêòóåò
ñ x4 . Çàïîìèíàíèå ÊÌ ïîëåçíî ëèøü â ñëó÷àå, åñëè çàäà÷à ÓÎ áóäåò ïîâòîðíî
ðåøàòüñÿ: òî÷íî òàêîå æå ìíîæåñòâî ïðèñâîåíèé íå âñòðåòèòñÿ âî âðåìÿ ýòîãî
ïîèñêà. Îäíàêî, ÊÌ âîçìîæíî ñîäåðæèò ïîäìíîæåñòâà â êîíôëèêòå ñ xi . Ìèíèìàëüíûå ÊÌ (Bruynooghe, 1985) [87] íå ñîäåðæàò íèêàêèõ äðóãèõ ÊÌ è îòâå÷àþò
çà òåêóùèé êîíôëèêò. Ïðîöåññ ïîèñêà âûèãðûâàåò, åñëè òàêèå ìèíèìàëüíûå ÊÌ
áîëüøå íå âñòðå÷àþòñÿ.
Çàïîìèíàíèå êîíôëèêòîâ ìîæåò ðàññìàòðèâàòüñÿ êàê îáó÷åíèå (ãëóáîêîå èëè
ïîâåðõíîñòíîå) (Dechter, 1990) [133]: ïîëåçíàÿ èíôîðìàöèÿ, âñêðûòàÿ ðåøàòåëåì
çàäà÷è, çàïîìèíàåòñÿ äëÿ äàëüíåéøåãî èñïîëüçîâàíèÿ. Ãëóáîêîå îáó÷åíèå íàõîäèò
âñå ìèíèìàëüíûå êîíôëèêòû â òóïèêîâîé âåðøèíå, ðåàëèçîâàííûå â ìåòîäå ïîèñ26
êà ñ âîçâðàòàìè, óïðàâëÿåìîãî çàâèñèìîñòÿìè (Dependency Directed Backtracking)
(Stallman & Sussman, 1977 [355]) è îáû÷íî èñïîëüçóåòñÿ â ñèñòåìàõ îáåñïå÷åíèÿ
èñòèííîñòè (truth-maintenance systems) (Doyle, 1979 [152]). Ýòî òðåáóåò çàòðàò ïàìÿòè: êàæäàÿ òóïèêîâàÿ âåðøèíà ïðåäñòàâëÿåò íîâóþ âîçìîæíîñòü äîáàâëåíèÿ
îãðàíè÷åíèé.  ñâÿçè ñ ýòèì, â ïàìÿòè ñîõðàíÿåòñÿ áîëüøàÿ ÷àñòü ïðîñòðàíñòâà
ïîèñêà.
Ïîâåðõíîñòíîå îáó÷åíèå [133] îãðàíè÷èâàåò îáúåì ðàáîòû, âûïîëíÿåìîé â òóïèêîâîé âåðøèíå xi ñ ïîìîùüþ óäàëåíèÿ âñåõ ïðèñâîåíèé ïåðåìåííûõ èç êîíôëèêòíîãî ìíîæåñòâà, êîòîðûå íå ðåëåâàíòíû (ò.å. ñîâìåñòíû ñî âñåìè âîçìîæíûìè ïðèñâîåíèÿìè) ê xi . Ãðàôîâîå ïîâåðõíîñòíîå îáó÷åíèå èñïîëüçóåò ãðàô
îãðàíè÷åíèé äëÿ (íåïîëíîé) ïðîâåðêè íà íåðåëåâàíòíîñòü: xh íå ðåëåâàíòåí ê
xi , åñëè ïåðåìåííûå íå ñìåæíû â ãðàôå. Â âûøåîïèñàííîì ïðèìåðå, ýòî âûâîäèò
{x1 = 4, x3 = 1}, îñòàâëÿÿ {x2 = 3}. Ýòîò êîíôëèêò çàïîìèíàåòñÿ ñ óäàëåíèåì çíàâ÷åíèÿ 3 èç D2 . Äîáàâëåíèå íîâûõ îãðàíè÷åíèé, îäíàêî, çàòðóäíÿåò ïîèñê
èç-çà óâåëè÷åíèÿ ÷èñëà ïðîâåðîê îãðàíè÷åíèé. Çàïîìíåííûå êîíôëèêòû ìîãóò
âåñüìà âåðîÿòíî îêàçàòüñÿ ïîëåçíûìè â ïðîöåññå ïîèñêà. Dechter (1990) [133] ââîäèò îãðàíè÷åíèå íà ÷èñëî çàïîìèíàåìûõ êîíôëèêòîâ. Îáó÷åíèå ïåðâîãî ïîðÿäêà
çàïîìèíàåò ëèøü îäíó ïåðåìåííóþ. Îáó÷åíèå âòîðîãî ïîðÿäêà äîáàâëÿåò îãðàíè÷åíèÿ, ñîäåðæàùèå äî äâóõ ïåðåìåííûõ.
Dechter (1990) [133] ïðîèçâåëà ñðàâíåíèå ïîâåðõíîñòíîãî è ãëóáîêîãî îáó÷åíèÿ
ïåðâîãî è âòîðîãî ïîðÿäêà. Äëÿ ëåãêèõ çàäà÷ îáó÷åíèå äàåò íåáîëüøîé ýôôåêò, íî
äëÿ áîëåå ñëîæíûõ çàäà÷ íàáëþäàåòñÿ áîëüøèé ýôôåêò íà ïðîèçâîäèòåëüíîñòü
àëãîðèòìà. Íå âñåãäà âåðíî òî, ÷òî íàèáîëåå ñèëüíàÿ ôîðìà îáó÷åíèÿ äàåò ìàêñèìàëüíûé ýôôåêò, òàê êàê â íåêîòîðûõ ñëó÷àÿõ çàòðàòû ìîãóò ïðåâûøàòü âûãîäó.
Bitner & Reingold âïåðâûå ïðåäëîæèëè èñïîëüçîâàòü ýâðèñòèêó MRV, íàçâàííóþ èìè ýâðèñòèêîé ñ íàèáîëåå îãðàíè÷åííîé ïåðåìåííîé (most-constrained-variable).
Brelaz (1979) [82] èñïîëüçîâàë ñòåïåííóþ ýâðèñòèêó (degree heuristic) äëÿ óñòðàíåíèÿ íåîïðåäåëåííîñòè, âîçíèêàþùåé ïîñëå ïðèìåíåíèÿ ýâðèñòèêè MRV. Ïîëó÷åííûé â èòîãå àëãîðèòì, íåñìîòðÿ íà åãî ïðîñòîòó, äî íàñòîÿùåãî âðåìåíè îñòàåòñÿ
íàèëó÷øèì ìåòîäîì ðàñêðàñêè ïðîèçâîëüíûõ ãðàôîâ â k öâåòîâ. Haralick & Elliot
(1980) [203] ïðåäëîæèëè ýâðèñòèêó ñ íàèìåíåå îãðàíè÷èòåëüíûì çíà÷åíèåì.  ñòàòüå [248] ( Kondrak & van Beek, 1997) ïðèâåäåí àíàëèòè÷åñêèé îáçîð àëãîðèòìîâ
ïîèñêà ñ âîçâðàòàìè.
3.2.5. Ìíîæåñòâà íåïåðñïåêòèâíûõ íàáîðîâ çíà÷åíèé
Îïðåäåëåíèå (Dechter, 1990) [133]. Ìíîæåñòâîì íåïåðñïåêòèâíûõ íàáîðîâ
çíà÷åíèé (ÌÍÍÇ) (nogood) [238] Ng èëè êîíôëèêòíûì ìíîæåñòâîì (conict set)
äëÿ çàäà÷è ÓÎ P íàçûâàåòñÿ ìíîæåñòâî íàáîðîâ çíà÷åíèé, êîòîðûå íå ìîãóò áûòü
÷àñòüþ íèêàêîãî ðåøåíèÿ çàäà÷è P .
Ïî-äðóãîìó, ÌÍÍÇ ÷àñòè÷íîå ïðèñâîåíèå çíà÷åíèé ïåðåìåííûì, êîòîðîå íå
ïðèâîäèò ê ðåøåíèþ [66]. Òàêèì îáðàçîì, ÌÍÍÇ íå ìîæåò áûòü äîïîëíåíî äî
ðåøåíèÿ çàäà÷è ÓÎ. Íàïðèìåð, ëþáîå ïðèñâîåíèå çíà÷åíèé, íàðóøàþùåå îãðàíè÷åíèå, ÿâëÿåòñÿ ÌÍÍÇ. ÇÓÎ íå èìååò ðåøåíèÿ òîãäà è òîëüêî òîãäà, êîãäà
27
ïóñòîå ìíîæåñòâî ïðèñâîåíèé ÿâëÿåòñÿ ÌÍÍÇ. Ìíîæåñòâî ïðèñâîåíèé A ÿâëÿåòñÿ ÌÍÍÇ, åñëè èìååòñÿ íå ïðîñìîòðåííîå ðåøåíèå, ñîäåðæàùåå A. Ëþáîå ñóïåðìíîæåñòâî ÌÍÍÇ ÿâëÿåòñÿ òàêæå ÌÍÍÇ.
Èçó÷åíèå ÌÍÍÇ ñòàíäàðòíûé ìåòîä óñîâåðøåíñòâîâàíèÿ ïîèñêà ñ âîçâðàòàìè (Dechter 1990) [133]. Çàìåòèì, ÷òî ìåòîä îáó÷àþùèõ ÌÍÍÇ áûë ïåðåíåñåí â
ðåøàòåëè çàäà÷è âûïîëíèìîñòè SAT â (Bayardo & Schrag 1997) [54].
 êîíòåêñòå çàäà÷ âûïîëíèìîñòè SAT ÌÍÍÇ ñîîòâåòñòâóåò êëàóçå (äèçúþíêòó), ïðè÷åì èñïîëüçîâàíèå îáó÷åíèÿ è èñïîëüçîâàíèÿ áîëüøîãî ÷èñëà êëàóç âî
âðåìÿ ïîèñêà (Moskewicz et al. 2001) [291] îêàçàëîñü âåñüìà ýôôåêòèâíûì äëÿ
ðåøåíèÿ çàäà÷ âûïîëíèìîñòè. Â òî æå âðåìÿ, ÌÍÍÇ íå èìåëè ñòîëü áîëüøîãî
âëèÿíèÿ íà ðåøàòåëè ÇÓÎ. Òàê, áîëüøèíñòâî êîììåð÷åñêèõ ðåøàòåëåé çàäà÷ ÓÎ
íå èñïîëüçóþò îáó÷åíèÿ ñ ÌÍÍÇ. Ïîä îáó÷åíèåì (learning), êàê è âûøå, çäåñü ïîíèìàåòñÿ çàïîìèíàíèå ïîòåíöèàëüíî ïîëåçíîé èíôîðìàöèè, êîòîðàÿ ñòàíîâèòñÿ
èçâåñòíîé ðåøàòåëþ çàäà÷è âî âðåìÿ ïðîöåññà ðåøåíèÿ [138].
Àëãîðèòìû ïîèñêà ñ âîçâðàòàìè èìåþò ðàçëè÷íûå âîçìîæíîñòè äëÿ íàõîæäåíèÿ ÌÍÍÇ â ïðîöåññå ïîèñêà, ÷òî è èñïîëüçóåòñÿ ïðè ðàçðàáîòêå ðàçëè÷íûõ
àëãîðèòìîâ ïîèñêà ñ âîçâðàòàìè. Â [309] ÌÍÍÇ, íàçûâàåìûå êîíôëèêòàìè, èñïîëüçóþòñÿ äëÿ áîëåå ìîùíûõ îáðàòíûõ ïåðåõîäîâ â àëãîðèòìå îáðàòíîãî ïåðåõîäà, óïðàâëÿåìîãî êîíôëèêòàìè.
 ðàáîòå [4] ÌÍÍÇ, íàçâàííûå òàì èñêëþ÷àþùèìè îáúÿñíåíèÿìè (eliminating
explanations), èñïîëüçóþòñÿ äëÿ óïðàâëåíèÿ äèíàìè÷åñêèì ïåðåóïîðÿäî÷åíèåì
âåòâåé äåðåâà ïîèñêà â àëãîðèòìå äèíàìè÷åñêîãî ïîèñêà ñ âîçâðàòàìè.  [5] ÌÍÍÇ
èçó÷àþòñÿ â òóïèêàõ è èñïîëüçóþòñÿ äëÿ óëó÷øåíèÿ ïîñëåäóþùåãî ïîèñêà. Ðàáîòû [42], [130], [286], [355], òàêæå ñîäåðæàò ïîëåçíûå èäåè î ñâÿçè ìåæäó ÌÍÍÇ
è ïîèñêîì ñ âîçâðàòàìè. Îòìå÷åíî, ÷òî ïî ñóòè äåëà ëþáîé àëãîðèòì ïîèñêà ñ
âîçâðàòàìè èñïîëüçóåò ÌÍÍÇ äëÿ óïðàâëåíèÿ ïîèñêîì, ÿâíî èëè íåÿâíî.
 ðàáîòå [238] ïðåäëîæåíî ïîíÿòèå îáîáùåííîãî ÌÍÍÇ, êîòîðîå ñóùåñòâåííî
ïîâûøàåò ðåçóëüòàòèâíîñòü ïîèñêà ñ âîçâðàòàìè.
3.2.6. Äèíàìè÷åñêèé ïîèñê ñ âîçâðàòàìè
Îáðàòíûé ïåðåõîä íà óðîâåíü âûøå óäàëÿåò ðåçóëüòàòû ïðîäåëàííîé ðåøàòåëåì ðàáîòû ïî îïðåäåëåíèþ ñîâìåñòíîãî ïðèñâîåíèÿ íà ïðåäûäóùåì óðîâíå.
Âî ìíîãèõ ñëó÷àÿõ óðîâíè, ñ êîòîðûõ äåëàåòñÿ âîçâðàò, íå èìåþò íè÷åãî îáùåãî ñ íåñîâìåñòíîñòüþ, êîòîðóþ àëãîðèòì ïûòàåòñÿ ðàçðåøèòü (ïðèìåðîì ìîæåò
ñëóæèòü ìå÷óùååñÿ ïîâåäåíèå, îïèñàííîå âûøå).  ðåçóëüòàòå, ïîòåíöèàëüíî ïîëåçíàÿ èíôîðìàöèÿ áåññìûñëåííî âûáðàñûâàåòñÿ ïðè ïîèñêå ðåàëüíîé ïðè÷èíû
íåñîâìåñòíîñòè.
 ìåòîäå äèíàìè÷åñêîãî ïîèñêà ñ âîçâðàòàìè (ÄÏÂ) (dynamic backtracking)
(Ginsberg, 1993) [188], [189] ñîõðàíÿþòñÿ óñïåøíûå ÷àñòè÷íûå ïðèñâàèâàíèÿ èç
ïîëó÷åííûõ ïîçäíåå ïîäìíîæåñòâ ïåðåìåííûõ, ïðè÷åì ÄÏ îáõîäèòñÿ áåç ôèêñèðîâàííîãî ïîðÿäêà ïðèñâîåíèÿ çíà÷åíèé, âìåñòî ýòîãî âûáèðàÿ ïåðåìåííûå äëÿ
ïðèñâîåíèÿ çíà÷åíèé äèíàìè÷åñêèì îáðàçîì. ÄÏ ýôôåêòèâíûì îáðàçîì ìåíÿåò
ïîðÿäîê ïðèñâàèâàíèÿ çíà÷åíèé òàê, ÷òî óðîâåíü, îòâåòñòâåííûé çà íåñîâìåñò28
íîñòü, ñòàíîâèòñÿ ñàìûì ãëóáîêèì óðîâíåì, îñòàâëÿÿ íå çàòðîíóòûìè âñå íåðåëåâàíòíûå ïðèñâîåíèÿ ïåðåìåííûõ.
Äëÿ êàæäîãî dia ∈ Di ÄÏ ñîõðàíÿåò ìíîæåñòâî îáúÿñíåíèé ïðè÷èí ýëèìèíàöèè, â êîòîðîì çàïîìèíàåòñÿ ïðè÷èíà òîãî, ïî÷åìó dia â íàñòîÿùåå âðåìÿ
èñêëþ÷åíî èç ðàññìîòðåíèÿ. Ýòè îáúÿñíåíèÿ îïðåäåëåíû â òåðìèíàõ òåêóùèõ
ïðèñâîåíèé ðàíåå ðàññìîòðåííûì ïåðåìåííûì. Êîãäà íåîáõîäèì ïåðåõîä îò xi ê
xh , ÄÏ ñîõðàíÿåò òåêóùåå ïðèñâîåíèå xi è âñå åãî ìíîæåñòâà îáúÿñíåíèé ïðè÷èí ýëèìèíàöèè, êðîìå òåõ, êîòîðûå âêëþ÷àþò xh (ïðèñâîåíèå êîòîðîãî äîëæíî
ìåíÿòüñÿ).
Èñïîëüçîâàíèå ìíîæåñòâ îáúÿñíåíèé ïðè÷èí ýëèìèíàöèè àíàëîãè÷íî ÌÍÍÇ,
çàïîìèíàþùèõ ïðè÷èíû êîíôëèêòîâ. Îáúÿñíåíèÿ ïðè÷èí ýëèìèíàöèè õðàíÿòñÿ
ëèøü äëÿ òåêóùèõ ïðèñâîåíèé äðóãèì ïåðåìåííûì; êàê òîëüêî ïðèñâàèâàíèå èçìåíèëîñü, âñå îáúÿñíåíèÿ, âêëþ÷àþùèå åãî, èñêëþ÷àþòñÿ. Èòàê, ÄÏ ïðåäñòàâëÿåò ñîáîé êîìïðîìèññ ìåæäó åìêîñòíîé è âðåìåííîé ñëîæíîñòÿìè.
ÄÏÂ, îäíàêî,íå ðàáîòàåò âñåãäà ëó÷øå ñóùåñòâóþùèõ àëãîðèòìîâ. Ñðàâíèâàÿ
ýôôåêòèâíîñòü ÄÏ â ñðàâíåíèè ñ äðóãèìè àëãîðèòìàìè, èñïîëüçóÿ ñòàíäàðòíûå ýâðèñòèêè (Baker, 1994) [42] ïîêàçàë, ÷òî ÄÏ ðàáîòàåò õóæå, ÷åì àëãîðèòì
îáðàòíîãî ïåðåõîäà íà ìíîæèòåëü, ýêñïîíåíöèàëüíî çàâèñÿùèé îò ðàçìåðà çàäà÷è. Ïðîáëåìà çäåñü ñîñòîèò â òîì, ÷òî ïðèñâîåíèÿ ïåðåìåííûõ, êîòîðûå ÄÏ íå
îòáðîñèë, ÷àñòî íå èìåþò íà îñíîâå ýâðèñòèê ïîäòâåðæäåíèÿ òîãî, ÷òî íàéäåíà
íåñîâìåñòíîñòü. Õðàíåíèå òàêèõ ïðèñâîåíèé ïåðåìåííûõ óõóäøàåò ðåçóëüòàò ïðèìåíåíèÿ ýâðèñòèê.
3.3. Ðàñïðîñòðàíåíèå îãðàíè÷åíèé
3.3.1. Î ðàñïðîñòðàíåíèè îãðàíè÷åíèé
Ñðåäè ðàçëè÷íûõ âèäîâ ìåòîäîâ äëÿ ïðåîäîëåíèÿ ïðèñóùåé çàäà÷àì ÓÎ òðóäíîé ðàçðåøèìîñòè âûäåëÿþòñÿ àëãîðèòìû ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé [35].
Ïðè óäàëåíèè èçáûòî÷íûõ çíà÷åíèé èç äîìåíîâ ïåðåìåííûõ ðàçìåð ïðîñòðàíñòâà ðåøåíèé ñíèæàåòñÿ. Àëãîðèòìû óìåíüøåíèÿ ïðîñòðàíñòâà ðåøåíèé èñêëþ÷àþò çíà÷åíèÿ ñ ïîìîùüþ ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé, íàçûâàåìîãî òàêæå ñóæåíèåì [116]. Óìåíüøåíèå ïðîñòðàíñòâà ðåøåíèé çàäà÷è ìîæåò áûòü âûïîëíåíî ëèáî îäíîêðàòíî â âèäå ýòàïà ïðåïðîöåññèíãà ïåðåä äðóãèì àëãîðèòìîì, ëèáî
ìíîãîêðàòíî, øàã çà øàãîì, ïåðåìåæàÿñü ñ èññëåäîâàíèåì ïðîñòðàíñòâà ðåøåíèé ñ ïîìîùüþ àëãîðèòìà ïîèñêà.  ïîñëåäíåì ñëó÷àå îòñåêàþòñÿ ïîäìíîæåñòâà
ïðîñòðàíñòâà ðåøåíèé, ýêîíîìÿ âðåìÿ, êîòîðîå àëãîðèòì ïîèñêà çàòðàòèë áû íà
ñèñòåìàòè÷åñêîå èññëåäîâàíèå îòáðîøåííûõ ýëåìåíòîâ. Åñëè â ðåçóëüòàòå óìåíüøåíèÿ ïðîñòðàíñòâà ðåøåíèé êàêîé-ëèáî äîìåí ñòàë ïóñòûì, îòñþäà ñëåäóåò, ÷òî
ðàññìàòðèâàåìàÿ çàäà÷à ÓÎ íå èìååò ðåøåíèé.
Îáúåì ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé õàðàêòåðèçóåòñÿ óðîâíåì ñîâìåñòíîñòè
çàäà÷è, ïîýòîìó ýòè àëãîðèòìû íàçûâàþòñÿ òàêæå àëãîðèòìàìè ñîâìåñòíîñòè.
Ðàñïðîñòðàíåíèå îãðàíè÷åíèé [48] èìååò äàâíþþ òðàäèöèþ â ÓÎ è ÿâëÿåòñÿ
î÷åíü îáùèì ïîíÿòèåì, êîòîðîå ïîÿâëÿëîñü ïîä ðàçíûìè íàçâàíèÿìè: ðåëàêñàöèÿ
29
îãðàíè÷åíèÿ (constraint relaxation), ôèëüòðóþùèå àëãîðèòìû (ltering algorithms),
ñóæàþùèå àëãîðèòìû (narrowing algorithms), âûâîä îãðàíè÷åíèé (constraint inference),
àëãîðèòìû óïðîùåíèÿ (simplication algorithms) è äð. Íèæå áóäóò ðàññìîòðåíû
íàèáîëåå õîðîøî èçâåñòíûå è ÷àñòî èñïîëüçóåìûå àëãîðèòìû. Ðàñïðîñòðàíåíèå
îãðàíè÷åíèé, ïðåäëîæåííîå âíà÷àëå äëÿ ðàçìåòêè èçîáðàæåíèé â ðàáîòàõ [289],
[384], áûëî çàòåì ðàñïðîñòðàíåíî è ïðèñïîñîáëåíî ê ðåøåíèþ ìíîãèõ äðóãèõ çàäà÷, ïîðîäèâ áîëüøîå ÷èñëî àëãîðèòìîâ ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé, ïðè ýòîì
â ÷èñëå íàèáîëåå çíà÷èìûõ ñëåäóåò îòìåòèòü ðàáîòû [136], [140], [255], [262], [263],
[265], [289].
Ñ ïîìîùüþ ðàñïðîñòðàíåíèÿ (èíôîðìàöèè) âîçäåéñòâèå ïðåäøåñòâóþùèõ ïðèñâîåíèé ìîæåò óìåíüøèòü ðàçìåð ïðîñòðàíñòâà ïîèñêà. Îñíîâíûì ìåòîäîì çäåñü
ÿâëÿåòñÿ óñå÷åíèå äîìåíà, êîòîðîå óäàëÿåò íåêîòîðûå çíà÷åíèÿ èç äîìåíîâ ïåðåìåííûõ, êîòîðûå áóäóò ðàññìîòðåíû ïîçäíåå. Êàê òîëüêî ïðèñâîåíèå áóäåò îñóùåñòâëåíî, ìîæåò áûòü èñïîëüçîâàí àëãîðèòì ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé äëÿ
íàõîæäåíèÿ ïîñëåäñòâèé ïðåäøåñòâóþùèõ ïðèñâîåíèé íà äîìåíû ïåðåìåííûõ,
ïðîñìàòðèâàåìûõ ïîçäíåå.
Èññëåäîâàíèÿ ïî ðàñïðîñòðàíåíèþ îãðàíè÷åíèé è àëãîðèòìàì ñîâìåñòíîñòè
áûëè èíèöèèðîâàíû â ðàáîòå Waltz [383], â êîòîðîé áûë ïðåäëîæåí àëãîðèòì ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé (ïîçäíåå ïîëó÷èâøèé íàçâàíèå äóãîâîé ñîâìåñòíîñòè)
äëÿ çàäà÷ ïîëèýäðàëüíîé ëèíåéíîé ðàçìåòêè äëÿ ñèñòåì êîìïüþòåðíîãî âèäåíèÿ.
Îí ïîêàçàë, ÷òî äëÿ íåêîòîðûõ ìíîãîãðàííûõ ôèãóð äîñòàòî÷íî ïðèìåíèòü îñíîâíûå àëãîðèòìû ðàñïðîñòðàíåíèÿ äëÿ ðåøåíèÿ ýòèõ çàäà÷. Ïðåïðîöåññèíã èëè
ïðåäâàðèòåëüíàÿ îáðàáîòêà â çàäà÷àõ ÓÎ ñîçäàåò ýêâèâàëåíòíóþ, ñ òåì æå ìíîæåñòâîì ðåøåíèé, íî áîëåå ïðîñòóþ çàäà÷ó. Ïîèñê íà äåðåâå ïîñëå ïðåïðîöåññèíãà
ìîæåò ðåøèòü ïîëó÷åííóþ çàäà÷ó ñ ãîðàçäî ìåíüøèìè çàòðàòàìè. Èñõîäíàÿ çàäà÷à ÓÎ ïðåîáðàçóåòñÿ ñëåäóþùèì îáðàçîì. Âíà÷àëå äîìåíû ïåðåìåííûõ ìîãóò
ôèëüòðîâàòüñÿ äëÿ óäàëåíèÿ ýëåìåíòîâ, êîòîðûå íå ìîãóò áûòü ÷àñòüþ íè îäíîãî
ðåøåíèÿ. Äàëåå ìíîæåñòâî îãðàíè÷åíèé ìîæåò áûòü èçìåíåíî ñ öåëüþ íåäîïóùåíèÿ íåñîâìåñòíûõ êîìáèíàöèé ïðèñâîåíèé. Èçìåíåíèÿ ïðîèçâîäÿòñÿ ñ ïîìîùüþ
ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé: èñïîëüçóåòñÿ ëîêàëüíàÿ ãðóïïà îãðàíè÷åíèé äëÿ
âûâîäà èíôîðìàöèè, êîòîðàÿ çàïîìèíàåòñÿ â âèäå èçìåíåííîãî äîìåíà îãðàíè÷åíèÿ èëè ïåðåìåííîé. Ýòî ëîêàëüíîå èçìåíåíèå ÿâëÿåòñÿ îñíîâîé äëÿ äàëüíåéøèõ
âûâîäîâ, ïîýòîìó ðåçóëüòàò ëþáîãî èçìåíåíèÿ ïîñòåïåííî ðàñïðîñòðàíÿåòñÿ ïî
âñåé çàäà÷å.
Õîòÿ ñ öåëüþ ïðîñòîòû èçëîæåíèÿ ïðåäñòàâëåííûå çäåñü ìåòîäû îïèñàíû äëÿ
áèíàðíûõ çàäà÷ ÓÎ, îíè ïðèìåíèìû ê n-àðíîé çàäà÷å ÓÎ, èñïîëüçóÿ, íàïðèìåð,
äâîéñòâåííóþ ãðàôîâóþ èíòåðïðåòàöèþ.
Ðàññìîòðèì äàëåå ïîíÿòèå ëîêàëüíîé ñîâìåñòíîñòè.
3.3.2. Ëîêàëüíàÿ ñîâìåñòíîñòü
Îäíèì èç íàèáîëåå âàæíûõ ïîíÿòèé â ÓÎ ÿâëÿåòñÿ ïîíÿòèå ëîêàëüíîé ñîâìåñòíîñòè. Ëîêàëüíàÿ íåñîâìåñòíîñòü ýòî ïðèñâîåíèå çíà÷åíèé íåêîòîðûì ïåðåìåííûì, óäîâëåòâîðÿþùåå ñîîòâåòñòâóþùèì îãðàíè÷åíèÿì, íî êîòîðîå íå ìîæåò
30
áûòü ðàñøèðåíî íà îäíó èëè áîëåå ïåðåìåííûõ è ïîýòîìó íå ìîæåò áûòü ÷àñòüþ
íèêàêîãî ðåøåíèÿ. Åñëè äëÿ ïîèñêà ðåøåíèÿ ÇÓÎ èñïîëüçóåòñÿ ïîèñê ñ âîçâðàòàìè, òî ïîäîáíàÿ íåñîâìåñòíîñòü ìîæåò áûòü ïðè÷èíîé ìíîãèõ òóïèêîâûõ âåðøèí
è ìîæåò ñòàòü ïðè÷èíîé ìíîãèõ áåñïîëåçíûõ ïîïûòîê ïîèñêà. Ýòî ïðèâîäèò ê (a)
îïðåäåëåíèþ óñëîâèé, õàðàêòåðèçóþùèõ óðîâåíü ëîêàëüíîé ñîâìåñòíîñòè çàäà÷è
ÓÎ ([167], [262], [289]), (b) ðàçðàáîòêå àëãîðèòìîâ ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé
àëãîðèòìîâ, êîòîðûå âûíóæäàþò ýòè óðîâíè ê ëîêàëüíîé ñîâìåñòíîñòè ñ ïîìîùüþ óäàëåíèÿ íåñîâìåñòíîñòåé èç ÇÓÎ ([262], [289]), è (c) ðàçðàáîòêå ýôôåêòèâíûõ àëãîðèòìîâ ïîèñêà ñ âîçâðàòàìè äëÿ ïîèñêà ðåøåíèé ÇÓÎ, ïîääåðæèâàþùèõ
óðîâåíü ëîêàëüíîé ñîâìåñòíîñòè âî âðåìÿ ïîèñêà ([128], [179], [203]).
 îáùåì, èìååòñÿ êîìïðîìèññ ìåæäó çàòðàòàìè íà ðàñïðîñòðàíåíèå îãðàíè÷åíèé, âûïîëíÿåìîå â êàæäîé âåðøèíå äåðåâà ïîèñêà è âåëè÷èíîé óñå÷åíèÿ äîìåíîâ. Îäèí èç ñïîñîáîâ óìåíüøåíèÿ çàòðàò íà ðàñïðîñòðàíåíèå îãðàíè÷åíèé ýòî
ðàññìîòðåíèå áîëåå îãðàíè÷åííûõ ëîêàëüíûõ ñîâìåñòíîñòåé, îäíèì èç ïðèìåðîâ
êîòîðûõ ñëóæèò ñîâìåñòíîñòü ãðàíèö. Ïðåäïîëîæèì, ÷òî äîìåíû ïåðåìåííûõ âåëèêè è óïîðÿäî÷åíû, ïðè÷åì îíè ìîãóò áûòü ïðåäñòàâëåíû èíòåðâàëàìè (çàäàâàåìûìè ìèíèìàëüíûì è ìàêñèìàëüíûì çíà÷åíèåì äîìåíà). Èñïîëüçóÿ ñîâìåñòíîñòü
ãðàíèö, âìåñòî âûÿñíåíèÿ òîãî, ÷òî êàæäîå çíà÷åíèå äîìåíà èìååò ïîääåðæêó â
îãðàíè÷åíèè, âûÿñíÿåòñÿ ëèøü òî, èìåþò ëè ìèíèìàëüíîå è ìàêñèìàëüíîå çíà÷åíèå ïîääåðæêó â îãðàíè÷åíèè. Õîòÿ ñîâìåñòíîñòü ãðàíèö ñëàáåå, ÷åì äóãîâàÿ
ñîâìåñòíîñòü, îíà ïîëåçíà äëÿ àðèôìåòè÷åñêèõ îãðàíè÷åíèé è ãëîáàëüíûõ îãðàíè÷åíèé, òàê êàê îíà ìîæåò áûòü âûíóæäåíà áîëåå ýôôåêòèâíî. Çàäà÷à, âêëþ÷àþùàÿ áèíàðíûå îãðàíè÷åíèÿ, ïóòå-ñîâìåñòíà, åñëè êàæäàÿ ñîâìåñòíàÿ ïàðà çíà÷åíèé äâóõ ïåðåìåííûõ ìîæåò áûòü ðàñøèðåíà äî ëþáîé òðåòüåé ïåðåìåííîé. Äëÿ
íåêîòîðûõ âèäîâ çàäà÷, ïîäîáíûõ òåìïîðàëüíûì îãðàíè÷åíèÿì, âîçìîæíî èìååò
ñìûñë âûíóæäåíèå áîëåå ñèëüíûõ óðîâíåé ñîâìåñòíîñòè, ÷åì ïóòåâàÿ ñîâìåñòíîñòü [262].
3.3.3. Âåðøèííàÿ è äóãîâàÿ ñîâìåñòíîñòü
Ïðîñòåéøèì ìåòîäîì ïðåïðîöåññèíãà ÿâëÿåòñÿ âåðøèííàÿ ñîâìåñòíîñòü, êîòîðàÿ óäàëÿåò òå çíà÷åíèÿ èç äîìåíà ïåðåìåííîé, êîòîðûå íåñîâìåñòíû ñ óíàðíûìè îãðàíè÷åíèÿìè íà ñîîòâåòñòâóþùóþ ïåðåìåííóþ: åñëè c(xi ) óíàðíîå îãðàíè÷åíèå äëÿ âåðøèíû xi , òîãäà âåëè÷èíû, íå óäîâëåòâîðÿþùèå c(xi ), èñêëþ÷àþòñÿ èç äîìåíà Di . Ïðÿìîé àëãîðèòì âåðøèííîé ñîâìåñòíîñòè (node-consistency
algorithm (NC)), êîòîðûé óäàëÿåò èçëèøíèå ýëåìåíòû äîìåíîâ ïåðåìåííûõ ñ ïîìîùüþ ïðîâåðêè äîìåíîâ îäíîãî çà äðóãèì, èìååò âðåìåííóþ ñëîæíîñòü O(dn),
ãäå d ìàêñèìàëüíûé ðàçìåð äîìåíîâ, à n ÷èñëî ïåðåìåííûõ.
Äóãîâàÿ ñîâìåñòíîñòü ñîñòîèò â ðàññìîòðåíèè êàæäîé äóãè9 , ñîîòâåòñòâóþùåé áèíàðíîìó îãðàíè÷åíèþ c(xi , xj ), è âûïîëíåíèè ñóæåíèÿ äîìåíîâ. Âåëè÷èíû,
íå óäîâëåòâîðÿþùèå c(xi , xj ), èñêëþ÷àþòñÿ èç äîìåíîâ Di è Dj .
Ïðîâåðêó ñîâìåñòíîñòè äóã ìîæíî èñïîëüçîâàòü ëèáî â êà÷åñòâå ýòàïà ïðåäâà9Â
äàííîì ñëó÷àå òåðìèí ¾äóãà¿ îáîçíà÷àåò îðèåíòèðîâàííîå ðåáðî â ãðàôå îãðàíè÷åíèé.
31
ðèòåëüíîé îáðàáîòêè ïåðåä íà÷àëîì ïðîöåññà ïîèñêà, ëèáî â êà÷åñòâå ýòàïà ðàñïðîñòðàíåíèÿ îãðàíè÷åíèÿ (àíàëîãè÷íî ïðåäâàðèòåëüíîé ïðîâåðêå) ïîñëå êàæäîãî ïðèñâàèâàíèÿ âî âðåìÿ ïîèñêà.
Ïîèñê êîìïðîìèññà ìåæäó çàòðàòàìè íà îáåñïå÷åíèå ñîâìåñòíîñòè è äîñòèãàåìûìè çà ñ÷åò ýòîãî ïðåèìóùåñòâàìè ñ òî÷êè çðåíèÿ ñîêðàùåíèÿ îáúåìà ïîèñêà
ïðèâåë ê íîâûì àëãîðèòìàì. Òàê, (Haralick & Elliot, 1980) [203] ïðåäëîæèëè àëãîðèòì ïðåäâàðèòåëüíîé ïðîâåðêè (forward checking), îïèñàííûé â (McGregor, 1979)
[273], à (Gaschnig, 1979) [181] ïðåäëîæèë ïðèìåíÿòü ïîëíóþ ïðîâåðêó ñîâìåñòíîñòè äóã ïîñëå ïðèñâàèâàíèÿ çíà÷åíèÿ êàæäîé ïåðåìåííîé; â äàëüíåéøåì ñîîòâåòñòâóþùèé àëãîðèòì â ðàáîòå (Sabin & Freuder, 1994) [330] ïîëó÷èë íàçâàíèå MAC
(Maintaining Arc Consistency). Â ïîñëåäíåé ñòàòüå ïîêàçàíî, ÷òî ïðè ðåøåíèè
áîëåå òðóäíûõ çàäà÷ ÓÎ ïîëíàÿ ïðîâåðêà ñîâìåñòíîñòè äóã âïîëíå îêóïàåòñÿ.
 ðàáîòå Mackworth & Freuder [265] áûëî çàìå÷åíî, ÷òî äóãîâàÿ ñîâìåñòíîñòü
ìîæåò ðåøàòü äðåâîâèäíûå çàäà÷è ÓÎ.
Äëÿ äàííîãî îãðàíè÷åíèÿ ãîâîðÿò, ÷òî çíà÷åíèå äëÿ ïåðåìåííîé â îãðàíè÷åíèè
èìååò ïîääåðæêó (support), åñëè ñóùåñòâóþò òàêèå çíà÷åíèÿ äëÿ äðóãèõ ïåðåìåííûõ â ýòîì îãðàíè÷åíèè, ÷òî ýòî îãðàíè÷åíèå óäîâëåòâîðÿåòñÿ.
Îãðàíè÷åíèå äóãî-ñîâìåñòíî, åñëè êàæäîå çíà÷åíèå èç äîìåíîâ ïåðåìåííûõ
èìååò ïîääåðæêó.
Äëÿ äîñòèæåíèÿ äóãîâîé ñîâìåñòíîñòè íà arc(i, j), äëÿ êàæäîãî dia ∈ Di , èùåòñÿ ýëåìåíò djb ∈ Dj , òàêîé ÷òî âûïîëíÿåòñÿ óñëîâèå äóãîâîé ñîâìåñòíîñòè; djb ïîääåðæèâàåò dia . Âñå ýëåìåíòû äîìåíà áåç ïîääåðæêè óäàëÿþòñÿ. Óäàëåíèå çíà÷åíèå
áåç ïîääåðæêè íàçûâàåòñÿ óñå÷åíèåì (ñóæåíèåì) äîìåíîâ.
Äëÿ îãðàíè÷åíèé, ñîäåðæàùèõ áîëåå äâóõ ïåðåìåííûõ, äóãîâàÿ ñîâìåñòíîñòü
÷àñòî íàçûâàåòñÿ ãèïåð-äóãîâîé ñîâìåñòíîñòüþ èëè îáîáùåííîé äóãîâîé ñîâìåñòíîñòüþ. Íàïðèìåð, ïóñòü äîìåíû ïåðåìåííûõ x è y {0, 1, 2} è ðàññìîòðèì îãðàíè÷åíèå x+y = 1. Âûíóæäåíèå äóãîâîé ñîâìåñòíîñòè íà ýòîì îãðàíè÷åíèè ñóçèëî
áû äîìåíû îáåèõ ïåðåìåííûõ äî {0, 1}. Âåëè÷èíû, óäàëåííûå èç äîìåíîâ îáåèõ
ïåðåìåííûõ, ëîêàëüíî íåñîâìåñòíû îíè íå ïðèíàäëåæàò íè îäíîìó íàáîðó ïðèñâîåíèé ïåðåìåííûõ, óäîâëåòâîðÿþùèõ îãðàíè÷åíèþ, è ïîýòîìó íå ìîãóò áûòü
÷àñòüþ êàêîãî-ëèáî ðåøåíèÿ âñåé çàäà÷è ÓÎ. Äëÿ âûíóæäåíèÿ äóãîâîé ñîâìåñòíîñòè â çàäà÷å ÓÎ òðåáóåòñÿ ïîâòîðíî óäàëÿòü âåëè÷èíû èç äîìåíîâ, ïîêà íå
äîñòèãíåì óñòîé÷èâîé òî÷êè.
Îñíîâûâàÿñü íà ðàáîòàõ [383], [289], Mackworth [262] âûäåëèë òðè âèäà ëîêàëüíîé ñîâìåñòíîñòè: âåðøèííóþ, äóãîâóþ è ïóòåâóþ ñîâìåñòíîñòü. Èì áûëè
ïðåäëîæåíû àëãîðèòìû (AC-1, AC-2, AC-3) äëÿ âûíóæäåíèÿ äóãîâîé ñîâìåñòíîñòè, à òàêæå àëãîðèòìû PC-1, PC-2, PC-3 äëÿ âûíóæäåíèÿ ïóòåâîé ñîâìåñòíîñòè.
Âû÷èñëèòåëüíàÿ ñëîæíîñòü óêàçàííûõ àëãîðèòìîâ áûëà èññëåäîâàíà äàëåå â ðàáîòå Mackworth & Freuder [265], ïðè÷åì òàì æå áûëî òàêæå çàìå÷åíî, ÷òî äóãîâàÿ
ñîâìåñòíîñòü ìîæåò ðåøàòü äðåâîâèäíûå çàäà÷è ÓÎ.
Àëãîðèòìû âûíóæäåíèÿ äóãîâîé ñîâìåñòíîñòè èíòåíñèâíî èññëåäîâàëèñü è ñîâåðøåíñòâîâàëèñü (ñì. [65], [262] è ññûëêè íà ëèòåðàòóðó â ýòèõ ðàáîòàõ). Îïòèìàëüíûé àëãîðèòì äëÿ ïðîèçâîëüíîãî îãðàíè÷åíèÿ õàðàêòåðèçóåòñÿ âðåìåííîé
32
ñëîæíîñòüþ â õóäøåì ñëó÷àå, ðàâíîé O(r · dr ), ãäå r àðíîñòü îãðàíè÷åíèÿ, à d
ðàçìåð äîìåíîâ ïåðåìåííûõ [288].
Ïðîñòåéøèì ìåòîäîì äîñòèæåíèÿ ãëîáàëüíîé äóãîâîé ñîâìåñòíîñòè ÿâëÿåòñÿ
ïîâòîðåíèå ïðîõîäîâ ïî ïðîâåðêå êàæäîé äóãè çàäà÷è äî òåõ ïîð, ïîêà íå áóäåò
íèêàêèõ èçìåíåíèé ãðàôà îãðàíè÷åíèé ïîñëå î÷åðåäíîãî ïðîõîäà. Ýòîò ïîäõîä
ðåàëèçîâàí â âèäå àëãîðèòìà AC-1 (èç (Machworth, 1977) [262].
Âñëåä çà èñòîðè÷åñêè ïåðâûì àëãîðèòìîì AC-1 áûëè ðàçðàáîòàíû àëãîðèòìû
AC-2, ..., AC-7, êàæäûé èç êîòîðûõ óëó÷øàåò õðàíåíèå èíôîðìàöèè îá èçìåíåííûõ äîìåíàõ è óïðàâëåíèå èòåðàöèÿìè.
Âû÷èñëèòåëüíàÿ ñëîæíîñòü àëãîðèòìîâ AC-1, AC-2, AC-3 áûëà èññëåäîâàíà
äàëåå â ðàáîòå Mackworth & Freuder [265]. Âðåìåííàÿ ñëîæíîñòü àëãîðèòìà AC3 ñîñòàâëÿåò O(d3 e), åìêîñòíàÿ ñëîæíîñòü O(e + nd), ãäå e ÷èñëî áèíàðíûõ
îãðàíè÷åíèé. Àëãîðèòì AC-4 [287] óëó÷øàåò AC-3 è èìååò âðåìåííóþ è åìêîñòíóþ
ñëîæíîñòü O(d2 e). Äðóãèì óëó÷øåíèåì àëãîðèòìà AC-3 ÿâëÿåòñÿ àëãîðèòì AC-5
[369], èñïîëüçóþùèé ñåìàíòèêó ñïåöèàëüíûõ âèäîâ îãðàíè÷åíèé. Àëãîðèòì AC-7
èñïîëüçóåò ñèììåòðèþ áèíàðíûõ îãðàíè÷åíèé.
Ñëîæíîñòü ïðîâåðêè ñîâìåñòíîñòè äóã ìîæíî ïðîàíàëèçèðîâàòü ñëåäóþùèì
îáðàçîì: ëþáàÿ áèíàðíàÿ çàäà÷à ÓÎ èìååò ñàìîå áîëüøåå O(n2 ) äóã; êàæäàÿ äóãà
(Xi , Xj ) ìîæåò áûòü ¾âíåñåíà â ïîâåñòêó äíÿ¿ òîëüêî d ðàç, ïîñêîëüêó îáëàñòü
îïðåäåëåíèÿ Xi èìååò ñàìîå áîëüøåå d çíà÷åíèé, äîñòóïíûõ äëÿ óäàëåíèÿ; ïðîâåðêà ñîâìåñòíîñòè ëþáîé äóãè ìîæåò áûòü âûïîëíåíà çà âðåìÿ O(d2 ), ïîýòîìó â
íàèõóäøåì ñëó÷àå çàòðàòû âðåìåíè ñîñòàâëÿþò O(n2 · d3 ).
3.3.4. Íàïðàâëåííàÿ äóãîâàÿ ñîâìåñòíîñòü
Îïðåäåëåíèå. Çàäà÷à ÓÎ ÿâëÿåòñÿ íàïðàâëåííî-äóãî-ñîâìåñòíîé ïî îòíîøåíèþ ê óïîðÿäî÷åíèþ h = {x1 , . . . , xn }, òîãäà è òîëüêî òîãäà, êîãäà êàæäàÿ ïåðåìåííàÿ xi äóãî-ñîâìåñòíà ïî îòíîøåíèþ ê êàæäîé ïåðåìåííîé xj , òàêîé ÷òî i ≤ j .
Ïðîöåäóðà ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé DAC ðàáîòàåò ñ çàäà÷åé ÓÎ (V, D, C)
è óïîðÿäî÷åíèåì h = {x1 , . . . , xn } äëÿ çàäà÷è ÓÎ. Ïðîöåäóðà îáðàáàòûâàåò ïåðåìåííûå â îáðàòíîì ïîðÿäêå (xn , . . . , x1 ). Äëÿ êàæäîé ïåðåìåííîé x îíà ïðîâåðÿåò
ðîäèòåëåé x10 . Ïðè îáðàáîòêå xi , ðàññìàòðèâàþòñÿ âñå áèíàðíûå îãðàíè÷åíèÿ, èíöèäåíòíûå xi , Rki , ïðè k ≤ i, è ñóæàþòñÿ ñîîòâåòñòâóþùèå äîìåíû Dk ïåðåìåííûõ
xk .
Ïîñëå âûïîëíåíèÿ ýòîé ïðåäâàðèòåëüíîé îáðàáîòêè âûÿñíÿåòñÿ íàïðàâëåííàÿ
äóãîâàÿ ñîâìåñòíîñòü [140]. Ýòî îçíà÷àåò, ÷òî äëÿ ëþáîãî çíà÷åíèÿ äîìåíà ïåðåìåííîé è äëÿ ëþáîãî ñûíà ýòîé ïåðåìåííîé íàéäåòñÿ ïî êðàéíåé ìåðå îäíî
çíà÷åíèå èç äîìåíà ñûíà, ñîâìåñòíîå ñî çíà÷åíèåì ðîäèòåëÿ.
Ãëîáàëüíî ñîâìåñòíûå ÇÓÎ îáëàäàþò ñâîéñòâîì, ÷òî ëþáîå ñîâìåñòíîå ïðèñâîåíèå çíà÷åíèé ïîäìíîæåñòâó ïåðåìåííûõ ìîæåò áûòü ðàñøèðåíî äî ñîâìåñòíîãî
ïðèñâîåíèÿ çíà÷åíèé âñåì ïåðåìåííûì áåç ïîëó÷åíèÿ òóïèêîâ.
10 ïåðåìåííûå,
ñîåäèíåííûå ñ x, êîòîðûå ïðåäøåñòâóþò x â óïîðÿäî÷åíèè.
33
3.3.5. Ïóòåâàÿ ñîâìåñòíîñòü
Äëÿ áèíàðíûõ çàäà÷ ÓÎ èìååòñÿ åùå îäèí âèä ñîâìåñòíîñòè ïóòåâàÿ ñîâìåñòíîñòü, êîòîðóþ Montanari ïðåäëîæèë â [289].
Îïðåäåëåíèå Áèíàðíàÿ çàäà÷à ÓÎ ÿâëÿåòñÿ ïóòå-ñîâìåñòíîé (path-consistent),
åñëè äëÿ ëþáîãî ïóòè â åå ãðàôå îãðàíè÷åíèé ñïðàâåäëèâî ñëåäóþùåå: åñëè ïðèñâîåíèÿ çíà÷åíèé íà÷àëüíîé è êîíå÷íîé ïåðåìåííîé ïóòè ñîâìåñòíû, òî ýòî ìîæåò
áûòü ðàñøèðåíî íà ñîâìåñòíîå ÷àñòè÷íîå ïðèñâîåíèå çíà÷åíèé îñòàâøèìñÿ ïåðåìåííûõ íà ïóòè.
Àíàëîãè÷íî ñåìåéñòâó àëãîðèòìîâ äóãîâîé ñîâìåñòíîñòè, èìååòñÿ ñåìåéñòâî
àëãîðèòìîâ äîñòèæåíèÿ ïóòåâîé ñîâìåñòíîñòè áèíàðíîé çàäà÷è ÓÎ. Ýòè àëãîðèòìû òàêæå ãàðàíòèðóþò âåðøèííóþ è äóãîâóþ ñîâìåñòíîñòü. Íàèëó÷øèé èç ýòèõ
àëãîðèòìîâ PC-4, àíàëîãè÷íûé AC-4, õàðàêòåðèçóåòñÿ âðåìåííîé è åìêîñòíîé
ñëîæíîñòüþ O(d3 n3 ).
Ëîêàëüíàÿ ïóòåâàÿ ñîâìåñòíîñòü âûïîëíÿåòñÿ, åñëè äëÿ äàííîãî ïóòè äëèíû
l ÷åðåç âåðøèíû (x1 , . . . , xl ), äëÿ âñåõ çíà÷åíèé d1a ∈ D1 è dlb ∈ Dl òàêèõ, ÷òî
âûïîëíÿþòñÿ óíàðíûå îãðàíè÷åíèÿ c(x1 ), c(xl ), è áèíàðíûå îãðàíè÷åíèÿ c(x1 , xl ),
èìååòñÿ ïîñëåäîâàòåëüíîñòü çíà÷åíèé: d2c ∈ D2 , . . . , dl−1c ∈ Dl , òàêàÿ, ÷òî
c(x2 ), . . . , c(xl−1 ), c(x1 , x2 ), c(x2 , x3 ), . . . , c(xl−1 , xl )
âûïîëíÿþòñÿ. Íà ðèñ. 10 ïîêàçàí ïðèìåð äëÿ ïóòè (x1 , x2 , x3 ). Íà÷àëüíîå ñîñòî-
x1, D1={4, 5}
x1, D1={4, 5}
>
>
a)
b)
x2, D2={3, 4}
x2, D2={3, 4}
>
>
x3, D3={2, 3}
x3, D3={2, 3}
Ɋɚɡɪɟɲɟɧɧɵɟ ɩɚɪɵ
{(4, 2), (5, 2), (5, 3)}
Ðèñ. 10. Ýôôåêò âûíóæäåíèÿ ïóòåâîé ñîâìåñòíîñòè [283].
ÿíèå ïîêàçàíî íà ðèñ. 10 a. Äîáàâëåíî íîâîå îãðàíè÷åíèå (ðèñ. 10 b), êîòîðîå íå
ðàçðåøàåò ïàðó ïðèñâîåíèé x1 = 4, x3 = 3: äëÿ ýòèõ ïðèñâîåíèé íå ñóùåñòâóåò
ïðèñâîåíèÿ äëÿ x2 , óäîâëåòâîðÿþùåãî áèíàðíûì îãðàíè÷åíèÿì c(x1 , x2 ), c(x2 , x3 ).
Âûíóæäåíèå äóãîâîé ñîâìåñòíîñòè íå ðàçðåøàåò ýòîé ïàðû ïðèñâîåíèé.
34
Ãëîáàëüíàÿ ïóòåâàÿ ñîâìåñòíîñòü âûïîëíÿåòñÿ, åñëè ëþáàÿ ïàðà ïðèñâîåíèé
çíà÷åíèé, êîòîðûå ñîâìåñòíû ñ ïðÿìûì îãðàíè÷åíèåì ìåæäó äâóìÿ ïåðåìåííûìè, òàêæå ñîâìåñòíà ñî âñåìè ïóòÿìè ìåæäó äâóìÿ âåðøèíàìè. Åñëè ëþáîé ïóòü
äëèíû 2 â ïîëíîì ãðàôå îãðàíè÷åíèé ÿâëÿåòñÿ ïóòå-ñîâìåñòíûì, òî ïóòåâàÿ ñîâìåñòíîñòü âûïîëíÿåòñÿ ãëîáàëüíî (Montanari, 1974) [289].
Ïóòåâàÿ ñîâìåñòíîñòü âûíóæäàåòñÿ ñ ïîìîùüþ èçìåíåíèÿ ïðÿìîãî îãðàíè÷åíèÿ ìåæäó íà÷àëüíîé è êîíå÷íîé òî÷êîé ïóòè äëÿ òîãî, ÷òîáû çàïðåòèòü âñå ïàðû
íàçíà÷åíèé, êîòîðûå íàðóøàþò òðåáóåìîå óñëîâèå. Îãðàíè÷åíèÿ ìîãóò áûòü îáíîâëåíû ïóòåì äîáàâëåíèÿ íîâîãî ÿâíîãî îãðàíè÷åíèÿ ê çàäà÷å (ñì. ðèñ. 10).
Ïåðâûé àëãîðèòì ïóòåâîé ñîâìåñòíîñòè áûë ïðåäëîæåí â (Montanari, 1974)
[289], ïðè÷åì îí ýêâèâàëåíòåí àëãîðèòìó PC-1 (Mackworth, 1977) [262]. Mackworth
[262] óñîâåðøåíñòâîâàë ýôôåêòèâíîñòü PC-1 è ïðåäëîæèë PC-2. PC-3 (Mohr &
Henderson, 1986) [287] óëó÷øàåò ýôôåêòèâíîñòü êàê â AC-4. PC-3 íå ïîëíîñòüþ
êîððåêòåí. PC-4 (Han & Lee, 1988) [202] ýòî êîððåêòíàÿ âåðñèÿ. Äàëüíåéøèå óñîâåðøåíñòâîâàíèÿ àëãîðèòìà ïóòåâîé ñîâìåñòíîñòè ìîãóò áûòü íàéäåíû â (Chmeiss
& Jegou, 1996) [106]. Mohr & Henderson [287] ïðåäëîæèëè îïòèìàëüíûå àëãîðèòìû
äëÿ äóãîâîé è ïóòåâîé ñîâìåñòíîñòè, ñîîòâåòñòâåííî AC-4 è PC-4, êîòîðûå áûëè
îñíîâàíû íà ðàáîòå Lauriere [258].
3.3.6. k -ñîâìåñòíîñòü
Äóãîâàÿ ñîâìåñòíîñòü ìîæåò òàêæå ïîíèìàòüñÿ êàê èíôîðìàöèÿ î òîì, íàñêîëüêî äàëåêî ÷àñòè÷íîå ðåøåíèå ìîæåò âñåãäà áûòü ðàñøèðåíî. À èìåííî, ëþáîå
÷àñòè÷íîå ðåøåíèå, ñîäåðæàùåå ëèøü îäíó çàôèêñèðîâàííóþ ïåðåìåííóþ, ìîæåò
áûòü ðàñøèðåíî ñ ïîìîùüþ ôèêñàöèè ëþáîé äðóãîé ïåðåìåííîé íà ñîîòâåòñòâóþùèì îáðàçîì âûáðàííîì çíà÷åíèè. Ïðèìåíåíèå òîãî æå ïðèíöèïà äëÿ áîëüøåãî
÷èñëà ïåðåìåííûõ ïðèâîäèò ê ïîíÿòèþ k -ñîâìåñòíîñòè, êîòîðîå ââåë Freuder [167],
[168], [169], èññëåäîâàâøèé è åãî ñâÿçü ñî ñëîæíîñòüþ ðåøåíèÿ çàäà÷ ÓÎ.
Ìîæíî îïðåäåëèòü k -ñîâìåñòíîñòü, ðàññìàòðèâàÿ îãðàíè÷åíèÿ ñ k ïåðåìåííûìè (äëÿ k = 3 ïóòåâàÿ ñîâìåñòíîñòü, äëÿ k > 3 ãèïåð-äóãîâàÿ ñîâìåñòíîñòü).
Îïðåäåëåíèå (k -ñîâìåñòíîñòü) Çàäà÷à ÓÎ k -ñîâìåñòíà, åñëè ëþáîé ñîâìåñòíûé êîðòåæ çíà÷åíèé ëþáûõ k − 1 ïåðåìåííûõ ìîæåò áûòü ðàñøèðåí ïóòåì çàäàíèÿ çíà÷åíèÿ ëþáîé îäíîé èç îñòàâøèõñÿ ïåðåìåííûõ.
Çàäà÷à ÓÎ ñòðîãî k -ñîâìåñòíà òîãäà è òîëüêî òîãäà, êîãäà îíà j -ñîâìåñòíà
äëÿ âñåõ j ≤ k . Ñòðîãî n-ñîâìåñòíàÿ ñåòü, ãäå n ÷èñëî ïåðåìåííûõ ÇÓÎ, íàçûâàåòñÿ ãëîáàëüíî ñîâìåñòíîé.
Äóãîâàÿ è ïóòåâàÿ ñîâìåñòíîñòü ñîîòâåòñòâóþò 2- è 3-ñîâìåñòíîñòè.
Çàìåòèì, ÷òî k -ñîâìåñòíàÿ ÇÓÎ íå îáÿçàòåëüíî ðàçðåøèìà, è íàîáîðîò, ðàçðåøèìîñòü çàäà÷è íå âëå÷åò çà ñîáîé ñîâìåñòíîñòè ëþáîãî óðîâíÿ, à íå òîëüêî
1-ñîâìåñòíîñòü.
35
3.4. Âû÷èñëèòåëüíàÿ ñëîæíîñòü è ïîèñê ëåãêî ðàçðåøèìûõ çàäà÷
óäîâëåòâîðåíèÿ îãðàíè÷åíèé
Îäíîé èç íàèáîëåå ôóíäàìåíòàëüíûõ ñëîæíûõ ïðîáëåì ÓÎ è ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ÿâëÿåòñÿ èçó÷åíèå âû÷èñëèòåëüíîé ñëîæíîñòè çàäà÷ ÓÎ. Â
[262] áûëî ïîêàçàíî, ÷òî êëàññ âñåõ çàäà÷ ÓÎ ÿâëÿåòñÿ NP-òðóäíûì, òàê ÷òî âðÿä
ëè ñóùåñòâóþò ýôôåêòèâíûå (ïîëèíîìèàëüíûå) àëãîðèòìû îáùåãî íàçíà÷åíèÿ
äëÿ ðåøåíèÿ âñåõ âèäîâ çàäà÷ ÓÎ.
Öåëüþ ìíîãèõ èññëåäîâàíèé áûëà èäåíòèôèêàöèÿ êëàññîâ ëåãêî ðàçðåøèìûõ
çàäà÷ ÓÎ, êîòîðûå ìîãóò áûòü ðåøåíû çà ïîëèíîìèàëüíîå âðåìÿ (ñì. îáçîðû
[255], [263], [364]). Ïîäîáíûå êëàññû çàäà÷ îáû÷íî îïèñûâàþòñÿ ëèáî äåðåâüÿìè,
äðåâîâèäíûìè ãðàôîâûìè ñòðóêòóðàìè ( [141], [170], [326]) ëèáî îïðåäåëåííîé
êîìáèíàöèåé àëãåáðàè÷åñêèõ îïåðàòîðîâ [227].
Äëÿ íåêîòîðûõ êëàññîâ çàäà÷ ÓÎ áûëî ïîêàçàíî, ÷òî èñïîëüçîâàíèå ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé ãàðàíòèðóåò ïîèñê áåç âîçâðàòîâ (backtrack-free search)
[136]. Â ðåçóëüòàòå ñðàâíåíèÿ ìíîãèõ ìåòîäîâ ãðàôîâîé äåêîìïîçèöèè ïîêàçàíî,
÷òî íàèëó÷øèìè ÿâëÿþòñÿ ìåòîäû, îñíîâàííûå íà èñïîëüçîâàíèè ïîíÿòèÿ ãèïåðãðàôîâîé äåêîìïîçèöèè (hypertree decomposition), ðàçðàáîòàííîãî â òåîðèè áàç
äàííûõ [195].
Ôîðìàëèçàöèÿ ïîíÿòèÿ ÿçûêà îãðàíè÷åíèé (constraint language)11 ìîæåò äàòü
èíôîðìàöèþ, ÿâëÿåòñÿ ëè çàäà÷à ÓÎ, âûðàæåííàÿ ñ ïîìîùüþ îïðåäåëåííîãî ÿçûêà îãðàíè÷åíèé, ëåãêî ðàçðåøèìîé [111], [218], [226], [227], [229], [230], [231], [232].
Õîòÿ îáùàÿ çàäà÷à ÓÎ ÿâëÿåòñÿ NP-ïîëíîé, âî ìíîãèõ ïðèëîæåíèÿõ âîçíèêàþùèå çàäà÷è ÓÎ èìåþò ñïåöèàëüíûé âèä, ÷òî ïîçâîëÿåò ðàçðàáîòàòü áîëåå ýôôåêòèâíûå àëãîðèòìû èõ ðåøåíèÿ [90], [112], [260], [310]. Èçâåñòíî, ÷òî áèíàðíûå
çàäà÷è ÓÎ ñ äðåâîâèäíîé ñòðóêòóðîé ëåãêî ðàçðåøèìû ([324], ãëàâà 7). Ïîäêëàññ
îáùåé çàäà÷è ÓÎ, êîòîðûå ìîãóò ðåøåíû çà ïîëèíîìèàëüíîå âðåìÿ, à òàêæå ðàñïîçíàí çà ïîëèíîìèàëüíîå âðåìÿ, íàçûâàåòñÿ ëåãêî ðàçðåøèìûì ïîäêëàññîì.
Ñóùåñòâóþò äâà îñíîâíûõ íàïðàâëåíèÿ ïîèñêà ñïåöèàëüíîé ñòðóêòóðû çàäà÷
ÓÎ, êîòîðûå ìîãóò áûòü ëåãêî ðàçðåøèìûìè: âûäåëåíèå ñòðóêòóðíûõ ñâîéñòâ
çàäà÷ ÓÎ (îïèñûâàåìûõ òîïîëîãèåé ãðàôà îãðàíè÷åíèé), ãàðàíòèðóþùèõ ëåãêóþ
ðàçðåøèìîñòü íåçàâèñèìî îò òîãî, êàêèå òèïû îãðàíè÷åíèé âêëþ÷åíû â ðàññìîòðåíèå [115], [140], ëèáî âûäåëåíèå òèïîâ îãðàíè÷åíèé, äîñòàòî÷íî îãðàíè÷èòåëüíûõ äëÿ ãàðàíòèðîâàíèÿ ëåãêîé ðàçðåøèìîñòè íåçàâèñèìî îò òîãî, êàê îíè ñî÷åòàþòñÿ [90], [161].
Áëàãîäàðÿ èññëåäîâàíèÿì â ýòîé îáëàñòè áûëè âûäåëåíû ìíîãèå êëàññû ëåãêî
ðàçðåøèìûõ çàäà÷ ÓÎ, îñíîâûâàÿñü íà ñòðóêòóðíûõ ñâîéñòâàõ (ñì. [324]). Ïîäîáíûå êëàññû ìîãóò âñòðåòèòüñÿ, â ÷àñòíîñòè, â ñëó÷àå, êîãäà èìååòñÿ íåêîòîðàÿ
ñïåöèàëüíàÿ ñòðóêòóðà âçàèìîñâÿçè îãðàíè÷åíèé (èõ ïåðåñå÷åíèé). Íàèáîëåå åñòåñòâåííûì äëÿ èçó÷åíèÿ âçàèìîñâÿçåé îãðàíè÷åíèé ÿâëÿåòñÿ àïïàðàò ãèïåðãðàôîâ. Äëÿ êëàññà çàäà÷ ÓÎ, ó êîòîðûõ àðíîñòü îãðàíè÷åíèé îãðàíè÷åíà íåêîòîðîé
ôèêñèðîâàííîé êîíñòàíòîé (òàêèõ, êàê áèíàðíûå çàäà÷è ÓÎ) áûëî ïîêàçàíî, ÷òî
11 ßçûê
îãðàíè÷åíèé ÇÓÎ ýòî ìíîæåñòâî îòíîøåíèé â îãðàíè÷åíèÿõ ÇÓÎ [113]
36
(ïðè âûïîëíåíèè íåêîòîðûõ äîïîëíèòåëüíûõ îãðàíè÷åíèé) åäèíñòâåííûì êëàññîì ñòðóêòóð, ãàðàíòèðóþùèì ëåãêóþ ðàçðåøèìîñòü, ÿâëÿåòñÿ êëàññ ñòðóêòóð ñ
îãðàíè÷åííîé äðåâîâèäíîé øèðèíîé [198], [209], [23].
Âòîðîå íàïðàâëåíèå èññëåäîâàíèé ñîñòîèò â ðàññìîòðåíèè çàäà÷ ÓÎ ñ áîëåå
îãðàíè÷åííûìè òèïàìè îãðàíè÷åíèé. Åñòåñòâåííûì ïîäõîäîì èçó÷åíèÿ òèïîâ îãðàíè÷åíèé ÿâëÿåòñÿ ìàòåìàòè÷åñêàÿ òåîðèÿ îòíîøåíèé è ñîîòâåòñòâóþùèå èì àëãåáðû, ïðèìåíåíèå êîòîðûõ ïîçâîëèëî ïîëó÷èòü õàðàêòåðèçàöèè òîãî, êàêèå âèäû
îãðàíè÷åíèé îáåñïå÷èâàþò ëåãêóþ ðàçðåøèìîñòü íåçàâèñèìî îò èõ âçàèìîñâÿçè.
Ìíîæåñòâî òèïîâ îãðàíè÷åíèé ñ ýòèì ñâîéñòâîì íàçûâàåòñÿ ëåãêî ðàçðåøèìûì
ÿçûêîì îãðàíè÷åíèé.  îáùåì áûëî ïîêàçàíî, ÷òî ëþáîé ëåãêî ðàçðåøèìûé ÿçûê
îãðàíè÷åíèé äîëæåí èìåòü îïðåäåëåííûå àëãåáðàè÷åñêèå ñâîéñòâà, íàçûâàåìûå
ïîëèìîðôèçìàìè [225].
Ôóíäàìåíòàëüíîé îòêðûòîé ïðîáëåìîé â ýòîé îáëàñòè ÿâëÿåòñÿ ÷åòêîå îïðåäåëåíèå òèïîâ îãðàíè÷åíèé â çàäà÷àõ ÓÎ, êîòîðûå ìîãóò áûòü ðåøåíû çà ïîëèíîìèàëüíîå âðåìÿ. Ýòà ïðîáëåìà âàæíà ñ òåîðåòè÷åñêîé òî÷êè çðåíèÿ, òàê êàê îíà
ïîìîãàåò âûÿñíèòü ãðàíèöó ìåæäó ëåãêîé è òðóäíîé ðàçðåøèìîñòüþ äëÿ øèðîêîãî êðóãà çàäà÷ êîìáèíàòîðíîãî ïîèñêà [125], [161], [225], [252]. Êðîìå òîãî, îíà
âàæíà è ñ ïðèêëàäíîé òî÷êè çðåíèÿ, òàê êàê îíà ïîçâîëÿåò ðàçðàáàòûâàòü ÿçûêè ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, èñïîëüçóþùèå ñóùåñòâîâàíèå ðàçëè÷íûõ
ñåìåéñòâ ëåãêî ðàçðåøèìûõ îãðàíè÷åíèé äëÿ ïîèñêà áîëåå ýôôåêòèâíûõ ìåòîäîâ
ðåøåíèÿ [260], [310]. Â ðÿäå ïóáëèêàöèé [228], [230], [227], [233] áûëî ïîêàçàíî, ÷òî
ñëîæíîñòü ÿçûêîâ îãðàíè÷åíèé íàä êîíå÷íûìè äîìåíàìè ìîæåò áûòü îõàðàêòåðèçîâàíà, èñïîëüçóÿ àëãåáðàè÷åñêèå ñâîéñòâà îòíîøåíèé. Ñîãëàñíî [114], ïåðâûé
ýòàï àëãåáðàè÷åñêîãî ïîäõîäà ê ÿçûêàì îãðàíè÷åíèé èñïîëüçóåò èçâåñòíóþ èäåþ,
ñîñòîÿùóþ â òîì, ÷òî ê äàííîìó íà÷àëüíîìó ìíîæåñòâó îòíîøåíèé îãðàíè÷åíèé
ìîãóò äîáàâëÿòüñÿ äîïîëíèòåëüíûå îãðàíè÷åíèÿ áåç èçìåíåíèÿ ñëîæíîñòè ñîîòâåòñòâóþùåãî êëàññà çàäà÷. Íà ñàìîì äåëå, áûëî ïîêàçàíî, ÷òî ìîæíî äîáàâèòü
âñå îãðàíè÷åíèÿ, ïîëó÷åííûå èç èñõîäíûõ îãðàíè÷åíèé, èñïîëüçóÿ íåêîòîðûå ïðîñòûå ïðàâèëà. Áîëüøèå ìíîæåñòâà îòíîøåíèé, ïîëó÷åííûå ïðè èñïîëüçîâàíèè
ýòèõ ïðàâèë, íàçûâàþòñÿ ðåëÿöèîííûìè êëîíàìè [146], [306]. Ïåðâûé ýòàï àëãåáðàè÷åñêîãî ïîäõîäà ñîñòîèò â òîì, ÷òî äîñòàòî÷íî àíàëèçèðîâàòü ñëîæíîñòü ëèøü
äëÿ òåõ ìíîæåñòâ îòíîøåíèé, êîòîðûå ÿâëÿþòñÿ ðåëÿöèîííûìè êëîíàìè. Âòîðîé
ýòàï ñîñòîèò â òîì, ÷òî ðåëÿöèîííûå êëîíû ìîãóò áûòü îïèñàíû ñ ïîìîùüþ èõ
ïîëèìîðôèçìîâ, ÿâëÿþùèõñÿ àëãåáðàè÷åñêèìè îïåðàöèÿìè íàä òåì æå îñíîâíûì
ìíîæåñòâîì [225],[227]. Ïîìèìî òîãî, ÷òî ïîëèìîðôèçìû äàþò òî÷íûé è óäîáíûé
ìåòîä îïèñàíèÿ áîëüøèõ ñåìåéñòâ îòíîøåíèé, îíè îòðàæàþò òàêæå îïðåäåëåííûå àñïåêòû ñòðóêòóðû îòíîøåíèé, êîòîðûå ìîãóò áûòü èñïîëüçîâàíû äëÿ ñîçäàíèÿ ýôôåêòèâíûõ àëãîðèòìîâ. Óêàçàííàÿ ñâÿçü ìåæäó ðåëÿöèîííûìè êëîíàìè
è ïîëèìîðôèçìàìè èãðàåò ñåé÷àñ êëþ÷åâóþ ðîëü ïðè îïðåäåëåíèè ìíîãèõ ëåãêî ðàçðåøèìûõ êëàññîâ îãðàíè÷åíèé è ðàçðàáîòêå ýôôåêòèâíûõ àëãîðèòìîâ èõ
ðåøåíèÿ ñîîòâåòñòâóþùèõ çàäà÷ ÓÎ [96],[92],[93], [91],[126],[228]. Ïîëíàÿ õàðàêòåðèçàöèÿ âñåâîçìîæíûõ ëåãêî ðàçðåøèìûõ ÿçûêîâ îãðàíè÷åíèé áûëà óñòàíîâëåíà
â ñëåäóþùèõ ñëó÷àÿõ: êîíñåðâàòèâíûå ÿçûêè îãðàíè÷åíèé (ò.å. ÿçûêè îãðàíè37
÷åíèé, ñîäåðæàùèå âñå óíàðíûå îãðàíè÷åíèÿ) [94], è ÿçûêè îãðàíè÷åíèé íàä 2ýëåìåíòíûì äîìåíîì [332] èëè íàä 3-ýëåìåíòíûì äîìåíîì [96]. Êðîìå òîãî, áûëè
ðàçðàáîòàíû íîâûå ýôôåêòèâíûå àëãîðèòìû äëÿ ðåøåíèÿ çàäà÷ ÓÎ ñïåöèàëüíîãî âèäà êàê äëÿ êîíå÷íûõ, òàê è äëÿ áåñêîíå÷íûõ äîìåíîâ [75], [92], [94], [112],
[121], [126], [251]. Ïîñëåäíèé ýòàï àëãåáðàè÷åñêîãî ïîäõîäà ñâÿçûâàåò ÿçûê îãðàíè÷åíèé è êîíå÷íûå óíèâåðñàëüíûå àëãåáðû (ñì. ðàçäåë 6.4.3 ðàáîòû [114]). ßçûê
êîíå÷íûõ óíèâåðñàëüíûõ àëãåáð ïðåäîñòàâëÿåò ìíîæåñòâî î÷åíü óäîáíûõ íîâûõ
ñðåäñòâ äëÿ àíàëèçà ñëîæíîñòè îãðàíè÷åíèé, â òîì ÷èñëå ãëóáîêèå ñòðóêòóðíûå
ðåçóëüòàòû, ðàçðàáîòàííûå äëÿ êëàññèôèêàöèè ñòðóêòóðû êîíå÷íûõ àëãåáð [210],
[274], [358].
 ñëó÷àå, êîãäà ìíîæåñòâî ðàçðåø¼ííûõ îòíîøåíèé èíâàðèàíòíî îòíîñèòåëüíî
íåêîòîðîé ìàëüöåâñêîé îïåðàöèè12 , ïîêàçûâàåòñÿ, ÷òî ñîîòâåòñòâóþùàÿ çàäà÷à
ÓÎ ìîæåò áûòü ðåøåíà çà ïîëèíîìèàëüíîå âðåìÿ [2].
Îäíàêî ìíîãèå çàäà÷è ÓÎ íå îáëàäàþò äîñòàòî÷íî îãðàíè÷åííîé ñòðóêòóðîé
èëè èñïîëüçóþò íåäîñòàòî÷íî îãðàíè÷åííûé ÿçûê îãðàíè÷åíèé, ÷òîáû ïîïàñòü â
êàêîé-ëèáî èç êëàññîâ ëåãêî ðàçðåøèìûõ çàäà÷. Îíè ìîãóò, òåì íå ìåíåå, èìåòü
ñâîéñòâà, îáåñïå÷èâàþùèå ýôôåêòèâíîñòü èõ ðåøåíèÿ, íî ýòè ñâîéñòâà îòíîñÿòñÿ
êàê ê ñòðóêòóðå, òàê è ê òèïàì îãðàíè÷åíèé. Ýòè ñâîéñòâà èíîãäà íàçûâàþòñÿ
ãèáðèäíûìè ïðè÷èíàìè ëåãêîé ðàçðåøèìîñòè [301], îíè ãîðàçäî ìåíåå èçó÷åíû,
÷åì ñâîéñòâà ÿçûêà è îïèñàííûå âûøå ñòðóêòóðíûå ñâîéñòâà.
 [122] îïèñàí íîâûå ãèáðèäíûå ëåãêî ðàçðåøèìûå êëàññû áèíàðíûõ ÇÓÎ,
îáîáùàþùèå çàäà÷è ñ äðåâîâèäíîé ñòðóêòóðîé, à òàêæå ãèáðèäíûå ëåãêî ðàçðåøèìûå êëàññû, îñíîâàííûå íà ÿçûêå. Ýòè íîâûå êëàññû îñíîâàíû íà ëîêàëüíûõ
ñâîéñòâàõ óïîðÿäî÷åííûõ òðîåê ïåðåìåííûõ. Ïðè ýòîì çàäà÷à îïðåäåëåíèÿ óïîðÿäî÷åíèÿ ïåðåìåííûõ, äëÿ êîòîðîãî âûïîëíÿþòñÿ ýòè ñâîéñòâà, ðåøàåòñÿ çà ïîëèíîìèàëüíîå âðåìÿ.
4. Ñòðóêòóðà è ìåòîäû äåêîìïîçèöèè çàäà÷ ÓÎ
Èññëåäîâàíèÿ, êàñàþùèåñÿ ñòðóêòóðû è ñëîæíîñòè çàäà÷ ÓÎ, íà÷àëèñü ñ ðàáîòû (Freuder, 1985) [169], ãäå áûëî ïîêàçàíî, ÷òî ïîèñê íà äåðåâüÿõ ñ ñîâìåñòíûìè
äóãàìè ïðîèñõîäèò áåç êàêèõ-ëèáî âîçâðàòîâ. Àíàëîãè÷íûå ðåçóëüòàòû ïðèìåíèòåëüíî ê àöèêëè÷åñêèì ãèïåðãðàôàì áûëè ïîëó÷åíû â îáëàñòè òåîðèè áàç äàííûõ
(Beeri et al, 1983) [55]. Ñî âðåìåíè ïóáëèêàöèè ýòèõ ðàáîò äîñòèãíóò çíà÷èòåëüíûé
ïðîãðåññ â ÷àñòè ïîëó÷åíèÿ áîëåå îáùèõ ðåçóëüòàòîâ, êàñàþùèõñÿ ñâÿçè ìåæäó
ñëîæíîñòüþ ðåøåíèÿ çàäà÷è ÓÎ è ñòðóêòóðîé åå ãðàôà îãðàíè÷åíèé.
 äàííîì ðàçäåëå ðàññìàòðèâàþòñÿ ñïîñîáû, ïîçâîëÿþùèå èñïîëüçîâàòü äëÿ
áûñòðîãî ïîèñêà ðåøåíèé ñòðóêòóðó ñàìîé çàäà÷è, ïðåäñòàâëåííóþ â âèäå ãðàôà
îãðàíè÷åíèé. Áîëüøèíñòâî îïèñàííûõ çäåñü ïîäõîäîâ ÿâëÿåòñÿ î÷åíü îáùèìè è
ïðèìåíèìûìè äëÿ ðåøåíèÿ äðóãèõ äèñêðåòíûõ çàäà÷, êðîìå ÓÎ.
12 Ìàëüöåâñêàÿ
ϕ(y, y, x) = x.
îïåðàöèÿ ýòî òåðíàðíàÿ îïåðàöèÿ ϕ, óäîâëåòâîðÿþùàÿ ϕ(x, y, y) =
38
4.1. Ãðàôîâûå ìåòîäû
Ãðàôîâûå ìåòîäû èñïîëüçóþò ñòðóêòóðó ãðàôà îãðàíè÷åíèé ïðè ðåøåíèè çàäà÷è ÓÎ. Íèæå ðàññìîòðåíû ãðàôîâûå ìåòîäû, èñïîëüçóþùèå òî, ÷òî çàäà÷à ÓÎ
ñ äðåâîâèäíûì ãðàôîì îãðàíè÷åíèé ìîæåò áûòü ðåøåíà çà ëèíåéíîå âðåìÿ (ñì.
(Miguel & Shen [283]), ðàçäåë 4.4), ïðè÷åì äðåâîâèäíàÿ ñòðóêòóðà íàõîäèòñÿ èëè
ñòðîèòñÿ èç ãðàôà îãðàíè÷åíèé äàííîé çàäà÷è ÓÎ.
Äëÿ ðàçáèåíèÿ çàäà÷è ÓÎ íà íåçàâèñèìûå ïîäçàäà÷è, ìîæíî ðàññìîòðåòü ñâÿçíûå êîìïîíåíòû ãðàôà îãðàíè÷åíèé. Êàæäûé êîìïîíåíò ñîîòâåòñòâóåò îäíîé ïîäçàäà÷å ÓÎi . Åñëè ïðèñâàèâàíèå Si ÿâëÿåòñÿ ðåøåíèåì ÓÎi , òî ∪i Si ÿâëÿåòñÿ ðåøåíèåì ∪i ÓÎi . Ïðåäïîëîæèì, ÷òî êàæäàÿ ïîäçàäà÷à ÓÎi èìååò c ïåðåìåííûõ èç
îáùåãî êîëè÷åñòâà n ïåðåìåííûõ, ãäå c êîíñòàíòà.  òàêîì ñëó÷àå äîëæíî áûòü
n/c ïîäçàäà÷, è äëÿ ðåøåíèÿ êàæäîé èç íèõ òðåáóåòñÿ, ñàìîå áîëüøåå, îáúåì ðàáîòû dc 13 . Ïîýòîìó îáùèé îáúåì ðàáîòû èçìåðÿåòñÿ âåëè÷èíîé O(dc n/c), êîòîðàÿ
ëèíåéíî çàâèñèò îò n; áåç òàêîé äåêîìïîçèöèè îáùèé îáúåì ðàáîòû èçìåðÿëñÿ
áû âåëè÷èíîé O(dn ), êîòîðàÿ ýêñïîíåíöèàëüíî çàâèñèò îò n. Ïðèâåäåì áîëåå êîíêðåòíûé ïðèìåð èç [12]: äåêîìïîçèöèÿ áóëåâîé çàäà÷è ÓÎ ñ n = 80 íà ÷åòûðå
íåçàâèñèìûå ïîäçàäà÷è ñ c = 20 ñîêðàùàåò ïðîäîëæèòåëüíîñòü ïîèñêà ðåøåíèÿ â
íàèõóäøåì ñëó÷àå îò âåëè÷èíû, ðàâíîé âðåìåíè ñóùåñòâîâàíèÿ âñåé Âñåëåííîé,
äî âåëè÷èíû, ìåíüøåé îäíîé ñåêóíäû. Ïîýòîìó ïîëíîñòüþ íåçàâèñèìûå ïîäçàäà÷è ÿâëÿþòñÿ î÷åíü ïðèâëåêàòåëüíûìè, íî âñòðå÷àþòñÿ ðåäêî.  áîëüøèíñòâå
ñëó÷àåâ ïîäçàäà÷è ëþáîé çàäà÷è ÓÎ ñâÿçàíû äðóã ñ äðóãîì. Ïðîñòåéøèì ñëó÷àåì
ÿâëÿåòñÿ òîò, â êîòîðîì ãðàô îãðàíè÷åíèé ÿâëÿåòñÿ äåðåâîì: ëþáûå äâå ïåðåìåííûå ñâÿçàíû íå áîëüøå ÷åì îäíèì ïóòåì. Àëãîðèòì ðåøåíèÿ áëî÷íîé ÇÓÎ èìååò
ñëåäóþùèå ýòàïû.
• Âûáðàòü â êà÷åñòâå êîðíÿ äåðåâà ëþáóþ ïåðåìåííóþ è óïîðÿäî÷èòü ïåðåìåííûå îò êîðíÿ äî ëèñòüåâ òàêèì îáðàçîì, ÷òîáû ðîäèòåëüñêàÿ âåðøèíà
êàæäîé âåðøèíû â äåðåâå ïðåäøåñòâîâàëà ýòîé âåðøèíå â òàêîì óïîðÿäî÷åíèè. Îáîçíà÷èòü ýòè ïåðåìåííûå ïî ïîðÿäêó êàê X1 , . . . , Xn . Òåïåðü êàæäàÿ
ïåðåìåííàÿ, êðîìå êîðíÿ, èìååò òîëüêî îäíó ðîäèòåëüñêóþ ïåðåìåííóþ.
• Â öèêëå ïî j îò n äî 2 ïðèìåíÿòü ïðîâåðêó ñîâìåñòíîñòè ê äóãàì (Xi , Xj ),
ãäå Xi ðîäèòåëüñêàÿ âåðøèíà âåðøèíû Xj , óäàëÿÿ çíà÷åíèÿ èç îáëàñòè
îïðåäåëåíèÿ Di ïî ìåðå íåîáõîäèìîñòè.
•  öèêëå ïî j îò 1 äî n ïðèñâàèâàòü Xj ëþáîå çíà÷åíèå, ñîâìåñòíîå ñî çíà÷åíèåì, ïðèñâîåííûì Xi , ãäå Xi ðîäèòåëüñêàÿ âåðøèíà âåðøèíû Xj .
Òåïåðü, ïîñëå ñîçäàíèÿ ýôôåêòèâíîãî àëãîðèòìà äëÿ äåðåâüåâ, ñëåäóåò ðàññìîòðåòü âîïðîñ î òîì, ìîæíî ëè êàêèì-òî îáðàçîì ïðèâîäèòü ê äðåâîâèäíûì ñòðóêòóðàì áîëåå îáùèå ãðàôû îãðàíè÷åíèé. Ñóùåñòâóþò äâà îñíîâíûõ ñïîñîáà âûïîëíåíèÿ ýòîé çàäà÷è; îäèí èç íèõ îñíîâàí íà óäàëåíèè âåðøèí, à äðóãîé íà ñëèÿíèè
13 d
ðàçìåð äîìåíîâ ïåðåìåííûõ.
39
x1
x2
a)
x1
x2
x2
x2
x3
x4
b)
x3
x4
Ðèñ. 11. Ýôôåêò ôèêñàöèè ìíîæåñòâà ðàçðûâà öèêëà.
âåðøèí äðóã ñ äðóãîì è îáðàçîâàíèè ñóïåð-âåðøèí. Ïåðâûé ïîäõîä ïðåäóñìàòðèâàåò ïðèñâàèâàíèå çíà÷åíèé íåêîòîðûì ïåðåìåííûì òàê, ÷òîáû îñòàâøèåñÿ ïåðåìåííûå îáðàçîâûâàëè äåðåâî.
4.2. Ìåòîä ìíîæåñòâ ðàçðûâà öèêëà
Ìåòîä ìíîæåñòâ ðàçðûâà öèêëà (cycle cutset) (Dechter, 1990) [133] îñíîâàí íà
òîì, ÷òî ïðèñâîåíèå çíà÷åíèÿ ïåðåìåííîé óñòðàíÿåò åå èç äàëüíåéøåãî ðàññìîòðåíèÿ â ýòîé âåòâè äåðåâà ïîèñêà. Ýòî ñèëüíî ìåíÿåò ñâÿçíîñòü îñòàâøåéñÿ ÷àñòè
ãðàôà îãðàíè÷åíèé.
Ìíîæåñòâî ðàçðûâà öèêëà ãðàôà îãðàíè÷åíèé ýòî ìíîæåñòâî âåðøèí, ïðè
èñêëþ÷åíèè êîòîðûõ (ñ ïîìîùüþ ôèêñàöèè ñîîòâåòñòâóþùèõ ïåðåìåííûõ) îñòàåòñÿ äåðåâî. Ðàññìîòðèì ïðèìåð íà ðèñ. 11 a. Ôèêñèðîâàíèå çíà÷åíèÿ ïåðåìåííîé
x2 ¾áëîêèðóåò¿ ïóòü, ïðîõîäÿùèé ÷åðåç ýòó âåðøèíó, òàê ÷òî èìååòñÿ òîëüêî îäèí
ïóòü ìåæäó ëþáûìè äâóìÿ ïåðåìåííûìè (âåðøèíàìè).  ðåçóëüòàòå ïîëó÷àåòñÿ
ãðàô îãðàíè÷åíèé (ðèñ. 11 b), â êîòîðîì çàôèêñèðîâàííàÿ ñåé÷àñ ïåðåìåííàÿ x2
ïîâòîðÿåòñÿ äëÿ êàæäîé ñìåæíîé ïåðåìåííîé. Åñëè ìíîæåñòâî ôèêñèðîâàííûõ
ïåðåìåííûõ ñîâïàäàåò ñ ìíîæåñòâîì ðàçðûâà öèêëà, òî îñòàâøèéñÿ ãðàô èìååò
äðåâîâèäíóþ ñòðóêòóðó è ñîîòâåòñòâóþùàÿ åìó çàäà÷à ìîæåò áûòü ðåøåíà î÷åíü
ýôôåêòèâíî. Ýòîò ìåòîä íàõîäèò ëîêàëüíî ñîâìåñòíîå ïðèñâîåíèå äëÿ ïåðåìåííûõ èç ìíîæåñòâà ðàçðûâà öèêëà è ðåøàåò îñòàâøóþñÿ (äðåâîâèäíóþ) çàäà÷ó.
Åñëè íå íàéäåíî íè îäíîãî ðåøåíèÿ, òî äîëæíî áûòü íàéäåíî äðóãîå ñîâìåñòíîå ïðèñâîåíèå äëÿ ïåðåìåííûõ èç ìíîæåñòâà ðàçðûâà öèêëà è äåëàåòñÿ ïîïûòêà
ðåøåíèÿ çàäà÷è, ñîîòâåòñòâóþùåé îñòàâøåéñÿ ÷àñòè ãðàôà. Íàõîæäåíèå ìèíèìàëüíîãî ìíîæåñòâà ðàçðûâà öèêëà ÿâëÿåòñÿ NP-ïîëíîé çàäà÷åé.  ñâÿçè ñ ýòèì,
öåëåñîîáðàçíî âñòðàèâàòü ìåòîä ìíîæåñòâà ðàçðûâà öèêëà â ìåòîä äåðåâà ïîèñêà, òàêîé, êàê ïîèñê ñ âîçâðàòàìè.  ñëó÷àå, êîãäà ìíîæåñòâî çàôèêñèðîâàííûõ
ïåðåìåííûõ îáðàçóåò ìíîæåñòâî ðàçðûâà öèêëà, îñòàâøàÿñÿ ÷àñòü çàäà÷è ìîæåò
áûòü áûñòðî ðåøåíà. Ïî ñðàâíåíèþ ñ ïîèñêîì ñ âîçâðàòàìè íà ñëó÷àéíî ñãåíåðèðîâàííûõ çàäà÷àõ, ìåòîä ïîèñêà ñ âîçâðàòàìè, èñïîëüçóþùèé ìíîæåñòâà ðàçðûâà
öèêëà, â ñðåäíåì íà 20% ýôôåêòèâíåå [284]. Ïî ñðàâíåíèþ ñ íàèâíîé âåðñèåé
40
àëãîðèòìà îáðàòíîãî ïåðåõîäà, åãî êîìáèíàöèÿ ñ ìíîæåñòâàìè ðàçðûâà öèêëà â
ñðåäíåì íà 25% ýôôåêòèâíåå [284].
Îáùèé àëãîðèòì ðåøåíèÿ óêàçàííûì ñïîñîáîì îïèñàí íèæå [12].
• Âûáðàòü ïîäìíîæåñòâî S èç ìíîæåñòâà ïåðåìåííûõ çàäà÷è ÓÎ, òàêîå, ÷òî
ãðàô îãðàíè÷åíèé ïîñëå óäàëåíèÿ S ñòàíîâèòñÿ äåðåâîì. Ïîäìíîæåñòâî S
íàçûâàåòñÿ ìíîæåñòâîì ðàçðûâà öèêëà.
• Äëÿ êàæäîãî âîçìîæíîãî ïðèñâàèâàíèÿ ïåðåìåííûì â S , êîòîðîå óäîâëåòâîðÿåò âñåì îãðàíè÷åíèÿì â S , âûïîëíèòü ñëåäóþùåå:
óäàëèòü èç îáëàñòåé îïðåäåëåíèÿ îñòàâøèõñÿ ïåðåìåííûõ ëþáûå çíà÷åíèÿ, íåñîâìåñòíûå ñ äàííûì ïðèñâàèâàíèåì äëÿ S ;
åñëè îñòàâøàÿñÿ çàäà÷à ÓÎ èìååò ðåøåíèå, âåðíóòü ýòî ðåøåíèå âìåñòå
ñ ïðèñâàèâàíèåì äëÿ S .
Åñëè ìíîæåñòâî ðàçðûâà öèêëà èìååò ðàçìåð c, òî îáùåå âðåìÿ ðàáîòû àëãîðèòìà
ñîñòàâëÿåò O(dc · (n − c)d2 ).  òîì ñëó÷àå, åñëè ãðàô ïî ñâîåé ôîðìå ¾î÷åíü áëèçîê
ê äåðåâó¿, òî ìíîæåñòâî ñ áóäåò íåáîëüøèì, à ýêîíîìèÿ âðåìåíè ïî ñðàâíåíèþ ñ
ïðÿìûì ïîèñêîì ñ âîçâðàòàìè îêàæåòñÿ îãðîìíîé. Íî â íàèõóäøåì ñëó÷àå êîëè÷åñòâî ýëåìåíòîâ ñ ìîæåò äîñòèãàòü (n − 2). Õîòÿ çàäà÷à ïîèñêà íàèìåíüøåãî
ìíîæåñòâà ðàçðûâà öèêëà ÿâëÿåòñÿ N P -òðóäíîé, íî èçâåñòíî íåñêîëüêî ýôôåêòèâíûõ àëãîðèòìîâ ðåøåíèÿ ýòîé çàäà÷è.  öåëîì äàííûé àëãîðèòìè÷åñêèé ïîäõîä íîñèò íàçâàíèå îïðåäåëåíèÿ óñëîâèé âûáîðà ìíîæåñòâà ðàçðûâà öèêëà (cutset
conditioning).
4.3. Ñâÿçíûå êîìïîíåíòû
Âûäåëåíèå ñâÿçíûõ êîìïîíåíòîâ ãðàôà (Dechter & Pearl [140]; Freuder [168])
ìîæåò áûòü ïîëåçíî ïðè ðåøåíèè çàäà÷ ÓÎ. Òî÷êà ñî÷ëåíåíèÿ xi â ãðàôå îãðàíè÷åíèé ýòà òàêàÿ âåðøèíà, ÷òî âñå ïóòè ìåæäó îñòàëüíûìè âåðøèíàìè äîëæíû
ïðîõîäèòü ÷åðåç íåå. Ðàçäåëèìûé ãðàô ñîäåðæèò òî÷êó ñî÷ëåíåíèÿ, à ñâÿçíûé
ãðàô íåò. Ñâÿçíûé êîìïîíåíò ýòî ïîäãðàô áåç òî÷åê ñî÷ëåíåíèÿ. Even [159]
ïðåäëîæèë àëãîðèòì ñî ñëîæíîñòüþ O(e) äëÿ íàõîæäåíèÿ âñåõ ñâÿçíûõ êîìïîíåíòîâ è òî÷åê ñî÷ëåíåíèÿ (çäåñü e ÷èñëî îãðàíè÷åíèé). Ïîñëå íàõîæäåíèÿ âñåõ
ñâÿçíûõ êîìïîíåíòîâ, íåîáõîäèìî íàéòè âñå âîçìîæíûå ðåøåíèÿ äëÿ êàæäîãî èç
íèõ. Ðåøåíèå âñåé çàäà÷è ÓÎ ìîæåò áûòü ïîëó÷åíî ñ ïîìîùüþ ñêëåèâàíèÿ ðåøåíèé äëÿ êîìïîíåíòîâ (ñ ó÷åòîì ñîâìåñòíîñòè çíà÷åíèÿ äëÿ òî÷êè ñî÷ëåíåíèÿ
ñìåæíûõ êîìïîíåíòîâ). Dechter & Pearl [140] ïðåäëîæèëè àëãîðèòì ñî ñëîæíîñòüþ O(n · dr ) , èñïîëüçóþùèé îïèñàííûé ïîäõîä, ãäå n ÷èñëî ïåðåìåííûõ, d ðàçìåð ìàêñèìàëüíîãî äîìåíà ïåðåìåííûõ, à r ðàçìåð íàèáîëüøåãî êîìïîíåíòà.
41
Ðèñ. 12. Ïîñòðîåíèå õîðäàëüíîãî ïåðâè÷íîãî ãðàôà.
4.4. Äðåâîâèäíàÿ êëàñòåðèçàöèÿ
Äðåâîâèäíàÿ êëàñòåðèçàöèÿ (tree-clustering) (Dechter & Pearl [141]) ïðåîáðàçóåò ïðîèçâîëüíóþ n-àðíóþ çàäà÷ó ÓÎ â àöèêëè÷åñêóþ ôîðìó â ïðåäñòàâëåíèè â
âèäå äâîéñòâåííîãî ãðàôà ïóòåì ôîðìèðîâàíèÿ êëàñòåðîâ èç ïåðåìåííûõ, ïðè÷åì ãðàô âçàèìîñâÿçåé èìååò ñòðóêòóðó äåðåâà. n-àðíàÿ çàäà÷à ÓÎ íàçûâàåòñÿ
àöèêëè÷åñêîé (ñì. (Miguel & Shen [283])), åñëè åå ïåðâè÷íûé ãðàô îãðàíè÷åíèé
îáëàäàåò ñëåäóþùèìè ñâîéñòâàìè:
• õîðäàëüíîñòü : êàæäûé öèêë, ñîäåðæàùèé íå ìåíåå 4 âåðøèí, ñîäåðæèò õîðäó (ðåáðî, ñîåäèíÿþùåå 2 íåïîñëåäîâàòåëüíûå âåðøèíû öèêëà).
• êîíôîðìíîñòü : êàæäàÿ èç ìàêñèìàëüíûõ êëèê ãðàôà ñîîòâåòñòâóåò îäíîìó
îãðàíè÷åíèþ â çàäà÷å ÓÎ.
Äëÿ äîñòèæåíèÿ óêàçàííûõ ñâîéñòâ ìîæåò áûòü èñïîëüçîâàí àëãîðèòì òðèàíãóëÿöèè (Tarjan & Yannakakis [361]), èñïîëüçóÿ äâà øàãà: a) Íàéòè óïîðÿäî÷åíèå
ñ ìàêñèìàëüíîé ñòåïåíüþ (maximum cardinality) è á) ðåêóðñèâíî äîáàâèòü ðåáðà
ìåæäó âåðøèíàìè, ñîåäèíÿþùèìè âåðøèíû, ñ áîëüøèì ïîðÿäêîì ñîãëàñíî óêàçàííîìó óïîðÿäî÷åíèþ. Íà ðèñóíêàõ 12 a è b (èç (Dechter & Pearl [141])) ïîêàçàí
ïåðâè÷íûé ãðàô îãðàíè÷åíèé çàäà÷è ÓÎ ñîîòâåòñòâåííî äî è ïîñëå ïðîöåññà òðèàíãóëÿöèè. Ìàêñèìàëüíûìè êëèêàìè ýòîãî ãðàôà ÿâëÿþòñÿ êëàñòåðû, êîòîðûå
ñîñòàâëÿþò îãðàíè÷åíèÿ ïðåîáðàçîâàííîé çàäà÷è ÓÎ (ñì. ðèñ. 13 a). Äëÿ ïîñòðîåíèÿ äåðåâà èç ýòîãî ïðåäñòàâëåíèÿ äîñòàòî÷íî óäàëèòü ëèøíèå ðåáðà èç ãðàôà,
ò.å. òå ðåáðà, óäàëåíèå êîòîðûõ íå îêàçûâàåò âëèÿíèÿ íà ìíîæåñòâî ðåøåíèé. Â
äâîéñòâåííîì ãðàôå äóãà èçáûòî÷íà, åñëè ìíîæåñòâî ïåðåìåííûõ, êîòîðûì îíà
ïîìå÷åíà, ÿâëÿåòñÿ îáùèì äëÿ âñåõ äóã íà îòäåëüíîì ïóòè ìåæäó êîíå÷íûìè
âåðøèíàìè äóãè.
Íà ðèñ. 13 b) ïîêàçàí îäèí ñïîñîá ïîñòðîåíèÿ äåðåâà äëÿ çàäà÷è ÓÎ. Ñëîæíîñòü ýòîé ïðîöåäóðû O(n·r·dr ), ãäå r ðàçìåð íàèáîëüøåé ìàêñèìàëüíîé êëèêè.
42
Ðèñ. 13. Ïîñòðîåíèå äåðåâà èç äâîéñòâåííîãî ãðàôà.
4.5. Ýëèìèíàöèÿ ïåðåìåííûõ
4.5.1. Ñåãìåíòíàÿ ýëèìèíàöèÿ
Ñåãìåíòíàÿ ýëèìèíàöèÿ (Bucket elimination) [137], [142] ïî ñóòè ÿâëÿåòñÿ
àíàëîãîì íåñåðèàëüíîãî äèíàìè÷åñêîãî ïðîãðàììèðîâàíèÿ [64], [21], [22], äëÿ ðåøåíèÿ çàäà÷ ÓÎ. Ýòîò àëãîðèòì ìîæåò íàéòè âñå âîçìîæíûå ðåøåíèÿ çàäà÷è.
Àëãîðèòì ñåãìåíòíîé ýëèìèíàöèè èìååò ýêñïîíåíöèàëüíûå îöåíêè âðåìåííîé è
åìêîñòíîé ñëîæíîñòè ïî èíäóöèðîâàííîé øèðèíå ãðàôà îãðàíè÷åíèé. Áîëüøàÿ
àðíîñòü ïðîìåæóòî÷íûõ îãðàíè÷åíèé, êîòîðûå õðàíÿòñÿ â ïàìÿòè â âèäå òàáëèö,
ÿâëÿåòñÿ ãëàâíûì ïðåïÿòñòâèåì äëÿ ïðèìåíåíèÿ ìåòîäà ñåãìåíòíîé ýëèìèíàöèè
íà ïðàêòèêå. Ïðè äîñòàòî÷íî íåáîëüøîé àðíîñòè îãðàíè÷åíèé àëãîðèòì ñåãìåíòíîé ýëèìèíàöèè äîñòàòî÷íî ýôôåêòèâåí [257].
4.5.2. Ìåòîä Çåéäåëÿ ïðîöåäóðà èíâàçèè
Åùå îäíèì èçâåñòíûì äåêîìïîçèöèîííûì àëãîðèòìîì ÿâëÿåòñÿ àëãîðèòì èíâàçèè Çåéäåëÿ (Seidel, 1981) [337], êîòîðûé íàõîäèò âñå ðåøåíèÿ áèíàðíîé çàäà÷è
ÓÎ. Ìåòîä ðàçáèâàåò äàííóþ çàäà÷ó ÓÎ íà ìíîæåñòâî ïîäçàäà÷ ÓÎ, ñâÿçàííûõ
ëèíåéíûì ãðàôîì (ïóòåì ÷àñòíûì ñëó÷àåì äåðåâà).
Ïðîöåäóðà èíâàçèè14 (Seidel, 1981) [337] ïðåäíàçíà÷åíà äëÿ íàõîæäåíèÿ âñåõ
ðåøåíèé çàäà÷è ÓÎ è îñíîâàíà íà ïîñëåäîâàòåëüíîñòè ïîäãðàôîâ G1 , . . . , Gn , íàçûâàåìîé èíâàçèåé ãðàôà îãðàíè÷åíèé G ñ n âåðøèíàìè. ×èñëî âåðøèí â ïîäãðàôå Gi äîëæíî áûòü i, ïðè÷åì Gi äîëæåí áûòü ïîäãðàôîì Gi+1 . Ôðîíò Fi ýòî ìíîæåñòâî âåðøèí ïîäãðàôà Gi , ñìåæíûõ ñ âåðøèíàìè, íå ïðèíàäëåæàùèõ
Gi , à äëèíà ôðîíòà fi ýòî ÷èñëî âåðøèí â Fi . Äëèíà ôðîíòà èíâàçèè ýòî
ìàêñèìóì äëèí åå îòäåëüíûõ ôðîíòîâ. Ðàññìîòðèì ïðèìåð íà ðèñ. 6a). Èíâàçèÿ ìîæåò áûòü ïîñòðîåíà ñëåäóþùèì îáðàçîì: G1 = {x1 }, G2 = {x1 , x2 }, G3 =
{x1 , x2 , x3 }, G4 = {x1 , x2 , x3 , x4 }. Íàéäåì ôðîíòû, ñîîòâåòñòâóþùèå ïîäãðàôàì:
F1 = {x1 }, F2 = {x2 }, F3 = {x2 }, F4 = { }. Çàìåòèì, ÷òî Fn âñåãäà ïóñòîå
ìíîæåñòâî, òàê êàê Gn ñîâïàäàåò ñ èñõîäíûì ãðàôîì îãðàíè÷åíèé. Äëÿ äàííîé
èíâàçèè àëãîðèòì Çåéäåëÿ ñòðîèò ãðàô ðåøåíèé S , ïðåäñòàâëÿþùèé ìíîæåñòâî
ðåøåíèé èñõîäíîé çàäà÷è ÓÎ. Âåðøèíû ãðàôà S ñãðóïïèðîâàíû â âèäå ìíîæåñòâ
14 èíâàçèÿ
íàøåñòâèå.
43
1
F1
3
4
4
F2
3
F4
F3
2
3
s4
4
3
1
s0
4
5
5
4
2
4
Ðèñ. 14. Ãðàô ðåøåíèé äëÿ àëãîðèòìà Çåéäåëÿ.
S0 , . . . , Sn , òàêèõ, ÷òî Si (i 6= 0, i 6= n) ÿâëÿåòñÿ ìíîæåñòâîì êîðòåæåé ïðèñâîåííûõ çíà÷åíèé äëÿ ôðîíòà Fi . Sn è S0 ñîäåðæàò ïî îäíîé âåðøèíå, sn è s0 ,
ñîîòâåòñòâåííî (ýòî íà÷àëî è êîíåö ðåøåíèÿ). Íàïðàâëåííîå ðåáðî èç êîðòåæà
èç Si ê êîðòåæó èç Si−1 ïîìå÷àåòñÿ ïðèñâîåíèåì çíà÷åíèÿ ïåðåìåííîé xi (ãäå xi
ïåðåìåííàÿ â Gi , êîòîðàÿ íå ïðèíàäëåæèò Gi−1 ). Ýòî ïðèñâîåíèå äîëæíî óäîâëåòâîðÿòü âñåì îãðàíè÷åíèÿì, ñîäåðæàùèì xi è âñå ïåðåìåííûå èç ôðîíòà Fi−1
äëÿ äàííûõ ïðèñâîåíèé, ïðåäñòàâëåííûõ êîíêðåòíîìó êîðòåæó èç Si−1 . Ïóòü èç
sn â s0 ñ ôèêñèðîâàíèåì xi íà çíà÷åíèÿõ, ñîîòâåòñòâóþùèõ êàæäîìó ïðîéäåííîìó
ðåáðó, ñîîòâåòñòâóåò îäíîìó ðåøåíèþ. Ãðàô ðåøåíèé çàäà÷è ñ ðèñ. 6 a) ïîêàçàí
íà ðèñ. 14. Ïðè ïîñòðîåíèè Si êàæäûé êîðòåæ ïðåäûäóùåãî ìíîæåñòâà êîðòåæåé Si−1 ðàññìàòðèâàåòñÿ ïî î÷åðåäè äëÿ âñåõ âîçìîæíûõ ïðèñâîåíèé xi . Êîðòåæ
äîáàâëÿåòñÿ ê Si äëÿ êàæäîãî ïðèñâîåíèÿ ïåðåìåííîé xi , êîòîðîå óäîâëåòâîðÿåò
âñåì îãðàíè÷åíèÿì ñ êîíêðåòíûì ïðèñâîåíèåì êîðòåæà â Si−1 . Äîáàâëÿåòñÿ ðåáðî,
ñîåäèíÿþùåå êàæäûé âíîâü ïîñòðîåííûé êîðòåæ èç Si ñ êîðòåæåì èç Si−1 , è ïîìåòèì åãî âåëè÷èíîé xi . Âðåìåííàÿ ñëîæíîñòü ýòîãî àëãîðèòìà O(e · df +1 ), ãäå e
÷èñëî îãðàíè÷åíèé, d ìàêñèìàëüíûé ðàçìåð äîìåíà, à f äëèíà ôðîíòà èíâàçèè. Êàê è äëÿ äðóãèõ äåêîìïîçèöèîííûõ ìåòîäîâ, ýôôåêòèâíîñòü àëãîðèòìà
èíâàçèè çàâèñèò îò ìàêñèìàëüíîãî ðàçìåðà ïîäçàäà÷ ÓÎ.
Òàêèì îáðàçîì, ýôôåêòèâíîñòü ýòîãî àëãîðèòìà çàâèñèò îò íàõîæäåíèÿ õîðîøåé èíâàçèè, ò.å. èíâàçèè ñ íåáîëüøîé äëèíîé ôðîíòà. Ê ñîæàëåíèþ, âîçìîæíîñòü
ñóùåñòâîâàíèÿ õîðîøèõ èíâàçèé äëÿ ëþáûõ ãðàôîâ íå ãàðàíòèðóåòñÿ ïîëíûé
ãðàô ñ n âåðøèíàìè èìååò èíâàçèè òîëüêî ñ äëèíîé ôðîíòà n − 1. Äëÿ íåêîòîðûõ
çàäà÷, òàêèõ êàê çàäà÷à î n ôåðçÿõ, ìàêñèìàëüíûé ðàçìåð ïîäçàäà÷ ÓÎ áóäåò
ðàâåí n.
4.6. Äðåâîâèäíàÿ äåêîìïîçèöèÿ
Ïîíÿòèå øèðèíû äåðåâà áûëî ââåäåíî â òåîðèè ãðàôîâ Ðîáåðòñîí è Ñåéìóð
(Robertson & Seymour, 1986) [320]. Dechter & Pearl, 1987, 1989) [140], [141], îñíîâûâàÿñü íà ðàáîòå Ôðåéäåðà (Freuder, 1985) [169], ïðèìåíÿëè òî æå ïîíÿòèå (íàçâàííîå èìè èíäóöèðîâàííîé øèðèíîé ) ê çàäà÷àì ÓÎ è ðàçðàáîòàëè ïîäõîä, èñ44
ïîëüçóþùèé äðåâîâèäíóþ äåêîìïîçèöèþ (tree decomposition) ãðàôà îãðàíè÷åíèé
è ñîçäàíèè ìíîæåñòâà ñâÿçàííûõ ïîäçàäà÷. Êàæäàÿ ïîäçàäà÷à ðåøàåòñÿ íåçàâèñèìî, à çàòåì èòîãîâûå ðåøåíèÿ êîìáèíèðóþòñÿ. Êàê è áîëüøèíñòâî àëãîðèòìîâ,
äåéñòâóþùèõ ïî ïðèíöèïó ¾ðàçäåëÿé è âëàñòâóé¿, ýòîò àëãîðèòì ðàáîòàåò óñïåøíî, åñëè ïîäçàäà÷è íå ñëèøêîì âåëèêè. Ëþáàÿ äðåâîâèäíàÿ äåêîìïîçèöèÿ äîëæíà
óäîâëåòâîðÿòü òðåì ïðèâåäåííûì íèæå òðåáîâàíèÿì.
• Êàæäàÿ ïåðåìåííàÿ èç ïåðâîíà÷àëüíîé çàäà÷è ïîÿâëÿåòñÿ ïî ìåíüøåé ìåðå
â îäíîé èç ïîäçàäà÷.
• Åñëè äâå ïåðåìåííûå ïåðâîíà÷àëüíîé çàäà÷è ñâÿçàíû îãðàíè÷åíèåì, òî äîëæíû ïîÿâèòüñÿ âìåñòå (íàðÿäó ñ ýòèì îãðàíè÷åíèåì) ïî ìåíüøåé ìåðå â îäíîé
èç ïîäçàäà÷.
• Åñëè êàêàÿ-òî ïåðåìåííàÿ ïîÿâëÿåòñÿ â äâóõ ïîäçàäà÷àõ â äåðåâå, òî äîëæíà
ïîÿâëÿòüñÿ â êàæäîé ïîäçàäà÷å âäîëü ïóòè, ñîåäèíÿþùåãî ýòè ïîäçàäà÷è.
Ïåðâûå äâà óñëîâèÿ ãàðàíòèðóþò, ÷òî â äåêîìïîçèöèè áóäóò ïðåäñòàâëåíû âñå
ïåðåìåííûå è îãðàíè÷åíèÿ. Òðåòüå óñëîâèå íà ïåðâûé âçãëÿä êàæåòñÿ äîâîëüíî
ôîðìàëüíûì, õîòÿ îíî ïðîñòî îòðàæàåò òî îãðàíè÷åíèå, ÷òî ëþáàÿ êîíêðåòíàÿ
ïåðåìåííàÿ äîëæíà èìåòü îäíî è òî æå çíà÷åíèå â êàæäîé ïîäçàäà÷å, â êîòîðîé
ïîÿâëÿåòñÿ; ñîáëþäåíèå ýòîãî îãðàíè÷åíèÿ ãàðàíòèðóþò ñâÿçè ìåæäó ïîäçàäà÷àìè â äåðåâå.
Êàæäàÿ ïîäçàäà÷à ðåøàåòñÿ íåçàâèñèìî; åñëè êàêàÿ-ëèáî èç íèõ íå èìååò ðåøåíèÿ, òî èçâåñòíî, ÷òî âñÿ çàäà÷à òàêæå íå èìååò ðåøåíèÿ. Åñëè óäàåòñÿ ðåøèòü âñå ïîäçàäà÷è, òî ìîæåò áûòü ïðåäïðèíÿòà ïîïûòêà ñîñòàâèòü ãëîáàëüíîå
ðåøåíèå ñëåäóþùèì îáðàçîì. Ïðåæäå âñåãî, êàæäàÿ ïîäçàäà÷à ðàññìàòðèâàåòñÿ êàê ¾ñóïåð-ïåðåìåííàÿ¿, îáëàñòüþ îïðåäåëåíèÿ êîòîðîé ÿâëÿåòñÿ ìíîæåñòâî
âñåõ ðåøåíèé ýòîé ïîäçàäà÷è. Çàòåì ðåøàåòñÿ çàäà÷à ñ îãðàíè÷åíèÿìè, ñâÿçûâàþùèìè ïîäçàäà÷è; äëÿ ýòîãî èñïîëüçóåòñÿ ýôôåêòèâíûé àëãîðèòì äëÿ äåðåâüåâ,
ïðèâåäåííûé âûøå. Îãðàíè÷åíèÿ, ñâÿçûâàþùèå ïîäçàäà÷è, óêàçûâàþò íà òî, ÷òî
ðåøåíèÿ ïîäçàäà÷ äîëæíû áûòü ñîãëàñîâàííûìè ïî èõ îáùèì ïåðåìåííûì. Ëþáîé êîíêðåòíûé ãðàô îãðàíè÷åíèé äîïóñêàåò áîëüøîå êîëè÷åñòâî äðåâîâèäíûõ
äåêîìïîçèöèé; ïðè âûáîðå äåêîìïîçèöèè íóæíî ñòðåìèòüñÿ ê òîìó, ÷òîáû ïîäçàäà÷è áûëè êàê ìîæíî ìåíüøå. Øèðèíà äåðåâà äðåâîâèäíîé äåêîìïîçèöèè ãðàôà
íà åäèíèöó ìåíüøå ðàçìåðà íàèáîëüøåé ïîäçàäà÷è; øèðèíà äåðåâà ñàìîãî ãðàôà îïðåäåëÿåòñÿ êàê ìèíèìàëüíàÿ øèðèíà äåðåâà ñðåäè âñåõ åãî äðåâîâèäíûõ
äåêîìïîçèöèé. Åñëè ãðàô èìååò øèðèíó äåðåâà w è äàíà ñîîòâåòñòâóþùàÿ äðåâîâèäíàÿ äåêîìïîçèöèÿ, òî ñîîòâåòñòâóþùàÿ çàäà÷à ìîæåò áûòü ðåøåíà çà âðåìÿ
O(ndw+1 ). Ýòî îçíà÷àåò, ÷òî çàäà÷è ÓÎ ñ ãðàôàìè îãðàíè÷åíèé, õàðàêòåðèçóþùèìèñÿ êîíå÷íîé øèðèíîé äåðåâà, ìîãóò áûòü ðåøåíû çà ïîëèíîìèàëüíîå âðåìÿ. Ê
ñîæàëåíèþ, çàäà÷à ïîèñêà äåêîìïîçèöèè ñ ìèíèìàëüíîé øèðèíîé äåðåâà ÿâëÿåòñÿ N P -òðóäíîé, íî ñóùåñòâóþò ýâðèñòè÷åñêèå ìåòîäû, êîòîðûå õîðîøî ðàáîòàþò
íà ïðàêòèêå.
45
4.7. Äðóãèå ìåòîäû äåêîìïîçèöèè
Îïèðàÿñü íà ðàáîòû (Robertson & Seymour, 1986) [320], (Dechter & Pearl, 1987,
1989) [140], [141], è íà ðåçóëüòàòû èç îáëàñòè òåîðèè áàç äàííûõ, Ãîòòëîá è äð. (
Gottlob et al., 1999) [195], [196] ðàçðàáîòàëè ïîíÿòèå øèðèíû ãèïåðäåðåâà, êîòîðîå
îñíîâàíî íà ìåòîäå õàðàêòåðèçàöèè çàäà÷è ÓÎ ñ ïîìîùüþ ãèïåðãðàôà. Îíè íå
òîëüêî ïîêàçàëè, ÷òî ëþáóþ çàäà÷ó ÓÎ ñ øèðèíîé ãèïåðäåðåâà w ìîæíî ðåøèòü
çà âðåìÿ O(nw+1 log n), íî è îáîñíîâàëè óòâåðæäåíèå, ÷òî êðèòåðèé øèðèíû ãèïåðäåðåâà ïðåâîñõîäèò âñå ðàíåå ïðåäëîæåííûå êðèòåðèè ¾øèðèíû¿ â òîì ñìûñëå,
÷òî â íåêîòîðûõ ñëó÷àÿõ øèðèíà ãèïåðäåðåâà ÿâëÿåòñÿ êîíå÷íîé, òîãäà êàê øèðèíà, îïðåäåëÿåìàÿ äðóãèìè êðèòåðèÿìè, íåîãðàíè÷åííîé.  (Pearson & Jeavons,
1997) [301] ïðèâåäåí îáçîð ëåãêî ðàçðåøèìûõ êëàññîâ çàäà÷ ÓÎ è îïèñàíû êàê ìåòîäû ñòðóêòóðíîé äåêîìïîçèöèè, òàê è ìåòîäû, îñíîâàííûå íà ñâîéñòâàõ îáëàñòåé
îïðåäåëåíèÿ èëè ñâîéñòâàõ ñàìèõ îãðàíè÷åíèé.
 ðàáîòå [115] ïðåäëîæåí îáùèé êëàññ ìåòîäîâ ñòðóêòóðíîé äåêîìïîçèöèè äëÿ
çàäà÷ ÓÎ, íàçâàííûé îñòîðîæíîé äåêîìïîçèöèåé (guarded decomposition). Ïîêàçàíî, ÷òî ìíîãèå ñóùåñòâóþùèå ìåòîäû äåêîìïîçèöèè ìîãóò õàðàêòåðèçîâàòüñÿ
â òåðìèíàõ íàõîæäåíèÿ îñòîðîæíîé äåêîìïîçèöèè, óäîâëåòâîðÿþùåé íåêîòîðûì
ñïåöèàëüíûì äîïîëíèòåëüíûì óñëîâèÿì.
5. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ
5.1. Îñíîâíûå ïîäõîäû è ñîñòîÿíèå äåë
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (constraint programming) ïðîãðàììíàÿ
òåõíîëîãèÿ äëÿ äåêëàðàòèâíîãî îïèñàíèÿ è ýôôåêòèâíîãî ðåøåíèÿ áîëüøèõ êîìáèíàòîðíûõ çàäà÷ â îáëàñòÿõ ïëàíèðîâàíèÿ è êàëåíäàðíîãî ïëàíèðîâàíèÿ.
Öåëü ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ (ñì. (Colmerauer, 1990) [120], (Jaar &
Lassez, 1987) [220], (Van Hentenryck, 1989) [368]) ñîñòîèò â ðàçðàáîòêå ÿçûêîâ ïðîãðàììèðîâàíèÿ äëÿ çàäàíèÿ îãðàíè÷åíèé è ïðîöåäóð ïîèñêà çàäà÷ ÓÎ. Ïðîöåäóðà
ïîèñêà â ÓÎ íåÿâíî îïèñûâàåò îáõîä äåðåâà ïîèñêà, íå îïèñûâàÿ ïðè ýòîì, êàê
îáõîäèòü ýòî äåðåâî, ýòî óæå çàäà÷à ñòðàòåãèé ïîèñêà. Îáû÷íî äåðåâî ïîèñêà
îáõîäèòñÿ ñ ïîìîùüþ ïîèñêà â ãëóáèíó. Òåì íå ìåíåå, èìåþòñÿ è äðóãèå ñòðàòåãèè ïîèñêà (ñì. (Harvey & Ginsberg, 1995) [206], (Korf, 1996) [249], (Meseguer, 1997)
[279], (Walsh, 1997) [381]), ïðåäñòàâëÿþùèå áîëüøîé èíòåðåñ.  ÷àñòíîñòè, áûëî
ïîêàçàíî, ÷òî ïîèñê ñ îãðàíè÷åííîé íåñîâìåñòíîñòüþ (limited discrepancy search
(LDS)) è åãî âàðèàöèè äîñòèãàþò íà íåêîòîðûõ ïðèêëàäíûõ çàäà÷àõ ñóùåñòâåííî ëó÷øèõ ðåçóëüòàòîâ ïî ñðàâíåíèþ ñ ïîèñêîì â ãëóáèíó. Áëàãîäàðÿ óñïåøíîìó
ðåøåíèþ ìíîãèõ ïðèêëàäíûõ çàäà÷ (ñì. (Harvey & Ginsberg, 1995) [206], (Laburthe
& Caseau, 1998) [256], (Perron, 1999) [304]), ñòðàòåãèè ïîèñêà ñòàëè íåîòúåìëåìîé ÷àñòüþ ÿçûêîâ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ (ñì. (Laburthe & Caseau,
1998) [256], (Perron, 1999) [304], (Schulte, 1997) [336], (Van Hentenryck et al., 2000)
[375]).  ÷àñòíîñòè, ïðîãðàììíàÿ ñèñòåìà Oz âïåðâûå ââåëà ñïåöèôèêàöèþ îáùèõ
46
ñòðàòåãèé ïîèñêà, êîòîðûå ìîãóò áûòü çàäàíû íåçàâèñèìî îò ïðîöåäóðû ïîèñêà
(Schulte, 1997) [335]. Â ðåçóëüòàòå, ñòðàòåãèÿ ïîèñêà ìîæåò áûòü ïðèìåíåíà ê ìíîãèì ïðîöåäóðàì ïîèñêà è ïðîöåäóðà ïîèñêà ìîæåò áûòü îñíàùåíà íåñêîëüêèìè
ñòðàòåãèÿìè ïîèñêà. Ïîèñêîâûé ÿçûê SALSA15 (Laburthe & Caseau, 1998) [256]
òàêæå ñîäåðæèò ðÿä çàäàííûõ îáùèõ ñòðàòåãèé ïîèñêà. Â ðàáîòå (Perron, 1999)
[304] ïîêàçàíî, ÷òî ìíîãî ñòðàòåãèé ïîèñêà ìîæåò áûòü çàäàíî ñ ïîìîùüþ âñåãî
äâóõ ôóíêöèé: ôóíêöèè îöåíêè, êîòîðàÿ ñòàâèò îöåíêó â ñîîòâåòñòâèå êàæäîé
âåðøèíå äåðåâà ïîèñêà è ôóíêöèè ïîäâåøèâàíèÿ, êîòîðàÿ íåÿâíî çàäàåò, êàêàÿ
âåðøèíà áóäåò ñëåäóþùåé.
Îñíîâíûå èäåè, ëåæàùèå â îñíîâå ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, ïðîñòû
[97]: äåêëàðàòèâíîå ïðåäñòàâëåíèå îãðàíè÷åíèé çàäà÷è, ñîâìåùåííîå ñ îáùèìè ìåòîäàìè ðåøåíèÿ òèïà õðîíîëîãè÷åñêîãî ïîèñêà ñ âîçâðàòàìè èëè ëîêàëüíîãî ïîèñêà. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ èìååò ìíîæåñòâî ñèëüíûõ ñòîðîí: ìîùíûå
ÿçûêè ìîäåëèðîâàíèÿ, ïîçâîëÿþùèå ïðåäñòàâèòü ñëîæíûå è äèíàìè÷åñêèå ïðèêëàäíûå çàäà÷è; áûñòðûå ìåòîäû âûâîäà îáùåãî íàçíà÷åíèÿ òèïà âûíóæäåíèÿ
äóãîâîé ñîâìåñòíîñòè, äëÿ óñå÷åíèÿ ÷àñòè ïðîñòðàíñòâà ïîèñêà; áûñòðûå ìåòîäû
âûâîäà ñïåöèàëüíîãî íàçíà÷åíèÿ, ñâÿçàííûå ñ ãëîáàëüíûìè îãðàíè÷åíèÿìè; ãèáðèäíûå ìåòîäû, ñî÷åòàþùèå ïðåèìóùåñòâà ìåòîäîâ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ è ïîäõîäîâ èññëåäîâàíèÿ îïåðàöèé; ìåòîäû ëîêàëüíîãî ïîèñêà, ïîçâîëÿþùèå áûñòðî íàõîäèòü ðåøåíèÿ, áëèçêèå ê îïòèìàëüíûì; áîëüøîé äèàïàçîí
ðàñøèðåíèé òèïà ìÿãêèõ îãðàíè÷åíèé è ðàñïðåäåëåííîãî ðåøåíèÿ îãðàíè÷åíèé,
ñ ïîìîùüþ êîòîðûõ âîçìîæíî áîëåå àäåêâàòíîå ìîäåëèðîâàíèå ïðàêòè÷åñêèõ çàäà÷.
5.2. Ëîãè÷åñêîå ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ
Çà ïîñëåäíèå 10-15 ëåò ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ [266] ïðîøëî ïóòü
îò íàó÷íîé èäåè äî ìîùíîé ïàðàäèãìû ïðîãðàììèðîâàíèÿ, êîòîðàÿ âñå áîëüøå
èñïîëüçóåòñÿ äëÿ ìîäåëèðîâàíèÿ è ðåøåíèÿ ìíîãèõ òðóäíûõ ïðàêòè÷åñêè âàæíûõ
çàäà÷. Ïîä ïðîãðàììèðîâàíèåì â îãðàíè÷åíèÿõ (constraint programming) ïîíèìàåòñÿ ïðîãðàììèðîâàíèå àëãîðèòìîâ ðåøåíèÿ çàäà÷ ÓÎ [81]. Ïðîãðàììèðîâàíèå â
îãðàíè÷åíèÿõ ñ÷èòàåòñÿ â íàñòîÿùåå âðåìÿ îäíèì èç ñòðàòåãè÷åñêèõ íàïðàâëåíèé
èíôîðìàòèêè [372].
Ëîãè÷åñêîå ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (ËÏÎ) (Constraint Logic Programming
(CLP)) [97] áûëî ïðåäëîæåíî â ðàáîòàõ Jaar & Lassez [220], Marriott & Stuckey
[266], [37] êàê ðàñøèðåíèå ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ. Ëîãè÷åñêîå ïðîãðàììèðîâàíèå ýòî ïàðàäèãìà ïðîãðàììèðîâàíèÿ, îñíîâàííàÿ íà ëîãèêå [116]. Åãî
êîíñòðóêòû áóëåâû èìïëèêàöèè (ò.å. q ⇒ p èëè p : −q ), êîìïîçèöèé, èñïîëüçóþùèõ áóëåâû îïåðàöèè êîíúþíêöèè è äèçúþíêöèè. Ëîãè÷åñêîå ïðîãðàììèðîâàíèå
ìîæåò ðàññìàòðèâàòüñÿ êàê ïðîöåäóðíûé ÿçûê, â êîòîðîì ïðîöåäóðû ýòî áóëåâû ôóíêöèè, ðåçóëüòàò ðàáîòû ïðîãðàììû âñåãäà èñòèíà èëè ëîæü.
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ ÿâëÿåòñÿ äåêëàðàòèâíîé ïàðàäèãìîé, ïîç15 SALSA:
A Language for Search Algorithms.
47
âîëÿþùåé âûðàçèòü ìíîãèå ïðèêëàäíûå çàäà÷è ñ ïîìîùüþ îãðàíè÷åíèé, ò.å. îòíîøåíèé ìåæäó ïåðåìåííûìè çàäà÷è. Ïîäîáíûé ïóòü çàäàíèÿ çàäà÷ ìîæåò ïðîèçâîäèòüñÿ äëÿ ìíîãèõ òðàäèöèîííûõ ñðåä ïðîãðàììèðîâàíèÿ, íî ëó÷øå âñåãî
ïîäõîäÿò òå ñðåäû, êîòîðûå èñïîëüçóþò äåêëàðàòèâíóþ ïàðàäèãìó ïðîãðàììèðîâàíèÿ, ïîäîáíûå ïàðàäèãìå ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ [261], êîòîðàÿ òàêæå
îñíîâàíà íà èñïîëüçîâàíèè îòíîøåíèé.
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (Marriott & Stuckey, 1998) [266] ñîñòîèò èç
äâóõ íåîáõîäèìûõ êîìïîíåíòîâ: ðåøàòåëÿ îãðàíè÷åíèé è ìàøèíû ïîèñêà.
Õîòÿ ðàíåå è áûëè ðàçðàáîòàíû íåêîòîðûå ÿçûêè äëÿ ïîääåðæàíèÿ îãðàíè÷åíèé ñïåöèàëüíîãî âèäà (ThingLab [78], Bertrand [259], è ALICE [258]), íî íå
áûëî íèêàêîé îáùåé ëèíãâèñòè÷åñêîé ïîääåðæêè äëÿ ðåøåíèÿ çàäà÷ ÓÎ è ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé äî ðàçðàáîòêè ñõåìû ËÏÎ. Ýòà ñõåìà ìîæåò ðàññìàòðèâàòüñÿ êàê îáîëî÷êà ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ, ïîääåðæèâàåìàÿ ñèñòåìîé
îãðàíè÷åíèé, ñ ïîìîùüþ êîòîðîé ìîæåò çàïèñûâàòü è ðåøàòü ëþáûå îãðàíè÷åíèÿ.
Ïî ýòîé ïðè÷èíå ñõåìà ËÏÎ ìîæåò îáîçíà÷àòüñÿ êàê ËÏÎ(X), ãäå X îïðåäåëÿåò
êëàññ îãðàíè÷åíèé, ñ êîòîðûìè ìû õîòèì ðàáîòàòü.
Ïîíÿòíî, ÷òî îïèñàíèå çàäà÷è â âèäå ñèñòåìû îãðàíè÷åíèé ÿâëÿåòñÿ äåêëàðàòèâíûì, ïðè÷åì îïèñûâàåòñÿ, ¾÷òî¿ äîëæíî âûïîëíÿòüñÿ, íî íå óêàçûâàåòñÿ,
¾êàê¿ ýòî ñäåëàòü. Ðàçðàáîòàíî ìíîãî ìåòîäîâ ðåøåíèÿ, ïîçâîëÿþùèõ (òî÷íî èëè
ïðèáëèæåííî) íàõîäèòü îäíî èëè íåñêîëüêî ðåøåíèé çàäà÷è ÓÎ. Íàèáîëåå èçâåñòíûì ÿâëÿåòñÿ îïèñàííûé âûøå ïîèñê ñ âîçâðàòàìè, êîòîðûé ìîæåò â îáùåì
ñëó÷àå îáîéòè âñå äåðåâî âîçìîæíûõ çíà÷åíèé äëÿ íàõîæäåíèÿ ðåøåíèÿ, èëè óñòàíîâëåíèÿ ôàêòà îòñóòñòâèÿ ðåøåíèé.
Òîò ôàêò, ÷òî ñèñòåìû óäîâëåòâîðåíèÿ îãðàíè÷åíèé è ëîãè÷åñêîå ïðîãðàììèðîâàíèå [261] äåêëàðàòèâíûå ïàðàäèãìû, èñïîëüçóþùèå îòíîøåíèÿ è ïîèñê ñ
âîçâðàòàìè, ñäåëàë èõ èíòåãðàöèþ ëåãêîé è åñòåñòâåííîé. ×ðåçâû÷àéíî âàæíûì
ÿâèëñÿ ôàêò îáúåäèíåíèÿ ËÏÎ ñ îáëàñòüþ èñêóññòâåííîãî èíòåëëåêòà, íàçûâàåìîãî óäîâëåòâîðåíèå îãðàíè÷åíèé. ËÏÎ ðàñøèðåíèå ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ, â êîòîðîì óíèôèêàöèÿ ìîæåò áûòü çàìåíåíà èëè äîïîëíåíà äðóãèìè
âèäàìè îãðàíè÷åíèé, îïðåäåëåííûõ íà äîìåíàõ (îáëàñòÿõ îïðåäåëåíèÿ) èñïîëüçóåìûõ ïåðåìåííûõ. ËÏÎ è óäîâëåòâîðåíèå îãðàíè÷åíèé èìåþò îáùèå öåëè, à òàêæå
èñïîëüçóþò êîìïàêòíîå äåêëàðàòèâíîå ôîðìóëèðîâàíèå êîìáèíàòîðíûõ çàäà÷ è
ýôôåêòèâíûå ñòðàòåãèè ïîèñêà.
Òàê, ðàñïðîñòðàíåíèå îãðàíè÷åíèé èñïîëüçóåòñÿ êàê äëÿ ðåøåíèÿ îãðàíè÷åíèé
ñ êîíå÷íûìè äîìåíàìè, òàê è â ïðîãðàììèðîâàíèè â îãðàíè÷åíèÿõ.
Îáùåïðèíÿòûé ïîäõîä ê ðåøåíèþ çàäà÷ ÓÎ ñî÷åòàåò äåðåâî ïîèñêà ñ âîçâðàòàìè ñ ðàñïðîñòðàíåíèåì îãðàíè÷åíèé. Ýòî ðåàëèçîâàíî â ñèñòåìàõ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ñ êîíå÷íûìè äîìåíàìè, òàêèõ êàê SICStus Prolog [99],
ILOG Solver [216], è Gecode [183], óñïåøíî èñïîëüçîâàííûõ äëÿ ðåøåíèÿ ìíîãèõ
ïðàêòè÷åñêèõ çàäà÷.
Êîãäà ÇÓÎ âñòðîåíà â ëîãè÷åñêîå ïðîãðàììèðîâàíèå, òî îãðàíè÷åíèå ìîæåò
áûòü îïðåäåëåíî â ïðîãðàììå êàê ìíîæåñòâî ôàêòîâ èëè äàæå ìíîæåñòâî ïðàâèë.
Îñíîâíàÿ èäåÿ ËÏÎ ñîñòîèò â ðàñøèðåíèè ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ
48
òàê, ÷òî ïîäñòàíîâêè çàìåíÿþòñÿ îãðàíè÷åíèÿìè, óíèôèêàöèÿ çàìåíÿåòñÿ ðåøåíèåì çàäà÷è ÓÎ, à âñå ñåìàíòè÷åñêèå ñâîéñòâà ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ (â
îñíîâíîì, ñóùåñòâîâàíèå äåêëàðàòèâíûõ, äåíîòàöèîíàëüíûõ è ïðîöåäóðàëüíûõ
ñåìàíòèê è ýêâèâàëåíòíîñòü ýòèõ òðåõ îáúåêòîâ) âñå åùå âûïîëíÿþòñÿ.
Jaar & Lassez (1987) [220] ïîêàçàëè, ÷òî òåîðåòè÷åñêèå îñíîâû ÿçûêîâ ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ îñòàþòñÿ ñïðàâåäëèâûìè äëÿ ÿçûêîâ ËÏÎ. Íåêîòîðûå
ÿçûêè ËÏÎ äî ñèõ ïîð èñïîëüçóþòñÿ ñïåöèàëèñòàìè ïî ëîãè÷åñêîìó ïðîãðàììèðîâàíèþ: PROLOG III è IV, CLP(R)16 , CHIP17 CLP(BNR)18 .
5.3. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ ñ êîíå÷íûìè äîìåíàìè
Ìíîãèå ÿçûêè ËÏÎ áûëè ñîçäàíû äëÿ ðàáîòû ñ îãðàíè÷åíèÿìè ñ êîíå÷íûìè
äîìåíàìè. ËÏÎ ñ êîíå÷íûìè äîìåíàìè âïåðâûå áûëî ðåàëèçîâàíî â êîíöå 1980õ ãîäîâ Van Hentenryck [368] â ÿçûêå CHIP [149]. Äðóãèìè ïðèìåðàìè ìîãóò
ñëóæèòü ÿçûêè ECLiPSe19 [158], [378] è CLP(FD)20 [109].
Îäíèì èç ãëàâíûõ ïðåèìóùåñòâ èñïîëüçîâàíèÿ ñèñòåìû îãðàíè÷åíèé â ðàìêàõ ÿçûêà ËÏÎ ÿâëÿåòñÿ êîíòðîëü çà ïðîöåññîì ïîèñêà. Èñïîëüçîâàíèå ìåòîäîâ
÷àñòè÷íîãî ïîèñêà (partial search) ñóùåñòâåííî óëó÷øèëî ìåòîäû ïîèñêà. Ìåòîäû ÷àñòè÷íîãî ïîèñêà îãðàíè÷èâàþò ÷èñëî àëüòåðíàòèâ, èçó÷àåìûõ â ðàçëè÷íûõ
âåðøèíàõ äåðåâà ïîèñêà. Òàêèì îáðàçîì, îáû÷íûé ïîèñê â ãëóáèíó ñ âîçâðàòàìè,
èñïîëüçóåìûé â ËÏÎ, êîòîðûé èíîãäà ïðîâåðÿåò ëèøü íåáîëüøóþ ÷àñòü äåðåâà
ïîèñêà, ìîæåò áûòü çàìåíåí íà äðóãèå ïîèñêîâûå ñõåìû (òàêèå êàê LDS [206] èëè
ïîèñê [57]), êîòîðûå ìîãóò ðàññìàòðèâàòü ìíîãî ðàçëè÷íûõ ïóòåé â äåðåâå ïîèñêà. Âûøå, â ðàçäåëå 2.2 îïèñàíû ãëîáàëüíûå îãðàíè÷åíèÿ, ïîçâîëÿþùèå ñíèçèòü
ïåðåáîð ïðè ðåøåíèè çàäà÷ ÓÎ.
ßçûêè, ïîäîáíûå CHIP [149], èìåþò ñëîæíóþ ìîðôîëîãèþ ãëîáàëüíûõ îãðàíè÷åíèé [56]. Äðóãèå ÿçûêè, òàêèå êàê SICStus Prolog [99], ECLiPSe [158], [378],
IF Prolog http://www.ifcomputer.de/Products/Prolog/home_en.html, à òàêæå
Oz [207], [353], [204], [292], âêëþ÷àþò íåêîòîðûå èç ãëîáàëüíûõ îãðàíè÷åíèé, èñïîëüçóåìûõ â CHIP. Ðàáîòû ïî èñïîëüçîâàíèþ ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé
äëÿ ãëîáàëüíûõ îãðàíè÷åíèé (â ÷àñòíîñòè, îãðàíè÷åíèÿ all-dierent) ïîêàçûâàþò ïðàêòè÷åñêóþ öåííîñòü èñïîëüçîâàíèÿ îãðàíè÷åíèé ýòîãî âèäà [313], [338].
Ãëîáàëüíûå îãðàíè÷åíèÿ áûëè èñïîëüçîâàíû òàêæå äëÿ ÷àñòè÷íûõ çàäà÷ ÓÎ, â
êîòîðûõ íåêîòîðûå îãðàíè÷åíèÿ ìîãóò íàðóøàòüñÿ ïðè íàõîæäåíèè ðåøåíèÿ [43].
Çàäà÷è ñ äèíàìè÷åñêèìè îãðàíè÷åíèÿìè ýòî çàäà÷è ÓÎ, èçìåíÿþùèåñÿ âî
âðåìåíè, ñ ïîìîùüþ äîáàâëåíèÿ èëè èñêëþ÷åíèÿ íåêîòîðûõ îãðàíè÷åíèé, ëèáî
êîìáèíàöèè ýòèõ äâóõ îïåðàöèé.  òî âðåìÿ êàê äîáàâëåíèå îãðàíè÷åíèé ÷àñòî
èñïîëüçóåòñÿ íà êàæäîì øàãå âû÷èñëåíèé, èñêëþ÷åíèå îãðàíè÷åíèé ðàññìàòðèâàåòñÿ ðåäêî, õîòÿ ýòî áûëî áû âåñüìà ïîëåçíî äëÿ èíòåðàêòèâíûõ èëè äèíàìè16 CLP(R):
Constraint Logic Programming (Reals).
Constraint Handling in Prolog.
18 CLP(BNR): Constraint Logic Programming (Booleans, Naturals and Reals).
19 ECLiPSe: Constraint Logic Programming System.
20 CLP(FD): Constraint Logic Programming over Finite Domains.
17 CHIP:
49
÷åñêèõ ñèñòåì, â òîì ÷èñëå ïðè íåîáõîäèìîñòè ïåðåñ÷åòà ðåøåíèÿ ïðè èçìåíåíèè
óñëîâèé çàäà÷è ÓÎ, à òàêæå ïîèñêà óñòîé÷èâûõ ðåøåíèé [380]. Ïî ýòîé ïðè÷èíå,
â ðÿäå ðàáîò ââåäåíî ïîíÿòèå èñêëþ÷åíèÿ (èëè îòìåíû) îãðàíè÷åíèé, è ïðåäëîæåíû ýôôåêòèâíûå àëãîðèòìû äëÿ ýòîãî â ðàìêàõ êëàññè÷åñêèõ ÿçûêîâ ËÏÎ.
Íàïðèìåð, ïðîãðàììíàÿ ñõåìà CLP(FD) áûëà ðàñøèðåíà êàê â ïëàíå ñèíòàêñèñà, ñåìàíòèêè è âîçìîæíîñòè îòìåíû îãðàíè÷åíèé â [184].
5.4. Íåëèíåéíûå îãðàíè÷åíèÿ â ÿçûêàõ ïðîãðàììèðîâàíèÿ â
îãðàíè÷åíèÿõ.
Âîçìîæíîñòü èñïîëüçîâàòü è ðåøàòü íåëèíåéíûå îãðàíè÷åíèÿ èìååò âàæíîå
çíà÷åíèå âî ìíîãèõ îáëàñòÿõ ïðèëîæåíèé (ýêîíîìèêà, ìåõàíèêà, õèìè÷åñêîå ïðîèçâîäñòâî, òåõíè÷åñêèå ïðèëîæåíèÿ è äð.). Îáû÷íî ðåøåíèå çàäà÷ òàêîãî òèïà
äîñòàòî÷íî ñëîæíî è òðåáóåò ïðèâëå÷åíèÿ áîëüøèõ âû÷èñëèòåëüíûõ ðåñóðñîâ.
Ïîìèìî êëàññè÷åñêèõ ìåòîäîâ, â íàñòîÿùåå âðåìÿ çäåñü èñïîëüçóþòñÿ ìåòîäû
èíòåðâàëüíîãî àíàëèçà [295]. Ïî ýòîé æå ïðè÷èíå, èíòåðâàëüíûå îãðàíè÷åíèÿ [62]
èñïîëüçóþòñÿ â òàêèõ ÿçûêàõ ËÏÎ, êàê ECLiPSe [158], [378],[385] è CLP(BNR),
à ÿçûêè Helios [370] è Numerica [371] áûëè ðàçðàáîòàíû äëÿ ðåøåíèÿ ñèñòåì
íåëèíåéíûõ îãðàíè÷åíèé, èñïîëüçóÿ àëãîðèòìû èíòåðâàëüíîãî àíàëèçà [295].
5.5. Ìîäåëèðîâàíèå.
×ðåçâû÷àéíî âàæíî èìåòü õîðîøèé ÿçûê ìîäåëèðîâàíèÿ äëÿ çàïèñè çàäà÷ ÓÎ.
 íàñòîÿùåå âðåìÿ áîëüøèíñòâî ñèñòåì ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ÿâëÿþòñÿ ëèáî ðàñøèðåíèåì äåêëàðàòèâíîãî ÿçûêà ïðîãðàììèðîâàíèÿ (òèïà Prolog),
ëèáî áèáëèîòåêàìè, èñïîëüçóåìûìè ñîâìåñòíî ñ îáû÷íûìè ÿçûêàìè ïðîãðàììèðîâàíèÿ (òàêèìè êàê C/C++). Ñåé÷àñ èìååòñÿ ìíîãî èññëåäîâàíèé ïî ðàçðàáîòêå
ÿçûêîâ ìîäåëèðîâàíèÿ îãðàíè÷åíèé, êîòîðûå äåëàþò ôàçó ìîäåëèðîâàíèÿ áîëåå
ëåãêîé è åñòåñòâåííîé (ïðèìåðû: Helios [370], Numerica [371] è OPL [374]).
Íåêîòîðûå èç ýòèõ ÿçûêîâ èñïîëüçóþò ñðåäñòâà âèçóàëèçàöèè äëÿ îïèñàíèÿ è
ãåíåðèðîâàíèÿ ïðîãðàìì â îãðàíè÷åíèÿõ. Íàïðèìåð, ñèñòåìà FORWARD êàëåíäàðíîãî ïëàíèðîâàíèÿ íåôòåïåðåãîííîãî çàâîäà [191] èñïîëüçóåò ñðåäñòâî ãðàôè÷åñêîé ñïåöèôèêàöèè äëÿ CHIP [344], ïðè ýòîì ìîäåëü íåôòåïåðåãîííîãî çàâîäà
ââîäèòñÿ ñ ïîìîùüþ ãðàôè÷åñêîãî èíòåðôåéñà. CML21 ÿçûê ìîäåëèðîâàíèÿ
îãðàíè÷åíèé, êîòîðûé áûë ðàçðàáîòàí äëÿ îáëåã÷åíèÿ ïîñòàíîâêè è ìîäèôèêàöèè êîìáèíàòîðíûõ çàäà÷ [32]: CML-ñïåöèôèêàöèè çàäà÷è ïîçâîëÿþò ôîðìóëèðîâàòü îãðàíè÷åíèÿ, îòðàæàþùèå âûðàæåíèÿ åñòåñòâåííîãî ÿçûêà, êîòîðûå çàòåì
ïåðåâîäÿòñÿ â ýôôåêòèâíûå CHIP-ïðîãðàììû.
Äðóãèì ÿçûêîì ìîäåëèðîâàíèÿ ÿâëÿåòñÿ VISUAL SOLVER [373], êîòîðûé
ïîçâîëÿåò çàäàòü êàê ïîñòàíîâêó çàäà÷è, òàê è ýâðèñòèêè, èñïîëüçóåìûå äëÿ ïîèñêà ðåøåíèé.
Äðóãèå ïîäõîäû ê ìîäåëèðîâàíèþ ðåàëüíûõ çàäà÷ â âèäå çàäà÷è ÓÎ èñïîëüçóþò èíòåðàêòèâíûå ìåòîäû: ðåøàòåëü çàäà÷è ÓÎ îáùàåòñÿ ñ ïîëüçîâàòåëåì, ïðåä21 CML:
Constraint Modelling Language.
50
ëàãàþùèì ÷àñòè÷íûå ðåøåíèÿ, è ïîëó÷àåò äàëüíåéøóþ èíôîðìàöèþ î çàäà÷å îò
÷åëîâåêà íà îñíîâàíèè îöåíêè ðåøàòåëåì ýòèõ ÷àñòè÷íûõ ðåøåíèé [173].  ÷èñëå
äðóãèõ ìåòîäîâ ñòîèò óïîìÿíóòü ìåòîäû ìàøèííîãî îáó÷åíèÿ: ïðè èñïîëüçîâàíèè
ìÿãêèõ îãðàíè÷åíèé ïîëüçîâàòåëü îöåíèâàåò ðåøåíèÿ, à ñèñòåìà èçó÷àåò çàäà÷ó
ÓÎ [327], ÷òî âåñüìà óïðîùàåò ðåøåíèå çàäà÷è ñ ìÿãêèìè îãðàíè÷åíèÿìè.
Äðóãîé èíòåðåñíîé ñõåìîé ìîäåëèðîâàíèÿ ÿâëÿåòñÿ ñõåìà, îñíîâàííàÿ íà àáäóêöèîííîì ËÏÎ (Abductive Constraint Logic Programming (ACLP)
(ñì. http://www.cs.ucy.ac.cy/aclp/), ïîñòðîåííàÿ íà îñíîâå ECLiPSe [158].
5.6. Îòëàäêà.
Îäíîé èç ðàñïðîñòðàíåííûõ ïðîáëåì, âîçíèêàþùèõ ó ïîëüçîâàòåëåé ñèñòåì
ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ÿâëÿåòñÿ èíîãäà íåïðåäñêàçóåìîå ïîâåäåíèå
ìîäåëè ñ îãðàíè÷åíèÿìè: äàæå íåáîëüøèå èçìåíåíèÿ ïðîãðàììû èëè äàííûõ ìîæåò ïðèâîäèòü ê ñóùåñòâåííîìó èçìåíåíèþ ïðîèçâîäèòåëüíîñòè ïðîãðàììû.
 òî âðåìÿ, êàê ïðîñòûå ïðèëîæåíèÿ ìîãóò áûòü ñîçäàíû äîñòàòî÷íî áûñòðî, îçíàêîìëåíèå ñî âñåìè âîçìîæíîñòÿìè ñèñòåìû â îãðàíè÷åíèÿõ ìîæåò çàíÿòü
ìíîãî âðåìåíè. Îäíîé èç ïîïûòîê ðåøåíèÿ ýòèõ ïðîáëåì ÿâëÿåòñÿ âèçóàëèçàöèÿ
äåðåâà ïîèñêà [100]. Ïðîãðàììíûå ñðåäñòâà òèïà Oz Explorer [335], ïîèñêîâîãî
äåðåâà CHIP [345] (îáçîð ðàííèõ ïðèëîæåíèé CHIP ïðèâåäåí â ðàáîòå [150]),
ñèñòåìà, íåäàâíî ðàçðàáîòàííàÿ â ðàìêàõ ñèñòåìû CIAO [208], êîòîðàÿ îáåñïå÷èâàåò 3D-âèçóàëèçàöèþ ñ ïîìîùüþ VRML [352], ïîçâîëÿþò íàìíîãî ãëóáæå ïîíÿòü ïðîöåññ ïîèñêà, ïîñêîëüêó îíè ïðåäîñòàâëÿþò äîñòàòî÷íóþ èíôîðìàöèþ äëÿ
àíàëèçà ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé è ñîñòîÿíèÿ äîìåíîâ ïåðåìåííûõ â êàæäîé
âåðøèíå äåðåâà.
5.7. Ìÿãêèå îãðàíè÷åíèÿ.
 ðàáîòå [109] ÿçûê ËÏÎ CLP(FD), ðàáîòàþùèé ñ êîíå÷íûìè äîìåíàìè, áûë
îáîáùåí äëÿ ðàáîòû ñ îãðàíè÷åíèÿìè èç ïîëóêîëüöà, â ðåçóëüòàòå ïîëó÷åí ÿçûê
CLP(FD,S) 22 [185], S êàêîå-ëèáî ïîëóêîëüöî (semiring), âûáèðàåìîå ïîëüçîâàòåëåì. Âûáèðàÿ êîíêðåòíîå ïîëóêîëüöî, ïîëüçîâàòåëü ðåøàåò èñïîëüçîâàòü êîíêðåòíûé êëàññ ìÿãêèõ îãðàíè÷åíèé: íå÷åòêèõ, îïòèìèçèðóåìûõ, âåðîÿòíîñòíûõ,
ëèáî êëàññè÷åñêèõ æåñòêèõ îãðàíè÷åíèé. Äëÿ îãðàíè÷åíèé ñ îöåíêàìè ïîêà íåò
ïîëíûõ ÿçûêîâ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ äëÿ ðàáîòû ñ íèìè, íî èìååòñÿ
ìíîãî ìåòîäîâ íàõîæäåíèÿ õîðîøèõ íèæíèõ îöåíîê äëÿ èõ îïòèìàëüíûõ ðåøåíèé
[98], [143].
5.8. ßçûêè çàïðîñîâ ñ îãðàíè÷åíèÿìè (Constraint query languages).
Ïîñêîëüêó îãðàíè÷åíèÿ èñïîëüçóþò îòíîøåíèÿ (êàê è áàçû äàííûõ (ÁÄ)),
ìíîãèå èññëåäîâàòåëè èçó÷àëè âçàèìîñâÿçü ìåæäó ËÏÎ è ÁÄ.  ýòîé îáëàñòè
èññëåäîâàíèé èìåþòñÿ äâà ãëàâíûõ íàïðàâëåíèÿ. Ñ îäíîé ñòîðîíû, ðåçóëüòàòû
22 CLP(FD,S):
Semiring-based Constraint Logic Programming Language over Finite Domains.
51
èç òåîðèè ÁÄ (íàïðèìåð, ïî äåêîìïîçèöèè è âûâîäó (ïîëó÷åíèþ) èíôîðìàöèè)
áûëè îáîáùåíû è ïðèìåíåíû äëÿ çàäà÷ ÓÎ, ÷òî ïîçâîëèëî ðàçðàáîòàòü ïîëåçíûå
èíñòðóìåíòû äëÿ ïðîâåðêè íåêîòîðûõ êëàññîâ çàäà÷ ÓÎ íà ëåãêóþ ðàçðåøèìîñòü
è ýôôåêòèâíîãî ðåøåíèÿ ýòèõ çàäà÷ [201], [110]. Ñ äðóãîé ñòîðîíû, êëàññè÷åñêèå
ÿçûêè îáðàáîòêè çàïðîñîâ â ÁÄ áûëè ðàñøèðåíû äëÿ ðàáîòû ñ îãðàíè÷åíèÿìè,
êîòîðûå èñïîëüçóþòñÿ íå òîëüêî äëÿ óñòàíîâëåíèÿ öåëîñòíîñòè èíôîðìàöèè, íî
òàêæå êàê ñðåäñòâî äëÿ ïðåäñòàâëåíèÿ ìíîæåñòâà êîðòåæåé ÁÄ êîìïàêòíûì îáðàçîì. Äåéñòâèòåëüíî, êîðòåæ ðåëÿöèîííîé ÁÄ ìîæåò ðàññìàòðèâàòüñÿ êàê îñîáûé
âèä îãðàíè÷åíèÿ, à èìåííî, êîíúþíêöèè îãðàíè÷åíèé-ðàâåíñòâ ìåæäó àòðèáóòàìè
êîðòåæà è çíà÷åíèé èç äàííûõ äîìåíîâ. Ââåäåíèå íîâûõ ëîãè÷åñêèõ ôîðìóë äëÿ
âûðàæåíèÿ âçàèìîîòíîøåíèé (ò.å. îãðàíè÷åíèé) ìåæäó àòðèáóòàìè ÁÄ ïðèâîäèò
ê îïðåäåëåíèþ ÁÄ ñ îãðàíè÷åíèÿìè (Constraint Databases) êàê íîâóþ èíòåðåñíóþ
îáëàñòü èññëåäîâàíèé [83], [237].
Îãðàíè÷åíèÿ ìîãóò áûòü äîáàâëåíû ê ðåëÿöèîííûì ÁÄ íà ðàçíûõ óðîâíÿõ. Íà
óðîâíå äàííûõ îãðàíè÷åíèÿ ìîãóò âûðàæàòü îáîáùåííûå êîðòåæè, ñïîñîáíûå çàäàâàòü áåñêîíå÷íûå ìíîæåñòâà êîðòåæåé. Îãðàíè÷åíèÿ ïðåäñòàâëÿþò ñîáîé ìîùíûé ìåõàíèçì äëÿ ìîäåëèðîâàíèÿ ïðîñòðàíñòâåííûõ è òåìïîðàëüíûõ ïîíÿòèé,
âîçíèêàþùèõ â òåîðèè ÁÄ, ãäå èìååòñÿ íåîáõîäèìîñòü â êîìïàêòíîì ïðåäñòàâëåíèè êîíòèíóàëüíîé èíôîðìàöèè [60], [199]. Äëÿ ðàáîòû ñ îãðàíè÷åíèÿìè áûëè ðàñøèðåíû ðåëÿöèîííîå èñ÷èñëåíèå è ðåëÿöèîííàÿ àëãåáðà êëàññè÷åñêèõ ÁÄ
[192], [236], [237], ÷òî ïðèâåëî ê íîâûì áîëåå âûðàçèòåëüíûì ÿçûêàì îáðàáîòêè
çàïðîñîâ. Ïîäîáíûé ÿçûê áûë ïîëó÷åí ïóòåì äîáàâëåíèÿ ëèíåéíûõ îãðàíè÷åíèé
ê Datalog â [317]. Äðóãèìè ïðèìåðàìè ìîãóò ñëóæèòü áåçîïàñíûé ñòðàòèôèöèðîâàííûé Datalog, ðàññìîòðåííûé â [316], à òàêæå èíòåãðàöèÿ ëèíåéíûõ îãðàíè÷åíèé ñ ÁÄ, îïòèìèçàöèÿ çàïðîñîâ äëÿ êîòîðûõ áûëà èññëåäîâàíà â [84]. Îïòèìèçàöèÿ çàïðîñîâ áûëà òàêæå ðàññìîòðåíà â [362] â êîíòåêñòå äåäóêòèâíûõ çàïðîñîâ
â ÁÄ ñ îãðàíè÷åíèÿìè.
5.9. Êîíêóðèðóþùèå è ðàñïðåäåëåííûå ñèñòåìû.
Èñïîëüçîâàíèå îãðàíè÷åíèé ïðè ìîäåëèðîâàíèè ïîâåäåíèÿ êîíêóðèðóþùèõ
ñèñòåì íà÷àëîñü ñ ðàçâèòèåì ïðîãðàììèðîâàíèÿ â êîíêóðèðóþùèõ îãðàíè÷åíèÿõ (concurrent constraint programming), â êîòîðîé êîíêóðèðóþùèå àãåíòû äåëÿò
ìåæäó ñîáîé õðàíèëèùå îãðàíè÷åíèé, ïðè÷åì îíè ìîãóò ëèáî ñîîáùàòü î íàëè÷èè
äîïîëíèòåëüíûõ îãðàíè÷åíèé (tell operation), îáìåíèâàòüñÿ ñîîáùåíèÿìè ñ äðóãèìè àãåíòàìè, èëè ñïðàøèâàòü, ÷òî èìååòñÿ ëè â íàëè÷èè (ask operation), ñèíõðîíèçèðîâàòüñÿ ñ äðóãèìè àãåíòàìè. ßçûêè ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, òàêèå
êàê Oz [207], [353], [204], [292], AKL23 [205], [224], [290], CHR24 [175], CIAO [208]
èñïîëüçîâàëè è âíåäðèëè ýòó ìîäåëü, îáåñïå÷èâ òåì ñàìûì ïðîãðàììíóþ îñíîâó
äëÿ êîíêóðèðóþùèõ ñèñòåì.
Òåìïîðàëüíîå êîíêóðåíòíîå ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (Temporal con23 AKL:
24 CHR:
Andorra Kernel Language.
Constraint Handling Rules.
52
current constraint programming) è íåäåòåðìèíèñòñêîå òåìïîðàëüíîå êîíêóðåíòíîå
ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (non-deterministic temporal concurrent constraint
programming (NTCC)) ÿâëÿþòñÿ âàðèàíòàìè ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ,
ðàáîòàþùèìè ñî âðåìåíåì.
Ðàñøèðåíèÿìè ýòîé ìîäåëè ÿâëÿþòñÿ ðàñïðåäåëåííûå ñèñòåìû [386] è ñèñòåìû
ðåàëüíîãî âðåìåíè [129].
5.10. Ñîâðåìåííûå ïàêåòû ïðîãðàììíîãî îáåñïå÷åíèÿ
CHIP [149] áûë ïåðâûì ÿçûêîì ËÏÎ, èñïîëüçóþùèì ðàñïðîñòðàíåíèå îãðàíè÷åíèé [368]. Äðóãèìè ïðèìåðàìè ñèñòåì ËÏÎ ìîãóò ñëóæèòü áèáëèîòåêè ïîääåðæêè îãðàíè÷åíèé ILOG [216] è COSYTEC [123], à òàêæå ÿçûêè ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ Prolog III [119], [120], Prolog IV [307],
CLP(R) [222] , ECLiPSe [158], [378], CIAO [208], CLP(FD) [109]. Èñïîëüçóÿ ýòè
ñèñòåìû, ìíîãèå ñëîæíûå ïðèêëàäíûå çàäà÷è áûëè óñïåøíî ðåøåíû ñ ïîìîùüþ
òåõíîëîãèé ÓÎ.  ÷èñëå ïðèìåðîâ óïîìÿíåì ïðîâåðêó ýëåêòðîííûõ ñõåì, êàëåíäàðíîå ïëàíèðîâàíèå, ðàñïðåäåëåíèå ðåñóðñîâ, ñîñòàâëåíèå ðàñïèñàíèé, óïðàâëÿþùèå ñèñòåìû, ãðàôè÷åñêèå èíòåðôåéñû, à òàêæå ìíîæåñòâî êîìáèíàòîðíûõ çàäà÷ [368], [377].
Ñèíòàêñèñ äëÿ âûðàæåíèÿ îãðàíè÷åíèé íàä êîíå÷íûìè äîìåíàìè çàâèñèò îò
ÿçûêà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ. Íèæå ïðèâåäåíà ïðîãðàììà íà ÿçûêå
Prolog, ðåøàþùàÿ êëàññè÷åñêèé êðîññâîðä èç ãëàâû 1 SEND+MORE=MONEY:
sendmore(Digits) :Digits = [S,E,N,D,M,O,R,Y],
Digits :: [0..9],
S #\= 0,
M #\= 0,
alldifferent(Digits),
%
%
%
%
%
%
%
Ñîçäàíèå ïåðåìåííûõ
Äîìåíû ïåðåìåííûõ
Îãðàíè÷åíèå: S äîëæíî îòëè÷àòüñÿ îò 0
Îãðàíè÷åíèå: M äîëæíî îòëè÷àòüñÿ îò 0
âñå ïåðåìåííûå äîëæíû ïðèíèìàòü
ðàçëè÷íûå çíà÷åíèÿ
Äðóãèå îãðàíè÷åíèÿ
1000*S + 100*E + 10*N + D
+ 1000*M + 100*O + 10*R + E
#= 10000*M + 1000*O + 100*N + 10*E + Y,
labeling(Digits).
% Íà÷àòü ïîèñê
Èíòåðïðåòàòîð ñîçäàåò ïåðåìåííóþ äëÿ êàæäîé áóêâû êðîññâîðäà. Ñèìâîë :: èñïîëüçóåòñÿ äëÿ çàäàíèÿ äîìåíîâ ýòèõ ïåðåìåííûõ, òàê ÷òî îíè ïðèíèìàþò ìíîæåñòâî çíà÷åíèé {0, 1, 2, 3, . . . , 9}. Îãðàíè÷åíèÿ S# = 0 è M # = 0 îçíà÷àþò, ÷òî
ýòè ïåðåìåííûå íå ìîãóò ïðèíèìàòü çíà÷åíèå 0. Ïðè îöåíêå èíòåðïðåòàòîðîì
ýòèõ îãðàíè÷åíèé îí óìåíüøàåò äîìåíû ýòèõ äâóõ ïåðåìåííûõ, óäàëÿÿ çíà÷åíèå
0 èç íèõ. Çàòåì ðàññìàòðèâàåòñÿ è çàïîìèíàåòñÿ îãðàíè÷åíèå alldierent(Digits).
Ïîñëåäíåå àëãåáðàè÷åñêîå îãðàíè÷åíèå âûðàæàåò òîò ôàêò, ÷òî öèôðû, ïðèñâîåííûå áóêâàì, äîëæíû áûòü òàêèìè, ÷òîáû ¾SEND+MORE=MONEY¿ âûïîëíÿëîñü
ïðè çàìåíå êàæäîé áóêâû íà ñîîòâåòñòâóþùóþ åé öèôðó.
53
Ïåðå÷èñëèì ïîïóëÿðíûå ÿçûêè ËÏÎ:
• B-Prolog (íà áàçå Prolog, êîììåð÷åñêèé) http://www.probp.com/
• CHIP V5 (íà áàçå Prolog, âêëþ÷àåò áèáëèîòåêè C++ è C, êîììåð÷åñêèé)
http://www.cosytec.com/production_scheduling/chip/optimization_product_chip.htm
• Ciao Prolog (íà áàçå Prolog, ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ: GPL/LGPL)
http://clip.dia.fi.upm.es/Software/Ciao/
• ECLiPSe (íà áàçå Prolog, open source) http://eclipse-clp.org/
• SICStus (íà áàçå Prolog, êîììåð÷åñêèé)
http://www.sics.se/isl/sicstuswww/site/index.html
• GNU Prolog (ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ) http://www.gprolog.org/
• Oz http://www.dmoz.org/Computers/Programming/Languages/Oz/
• YAP Prolog http://www.dcc.fc.up.pt/~vsc/Yap/documentation.html
• SWI Prolog ñâîáîäíàÿ ñèñòåìà Prolog, ñîäåðæàùàÿ íåñêîëüêî áèáëèîòåê
äëÿ ðåøåíèÿ îãðàíè÷åíèé http://www.swi-prolog.org/
• Claire http://www.claire-language.com/cgi-bin/trac.cgi
• Curry (íà áàçå Haskell, ñâîáîäíî ðàñïðîñòðàíÿåìîå) http://www.curry-language.org/
• HAL: [147], [145]
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ ðåàëèçóåòñÿ â èìïåðàòèâíîì ïðîãðàììèðîâàíèè ñ ïîìîùüþ ñîçäàíèÿ îòäåëüíûõ áèáëèîòåê. Òàêèìè ïîïóëÿðíûìè áèáëèîòåêàìè äëÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ÿâëÿþòñÿ:
Choco (áèáëèîòåêà Java, ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ)
http://www.emn.fr/x-info/choco-solver/doku.php
Comet (ÿçûê C-ñòèëÿ äëÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ, ëîêàëüíûé ïîèñê,
îñíîâàííûé íà îãðàíè÷åíèÿõ, è ìàòåìàòè÷åñêîå ïðîãðàììèðîâàíèå, ñâîáîäíî ðàñïðîñòðàíÿåìûå èñïîëíèìûå ôàéëû äëÿ àêàäåìè÷åñêèõ öåëåé) http://dynadec.com/
Disolver (áèáëèîòåêà C++, êîììåð÷åñêèé)
Gecode (C++ library, ñâîáîäíîå ÏÎ: X11 style) http://www.gecode.org/
ILOG CP Optimizer (C++, Java, áèáëèîòåêè .NET libraries, êîììåð÷åñêèé)
http://www.ilog.com/products/cpoptimizer/
ILOG CP (áèáëèîòåêà C++, êîììåð÷åñêèé) http://www.ilog.com/products/cp/
JaCoP(áèáëèîòåêà Java, open source) http://jacop.osolpro.com/
JOpt (áèáëèîòåêà Java, ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ) http://jopt.sourceforge.net/
Koalog Constraint Solver (áèáëèîòåêà Java, êîììåð÷åñêèé)
http://linux.softpedia.com/get/Programming/Libraries/
54
Koalog-Constraint-Solver-8073.shtml
Minion (C++ program, GPL) http://minion.sourceforge.net/
Python-constraint (áèáëèîòåêà Python, GPL) http://labix.org/python-constraint
Cream (áèáëèîòåêà Java, ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ: LGPL)
http://bach.istc.kobe-u.ac.jp/cream/
Emma (áèáëèîòåêà Python, êîììåð÷åñêèé) http://www.eveutilities.com/products/emma
ßçûêè ñ ïîääåðæêîé ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ
Common Lisp via Screamer (ñâîáîäíî ðàñïðîñòðàíÿåìîå ÏÎ, êîòîðîå ïîä-
äåðæèâàåò ïîèñê ñ âîçâðàòàìè è âîçìîæíîñòè CLP(R), CHiP )
http://www.cl-user.net/asp/d86x/sdataQkvrOGEiQe5uDQ3jQRpX8yBX8yBXnMq=
/sdataQu3F$sSHnB==
Bertrand ÿçûê äëÿ ïîñòðîåíèÿ ñèñòåì ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ
[259].
5.11. Ñðàâíåíèå ñ äðóãèìè ÿçûêàìè ìîäåëèðîâàíèÿ
Àëãåáðàè÷åñêèå ÿçûêè ìîäåëèðîâàíèÿ, ïîÿâèâøèåñÿ â 1970-õ ãîäàõ, èñïîëüçóåìûå äëÿ ðåøåíèÿ çàäà÷ ìàòåìàòè÷åñêîãî ïðîãðàììèðîâàíèÿ (íàïðèìåð, GAMS
(Brooke et al., 1988) [85] è MGG (Simons, 1987) [351]), áûëè ñóùåñòâåííûì ïðîäâèæåíèåì âïåðåä. Âî-ïåðâûõ, îíè áûëè ðàçðàáîòàíû äëÿ óïðîùåíèÿ ðîëè ïîëüçîâàòåëÿ â ðåøåíèè çàäà÷ ìàòåìàòè÷åñêîãî ïðîãðàììèðîâàíèÿ, îáåñïå÷èâàÿ áëèçêèé
ê ìàòåìàòè÷åñêîé çàïèñè ñèíòàêñèñ. Âî-âòîðûõ, îíè èìåþò äåêëàðàòèâíóþ ïðèðîäó, îïèñûâàÿ çàäà÷ó, à íå òî, êàê ðåøåíèÿ ìîãóò áûòü íàéäåíû. Ýòî ñíèìàåò
íàãðóçêó ñ ïîëüçîâàòåëÿ, è ïîçâîëÿåò ïðîñòî ïðèìåíÿòü ðàçëè÷íûå ðåøàòåëè äëÿ
ðåøåíèÿ îäíîé è òîé æå çàäà÷è. Äðóãèå ïîëåçíûå ÿçûêè ìîäåëèðîâàíèÿ áûëè ñîçäàíû â äðóãèõ îáëàñòÿõ, íàïðèìåð, ACE (Fuchs & Schwitter, 1996) [178], ÿçûê
ðàññóæäåíèé î áàçàõ çíàíèé, ïîäîáíûé àíãëèéñêîìó.
Óñïåõ ÿçûêîâ ìîäåëèðîâàíèÿ ïîêàçàë, ÷òî ïîäîáíûé ïîäõîä ìîã áû áûòü ïëîäîòâîðíûì äëÿ ðåøåíèÿ çàäà÷ ÓÎ. Ðàííèå ïîïûòêè â ýòîì íàïðàâëåíèè, ÿçûê
ALICE (Lauriere, 1978) [258] èìååò ìíîãî àñïåêòîâ, ïîäîáíûõ àëãåáðàè÷åñêèì
ÿçûêàì ìîäåëèðîâàíèÿ òîãî âðåìåíè, â òîì ÷èñëå äåêëàðàòèâíóþ ïðèðîäó. ßçûêè
ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ïîñòåïåííî ðàñøèðÿëè äèàïàçîí òèïîâ ðåøàþùèõ ïåðåìåííûõ. Íàïðèìåð, Eclipse (Gervet, 1994) [186] ïîääåðæèâàåò ðåøàþùèå
ïåðåìåííûå, ýëåìåíòû äîìåíîâ êîòîðûõ ÿâëÿþòñÿ ìíîæåñòâàìè; àíàëîãè÷íî F
ïîääåðæèâàåò ôóíêöèè, ESRA ïîääåðæèâàåò îòíîøåíèÿ è ôóíêöèè, à NP-Spec
ïîääåðæèâàåò ìíîæåñòâà, ïåðåñòàíîâêè, ðàçáèåíèÿ è öåëûå ôóíêöèè. Óñèëåíèå
àáñòðàêöèè ïîçâîëÿåò ïîëüçîâàòåëþ èçáåæàòü äîïîëíèòåëüíûõ óñèëèé ïðè ìîäåëèðîâàíèè, ïåðåäàâàÿ ýòî âñå êîìïèëÿòîðó. ESSENCE ñäåëàë áîëüøîé ñêà÷îê â
ýòîì íàïðàâëåíèè, îáåñïå÷èâàÿ áîëåå øèðîêèé äèàïàçîí òèïîâ, ÷åì ýòî áûëî â
ïðåäøåñòâóþùèõ ÿçûêàõ è, ÷òî óíèêàëüíî, êîíñòðóêòîðû òèïîâ, êîòîðûå ìîãóò
áûòü êàê óãîäíî âëîæåííûìè. Èìåííî ýòè ôàêòîðû äåëàþò ESSENCE ñêîðåå
ÿçûêîì ñïåöèôèêàöèé, à íå ïðîñòî ÿçûêîì ìîäåëèðîâàíèÿ.
55
Ïðè ðåøåíèè ñëîæíûõ êîìáèíàòîðíûõ çàäà÷ îáû÷íî èñïîëüçóåòñÿ äâóõøàãîâàÿ ïðîöåäóðà. Íà ïåðâîì øàãå ðàçðàáàòûâàåòñÿ êîíöåïòóàëüíàÿ ìîäåëü, îïèñûâàþùàÿ, â ÷åì ñîñòîèò çàäà÷à, áåç îïèñàíèÿ, êàê ôàêòè÷åñêè åå ðåøàòü. Âòîðîé
øàã ñîñòîèò â îòîáðàæåíèè êîíöåïòóàëüíîé ìîäåëè íà ïðîåêòíóþ ìîäåëü, êîòîðàÿ
óæå ìîæåò áûòü íåïîñðåäñòâåííî ðåøåíà.  èäåàëå, îäíà è òà æå êîíöåïòóàëüíàÿ ìîäåëü ìîæåò áûòü ïðåîáðàçîâàíà â ðàçëè÷íûå ïðîåêòíûå ìîäåëè, ïîçâîëÿÿ
òåì ñàìûì ñïåöèàëèñòàì ïî ìîäåëèðîâàíèþ ëåãêî ¾ïîäêëþ÷àòü è ðàáîòàòü¿ (plug
and play) ñ ðàçëè÷íûìè ðåøàòåëÿìè. Íîâûé ÿçûê ìîäåëèðîâàíèÿ Zinc, ðàçðàáîòàííûé â ðàìêàõ ýòîé ìåòîäîëîãèè, îïèñàí â [268]. Zinc (Marriott et al., 2006),
[267]; (de la Banda et al., 2006) [144] ýòî íîâûé ÿçûê ñïåöèôèêàöèé, èñïîëüçóþùèé, êàê è ESSENCE, âëîæåííûå êîíñòðóêòîðû òèïîâ, íî, êðîìå òîãî, â îòëè÷èå
îò ESSENCE, îí èìååò âîçìîæíîñòü îïðåäåëÿòü ïðåäèêàòû. Êðîìå ESSENCE
èçâåñòíû ëèøü òðè ÿçûêà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ñ ïîäîáíûìè âîçìîæíîñòÿìè: ESRA, F è LOCALIZER (Michel & Van Hentenryck, 2000) [281].
Äðóãîé ïîäõîä ê ñïåöèôèêàöèè çàäà÷è, êîòîðûé èñïîëüçóåò áîëåå ìîùíûé è
îáùèé ÿçûê ñïåöèôèêàöèé, òàêîé êàê Z, áûë èññëåäîâàí â ðàáîòå (Renker & Ahriz,
2004) [315], ñîçäàâøèõ èíñòðóìåíòàëüíûå ñðåäñòâà ñõåìû Z äëÿ ïîääåðæêè îáùèõ
ãëîáàëüíûõ îãðàíè÷åíèé è èñïîëüçîâàâøèõ ýòî äëÿ ïîñòðîåíèÿ îáøèðíîãî êàòàëîãà ñïåöèôèêàöèé [318]. Íåäîñòàòîê ýòîãî ïîäõîäà ñîñòîèò â òîì, ÷òî Z ÿâëÿåòñÿ
÷åðåñ÷óð îáùèì äëÿ çàäà÷ ÓÎ, òàê êàê ïîçâîëÿåò ñïåöèôèêàöèè çàäà÷, êîòîðûå
åñòåñòâåííûì îáðàçîì ê ÇÓÎ íå ñâîäÿòñÿ. Ê íåäîñòàòêàì ñïåöèôèêàöèé ÿçûêà Z
îòíîñèòñÿ ãîðàçäî ìåíüøàÿ èõ åñòåñòâåííîñòü ïî ñðàâíåíèþ ñî ñïåöèôèêàöèÿìè
ESSENCE.
ßçûê Alloy (Jackson, 2006) [219] ïîçâîëÿåò èçáåæàòü íåêîòîðûõ íåäîñòàòêîâ
ÿçûêà Z ïóòåì îãðàíè÷èâàíèÿ åãî äî ëîãèêè ïåðâîãî ïîðÿäêà. Alloy äàåò åñòåñòâåííûé è âûðàçèòåëüíûé ñïîñîá ñïåöèôèêàöèè çàäà÷ â òåðìèíàõ îòíîøåíèé
è àòîìîâ è îòîáðàæàåò ýòè ñïåöèôèêàöèè â ýôôåêòèâíûå ìîäåëè âûïîëíèìîñòè
SAT.
6. Ïðèëîæåíèÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ è ÓÎ
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ â íàñòîÿùåå âðåìÿ èìååò øèðîêèé êðóã
ïðèëîæåíèé. Òàêèå êîìïàíèè, êàê American Express, BMW, Coors, Danone, eBay,
France Telecom, General Electric, HP, JB Hunt, LL Bean, Mitsubishi Chemical, Nippon
Steel, Orange, Porsche, QAD, Royal Bank of Scotland, Shell, Travelocity, US Postal
Service, Visa,Wal-Mart, Xerox, Yves Rocher, Zurich Insurance èñïîëüçóþò ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ äëÿ îïòèìèçàöèè ñâîèõ áèçíåñ-ïðîöåññîâ [325].
Ðàññìîòðèì ãëàâíûå îáëàñòè ïðèëîæåíèé, â êîòîðûõ áûëà èñïîëüçîâàíà òåõíîëîãèÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ è îêàçàëàñü êîíêóðåíòíîñïîñîáíîé êàê
ïî ãèáêîñòè ìîäåëèðîâàíèÿ, òàê è ïî ýôôåêòèâíîñòè ðåøåíèÿ.  ÷èñëå îáçîðíûõ
ðàáîò ïî ïðèëîæåíèÿì ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ìîæíî óïîìÿíóòü [221],
[348], [349], [377].
56
6.1. Çàäà÷è î íàçíà÷åíèÿõ.
Çàäà÷è î íàçíà÷åíèÿõ áûëè îäíèì èç ïåðâûõ òèïîâ ïðèêëàäíûõ çàäà÷, êîòîðûå áûëè ðåøåíû ñ ïîìîùü òåõíîëîãèè ËÏÎ. Ýòè çàäà÷è îáû÷íî ó÷èòûâàþò
äâà òèïà ðåñóðñîâ è îãðàíè÷åíèé, ñâÿçûâàþùèõ èõ, è ïûòàþòñÿ ïðèïèñàòü îäèí
ðåñóðñ ïåðâîãî òèïà îäíîìó ðåñóðñó âòîðîãî òèïà òàê, ÷òîáû âñå îãðàíè÷åíèÿ
óäîâëåòâîðÿëèñü.
Îäíèì èç ïðèìåðîì ýòîé çàäà÷è î íàçíà÷åíèÿõ ìîæåò ñëóæèòü çàäà÷à ðàçìåùåíèÿ ñòîÿíîê ñàìîëåòîâ â àýðîïîðòó, ãäå ñàìîëåòû (ðåñóðñû ïåðâîãî òèïà)
äîëæíû ïàðêîâàòüñÿ íà äîñòóïíûõ ñòîÿíêàõ (âòîðîé òèï ðåñóðñîâ) âî âðåìÿ èõ
ïðåáûâàíèÿ â àýðîïîðòó [107], [108], [303], [348].
6.2. Íàçíà÷åíèå ïåðñîíàëà
Çàäà÷è íàçíà÷åíèÿ ïåðñîíàëà ÿâëÿþòñÿ ÷àñòíûì ñëó÷àåì çàäà÷ î íàçíà÷åíèÿõ,
â êîòîðûõ îäíèì òèïîì ðåñóðñîâ ÿâëÿþòñÿ ëþäè, ÷òî äåëàåò ýòè çàäà÷è äîñòàòî÷íî ñïåöèàëüíûìè äëÿ òîãî, ÷òîáû ðàññìàòðèâàòü èõ îòäåëüíî.  ñàìîì äåëå, èçìåíÿþùèåñÿ ïðàâèëà ðàáîòû è âñåâîçìîæíûå ïðåäïèñàíèÿ ïîðîæäàþò ñëîæíûå
îãðàíè÷åíèÿ, çàâèñÿùèå îò âðåìåíè. Ïîìèìî ýòîãî, ïîëüçîâàòåëüñêèå ïðåäïî÷òåíèÿ ÷àñòî âåäóò ê ïåðåîãðàíè÷åííûì çàäà÷àì, íå èìåþùèì ðåøåíèé, óäîâëåòâîðÿþùèõ âñåì îãðàíè÷åíèÿì. Äðóãèì âàæíûì àñïåêòîì ÿâëÿåòñÿ íåîáõîäèìîñòü
ñîáëþäåíèÿ áàëàíñà îáúåìà ðàáîòû ìåæäó ðàçíûìè ëþäüìè, ÷òî ïðèâîäèò ê òðóäíûì çàäà÷àì îïòèìèçàöèè. Ðàçëè÷íûå ïðèëîæåíèÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ â îáëàñòè íàçíà÷åíèÿ ïåðñîíàëà îïèñàíû â ðàáîòàõ [102], [103] (ðàçðàáîòêà
ñìåííûõ ãðàôèêîâ ìåäñåñòåð), [118] (ãðàôèêè ðàáîòû íà òåëåâèäåíèè Ôðàíöèè),
[155], [246], [298].
6.3. Óïðàâëåíèå ñåòÿìè
Ñèñòåìà LOCARIM [347] áûëà ðàçðàáîòàíà êîìïàíèåé COSYTEC äëÿ France
Telecom: íà÷èíàÿ ñ àðõèòåêòóðíîãî ïðîåêòà çäàíèÿ, îíà ïðåäëàãàåò ïðîêëàäêó êàáåëÿ òåëåêîììóíèêàöèîííîé ñåòè çäàíèÿ. Ñèñòåìà PLANETS (PLanning Activities
on NETworkS) [124], ðàçðàáîòàííàÿ Óíèâåðñèòåòîì Êàòàëîíèÿ (University of Catalonia)
â Áàðñåëîíå äëÿ èñïàíñêîé ýëåêòðè÷åñêîé êîìïàíèè, êàê èíñòðóìåíò ïåðåñòðîéêè ñòðóêòóðû ýëåêòðè÷åñêîé ñåòè, êîòîðûé ïîçâîëÿåò ñòðîèòü êàëåíäàðíûé ïëàí
òåõíè÷åñêîãî îáñëóæèâàíèÿ äåÿòåëüíîñòè ñ ïîìîùüþ âûäåëåíèÿ ó÷àñòêîâ ñåòè
áåç íàðóøåíèÿ îáñëóæèâàíèÿ ïîòðåáèòåëåé.
 ðàáîòå [36] îïèñàíî èñïîëüçîâàíèå ÿçûêà CHIP â óïðàâëåíèè âîäíîé ñèñòåìîé. Ïëàíèðîâàíèå òåëåêîììóíèêàöèîííîé ñåòè ìîáèëüíîé ñâÿçè áûëî îñóùåñòâëåíî ñ ïîìîùüþ ñèñòåìû POPULAR [177], çàïðîãðàììèðîâàííîé íà ECLiPSe.
6.4. Êàëåíäàðíîå ïëàíèðîâàíèå
Íàâåðíîå, íàèáîëåå óñïåøíîé ïðèêëàäíîé îáëàñòüþ äëÿ ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ ÿâëÿåòñÿ êàëåíäàðíîå ïëàíèðîâàíèå [44], [101]. Äëÿ
57
çàäàííîãî ìíîæåñòâà ðåñóðñîâ ñ äàííûìè ìîùíîñòÿìè, ìíîæåñòâî âèäîâ äåÿòåëüíîñòè ñ äàííîé ïðîäîëæèòåëüíîñòüþ è ïîòðåáíîñòÿìè â ðåñóðñàõ, ìíîæåñòâî
òåìïîðàëüíûõ îãðàíè÷åíèé ìåæäó âèäàìè äåÿòåëüíîñòè, çàäà÷à ¾÷èñòîãî¿ êàëåíäàðíîãî ïëàíèðîâàíèÿ ñîñòîèò â ðåøåíèè, êîãäà âûïîëíèòü êàæäóþ ðàáîòó òàê,
÷òîáû âûïîëíÿëèñü òåìïîðàëüíûå îãðàíè÷åíèÿ è îãðàíè÷åíèÿ ïî ðåñóðñàì.
Ñîâðåìåííûå ðåçóëüòàòû èññëåäîâàíèé ïî ñëîæíîñòè êëàññîâ çàäà÷ ÓÎ ïîêàçûâàþò, ÷òî òàêèå çàäà÷è êàëåíäàðíîãî ïëàíèðîâàíèÿ íà ñàìîì äåëå ëåãêî ðàçðåøèìû è ïîýòîìó èìåþòñÿ ýôôåêòèâíûå àëãîðèòìû èõ ðåøåíèÿ [310].
Òèïè÷íûì ïðèìåðîì ïðèëîæåíèÿ êàëåíäàðíîãî ïëàíèðîâàíèÿ, îñíîâàííîãî íà
ÓÎ, ÿâëÿåòñÿ ATLAS [346], îñóùåñòâëÿþùèé êàëåíäàðíîå ïëàíèðîâàíèå ïðîèçâîäñòâà ãåðáèöèäîâ íà çàâîäå Monsanto â Àíòâåðïåíå.
Ñèñòåìà PLANE [59] èñïîëüçîâàíà êîìïàíèåé Dassault Aviation äëÿ ïëàíèðîâàíèÿ ïðîèçâîäñòâà âîåííîãî ñàìîëåòà Mirage 2000 è ñàìîëåòà Falcon.
Ñèñòåìà MOSES [28], [350] áûëà ðàçðàáîòàíà êîìïàíèåé COSYTEC äëÿ ïðîèçâîäèòåëÿ ïèòàíèÿ äëÿ æèâîòíûõ â Âåëèêîáðèòàíèè.
Ñèñòåìà FORWARDC [191] ïðåäñòàâëÿåò ñîáîé ñèñòåìó ïîääåðæêè ïðèíÿòèÿ ðåøåíèé (ÑÏÏÐ) [13], ðåàëèçîâàííóþ íà CHIP, è èñïîëüçóåòñÿ íà òðåõ íåôòåïåðåãîííûõ çàâîäàõ â Åâðîïå äëÿ ðåøåíèÿ çàäà÷ êàëåíäàðíîãî ïëàíèðîâàíèÿ,
âîçíèêàþùèõ ïðè ïðèâîçå ñûðîé íåôòè, åå îáðàáîòêå, ñìåøèâàíèè è äîñòàâêå.
Xerox èñïîëüçîâàë ñèñòåìó ÓÎ äëÿ êàëåíäàðíîãî ïëàíèðîâàíèÿ ðàçëè÷íûõ ðàáîò íà êîïèðîâàëüíûõ ìàøèíàõ [174].
Óïðåæäàþùèå (preemptive) çàäà÷è êàëåíäàðíîãî ïëàíèðîâàíèÿ ýòî òå çàäà÷è, â êîòîðûõ ðàáîòû ìîãóò ïðåðûâàòüñÿ âî âðåìåíè. È äëÿ òàêèõ çàäà÷ ìîãóò
óñïåøíî ïðèìåíÿòüñÿ òåõíîëîãèè ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ:
òàê, CLAIRE Scheduler ýòî áèáëèîòåêà ïðîãðàìì â îãðàíè÷åíèÿõ, ïîçâîëÿþùàÿ ðàáîòàòü ñ ïîäîáíûìè çàäà÷àìè, â òîì ÷èñëå ïðè íàëè÷èè ïðåäïî÷òåíèé
[296], [297]. Ïîäîáíûå ôóíêöèè âûïîëíÿåò è ILOG Scheduler [217].
Åñëè ñðàâíèâàòü çàäà÷è êàëåíäàðíîãî ïëàíèðîâàíèÿ ïî ìåòîäàì ðåøåíèÿ, òî
îíè ðåøàþòñÿ ñ ïîìîùüþ èìïåðàòèâíûõ ÿçûêîâ (íàïðèìåð, C/C++), íåñïåöèàëèçèðîâàííûõ ÿçûêîâ ËÏÎ (íàïðèìåð, CHIP), è ñïåöèàëüíûõ ñðåäñòâ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ. Ðàáîòà [41] ïîêàçàëà, ÷òî ïîäõîä ËÏÎ ïðåâîñõîäèò
äðóãèå ïî ìíîãèì ïàðàìåòðàì: âðåìÿ ðàçðàáîòêè, âåðøèíû, ïðîñìîòðåííûå â äåðåâå ïîèñêà, ïî ÷èñëó ïîñòðîåííûõ äîïóñòèìûõ ðåøåíèé, äàæå ïî ýôôåêòèâíîñòè.
Ñîãëàñíî ýòîìó èññëåäîâàíèþ, ãëàâíîé ïðè÷èíîé óñïåõà ÿçûêîâ ËÏÎ ïðè ðåøåíèè ýòèõ çàäà÷ ñîñòîèò â èñïîëüçîâàíèè ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé, êîòîðîå
ïîìîãàåò óìåíüøèòü êàê âðåìÿ ðàçðàáîòêè, òàê è âðåìÿ âûïîëíåíèÿ. Âûÿñíèëîñü,
÷òî äëÿ íåêîòîðûõ êëàññîâ çàäà÷ êàëåíäàðíîãî ïëàíèðîâàíèÿ íå ñóùåñòâóåò ìåòîäà, ëó÷øåãî âñåõ îñòàëüíûõ ìåòîäîâ, à ëó÷øå ïðèìåíÿòü ñî÷åòàíèå íåñêîëüêèõ
ìåòîäîâ. Â ñâÿçè ñ ýòèì áûëè ïðåäëîæåíû ãèáðèäíûå àëãîðèòìû, èñïîëüçóþùèå
êàê ÿçûêè ËÏÎ, òàê è äðóãèå ìåòîäû. Òàê, ñî÷åòàíèå ËÏÎ è öåëî÷èñëåííîãî
ïðîãðàììèðîâàíèÿ áûëî èñïîëüçîâàíî äëÿ ðåøåíèÿ çàäà÷ êàëåíäàðíîãî ïëàíèðîâàíèÿ ñ ìíîãèìè ïîäúåìíèêàìè [321].
Îòìåòèì ñëåäóþùèå ñèñòåìû ïëàíèðîâàíèÿ.
58
TAP-AI [52] àêòèâíàÿ ñèñòåìà ïëàíèðîâàíèÿ, ïðåäíàçíà÷åííàÿ äëÿ íàçíà÷åíèÿ ýêèïàæåé ïî àâèàëèíèÿì SAS. Îíà ïðåäíàçíà÷åíà äëÿ åæåäíåâíîãî óïðàâëåíèÿ äåÿòåëüíîñòüþ (îïåðàöèÿìè).
OPTISERVICE [118] ïðîãðàììíûé ïàêåò äëÿ íàçíà÷åíèÿ ïåðñîíàëà äëÿ
âñåõ çàãðàíè÷íûõ òåëå- è ðàäèîñòàíöèé ñåòè RFO. Îí íàçíà÷àåò êîìàíäû êâàëèôèöèðîâàííûõ æóðíàëèñòîâ è òåõíè÷åñêèõ ðàáîòíèêîâ ïî ïåðåäà÷àì, ó÷èòûâàÿ
îãðàíè÷åíèÿ ïî âðåìåíè è óñëîâèÿì îïëàòû.
Ñèñòåìà MOSAR
(http://www.cosytec.com/constraint_programming/cases_studies/administration.htm),
ðàçðàáîòàííàÿ êîìïàíèÿìè Cisi è COSYTEC äëÿ ìèíèñòåðñòâà þñòèöèè Ôðàíöèè,
íàçíà÷àåò îõðàííèêîâ òþðåì ïî 200 òþðüìàì Ôðàíöèè ïî ÷åðåäóþùèìñÿ ñìåíàì.
6.5. Òðàíñïîðòíûå ïðîáëåìû.
Ìíîãèå òðàíñïîðòíûå ïðîáëåìû áûëè ðåøåíû ñ èñïîëüçîâàíèåì òåõíîëîãèè
îãðàíè÷åíèé. Ýòè çàäà÷è ÷àñòî î÷åíü ñëîæíû â ñâÿçè ñ èõ áîëüøèìè ðàçìåðàìè,
÷èñëó è ìíîæåñòâó âèäîâ îãðàíè÷åíèé, à òàêæå èç-çà íàëè÷èÿ ñëîæíûõ îãðàíè÷åíèé, íàêëàäûâàåìûõ íà âîçìîæíûå ìàðøðóòû. Êðîìå òîãî, ýòè çàäà÷è ÷àñòî
òðåáóþò ðåøåíèÿ ïîäçàäà÷è íàçíà÷åíèÿ ïåðñîíàëà, ïðè÷åì ïðè âûïîëíåíèè ðÿäà
ñëîæíûõ óñëîâèé. Ðàññìîòðèì ñîîòâåòñòâóþùèå ïðèëîæåíèÿ.
Ñèñòåìà COBRA [350] ðàçðàáàòûâàåò äèàãðàììû ðàáî÷èõ ïëàíîâ ìàøèíèñòîâ
ïîåçäîâ êîìïàíèè North Western Trains â Âåëèêîáðèòàíèè.
Ïðîåêò DAYSY Esprit (ïàêåò SAS-Pilot) [52] îñóùåñòâëÿåò ïåðåíàçíà÷åíèå
ëåòíûõ ýêèïàæåé ïî ïîëåòàì. Ýòà æå çàäà÷à ðåøàåòñÿ ñ ïîìîùüþ äðóãîé ñèñòåìû [164], ñî÷åòàþùåé ìåòîäû ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ è èññëåäîâàíèÿ
îïåðàöèé.
Ñèñòåìà, îïèñàííàÿ â [269], èñïîëüçóåò áèáëèîòåêè îãðàíè÷åíèé ILOG äëÿ ðàçðàáîòêè è îïòèìèçàöèè ïîåçäíûõ îïåðàòèâíûõ ïëàíîâ äëÿ ãðóçîâîé æåëåçíîäîðîæíîé êîìïàíèè.
Äëÿ çàäà÷ ïëàíèðîâàíèÿ òðàíñïîðòà (êàê è äëÿ çàäà÷ êàëåíäàðíîãî ïëàíèðîâàíèÿ), â ðÿäå ñëó÷àåâ íàèëó÷øèì ìåòîäîì îêàçàëàñü êîìáèíàöèÿ íåñêîëüêèõ
ìåòîäîâ. Íàïðèìåð, ÓÎ è ëîêàëüíûé ïîèñê áûëè ñîâìåñòíî èñïîëüçîâàíû ïðè ðåøåíèè çàäà÷ ìàðøðóòèçàöèè òðàíñïîðòíûõ ñðåäñòâ â [340], à â ðàáîòå [305] òàêèå
æå çàäà÷è ðåøàëèñü ñ ïîìîùüþ êîìáèíàöèè ìåòîäîâ ÓÎ è ìåòîäîâ èññëåäîâàíèÿ
îïåðàöèé.
Ìàðøðóòèçàöèÿ òðàíñïîðòíûõ ñðåäñòâ (Vehicle Routing) ýòî çàäà÷à ïîñòðîåíèÿ ìàðøðóòîâ äëÿ òðàíñïîðòíûõ ñðåäñòâ äëÿ ïåðåâîçîê ïðîäóêöèè ïîëüçîâàòåëÿì ñ ìèíèìàëüíîé ñòîèìîñòüþ.
6.6. Ñèñòåìû óïðàâëåíèÿ ýëåêòðîìåõàíè÷åñêèìè ñèñòåìàìè
Òåõíîëîãèÿ ÓÎ èñïîëüçóåòñÿ äëÿ ðàçðàáîòêè ÏÎ äëÿ óïðàâëåíèÿ ýëåêòðîìåõàíè÷åñêèìè ñèñòåìàìè ñ êîíå÷íûì ÷èñëîì âõîäîâ è âûõîäîâ è âíóòðåííèõ ñîñòîÿíèé.
59
Ñèñòåìû óïðàâëåíèÿ òðåáóþòñÿ äëÿ òàêèõ ïðèëîæåíèé, êàê ëèôòû, êîïèðîâàëüíûå ìàøèíû, ñáîðî÷íûå ëèíèè è ýëåêòðîñòàíöèè.  êà÷åñòâå ïðèìåðîâ òàêîé ïðîãðàììíîé ñèñòåìû ìîæíî ïðèâåñòè ñèñòåìû âåðèôèêàöèè: SVE (system
verication environment) [163], à òàêæå ñèñòåìà âåðèôèêàöèè ïàðàëëåëüíûõ ñèñòåì [276], èñïîëüçóþùàÿ ñåòè Ïåòðè è ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ (ÿçûê
ïðîãðàììèðîâàíèÿ 2LP).
6.7. Ýëåêòðîííûå òàáëèöû ñ îãðàíè÷åíèÿìè
Ýëåêòðîííàÿ òàáëèöà â íàñòîÿùåå âðåìÿ îäíî èç íàèáîëåå ðàñïðîñòðàí¼ííûõ
ïðîãðàììíûõ ñðåäñòâ ïîääåðæêè ïðèíÿòèÿ ðåøåíèé. Îäíàêî, îáû÷íûå ýëåêòðîííûå òàáëèöû èìåþò ñëåäóþùèå äâà îãðàíè÷åíèÿ: îíè âû÷èñëÿþò ëèøü â ôèêñèðîâàííîì íàïðàâëåíèè, (îò âõîäíûõ ÿ÷ååê ê ÿ÷åéêàì-ðåçóëüòàòàì), ïðè ýòîì
ðåçóëüòàòû ìîãóò áûòü îïðåäåëåíû ïîñëå çàäàíèÿ çíà÷åíèé âõîäíûõ ÿ÷ååê. Ñ äðóãîé ñòîðîíû, îãðàíè÷åíèÿ ïîçâîëÿþò ïåðåìåííûì âîçäåéñòâîâàòü äðóã íà äðóãà âî
âñåõ íàïðàâëåíèÿõ (êàê â îãðàíè÷åíèè X ≤ Y ), è ðàáîòàòü åñòåñòâåííûì îáðàçîì
ñ ÷àñòè÷íîé èíôîðìàöèåé Èäåÿ ïðèìåíåíèÿ òåõíîëîãèè ËÏÎ äëÿ ïðåîäîëåíèÿ
ýòèõ îãðàíè÷åíèé ñóùåñòâóþùèõ ýëåêòðîííûõ òàáëèö áûëà èñïîëüçîâàíà ïðè ñîçäàíèè íåñêîëüêèõ ïðîãðàììíûõ ñèñòåì.
Ñèñòåìà êðàòêîñðî÷íîãî ïëàíèðîâàíèÿ (The Short Term Planning (STP)) äëÿ
êîìïàíèè Renault [105] ðåøàåò çàäà÷ó òðàíñïîðòèðîâêè àâòîìîáèëåé çàêàç÷èêàì
ñ ó÷åòîì ìíîæåñòâà îãðàíè÷åíèé. Áûëè ðàçðàáîòàíû ýëåêòðîííûå òàáëèöû íà îñíîâå îãðàíè÷åíèé äëÿ ïîìîùè ïîëüçîâàòåëþ â ðåøåíèè ýòîé çàäà÷è. Âî âðåìÿ
ïðîöåññà ïëàíèðîâàíèÿ, âåëè÷èíû â ýëåêòðîííûõ òàáëèöàõ íå òî÷íûå ÷èñëà,
à èíòåðâàëû [min, max]. Îãðàíè÷åíèÿ ïðèïèñàíû ê ðàçëè÷íûì ÿ÷åéêàì òàáëèöû
è èñïîëüçóþòñÿ äëÿ ðàñïðîñòðàíåíèÿ ïîñëåäñòâèé èçìåíåíèé, íàëîæåííûõ ïîëüçîâàòåëåì, êîòîðûé ìîæåò ëèáî ââåñòè êîíêðåòíîå çíà÷åíèå â ÿ÷åéêó, èëè ïðÿìî
îãðàíè÷èòü äèàïàçîí âîçìîæíûõ çíà÷åíèé ïóòåì ñóæåíèÿ èíòåðâàëà.
Äðóãèì ïåðñïåêòèâíûì ïðèëîæåíèåì ýëåêòðîííûõ òàáëèö ñ îãðàíè÷åíèÿìè
ÿâëÿåòñÿ ôèíàíñîâîå ïëàíèðîâàíèå [215]: ýëåêòðîííûå òàáëèöû ïîçâîëÿþò ñïåöèàëèñòó ïî ïëàíèðîâàíèþ ôèíàíñîâ èñïîëüçîâàòü ïîòåíöèàëüíûå èíâåñòèöèè.
Ôèíàíñîâûå ïðèëîæåíèÿ ÷àñòî ñîäåðæàò íåëèíåéíûå îãðàíè÷åíèÿ, êîòîðûå ìîãóò ðåøàòüñÿ ñ ïîìîùüþ ìåòîäîâ èíòåðâàëüíîãî àíàëèçà. Ïëàíèðîâàíèå áþäæåòîâ
ðàéîíîâ Ìîñêâû è ïîñëåäóþùèé êîíòðîëü çà ýòèìè áþäæåòàìè áûëè îñóùåñòâëåíû ñ ïîìîùüþ ýëåêòðîííûõ òàáëèö íà îñíîâå îãðàíè÷åíèé, ãäå ìåòîä ðåøåíèÿ
îãðàíè÷åíèé áûë âñòðîåí â ÿçûê ECLiPSe [342].
6.8. Èíòåðàêòèâíîå ðåøåíèå çàäà÷
Òåõíîëîãèÿ ËÏÎ, â îñîáåííîñòè ðàñïðîñòðàíåíèå îãðàíè÷åíèé, ìîæåò áûòü
èñïîëüçîâàíà ïðè îðãàíèçàöèè ó÷àñòèÿ ïîëüçîâàòåëÿ â ðàçðàáîòêå ðåøåíèé. Ôàêòè÷åñêè íà êàæäîì øàãå ïîñëåäñòâèÿ êîíêðåòíîãî âûáîðà ÿâíî äåìîíñòðèðóþòñÿ
ïîëüçîâàòåëþ ñ ïîìîùüþ ìåõàíèçìà ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé. Ïîëüçîâàòåëü
â ýòîì ñëó÷àå ëèáî îòêàçûâàåòñÿ îò ýòîãî ðåøåíèÿ, ëèáî èñïîëüçóåò ðàñïðîñòðà60
íåííóþ èíôîðìàöèþ äëÿ âûðàáîòêè ñëåäóþùåãî âûáîðà èëè ðàçðåøàåò ñèñòåìå
ñäåëàòü ýòîò âûáîð àâòîìàòè÷åñêè.
Íàïðèìåð, ñèñòåìû ËÏÎ òàêîãî òèïà áûëè èñïîëüçîâàíû äëÿ ðåøåíèÿ çàäà÷
ñîñòàâëåíèÿ ðàñïèñàíèé â Banque Bruxelles Lambert [153] è ìåäèöèíñêîãî ôàêóëüòåòà Óíèâåðñèòåòà èì. Ãóìáîëüòà (Humbolt University) [193].
Èñïîëüçîâàíèå ñèñòåì ËÏÎ îïèñàíî òàêæå â ðàáîòàõ [26], [63], [182], [187].
6.9. Ãðàôè÷åñêèå èíòåðôåéñû ïîëüçâàòåëÿ
Îäíîé èç îáøèðíûõ è ñòàðåéøèõ îáëàñòåé ïðèëîæåíèÿ äëÿ òåõíîëîãèè ÓÎ
ÿâëÿåòñÿ ðàçðàáîòêà ãðàôè÷åñêèõ èíòåðôåéñîâ. Ðîëü ÓÎ ñîñòîèò çäåñü â ñîõðàíåíèè ãðàôè÷åñêèõ îáúåêòîâ â ïðàâèëüíîì îòíîøåíèè äðóã ê äðóãó ïîñëå îáíîâëåíèÿ ãðàôè÷åñêîãî îêíà (îáû÷íî ñ ïîìîùüþ ìûøêè). Çäåñü öåëü îòíîñèòåëüíî
áûñòðîå íàõîæäåíèå äîïóñòèìîãî ðåøåíèÿ. Êîììåð÷åñêàÿ áèáëèîòåêà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ äëÿ ïîñòðîåíèÿ èíòåðàêòèâíûõ ãðàôè÷åñêèõ èíòåðôåéñîâ ïîëüçîâàòåëÿ ïðåäëîæåíà â [80]. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ áûëî
èñïîëüçîâàíî ïðè ñîçäàíèè àëãîðèòìîâ ïîñòðîåíèÿ ãðàôîâ [360] è ïðè ñîçäàíèè
ñðåäñòâ âèçóàëèçàöèè è àíèìàöèè [359]. Ãðàôè÷åñêèé èíòåðôåéñ, èñïîëüçóþùèé
òåõíîëîãèþ ÓÎ, áûë èñïîëüçîâàí äëÿ ðåøåíèÿ çàäà÷è ñáîðêè â ïðîôåññèîíàëüíûõ
ñèñòåìàõ CAD/CAM [339]. Ðàçðàáîòàí ÿçûê EaCL [365] äëÿ ñîäåéñòâèÿ ïîëüçîâàòåëÿì â ïîñòðîåíèè çàäà÷ ÓÎ.
6.10. Ïåðåîãðàíè÷åííûå çàäà÷è
Ìíîãèå ïðèêëàäíûå çàäà÷è ÿâëÿþòñÿ ïåðåîãðàíè÷åííûìè: ïîëüçîâàòåëü ââîäèò íàñòîëüêî ìíîãî îãðàíè÷åíèé, ÷òî ñòàíîâèòñÿ íåâîçìîæíûì óäîâëåòâîðèòü èõ
âñå îäíîâðåìåííî.  ýòèõ ñëó÷àÿõ íóæíî âíà÷àëå ïîêàçàòü, ÷òî ðåøåíèé íåò (âûÿñíåíèå ýòîãî ìîæåò çàíÿòü ìíîãî âðåìåíè), à çàòåì ðåøèòü, êàêèå èç îãðàíè÷åíèé
îñëàáèòü, ÷òîáû çàäà÷à ñòàëà ðàçðåøèìîé. Äëÿ ðåøåíèÿ ýòîé âòîðîé çàäà÷è ïðåäëàãàåòñÿ ïîïðîñèòü êîíå÷íîãî ïîëüçîâàòåëÿ íàéòè íåêîòîðûå ðåøåíèÿ, òàê, êàê
ýòî äåëàåòñÿ â èíòåðàêòèâíîì ðåøåíèè çàäà÷.  ðåçóëüòàòå ïîëó÷àåòñÿ èåðàðõèÿ
îãðàíè÷åíèé (ãäå âûøåñòîÿùèå îãðàíè÷åíèÿ ÿâëÿþòñÿ áîëåå âàæíûìè) [79], èëè
â áîëåå îáùåì ñëó÷àå èñïîëüçóþòñÿ ìÿãêèå îãðàíè÷åíèÿ [172], [154], [328], [334],
[68]. Òèïè÷íûìè ïåðåîãðàíè÷åííûìè çàäà÷àìè ÿâëÿþòñÿ çàäà÷è ñîñòàâëåíèÿ ðàñïèñàíèé, â êîòîðûõ îãðàíè÷åíèÿ èç ðàçíûõ èñòî÷íèêîâ (íàïðèìåð, äîñòóïíîñòü
àóäèòîðèé è ïðåäïî÷òåíèÿ ïðåïîäàâàòåëåé). Ñîâðåìåííûå ñèñòåìû ñîñòàâëåíèÿ
ðàñïèñàíèé èñïîëüçóþò êàê æåñòêèå, òàê è ìÿãêèå îãðàíè÷åíèÿ äëÿ ìîäåëèðîâàíèÿ è ðåøåíèÿ çàäà÷ ñîñòàâëåíèÿ ðàñïèñàíèé, êàê â University of Siegen, Germany
[53], à äðóãàÿ ñèñòåìà ñîñòàâëåíèÿ ðàñïèñàíèé ïî èíôîðìàòèêå â Òåõíè÷åñêîì
óíèâåðñèòåòå Ôëîðèäû èñïîëüçóåò äâà ýòàïà ÓÎ (ïåðâûé ýòàï íàçíà÷èòü ôàêóëüòåò êóðñàì, à âòîðîé ïðèïèñàòü âðåìåííûå èíòåðâàëû êóðñàì ëåêöèé) [72].
Åùå îäíà ñèñòåìà, ðåøàþùàÿ ïåðåîãðàíè÷åííûå çàäà÷è ñ ïîìîùüþ èåðàðõè÷åñêîé
ñèñòåìîé ÓÎ, èñïîëüçóåòñÿ â íàñòîÿùåå âðåìÿ â áîëüíèöå Neuwied äëÿ ðåøåíèÿ
çàäà÷è êàëåíäàðíîãî ïëàíèðîâàíèÿ ðàáîòû ìåäñåñòåð [280].
61
6.11. Äðóãèå îáëàñòè ïðèëîæåíèé
Ñëîæíàÿ çàäà÷à ïðîãíîçà ñòðóêòóðû áåëêà (îäíà èç íàèáîëåå âàæíûõ çàäà÷
âû÷èñëèòåëüíîé áèîëîãèè) ðåøàåòñÿ ñ ïîìîùüþ òåõíîëîãèè ËÏÎ [40]. Ýòà çàäà÷à
ñîñòîèò â íàõîæäåíèè ñòðóêòóðû áåëêà ñ ìèíèìàëüíîé ýíåðãèåé. Îêàçàëîñü, ÷òî
èñïîëüçîâàíèå îãðàíè÷åíèé ïîìîãàåò ñíèçèòü îáúåì ïîèñêà äëÿ ðåøåíèÿ ýòîé NPïîëíîé çàäà÷è.
Òåõíîëîãèÿ îãðàíè÷åíèé áûëà òàêæå èñïîëüçîâàíà Sony â íåñêîëüêèõ ïðèëîæåíèÿõ, ñâÿçàííûõ ñ ìóçûêîé [299].
7. Çàêëþ÷åíèå.
ÓÎ è ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ èíòåðåñíûå è ìíîãîîáåùàþùèå òåõíîëîãèè èñêóññòâåííîãî èíòåëëåêòà, ïîçâîëÿþùèå â ñî÷åòàíèè ñ ìåòîäàìè èññëåäîâàíèÿ îïåðàöèé ðåøàòü ñëîæíûå êîìáèíàòîðíûå çàäà÷è.
Àâòîð íàäååòñÿ, ÷òî äàííûé îáçîð, ïîñâÿùåííûé ÷ðåçâû÷àéíî èíòåðåñíîìó è
ïåðñïåêòèâíîìó íàïðàâëåíèþ èñêóññòâåííîãî èíòåëëåêòà, áóäåò èíòåðåñåí è ïîëåçåí ñïåöèàëèñòàì â îáëàñòè èñêóññòâåííîãî èíòåëëåêòà, èññëåäîâàíèÿ îïåðàöèé,
äèñêðåòíîé ìàòåìàòèêè, ñèñòåì ïîääåðæêè ïðèíÿòèÿ ðåøåíèé.
Ñïèñîê öèòèðóåìûõ èñòî÷íèêîâ
1.
2.
3.
4.
5.
6.
7.
8.
9.
Áðàòêî È. Àëãîðèòìû èñêóññòâåííîãî èíòåëëåêòà íà ÿçûêå Prolog, 3-å èçäàíèå / Ïåð.
ñ àíãë. Ì.: Èçäàòåëüñêèé äîì ¾Âèëüÿìñ¿, 2004. 640 ñ.
Áóëàòîâ À.À. Ïîëèíîìèàëüíîñòü ìàëüöåâñêèõ çàäà÷ CSP // Àëãåáðà è ëîãèêà. 2006.
Ò. 45. Ñ. 655686.
Ãýðè Ì., Äæîíñîí Ä. Âû÷èñëèòåëüíûå ìàøèíû è òðóäíîðåøàåìûå çàäà÷è. Ì.: Ìèð,
1982. 416 ñ.
Åìåëè÷åâ Â. À., Ìåëüíèêîâ Î. È., Ñàðâàíîâ Â. È., Òûøêåâè÷ Ð. È. Ëåêöèè ïî òåîðèè
ãðàôîâ. Èçä. 2-å, èñïð. Ì.: Êíèæíûé äîì ¾ËÈÁÐÎÊÎÌ¿, 2009. 392 ñ.
NeMo+: Îáúåêòíî-îðèåíòèðîâàííàÿ ñèñòåìà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ íà
îñíîâå íåäîîïðåäåëåííûõ ìîäåëåé / Ã.Á. Çàãîðóëüêî [è äð.] // Òð. øåñòîé íàö. êîíô.
ïî èñêóññòâåííîìó èíòåëëåêòó (ÊÈÈ'98). Ïóùèíî. 1998. Ñ. 524530.
Îáñòàíîâêà äëÿ ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ íà îñíîâå íåäîîïðåäåëåííûõ ìîäåëåé NeMo+ (ÿçûê, àðõèòåêòóðà, èíòåðôåéñ) / Ã.Á. Çàãîðóëüêî [è äð.] // Íàó÷íîòåõí. îò÷åò N 7 / Ðîññèéñêèé ÍÈÈ èñêóññòâåííîãî èíòåëëåêòà, Èíñòèòóò ñèñòåì
èíôîðìàòèêè èì. À. Ï. Åðøîâà ÑÎ ÐÀÍ. Ìîñêâà, Íîâîñèáèðñê, 1998. 107 ñ.
Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ è íåäîîïðåäåëåííûå ìîäåëè À.Ñ. Íàðèíüÿíè [è
äð.] // Èíôîðìàöèîííûå òåõíîëîãèè. 1998. N 7. Ñ. 1322.
Òåõíîëîãèÿ ðåøåíèÿ çàäà÷ â îáúåêòíî-îðèåíòèðîâàííîé ñðåäå ÍåÌî+ / À.À. Êóçíåöîâ [è äð.] // Ïÿòàÿ íàöèîíàëüíàÿ êîíôåðåíöèÿ ñ ìåæäóíàðîäíûì ó÷àñòèåì ¾Èñêóññòâåííûé èíòåëëåêò 96¿. Ñáîðíèê íàó÷íûõ òðóäîâ â òðåõ òîìàõ. Òîì III. Êàçàíü,
1996. Ñ. 408414.
Íàðèíüÿíè À.Ñ., Íàïðååíêî Â.Ã., Ñìèðíîâ Å.Ï. Êîìïüþòåðíàÿ ìîäåëü ýêîíîìèêè ðåãèîíà íà îñíîâå èíòåëëåêòóàëüíîé òåõíîëîãèè íîâîãî ïîêîëåíèÿ. Êîíöåïöèÿ,
62
òåõíîëîãèÿ è èíñòðóìåíòû ôîðìèðîâàíèÿ óïðàâëåí÷åñêèõ ðåøåíèé â ñîöèàëüíîýêîíîìè÷åñêîé è òåõíîëîãè÷åñêîé ñôåðàõ ñóáúåêòîâ Ðîññèéñêîé Ôåäåðàöèè. Èçäàíèå
ðàáî÷åé ãðóïïû ïî ñòðàòåãèè ðåãèîíàëüíîãî ðàçâèòèÿ è áåçîïàñíîñòè Ãîñóäàðñòâåííîãî Ñîâåòà Ðîññèéñêîé Ôåäåðàöèè. Ìîñêâà, 2005.
10. Ïåòðîâ Å.Ñ. Îïûò èíòåãðàöèè ëîãè÷åñêîãî ïðîãðàììèðîâàíèÿ è ïðîãðàììèðîâàíèÿ
â îãðàíè÷åíèÿõ // Ïðîãðàììèðîâàíèå. 1998. N 3. Ñ.4049.
11. Ïåòðîâ Å.Ñ., ßõíî Ò.Ì. Íåäîîïðåäåëåííûå ìîäåëè è ëîãè÷åñêîå ïðîãðàììèðîâàíèå:
ðåàëèçàöèÿ îãðàíè÷åíèé // Ïðîãðàììèðîâàíèå. 2001,  2. Ñ.60-67.
12. Ðàññåë Ñ., Íîðâèã Ï. Èñêóññòâåííûé èíòåëëåêò: ñîâðåìåííûé ïîäõîä. 2å èçä. / Ïåð. ñ àíãë. Ì.: Âèëüÿìñ, 2006. 1408 ñ. èìååòñÿ êîïèÿ:
http://rriai.org.ru/zadachi-udovletvoreniya-ogranicheniy.html
(äàòà
îáðàùåíèÿ 07.08.2010).
13. Ñàðàåâ À.Ä., Ùåðáèíà Î.À. Ñèñòåìíûé àíàëèç è ñîâðåìåííûå èíôîðìàöèîííûå òåõíîëîãèè // Òðóäû Êðûìñêîé àêàäåìèè íàóê. Ñèìôåðîïîëü: ÑÎÍÀÒ. 2006. Ñ. 47-59.
14. Ñåìåíîâ À.Ë. Ìåòîäû ðàñïðîñòðàíåíèÿ îãðàíè÷åíèé: îñíîâíûå êîíöåïöèè. Òðóäû
êîíôåðåíöèè ÈÌÐÎ-03. Íîâîñèáèðñê, 2003. Ñ. 19-31.
15. Ñèäîðîâ Â.À. Ïðîãðàììèðîâàíèå â îãðàíè÷åíèÿõ ñ ÷åðíûìè ÿùèêàìè. Íîâîñèáèðñê,
2003. 39 ñ. (Ïðåïð. / ÇÀÎ Ëåäàñ; N2).
16. Ñèäîðîâ Â.À. Ìåòîäû è ñðåäñòâà ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ äëÿ ñèñòåì àâòîìàòèçàöèè ïðîåêòèðîâàíèÿ: äèññ... êàíä. ôèç.-ìàò. íàóê (05.13.11 ìàòåìàòè÷åñêîå ìîäåëèðîâàíèå, ÷èñëåííûå ìåòîäû è êîìïëåêñû ïðîãðàìì). Íîâîñèáèðñê, Èí-ò
ñèñòåì èíôîðìàòèêè èì. À.Ï. Åðøîâà ÑÎ ÐÀÍ, 2007. 152 ñ.
17. Ñêâîðöîâ Å.Ñ. Îá ýôôåêòèâíûõ àëãîðèòìàõ äëÿ çàäà÷è CSP è èõ ïðîãðàììíîé ðåàëèçàöèè. Àâòîðåôåðàò äèññ... êàíä. ôèç.-ìàò. íàóê (05.13.18 ìàòåìàòè÷åñêîå ìîäåëèðîâàíèå, ÷èñëåííûå ìåòîäû è êîìïëåêñû ïðîãðàìì). Åêàòåðèíáóðã, Óðàëüñêèé
ãîñóäàðñòâåííûé óíèâåðñèòåò èì. À.Ì. Ãîðüêîãî, 2008. 24 ñ.
18. Òåëåðìàí Â.Â., Óøàêîâ Ä.Ì. Óäîâëåòâîðåíèå îãðàíè÷åíèé â çàäà÷àõ ìàòåìàòè÷åñêîãî ïðîãðàììèðîâàíèÿ // Âû÷èñëèòåëüíûå òåõíîëîãèè. 1998. Òîì 3,  2. Ñ. 45-53.
19. Óøàêîâ Ä.Ì., Òåëåðìàí Â.Â. Ñèñòåìû ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ (îáçîð)
// Ñèñòåìíàÿ èíôîðìàòèêà: Ñá. íàó÷. òð. Íîâîñèáèðñê: Íàóêà, 2000. Âûï.7: Ïðîáëåìû òåîðèè è ìåòîäîëîãèè ñîçäàíèÿ ïàðàëëåëüíûõ è ðàñïðåäåëåííûõ ñèñòåì. Ñ.
275-310.
20. Øâåöîâ È.Å., Íåñòåðåíêî Ò.Â. Ïðîåêòèðîâàíèå ñòàòè÷åñêèõ è äèíàìè÷åñêèõ ñèñòåì
ñðåäñòâàìè ïðîãðàììèðîâàíèÿ â îãðàíè÷åíèÿõ. // Òðóäû ìåæäóíàðîäíîé êîíôåðåíöèè ¾Ïðîáëåìû óïðàâëåíèÿ è ìîäåëèðîâàíèÿ â ñëîæíûõ ñèñòåìàõ¿. Ñàìàðà: Ñàìàðñêèé íàó÷íûé öåíòð ÐÀÍ, 1999. Ñ. 262-267.
21. Ùåðáèíà Î.À. Ýëèìèíàöèîííûå àëãîðèòìû äåêîìïîçèöèè çàäà÷ äèñêðåòíîé îïòèìèçàöèè // Òàâðè÷åñêèé âåñòíèê èíôîðìàòèêè è ìàòåìàòèêè. 2006. 2. Ñ. 28-41.
22. Ùåðáèíà Î.À. Ëîêàëüíûå ýëèìèíàöèîííûå àëãîðèòìû äëÿ çàäà÷ óäîâëåòâîðåíèÿ
îãðàíè÷åíèé // Òàâðè÷åñêèé âåñòíèê èíôîðìàòèêè è ìàòåìàòèêè. 2007. Âûï. 1. Ñ.
24-39.
23. Ùåðáèíà Î.À. Äðåâîâèäíàÿ äåêîìïîçèöèÿ è çàäà÷è äèñêðåòíîé îïòèìèçàöèè (îáçîð)
// Êèáåðíåòèêà è ñèñòåìíûé àíàëèç. 2007. 4. Ñ.102-118.
63
24. Ùåðáèíà Î.À. Ëîêàëüíûå ýëèìèíàöèîííûå àëãîðèòìû äëÿ ðåøåíèÿ íåêîòîðûõ çàäà÷ èñêóññòâåííîãî èíòåëëåêòà // Òðóäû 11 Íàöèîíàëüíîé êîíôåðåíöèè ïî èñêóññòâåííîìó èíòåëëåêòó (Äóáíà, 28 ñåíòÿáðÿ 3 îêòÿáðÿ 2008 ã.). Ì.: ËÅÍÀÍÄ, 2008.
Ò. 2. Ñ. 244-252. http:www.raai.org/cai-08/files/cai-08_paper_189.doc (äàòà îáðàùåíèÿ 07.08.2010)
25. Models and solution techniques for the frequency assignment problems / K.I. Aardal [et
al.] // Annals of Operations Research. 2007. Vol. 153. P. 79-129.
26. Abdennadher S., Schlenker H. INTERDIP an interactive constraint based nurse
scheduler // Proc. PACLP99, 1999.
http://www.pms.ifi.lmu.de/publikationen/PMS-FB/PMS-FB-1999-2/PMS-FB-1999-2.pdf
(äàòà îáðàùåíèÿ 07.08.2010)
27. Aggoun A., Beldiceanu N. Extending CHIP in order to solve complex scheduling and
placement problems // Mathl. Comput. Modelling. 1993. V. 17. P. 5773.
28. Aggoun A., Gloner Y., Simonis H. Global constraints for scheduling in CHIP. Invited
Industrial Presentation // JFPLC 99, 1999.
29. Allen J.F. Maintaining knowledge about temporal intervals // Comm. ACM. 1983. 26. P.
832843.
30. Allen J.F. Toward a general theory of action and time // Articial Intelligence. 1984.
V.23(2). P.123154.
31. Allen J.F. Natural Language Understanding. 2nd edition. Benjamin Cummings, 1994. 654
p.
32. Andersson K., Hjerpe T. Modeling Constraint Problems in CML // The Third
International Conference on the Practical Application of Constraint Technology
(PACT'98), London, 1998. P. 295312.
33. Appel K., Haken W. Every planar map is four colorable: Part I: Discharging // Illinois
J. Math. 1977. V. 21. P. 429-490.
34. Apt K. R. Principles of Constraint Programming. New York: Cambridge University Press,
2003. 407 p.
35. Apt K. R. The essence of constraint propagation // Theoretical Computer Science, 1999.
221(1-2). P. 179210.
36. New Trends in Constraints / K.R. Apt [et al.], eds. Joint ERCIM/Compulog Net
Workshop, October 1999, Selected papers, vol. 1865 of Lecture Notes in Computer Science,
Paphos, Cyprus. Springer-Verlag, 2000. 343 p.
37. Apt K.R., Wallace M. Constraint Logic Programming using Eclipse. New York: Cambridge
University Press, 2006. 329 p.
38. Arnborg S. Ecient algorithms for combinatorial problems on graphs with bounded
decomposability a survey // BIT. 1985. V. 25. P. 2-23.
39. Bacchus F., van Beek P. On the conversion between non-binary and binary constraint
satisfaction problems // Proceedings of the Fifteenth National Conference on Articial
Intelligence (AAAI-98). Madison: AAAI Press, 1998. P. 311-318.
40. Backofen R. The protein structure prediction problem: A constraint optimization
approach using a new lower bound // Constraints. 2001. V. 6. P. 223-255.
41. Multi-criteria comparison between algorithic, constraint logic and specic constraint
programming on a real scheduling problem / A. Bachelu [et al.] // Proc. PACT97, 1997.
64
42. Baker A.B. Intelligent backtracking on constraint satisfaction problems: Experimental
theoretical results. Ph.D. Thesis, Graduate School of the University of Oregon, 1995.
43. Baptiste P., Le Pape C., Peridy L. Global constraints for partial CSPs: a case- study of
resource and due date constraints // Proc. 4th Int. Conf. on Principles and Practice of
Constraint Programming (CP98). Springer-Verlag, LNCS 1520, 1998.
44. Baptiste P., Le Pape C., Nuijten W. Constraint-Based Scheduling: Applying Constraint
Programming to Scheduling Problems. Dordrecht: Kluwer Academic Publishers, 2001.
198 p.
45. Barnier N., Brisset P. Graph coloring for air trac ow management // Annals of
Operations Research. 2004. V.130. P. 163-178.
46. Bartak R. Theory and practice of constraint propagation // Proceedings of the Third
Workshop on Constraint Programming for Decision and Control (CPDC-0I). Poland,
Gliwice, 2001. P. 7-14.
47. Bartak R. Constraint Programming: In Pursuit of the Holy Grail // Proceedings of the
Week of Doctoral Students (WDS99), Part IV. Prague: MatFyzPress, 1999. P. 555-564.
48. Bartak R.Theory and Practice of Constraint Propagation // Proceedings of the 3rd
Workshop on Constraint Programming for Decision and Control (CPDC2001), Poland,
Gliwice: Wydavnictvo Pracovni Komputerowej, 2001. P. 7-14.
49. Bartak R. Constraint-based Scheduling: An Introduction for Newcomers. // Intelligent
Manufacturing Systems 2003. A Proceedings volume from the 7th IFAC Symposium /
L. Monostori, B. Kadar, G. Morel (eds.) (6-8 April, 2003, Budapest, Hungary). Elsevier
Science, 2003. P. 69-74.
50. Bartak R. Modelling soft constraints: A survey // Neural Network World. 2002. Vol. 12,
Number 5. P. 421-431,
51. Bartak R. Expert Systems Based on Constraints (in Czech, English abstract), Doctoral
Dissertation. Prague, Charles University, April 1997.
52. Baues G., Kay P., Charlier P. Constraint based resource allocation for airline crew
management // Proc. ATTIS'94, 1994.
53. Priority-driven constraints used for scheduling at universities / M. Baumgart [et al.]
// Proc. PACT97, 1997.
54. Bayardo R. J., Schrag R. C. Using CSP lookback techniques to solve real-world sat
instances // Proc. of the AAAI National Conference. 1997. P. 203208.
55. On the desirability of acyclic database schemes / C. Beeri [et al.] // Journal of the
Association for Computing Machinery. 1983. V. 30(3). P. 479-513.
56. Beldiceanu N., Contejean E. Introducing global constraints in CHIP // Journal of
Mathematical and Computer Modeling. 1994. V. 20. P. 97-123.
57. Partial search strategy in CHIP / N. Beldiceanu [et al.] // Proc. 2nd Int. Conf. on MetaHeuristics. France, Sophia-Antipolis, 1997.
58. Beldiceanu N. Global constraints as graph properties on structured network of elementary
constraints of the same type. Technical Report T2000/01, SICS, 2000.
59. Bellone J., Chamard A., Pradelles C. Plane an evolutive planning system for aircraft
production // Proc. 1st Int. Conf. on Practical Applications of Prolog (PAP92), 1992.
60. Belussi A., Bertino E., Catania B. Manipulating spatial data in constraint databases
// Proc. 5th Symp. on Spatial Databases. Springer-Verlag, LNCS 1262, 1997.
65
61. Benhamou F., Older W. Applying interval arithmetic to real, integer and boolean
constraints // Journal of Logic Programming. 1997. V. 32(1). P. 1-24.
62. Benhamou F., Van Hentenryck P. (eds.). Special Issue on Interval Constraints
// Constraints: An International Journal. 1997. V.2, N.2.
63. Berger R. Constraint-based gate allocation for airports // Proc. ILOG User- group
meeting, 1995.
64. Bertele U., Brioschi F. Nonserial Dynamic Programming. New York: Academic Press,
1972. 235 p.
65. An optimal coarse-grained arc consistency algorithm / C. Bessiere [et al.] // Articial
Intelligence. 2005. V. 165. P. 165185.
66. Bessiere C. Constraint propagation. Chapter 4 in Rossi F., van Beek P., Walsh T. (Eds.)
Handbook of Constraint Programming. Elsevier, 2006. P. 29-83
67. Biggs N.L., Lloyd E.K., Wilson R.J. Graph Theory 1736-1936. Oxford: Oxford University
Press, 1976. 239 p.
68. Bistarelli S., Montanari U., Rossi F. Semiring-based constraint solving and optimization
// Journal of the ACM. 1997. 44. P. 201-236.
69. Bistarelli S., Montanari U., Rossi F. Semiring-based Constraint Logic Programming
// Proc. IJCAI97. Morgan Kaufman, 1997.
70. Semiring-based CSPs and valued CSPs: Frameworks, properties and comparison
/ S. Bistarelli [et al.] // Constraints. 1999. V. 4. P. 199240.
71. Bitner J. R., Reingold E. M. Backtrack programming techniques // Communications of
the Association for Computing Machinery. 1975. 18(11). P. 651-656.
72. Blanco J.J., Khatib L. Course scheduling as a constraint satisfaction problem // Proc.
PACT98, 1998.
73. Bliek C., Neveu B., Trombettoni G. Using graph decomposition techniques for solving
continuous CSPs // Proc. 4th Int. Conf. on Principles and Practice of Constraint
Programming (CP98), Springer-Verlag, LNCS 1520, 1998. P. 102-116.
74. Blum A., Furst M. Fast planning through planning graph analysis // Articial
Intelligence. 1997. V. 90. P.281300.
75. Bodirsky M., Nes etril J. Constraint satisfaction with countable homogeneous templates
// Journal of Logic and Computation. 2006. V. 16. P. 359373.
76. Bohler E., Hemaspaandra E., Reith S., and Vollmer H. The complexity of Boolean
constraint isomorphism // STACS 2004 (Montpellier, 2004), LNCS 2996. Berlin: Springer,
2004. P. 164-175.
77. Quantied constraints: Algorithms and complexity / F. Borner [et al.] // Computer
Science Logic (Vienna, 2003), Lecture Notes in Comput. Sci. 2803, Berlin: Springer, 2003.
P. 58-70.
78. Borning A. The programming language aspects of thinglab, a constraint oriented
simulation laboratory // ACM Transaction on Programming Languages and Systems.
1981. V. 3(4). P. 353387.
79. Borning A., Maher M., Martindale A., Wilson M. Constraint hierarchies and logic
programming // Proc. 6th International Conference on Logic Programming / M. Martelli,
G. Levi (eds.). cambridge: MIT Press, 1989. P. 149-164.
66
80. Borning A., Freeman-Benson B.N. The OTI constraint solver: a constraint library for
constructing graphical user interfaces // Proceedings 1st Int. Conference on Principles
and Practice of Constraint Programming (CP95). Springer-Verlag, LNCS 976, 1995.
81. Brailsford S.C., Potts C.N., Smith B.M. Constraint satisfaction problems: Algorithms and
applications // European Journal of Operational Research. 1999. V. 119. P. 557-581.
82. Brelaz D. New methods to color the vertices of a graph // Communications of the
Association for Computing Machinery. 1979. 22(4). P. 251-256.
83. Brodsky A. Constraint databases: Promising technology or just intellectual exercise?
// Constraints: An International Journal. 1997. V. 2. P. 35-44.
84. Brodsky A., Jaar J., Maher M. Toward practical query evaluation for constraint
databases // Constraints: An International Journal, 1997. V. 2. P. 279-304.
85. Brooke A., Kendrick D., Meeraus A. GAMS: A Users' Guide. Danvers: The Scientic
Press, 1988.
86. Bruynooghe M. Solving combinatorial search problems by intelligent backtracking
// Inform. Process. Lett. 1981. V. 12. P. 3639.
87. Bruynooghe M. Graph Coloring and Constraint Satisfaction. Technical Report CW- 44.
Kathioleke Universiteit Leuven: Department Computerwtenschappen, 1985.
88. Bruynooghe M. Enhancing a search algorithm to perform intelligent backtracking
// Theory Pract. Log. Program. 2004. V. 4. P. 371-380.
89. Bulatov A., Dalmau V. Mal'tsev constraints are tractable // SIAM J. on Computing.
2006. V. 36(1). P. 16-27.
90. Bulatov A., Krokhin A., Jeavons P. Classifying the complexity of constraints using nite
algebras // SIAM Journal on Computing. 2005. V. 34(3). P. 720-742.
91. Bulatov A., Krokhin A., Jeavons P. The complexity of maximal constraint languages
// Proceedings 33rd ACM Symposium on Theory of Computing (STOC'01), 2001.
P. 667674.
92. Bulatov A. Mal'tsev Constraints are Tractable. Technical Report PRG-02-05, Computing
Laboratory, Oxford University, 2002.
93. Bulatov A., Jeavons P.G. Tractable Constraints Closed under a Binary Operation.
Technical Report PRG-TR-12-00. Oxford, University of Oxford, Computing Laboratory,
2002.
94. Bulatov A. Tractable conservative constraint satisfaction problems // Proceedings of the
18th Annual IEEE Simposium on Logic in Computer Science, (LICS'03), 2003. P. 321330.
95. Bulatov A., Dalmau V. Towards a dichotomy theorem for the counting constraint
satisfaction problem // Proceedings 44rd IEEE Symposium on Foundations of Computer
Science, FOCS'03, Boston, 2003, P. 562571.
96. Bulatov A., Dalmau V. A Simple Algorithm for Mal'tsev Constraints // SIAM J. Comput.
2006. V. 36. P. 16-27.
97. Buscemi M.G., Montanari U. A survey of constraint-based programming paradigms
// Computer Science Review. 2008. V. 2. P. 137-141.
98. Cabon B., de Givry S., Verfaille G. Anytime lower bounds for constraint violation
minimization problems // Proc. 4th Int. Conf. on Principles and Practice of Constraint
Programming (CP98). Springer-Verlag, LNCS 1520, 1998.
67
99. Carlsson M., Widen J. SICStus Prolog User's Manual. Technical report, Swedish Institute
of Computer Science (SICS), 1999. on-line version at http://www.sics.se/sicstus/
(äàòà îáðàùåíèÿ 07.08.2010).
100. Carro M., Hermenegildo M. Some design issues in the visualization of constraint program
execution // Proc. Joint Conference on Declarative Programming (AGP'98), 1998.
101. Caseau Y., Laburthe F. Improved CLP scheduling with task intervals // Proceedings of
the Eleventh International Conference on Logic Programming. Santa Margherita Ligure,
1994. P. 369383.
102. Chan P., Heus K., Veil G. Nurse scheduling with global constraints in CHIP: Gymnaste
// Proc. PACT98, 1998.
103. Chan P. La planication du personnel: acteurs, actions et termes multiples pour une
planication operationelle des personnes. PhD thesis, Universite Joseph Fourier, Grenoble
1. TIMC-IMAG, October 2002.
104. Cheeseman P., Kanefsky B., Taylor W. Where the really hard problems are
// Proceedings of the Twelfth International Joint Conference on Articial Intelligence
(IJCAI-91). Morgan Kaufmann, 1991. P. 331-337.
105. Chew T., David J.-M. A constraint-based spreadsheet for cooperative production
planning // Proc. AAAI SIGMAN workshop on knowledge-based production planning,
scheduling and control, 1992.
106. Chmeiss A., Jegou P. Path-consistency: when space misses time // Proceedings of the
13th National Conference on Articial Intelligence. Portland, 1996. P. 196201.
107. Chow K.P., Perrett M. Airport counter allocation using constraint logic programming
// Proc. Third International Conference on Constraint Technology (PACT97). London,
1997.
108. Stand allocation with constraint technologies at Chek Lap Kok international airport
/ A.H.W. Chun [et al.] // Proc. The First International Conference and Exhibition on
The Practical Application of Constraint Technologies and Logic Programming PACLP99
(19th -21 April 1999), Commonwealth Conference and Events Centre, London, 1999. P.
131-136.
109. Codognet P., Diaz D. Compiling constraints in clp(fd) // Journal of Logic Programming.
1996. V. 27. P. 185-226.
110. Cohen D.A., Gyssens M., Jeavons P.D. Derivation of constraints and database relations
// Proceedings 2nd Int. Conference on Principles and Practice of Constraint Programming
(CP96). Springer-Verlag, LNCS 1118, 1996. P. 134-148.
111. Cohen D.A., Jeavons P., Koubarakis M. Tractable disjunctive constraints. // Proc. 3rd
Int. Conf. on Principles and Practice of Constraint Programming (CP97). Springer-Verlag,
LNCS 1330, 1997. P. 478-490.
112. Cohen D.A., Jeavons P.G., Jonsson P., Koubarakis M. Building tractable disjunctive
constraints // Journal of the ACM. 2000. V. 47. P. 826853.
113. Cohen D., Jeavons P., and Gault R. New tractable constraint classes from old
// Exploring Articial intelligence in the New Millennium / G. Lakemeyer and B. Nebel
(eds.). San Francisco: Morgan Kaufmann Publishers, 2003. P. 331-354.
114. Cohen D.A., Jeavons P.D. The complexity of constraint languages. // Handbook of
Constraint Programming, chapter 8. / F. Rossi, P. van Beek, and T. Walsh (eds.). Elsevier,
2006.
68
115. Cohen D.A., Jeavons P.D., Gyssens M. A unied theory of structural tractability for
constraint satisfaction problems // Journal of Computer and System Sciences. 2008. V.
74. P. 721-743.
http://www.comlab.ox.ac.uk/activities/constraints/publications/JCSSspreadcut.pdf
(äàòà îáðàùåíèÿ 07.08.2010)
116. Cohen J. Logic Programming and Constraint Logic Programming // Computer Science
Handbook / editor-in-chief A.B. Tucker. 2nd ed. Chapman & Hall/CRC, 2004. Chapter
93.
117. Collavizza H., Delobel F., Rueher M. A note on partial consistency over continuous
domains // Proc. 4th Int. Conf. on Principles and Practice of Constraint Programming
(CP98). Springer-Verlag, LNCS 1520, 1998. P. 147-161.
118. Collignon C. Gestion optimisee de ressources humaines pour l'audiovisuel // Proc. CHIP
users' club, 1996.
119. Colmerauer A. Opening the Prolog-III universe // BYTE magazine. 1987. V. 12. P.177182.
120. Colmerauer A. An introduction to Prolog-III // Communication of the ACM. 1990. V.
33. P. 69-90.
121. Cooper M.C., Cohen D.A., Jeavons P.G. Characterising tractable constraints // Articial
Intelligence. 1994. V. 65. P. 347361.
122. Cooper M.C., Jeavons P.D., Salamon A.Z. Hybrid tractable CSPs which generalize
tree structure // Proceedings of the 18th European Conference on Articial Intelligence
(ECAI 2008) / M. Ghallab [et al.] eds, (July 2125, Patras, Greece). Vol.
178 of Frontiers in Articial Intelligence and Applications. IOS Press, 2008. P.
530534 http://www.gaon.net/andras/academic/cjs-ecai2008.pdf (äàòà îáðàùåíèÿ 07.08.2010)
123. COSYTEC, CHIP C library. COSYTEC SA, Parc Club Orsay Universite, 1995.
124. Constraint-based Maintenance Scheduling on an Electric Power-Distribution Network
/ T. Creemers [et al.] // Proc. of the 3rd International Conference and Exhibition on
Practical Applications of Prolog. Paris: Alinmead Software Ltd. April, 1995. P. 135-144.
125. Creignou N., Khanna S., Sudan M. Complexity Classication of Boolean Constraint
Satisfaction Problems, volume 7 of SIAM Monographs on Discrete Mathematics and
Applications. Philadelphia: SIAM, 2001.
126. Dalmau V. A new tractable class of constraint satisfaction problems // Annals of
Mathematics and Articial Intelligence. 2005. V. 44(1-2). P. 61-85.
127. Constraint logic programming and integer programming approaches and their
collaboration in solving an assignment scheduling problem / K. Darby-Dowman [et al.]
// Constraints: An International Journal. 1997. V. 1. P. 245264.
128. Davis M., Putnam H. A computing procedure for quantication theory. // Journal of
the ACM. 1960. V. 7. P.201-215.
129. de Boer F., Gabbrielli M., Meo M.C. Semantics and expressive power of a timed
concurrent constraint language // Proc. Third Int'l Conf. on Principles and Practice of
Constraint Programming (CP 97) / G. Smolka (ed.). LNCS 1330. Berlin: Springer-Verlag,
1997. P. 4761.
69
130. de Kleer J. A comparison of ATMS and CSP techniques // Proceedings of the Eleventh
International Joint Conference on Articial Intelligence (IJCAI-89), Vol. 1. Detroit:
Morgan Kaufmann, 1989. P. 290-296.
131. Dechter R. A Constraint-Network Approach to Truth-Maintenance. Technical Report
R-80. Cognitive Systems Laboratory, University of California, Computer Science
Department, 1987.
132. Dechter R., Dechter A. Belief maintenance in dynamic constraint networks
// Proceedings of The 7th National Conference on Articial Intelligence. St Paul,
Minnesota, 1988. P. 3742.
133. Dechter R. Enhancement schemes for constraint processing: Backjumping, learning and
cutset decomposition // Articial Intelligence. 1990. V. 41. P. 273-312.
134. Dechter R. On the expressiveness of networks with hidden variables // Proceedings of
the Eighth National Conference on Articial Intelligence (AAAI-90). Boston: MIT Press,
1990. P. 379-385,.
135. Dechter R. Constraint networks // Encyclopedia of Articial Intelligence (2nd edition)
/ S. Shapiro (ed.). New York: Wiley and Sons, 1992. P. 276-285
136. Dechter R. From local to global consistency // Articial Intelligence. 1992. V. 55. P.
87-107.
137. Dechter R. Bucket elimination: a unifying framework for processing hard and soft
constraints // Constraints. 1997. V. 2. P. 51-55.
138. Dechter R., Frost D. Backtracking algorithms for constraint satisfaction problems.
Tech.rep., University of California, Department of Information and Computer
Science, 1999.http://www.ics.uci.edu/~csp/r56-backtracking.pdf (äàòà îáðàùåíèÿ 07.08.2010)
139. Dechter R., Meiri I. Experimental evaluation of preprocessing techniques in constraint
satisfaction problems // Articial Intelligence. 1994. V. 68. P. 211-241.
140. Dechter R., Pearl J. Network-based heuristics for constraint-satisfaction problems
// Articial Intelligence. 1987. 34(1). P. 1-38.
141. Dechter R., Pearl J. Tree clustering for constraint networks // Articial Intelligence.
1989. 38(3). P. 353-366.
142. Dechter R. Constraint processing. San Francisco: Morgan Kaufmann, 2003. 481 p.
143. De Givry S., Verfaille G., Schiex T. Bounding the optimum of constraint optimization
problems // Proc. CP97 / G. Smolka (ed.). Springer-Verlag, LNCS 1330, 1997. P. 405-419.
144. The modelling language Zinc / M.G. de la Banda [et al.] // Principles and Practice of
Constraint Programming CP 2006. LNCS 4204. Springer, 2006. P. 700705.
145. To the Gates of HAL: a HAL tutorial / G.M. de la Banda // 6th International Conference
on Functional and Logic Programming (FLOPS), Japan, 2002.
146. Denecke K., Wismath S.L. Universal Algebra and Applications in Theoretical Computer
Science. Chapman and Hall/CRC Press, 2002. 383 p.
147. An overview of HAL / B. Demoen [et al.] // International Conference on Principles and
Practice of Constraint Programming, CP99. Alexandria, 1999. P. 174-188.
148. Deville Y., Jansenn M., Van Hentenryck P. Consistency techniques in ordinary
dierential equations // Proc. 4th Int. Conf. on Principles and Practice of Constraint
Programming (CP98), LNCS 1520. Springer-Verlag, 1998. P. 162-176.
70
149. The constraint logic programming language CHIP / M. Dincbas [et al.] // Proc.
International Conference on Fifth Generation Computer Systems (FGCS). Berlin
Heidelberg New York: Springer, 1988. P. 693-702.
150. Applications of CHIP to industrial and engineering problems / M. Dincbas [et al.]
// First International Conference on Industrial and Engineering Applications of Articial
Intelligence and Expert Systems, Tullahoma, Tennessee, 1988. P.885-892.
151. Dincbas M., Simonis H. Apache a constraint based, automated stand allocation system
// Proc. of Advanced Software technology in Air Transport (ASTAIR'91). London, UK:
Royal Aeronautical Society, 1991. P. 267-282.
152. Doyle J. A truth maintenance system // Articial Intelligence. 1979. 12(3). P. 231-272.
153. Dresse A. A constraint programming library dedicated to timetabling // Proc. ILOG
User-group meeting, 1995.
154. Dubois D., Fargier H., Prade H. The calculus of fuzzy restrictions as a basis for exible
constraint satisfaction // Proc. IEEE International Conference on Fuzzy Systems. IEEE,
1993. P. 1131-1136.
155. Dubos A., Du Jeu A. Application EPPER planication des ageents roulaants // Proc.
CHIP users' club, 1996.
156. Dunkin N., Allen S.M. Frequency assignment problems: Representations and solutions.
Technical Report CSD-TR-97-14. Royal Holloway: University of London, 1997.
157. Towards High Order Constraint Representations for the Frequency Assignment Problem
/ N.W. Dunkin [et al.]. Technical Report CSD-TR-98-05, Royal Holloway, University
of London, June 1998. ftp://ftp.cs.rhul.ac.uk/pub/constraints/CSD-TR-98-05.ps
(äàòà îáðàùåíèÿ 07.08.2010)
158. The ECLiPSe Library Manual Release 5.0.
http://www.win.tue.nl/~setalle/lp/eclipse-doc/libman/libman.html,2000 (äàòà
îáðàùåíèÿ 07.08.2010)
159. Even S. Graph Algorithms. Potomac: Computer Science Press, 1979.
160. Fargier H., Lang J., Schiex T. Selecting preferred solutions in fuzzy constraint satisfaction
problems // Proc. 1st European Ccongress on Fuzzy and Intelligent Technologies
(EUFIT), 1993.
161. Feder T., Vardi M.Y. The computational structure of monotone monadic SNP and
constraint satisfaction: A study through Datalog and group theory // SIAM Journal
of Computing. 1998. V. 28(1). P. 57104.
162. Fikes R. A heuristic program for solving problems stated as non-deterministic
procedures. Ph.D. dissertation, Comput. Sci. Dept., Carnegie-Mellon Univ. Pittsburgh,
1968.
163. Filkhorn T., Schneider H.-A., Scholz A., Strasser A., and Warkentin P. SVE system
verication environment. Technical report, Siemens AG, Technical report SVE, ZFE BT
SE, 1995.
164. Constraint logic programming for the crew rostering problem / F. Focacci [et al.] // Proc.
PACT97, 1997.
165. Ecient graph automorphism by vertex partitioning / G. Fowler [et al.] // Articial
Intelligence. 1983. V. 21. P. 245269.
71
166. Fox M.S. Constraint-Directed Search: A Case Study of Job-Shop Scheduling. Pitman:
Morgan Kaufmann, 1987. 184 p.
167. Freuder E. C. Synthesizing constraint expressions // Communications of the Association
for Computing Machinery. 1978. 21(11). P. 958-966.
168. Freuder E. C. A sucient condition for backtrack-free search // Journal of the ACM.
1982. 29(1). P. 24-32.
169. Freuder E. C. A sucient condition for backtrack-bounded search // Journal of the
ACM. 1985. 32(4). P. 755-761.
170. Freuder E. C. Backtrack-free and backtrack-bounded search // Search in Articial
Intelligence / L. Kanal , V. Kumar (eds.). Springer-Verlag, 1988. P. 343-369.
171. Freuder E. C., Mackworth A. K. Constraint satisfaction: An emerging paradigm
// Foundations of Articial Intelligence. 2006. V. 2. P. 13-27.
172. Freuder E. C., Wallace R. J. Partial constraint satisfaction // Articial Intelligence.
1992. V. 58. P. 21-70.
173. Freuder E. C., Wallace R. J. Suggestion strategies for constraint-based matchmaker
agents // Proc. 4th Int. Conf. on Principles and Practice of Constraint Programming
(CP98). Springer-Verlag, LNCS 1520, 1998.
174. Fromherz M., Gupta V., Saraswat V. Model-based computing: constructing constraintbased software for electro-mechanical systems // Proc. Conf. on Practical Applications
of Constraint Technology (PACT95). Paris, 1995. P. 63-66.
175. Fr
uhwirth T. Constraint simplication rules // Constraint Programming: Basics and
Trends / A. Podelski, ed. Springer-Verlag, LNCS 910, 1995.
176. Fr
uhwirth T., Abdennadher S. Essentials of Constraint Programming. Springer, 2003.
144 p.
177. Fr
uhwirth T., Brisset P. Optimal planning of digital cordless telecommunication systems
// Proc. PACT97, 1997.
178. Fuchs N., Schwitter R. Attempto controlled English (ACE) // Proc. of 1st International
Workshop on Controlled Language, 1996.
179. Gaschnig J. A constraint satisfaction method for inference making // Proceedings
Twelfth Annual Allerton Conference on Circuit and System Theory. Illinois, Monticello,
1974. P. 866874.
180. Gaschnig J. A general backtrack algorithm that eliminates most redundant tests
// Proceedings of the Fifth International Joint Conference on Articial Intelligence
(IJCAI-77) Cambridge, 1977. P. 457.
181. Gaschnig J. Performance measurement and analysis of certain search algorithms.
Technical report CMU-CS-79-124. Carnegie-Mellon University, Computer Science
Department, 1979.
182. Extending CLP(FD) with interactive data acquisition for 3D visual object recognition
/ M. Gavanelli [et al.] // Proc. PACLP99, 1999.
183. Gecode: Generic Constraint Development Environment. http://www.gecode.org (äàòà
îáðàùåíèÿ 07.08.2010).
184. Georget Y., Codognet P., Rossi F. Constraint retraction in clp(fd): Formal framework
and performance results // Constraints: An International Journal. 1999. V. 4.
72
185. Georget Y., Codognet P. Compiling semiring-based constraints with clp(fd,s) // Proc.
CP98 / M. Maher, J-F.Puget (eds.). Springer-Verlag, LNCS 1520, 1998.
186. Gervet C. Conjunto: Constraint logic programming with nite set domains // Logic
Programming Proc. of the 1994 International Symposium / M. Bruynooghe, ed.
Cambridge: The MIT Press, 1994. P. 339358.
187. Gervet C., Caseau Y., and Montaut D. On rening ill-dened constraint problems: A
case study in iterative prototyping // Proc. PACLP99, 1999.
188. Ginsberg M. L. Essentials of Articial Intelligence. San Mateo: Morgan Kaufmann, 1993.
430 p.
189. Ginsberg M.L. Dynamic Backtracking // Journal of Articial Intelligence Research.
1993. v. 1. P. 25-46.
190. Ginsberg M.L., McAllester D.A. GSAT and dynamic backtracking // Proceedings of The
4th International Conference on Principles of Knowledge Representation and Reasoning,
1994.
191. Glaisner F., Richard L.-M. FORWARD-C: A renery scheduling system // Proc.
PACT97, 1997.
192. Goldin D.Q., Kanellakis P. Constraint query algebras // Constraints: An International
Journal. 1996. V.1. P. 45-84.
193. Goltz H.-J., Matke D. Combined interactive and automatic timetabling // Proc.
PACLP99, 1999.
194. Gomes C.P. Articial intelligence and operations research: challenges and opportunities
in planning and scheduling // Knowl. Eng. Rev. 2000. V. 15. P. 1-10.
195. Gottlob G., Leone N., Scarcello F. A comparison of structural CSP decomposition
methods // Proceedings of the Sixteenth International Joint Conference on Articial
Intelligence (IJCAI-99). Stockholm: Morgan Kaufmann, 1999. P. 394-399.
196. Gottlob G., Leone N., Scarcello F. Hypertree decompositions and tractable queries
// Proceedings of the 18th ACM International Symposium on Principles of Database
Systems. Philadelphia: Association for Computing Machinery, 1999. P. 21-32.
197. Gottlob G., Leone N., Scarcello F. Hypertree decomposition and tractable queries
// Journal of Computer and System Sciences. 2002. V. 64 (3). P. 579627.
198. Grohe M. The structure of tractable constraint satisfaction problems // Proceedings of
the 31st Symposium on Mathematical Foundations of Computer Science, LNCS 4162.
Springer-Verlag, 2006. P. 5872.
199. Dedale: A spatial constraint database / S. Grumbach [et al.] // Proc. Intl. Workshop on
Database Programming Languages (DBPL'97). Estes Park, Colorado, USA, 1994.
200. Gu J. Parallel Algorithms and Architectures for Very Fast AI Search. Ph.D. thesis,
University of Utah,1989.
201. Gyssens M., Jeavons P.G., Cohen D.A. Decomposing constraint satisfaction problems
using database techniques // Articial Intelligence. 1994. V. 66. P. 57-89.
202. Han C., Lee C. Comments on Mohr and Henderson's path consistency algorithm
// Articial Intelligence. 1988. V. 36. P. 125130.
203. Haralick R. M., Elliot G. L. Increasing tree search eciency for constraint satisfaction
problems // Articial Intelligence. 1980. V. 14(3). P. 263-313.
73
204. Programming languages for distributed applications / S. Haridi [et al.] // New
Generation Computing. 1998. V.16. P. 223-261.
205. Haridi S., Janson S. Kernel Andorra Prolog and its computational model // Proc.
ICLP90. MIT Press, 1990.
206. Harvey W., Ginsberg M. Limited discrepancy search // Proc. IJCAI95, 1995.
207. Henz M., Smolka G., Wurtz J. Oz a programming language for multiagent systems
// 13th International Joint Conference on Articial Intelligence / Ruzena Bajcsy, ed. vol.
1. Morgan Kaufmann Publishers, 1993. P. 404-409.
208. Hermenegildo M. and the CLIP group. Some methodological issues in the design of
CIAO, a generic, parallel concurrent constraint system // Proceedings of the Second
International Workshop on Principles and Practice of Constraint Programming, May 0204, 1994. Springer-Verlag, LNCS 874, 1994. P. 123-133.
209. Hicks I.V., Koster A.M.C.A., Kolotoglu E. Branch and tree decomposition techniques
for discrete optimization // Tutorials in Operations Research. New Orleans: INFORMS,
2005. P.1-29. http://ise.tamu.edu/people/faculty/Hicks/bwtw.pdf (äàòà îáðàùåíèÿ 07.08.2010)
210. Hobby D., McKenzie R.N. The Structure of Finite Algebras, volume 76 of Contemporary
Mathematics. Providence: American Mathematical Society, 1988. 203 p.
211. Hooker J.N., Yan H. Verifying logic circuits by Benders decomposition // Principles
and Practice of Constraint Programming / V.A. Saraswat, P. van Hentenryck (eds.)
Cambridge: MIT Press, 1994.
212. Hooker J.N., Ottosson G., Thorsteinsson E.S., and Kim H.-J. A scheme for unifying
optimization and constraint satisfaction methods // The Knowledge Engineering Review.
2000. V.15, N.1. P. 11-30.
213. Hooker J.N. Logic-Based Methods for Optimization: Combining Optimization and
Constraint Satisfaction. New York: Wiley, 2000. 495 p.
214. Hower W. Constraint satisfaction Algorithms and complexity analysis // Information
Processing Letters. 1995. Volume 55 (3). P. 171-178.
215. Hyvonen E. Interval constraints spreadsheets for nancial planning // Proc. 1st Int.
Conf. on Articial Intelligence Applications on Wall Street. IEEE Computer Society Press,
1991.
216. ILOG SOLVER: Object oriented constraint programming. ILOG SA, 12, Av. Raspail,
BP 7, 94251 Gentilly cedex, France, 1995.
217. ILOG Scheduler. http://www.ilog.fr/products/scheduler/
218. Istrate G. Counting, structure identication and maximum consistency for binary
constraint satisfaction problems // Proceedings 3rd Int. Conference on Principles and
Practice of Constraint Programming / G. Smolka (ed.). Springer-Verlag, LNCS 1330,
1997. P. 136-149.
219. Jackson D. Software Abstractions: Logic, Language, and Analysis. Cambridge: The MIT
Press, 2006. 366 p.
220. Jaar J., Lassez J.L. Constraint logic programming // Proc. 14th ACM Symp. Principles
Programming Lang. POPL-87, Munich, ACM Press, 1987. P. 111119.
221. Jaar J., Maher M.J. Constraint logic programming: A survey // Journal of Logic
Programming. 1994. V. 19. P. 503-581.
74
222. The CLP(R) Language and System / J. Jaar // ACM Transactions on Programming
Languages and Systems. 1992. V. 14. P. 339-395.
223. Jampel M. (ed.) Over-Constrained Systems. Springer-Verlag, LNCS 1106, 1996.
224. Janson S. AKL A Multiparadigm Programming Language. PhD thesis, Uppsala Theses
in Computer Science 19, Uppsala University, and SICS Dissertation Series 14, 1994.
225. Jeavons P.G. On the algebraic structure of combinatorial problems
//
Theoretical
Computer
Science.
1998.
V.
200.
P.
185-204.
ftp://ftp.cs.rhul.ac.uk/pub/constraints/algebraic.ps
(äàòà
îáðàùåíèÿ
07.08.2010)
226. Jeavons P.G. Constructing constraints // Proc. 4th Int. Conf. on Principles and
Practice of Constraint Programming (CP98). Springer-Verlag, LNCS 1520, 1998. P. 216. ftp://ftp.cs.rhul.ac.uk/pub/constraints/constructing.ps (äàòà îáðàùåíèÿ
07.08.2010)
227. Jeavons P.G., Cohen D.A., Gyssens M. Closure properties of constraints // Journal of
ACM. 1997. V. 44. P. 527-548.
228. Jeavons
P.G.,
Cohen
D.A.,
Cooper
M.C.
Constraints,
consistency
and
closure
//
Articial
Intelligence.
1998.
V.
101.
P.
251265.
ftp://ftp.cs.rhul.ac.uk/pub/constraints/conconclo.ps
(äàòà
îáðàùåíèÿ
07.08.2010)
229. Jeavons P.G., Cohen D.A. An algebraic characterization of tractable constraints // Proc.
of Computing and Combinatorics (COCOON'95). Springer-Verlag, LNCS 959, 1995. P.
633-642.
230. Jeavons P.G., Cohen D.A., Gyssens M. A unifying framework for tractable constraints
// Proc. 1st Int. Conf. on Principles and Practice of Constraint Programming (CP95),
Springer-Verlag, LNCS 976, 1995. P. 276-291.
231. Jeavons P.G., Cohen D.A., Gyssens M. How to determine the expressive power of
constraints // Constraints: An international Journal 1999. V. 4. P. 113131.
232. Jeavons P.G., Cohen D.A., Gyssens M. A test for tractability // Proc. 2nd Int. Conf.
on Principles and Practice of Constraint Programming (CP96). Springer-Verlag, LNCS
1118, 1996. P. 267-281
233. Jeavons P.G., Cooper M.C. Tractable constraints on ordered domains // Articial
Intelligence. 1995. 79(2). P. 327339,
234. Jonsson P., Krokhin A. Recognizing frozen variables in constraint satisfaction problems
// Theoret. Comput. Sci. 2004. V. 329 (13). P. 93113.
235. Kam R.W.L., Lee J.H.M. Fuzzifying the constraint hierarchies framework // Proc. 4th
Int. Conf. on Principles and Practice of Constraint Programming (CP98). Springer-Verlag,
LNCS 1520, 1998.
236. Kanellakis P., Goldin D.Q. Constraint programming and database query languages
// Proc. Int. Symp. on Theoretical Aspects of Computer Software. Springer-Verlag, LNCS
789, 1994. P. 96-120.
237. Kanellakis P., Kuper G., Revesz P. Constraint query languages // Journal of Computer
and System Sciences. 1995. V. 51. P. 25-52.
238. Katsirelos G., Bacchus F. Generalized NoGoods in CSPs // Proc. of 20th AAAI, 2005.
P. 390396.
75
239. Katsirelos G. Nogood Processing in CSPs. Phd thesis. University of Toronto, 2008.
240. Kautz H., Selman B. Planning as Satisability // Proceedings of European Conference
on Articial Intelligence ECAI-92 (Vienna, 1992). Chichester: John Wiley and Sons, 1992.
P. 359-363.
241. The approximability of constraint satisfaction problems / S. Khanna [et al.] // SIAM J.
Comput. 2000. V. 30(6). P. 1863-1920.
242. Estimating search tree size / P. Kilby [et al.] // Proceedings of AAAI-2006. 2006. P.
1014-1019.
243. Kirkpatrick S., Gelatt C. D., Vecchi M. P. Optimization by simulated annealing
// Science. 1983. V. 220. P. 671-680.
244. Kirousis L., Kolaitis Ph. A dichotomy in the complexity of propositional circumscription
// Logic in Computer Science (Boston, MA, 2001). IEEE Comput. Soc., 2001. P. 71-80.
245. Knuth D. Estimating the eciency of backtrack programs // Mathematics of
Computation. 1975. V. 29(129). P. 121-136.
246. Kokkoras F., Gregory S. D-WMS: Distributed workforce management using CLP
// Proc. 4th Int. Conference on the Practical Applications of Constraint Technology
(PACT'98). London, UK, 25-27 March, 1998. P. 129-146.
247. Kolaitis P., Vardi M. Conjunctive-query containment and constraint satisfaction
// Journal of Computer and System Sciences. 2000. V. 61. P. 302332.
248. Kondrak G., van Beek P. A theoretical evaluation of selected backtracking algorithms
// Articial Intelligence. 1997. V. 89. P. 365-387.
249. Korf R. Improved limited discrepancy search // Proceedings of the 13th National
Conference on Articial Intelligence (AAAI-96) (Portland). 1996. P. 209215.
250. Koubarakis M. Querying Temporal Constraint Networks: A Unifying Approach
// Applied Intelligence. 2002. V.17. P. 297-311.
251. Krokhin A., Jeavons P., and Jonsson P. Reasoning about temporal relations: The
tractable subalgebras of Allen's interval algebra // Journal of the ACM. 2003. V. 50.
P. 591640.
252. Krokhin A., Bulatov A., Jeavons P. Functions of multiple-valued logic and the complexity
of constraint satisfaction: A short survey // Proceedings 33rd IEEE International
Symposium on Multiple-Valued Logic (ISMVL 2003). IEEE Computer Society, 2003. P.
343351.
253. Krokhin A., Bulatov A., Jeavons P. The complexity of constraint satisfaction: an
algebraic approach // Structural Theory of Automata, Semigroups, and Universal
Algebra, volume 207 of NATO Science Series II: Math., Phys., Chem., Springer Verlag,
2005. P. 181-213.
254. Kuipers B. Qualitative Reasoning: Modeling and Simulation with Incomplete Knowledge.
MIT Press, 1994. 418 p.
255. Kumar V. Algorithms for constraint satisfaction problems: A survey // AI Magazine.
1992. 13(1). P. 32-44.
256. Laburthe F., Caseau Y. SALSA: A language for search algorithms // Proceedings of the
4h International Conference on the Principles and Practice of Constraint Programming
(CP'98) (Pisa, Italy), 1998.
76
257. Larrosa J., Morancho E., Niso D. On the practical applicability of bucket elimination:
Still-life as a case study // Journal of Articial Intelligence Research. 2005. V. 23. P.
421440.
258. Lauriere J-L. ALICE: A language and a program for stating and solving combinatorial
problems // Articial Intelligence. 1978. V. 10(1). P. 29127.
259. Leler Wm. Constraint Programming Languages, Their Specication and Generation.
Reading: Addison-Wesley, 1988. 202 p.
260. Engineering dynamic scheduler for Work Manager / D. Lesaint [et al.] // BT Technology
Journal. 1998. V. 16. P. 1629.
261. Lloyd J. W. Foundations of Logic Programming. Berlin: Springer Verlag, 1987. 212 p.
262. Mackworth A.K. Consistency in networks of relations // Articial Intelligence. 1977.
8(1). P. 99-118.
263. Mackworth A.K. Constraint satisfaction // Encyclopedia of Articial Intelligence
(second edition) / S. Shapiro (Ed.). New York: Wiley, 1992. Vol. 1. P. 285-293.
264. Mackworth A.K. On reading sketch maps // Proceedings of the Fifth International Joint
Conference on Articial Intelligence Cambridge, 1977. P. 598606.
265. Mackworth A.K., Freuder E.C. The complexity of some polynomial network consistency
algorithms for constraint satisfaction problems // Articial Intelligence. 1985. V. 25 (1).
P. 6574.
266. Marriott K., Stuckey P. J. Programming with Constraints: An Introduction. Cambridge:
MIT Press, 1998. 483 p.
267. Zinc 0.1: Language and libraries. Technical report / K. Marriott [et al.]. Monash
University, 2006.
268. The design of the Zinc modelling language / K. Marriott [et al.] // Constraints 2008. V.
13, N 3. P. 229-267.
269. Maximuck W., Reviakin M. A prototype of train schedule module // Proc. PACT98,
1998.
270. McAloon K. Cooperating solvers: A progress report // Proc. PACLP99, 1999.
271. McAloon K., Tretko C. 2LP: Linear programming and logic programming // Principles
and Practice of Constraint Programming / V. Saraswat, P. Van Hentenryck (eds). MIT
Press, 1995. P. 99-114.
272. McDermott D. A general framework for reason maintenance // Articial Intelligence.
1991. V. 50. P. 289329.
273. McGregor J.J. Relational consistency algorithms and their application in nding
subgraph and graph isomorphisms // Information Sciences. 1979. V. 19(3). P. 229-250.
274. McKenzie R.N., McNulty G.F., Taylor W.F. Algebras, Lattices and Varieties, volume I,
California: Wadsworth and Brooks, 1987.
275. Mehlhorn K., Thiel S. Faster algorithms for bound-consistency of the sortedness and
alldierent constraint // Proceedings of the Sixth International Conference on Principles
and Practice of Constraint Programming. Singapore, 2000. P. 306319.
276. Melzer S. Verication of parallel systems using constraint programming // Proc. 3rd Int.
Conf. on Principles and Practice of Constraint Programming (CP97). Springer-Verlag,
LNCS 1330, 1997.
77
277. Menzel W. Constraint satisfaction for robust parsing of spoken language // Journal of
Experimental and Theoretical Articial Intelligence. 1998. V. 10. P. 77-89.
278. Meseguer P. Constraint satisfaction problems: an overview // AI Communications. 1989.
V. 2. P. 3-17.
279. Meseguer P. Interleaved depth-rst search // Proceedings of the 15th International Joint
Conference on Articial Intelligence (Nagoya, Japan), 1997.
280. Meyer auf'm Hofe H. ConPlan/SIEDAplan, personnel assignment as a problem of
hierarchical constraint satisfaction // Proc. PACT 97, 1997. P. 257-271.
281. Michel L., Van Hentenryck P. Localizer // Constraints. 2000. V. 5(1/2). P. 4384.
282. Miguel I., Shen Q. Extending qualitative modelling for simulation of time- delayed
behaviour // Proceedings of The 12th International Workshop on Qualitative Reasoning.
Massachusetts, Cape Cod, 1998. P. 161166.
283. Miguel I., Shen Q. Solution techniques for constraint satisfaction problems:
foundations // Articial Intelligence Review. 2001. V. 15. P. 241-265.
284. Miguel I., Shen Q. Solution techniques for constraint satisfaction problems: advanced
approaches // Articial Intelligence Review. 2001. V. 15. P. 267-291.
285. Minimizing conicts: A heuristic repair method for constraint satisfaction and scheduling
problems / S. Minton [et al.] // Articial Intelligence. 1992. 55(1-3). P. 161-205.
286. Mitchell D. Hard problems for CSP algorithms // Proceedings of the AAAI National
Conference, 1998. P. 398405.
287. Mohr R., Henderson T. C. Arc and path consistency revisited // Articial Intelligence.
1986. 28(2). P. 225-233.
288. Mohr R., Masini G. Good old discrete relaxation // Proceedings of the 8th European
Conference on Articial Intelligence. M
unchen, 1988. P. 651656.
289. Montanari U. Networks of constraints: Fundamental properties and applications to
picture processing // Information Sciences. 1974. 7(2). P. 95-132.
290. Montelius J., Ali K.A.M. An and/or-parallel implementation of AKL // New Generation
Computing. 1996. V. 14. P. 31-52.
291. Moskewicz M., Madigan C., Zhao Y., Zhang L., and Malik S. Cha: Engineering an
ecient sat solver / M. Moskewicz [et al.] // Proc. of the Design Automation Conference
(DAC), 2001.
292. http://www.mozart-oz.org/. The Mozart project, 2008 (äàòà îáðàùåíèÿ 07.08.2010).
293. Nadel B.A. Constraint satisfaction algorithms // Comput. Intelligence. 1989. V. 5. P.
188224.
294. Nadel B.A. Constraint satisfaction in Prolog: Complexity and theory-based heuristics
// Information Sciences, An International Journal. 1995. vol. 83. P. 113-131
295. Neumaier A. Complete search in continuous global optimization and constraint
satisfaction // Acta Numerica. Cambridge University Press, 2004. P. 271-369.
296. Le Pape C., Baptiste P. A constraint programming library for preemptive and nonpreemptive scheduling // Proc. PACT97, 1997.
297. Le Pape C., Baptiste P. Resource constraints for preemptive job-shop scheduling
// Constraints: An International Journal, 1998. V. 3. P. 263-287.
78
298. Pareschi R. Work force management in telecommunications and beyond
telecommunications // Proc. PACLP99, 1999.
299. Pachet F. Constraints and multimedia // Proc. PACLP99, 1999.
300. Papadimitriou C.H. Computational Complexity. Reading: Addison-Wesley, 2005. 523 p.
301. Pearson J., Jeavons P. A survey of tractable constraint satisfaction problems. Technical
report CSD-TR-97-15. U. of London, Royal Holloway College, 1997.
302. Peirce C.S. Collected Papers / C. Hartshorne, P. Weiss (eds.), Vol. III. Harvard
University Press, 1933.
303. Perrett M. Using constraint logic programming techniques in container port planning
// ICL Technical Journal. 1991. P. 537-545.
304. Perron L. Search procedures and parallelism in constraint programming // Proceedings
of the 5th International Conference on the Principles and Practice of Constraint
Programming (CP'99) (Alexandra), 1999.
305. Pesant G., Gendreau M., and Rousseau J.-M. GENIUS-CP: a generic single- vehicle
routing algorithm // Proc. 3rd Int. Conf. on Principles and Practice of Constraint
Programming (CP97). Springer-Verlag, LNCS 1330, 1997.
306. Poschel R., Kaluznin L.A. Funktionen- und Relationenalgebren. DVW, Berlin, 1979.
307. Le manuel de Prolog IV / F. Benhamou [et al.]. Marseille: PrologIA, 1996.
308. Prosser P. A reactive scheduling agent // Proceedings of the 11th International Joint
Conference on Articial Intelligence IJCAI-89. Detroit, 1989. P. 10041009.
309. Prosser P. Hybrid algorithms for constraint satisfaction problems // Computational
Intelligence. 1993. V. 9. P. 268-299.
310. Purvis L., Jeavons P. Constraint tractability theory and its application to the
product development process for a constraint-based scheduler // Proceedings of 1st
International Conference on The Practical Application of Constraint Technologies and
Logic Programming, PACLP'99. Practical Applications Company, 1999. P. 6379.
311. Regin J. A ltering algorithm for constraints of dierence in CSPs // Proceedings of the
Twelfth National Conference on Articial Intelligence (AAAI-94). Seattle: AAAI Press,
1994. P. 362-367.
312. Regin J. Generalized arc consistency for global cardinality constraint // Proceedings of
the Thirteenth National Conference on Articial Intelligence. Portland, 1996. P. 209215.
313. Regin J. The symmetric alldi constraint // Proc. IJCAI99, 1999.
314. Reith S., Vollmer H. Optimal satisability for propositional calculi and constraint
satisfaction problems // Inform. and Comput. 2003. V. 186. P. 119.
315. Renker G., Ahriz H. Building models through formal specication // Proc. of the First
Int. Conf. on the Integration of AI and OR Techniques in Constraint Programming for
Combinatorial Optimization Problems. Springer, LNCS 3011, 2004. P. 395401.
316. Revesz P.Z. Safe stratied Datalog with integer order programs // Proceedings of 1st
Int. Conference on Principles and Practice of Constraint Programming (CP95). SpringerVerlag, LNCS 976, 1995. P. 154169.
317. Revesz P.Z. Safe Datalog queries with linear constraints // Proc. 4th Int. Conf. on
Principles and Practice of Constraint Programming (CP98). Springer-Verlag, LNCS 1520,
1998. P. 355-369.
79
318. http://www.comp.rgu.ac.uk/staff/ha/ZCSP/ (äàòà îáðàùåíèÿ 07.08.2010).
319. Rit J.F. Propagating temporal constraints for scheduling // Proceedings of the 5th
National Conference on Articial Intelligence. Philadelphia, 1986. P. 383386.
320. Robertson N., Seymour P. D. Graph minors, ii. Algorithmic aspects of tree-width
// Journal of Algorithms. 1986. 7(3). P. 309-322.
321. Rodosek R., Wallace M. A generic model and hybrid algorithm for hoist scheduling
probleems // Proc. 4th Int. Conf. on Principles and Practice of Constraint Programming
(CP98). Springer-Verlag, LNCS 1520, 1998, pp. 385-399.
322. Rossi F. Constraint (logic) programming: A survey on research and applications // New
Trends in Constraints / K.R. Apt [et al.] (eds.). Berlin: Springer, 1999. P. 4074.
323. Rossi F., Petrie C., Dhar V. On the equivalence of constraint satisfaction problems.
Technical Report ACT-AI-222-89, MCC, Austin, Texas, 1989.
324. Rossi F., van Beek P., Walsh T. (eds.) Handbook Of Constraint Programming. Elsevier,
2006. 978 p.
325. Rossi F., van Beek P., Walsh T. Chapter 4 Constraint Programming in Foundations
of Articial Intelligence. // Handbook of Knowledge Representation / F. van Harmelen,
V. Lifschitz, B. Porter (eds.). 2008. Volume 3. P. 181-211.
326. Rossi F., Montanari U. Exact solution of networks of constraints using per- fect
relaxation // Proc. International Conference on Knowledge Representation (KR89).
Morgan Kaufmann, 1989.
327. Rossi F., Sperduti A. Learning solution preferences in constraint problems // Journal of
Experimental and Theoretical Computer Science, 1998. Vol 10. P. 103- 116.
328. Ruttkay Zs. Fuzzy constraint satisfaction // Proc. 3rd IEEE International Conference
on Fuzzy Systems, 1994. P. 1263-1268.
329. Ruttkay Zs. Constraint satisfaction a survey // CWI Quarterly. 1998. V. 11. P. 163
214.
330. Sabin D., Freuder E. C. Contradicting conventional wisdom in constraint satisfaction
// Proceedings of 11th European Conference on Articial Intelligence (ECAI 94).
Amsterdam: Wiley, 1994. P. 125-129.
331. Sam-Haroud D., Faltings B. Consistency techniques for continuous constraints
// Constraints: An International Journal. 1996. V. 1. P. 85-118.
332. Schaefer T.J. The complexity of satisability problems // Proceedings 10th ACM
Symposium on Theory of Computing (STOC'78), 1978. P. 216226.
333. Schiex T. Possibilistic constraint satisfaction problems, or how to handle soft
constraints? // Proc. 8th Conf. of Uncertainty in AI, 1992. P. 269-275.
334. Schiex T., Fargier H., and Verfaille G. Valued constraint satisfaction problems: hard and
easy problems // Proc. IJCAI95. Morgan Kaufmann, 1995. P. 631-637.
335. Schulte C. Oz explorer: a visual constraint programming tool // Proceedings of the 14th
Int. Conf. on Logic programming. MIT Press, 1997. P. 286-300.
336. Schulte C. Programming constraint inference engines // Proc. 3rd Int. Conf. on
Principles and Practice of Constraint Programming (Schloss Hagenberg, Linz, Austria,
CP97). Springer-Verlag, LNCS 1330, 1997. P. 519533.
337. Seidel R. A new method for solving constraint satisfaction problems // Proceedings of
IJCAI-81, 1981. P. 338342.
80
338. Sergiou K., Walsh T. The dierence all-dierence makes // Proc. IJCAI99, 1999.
339. Spatial modelling with geometric constraints / B. Seybold [et al.] // Proc. PACT97,
1997.
340. Shaw P. Using constraint programming and local search methods to solve vehicle routing
problems // Proc. 4th Int. Conf. on Principles and Practice of Constraint Programming
(CP98). Springer-Verlag, LNCS 1520, 1998.
341. Shen Q., Leitch R. Fuzzy Qualitative Simulation // IEEE Transactions on Systems.
Man, and Cybernetics. 1993. V. 23(4). P. 10381061.
342. Shvetsov I., Kornienko V., Preis S. Interval spreadsheet for problems of nancial planning
// PACT`97, England, London, 1997. P. 373-385.
343. Schwalb E., Vila L. Temporal Constraints: A Survey // Constraints. 1998. V. 3. P.
129-149.
344. Simonis H. Visual CHIP a visual language for dening constraint programs // CCL
II workshop, 1997.
345. Simonis H., Aggoun A. Search tree debugging. Technical report, COSYTEC SA, 1997.
346. Simonis H., Cornelissens T. Modelling producer/consumer constraints // Proceedings 1st
Int. Conference on Principles and Practice of Constraint Programming (CP95). SpringerVerlag, LNCS 976, 1995. P. 449-462.
347. Simonis H. Application development with the CHIP system // Proceedings of
the ESPRIT WG CONTESSA Workshop on Constraint Databases and Applications
(September 08 - 09, 1995) / G. M. Kuper, M. Wallace (eds.). LNCS 1034. London:
Springer-Verlag, 1996. P. 1-21.
348. Simonis H. Building industrial applications with constraint programming // Constraints
in computational logics: theory a nd applications. New York: Springer-Verlag, 2001. P.
271-309.
349. Simonis H. Models for global constraint applications // Constraints. 2007. V. 12. P.
63-92.
350. Simonis H., Charlier P. Cobra a system for train crew scheduling // Proc. DIMACS
workshop on constraint programming and large scale combinatorial optimization, 1998.
351. Simons R.V. Mathematical programming modeling using MGG // IMA Journal of
Mathematics in Management. 1987. V. 1. P. 267276.
352. Smedback G., Carro M., and Hermenegildo M. Interfacing Prolog and VRML and
its applications to constraint visualization // The Practical Application of Constraint
Technologies and Logic Programming (PACLP99),1999. P. 453-471.
353. Smolka G. A foundation for higher-order concurrent constraint programming // 1st
International Conference on Constraints in Computational Logics / Jean-Pierre
Jouannaud (ed.). LNCS 845. Berlin: Springer-Verlag, 1994. P. 50-72.
354. Sosic R., Gu J. Ecient local search with conict minimization: A case study of the nqueens problem // IEEE Transactions on Knowledge and Data Engineering. 1994. 6(5).
P. 661-668.
355. Stallman R.M., Sussman G.J. Forward reasoning and dependency-directed backtracking
in a system for computer-aided circuit analysis // Articial Intelligence. 1977. 9(2). P.
135-196.
81
356. Sutherland I. Sketchpad: A man-machine graphical communication system
// Proceedings of the Spring Joint Computer Conference. IFIPS, 1963. P. 329-346.
357. Resource allocation in distributed factory scheduling / K.P. Sycara [et al.] // IEEE
Expert. 1991. V. 6. P. 29-40.
358. Szendrei A. Clones in Universal Algebra, volume 99 of Seminaires de Mathematiques
Superieures. University of Montreal, 1986.
359. A constraint-based approach for visualization and animation / S. Takahashi [et al.]
// Constraints: An International Journal. 1998. V. 3. P. 61-86.
360. Tamassia R. Constraints in graph drawing algorithms // Constraints: An International
Journal. 1998. V. 3. P. 87-120.
361. Tarjan R.E., Yannakakis M. Simple linear-time algorithms to test chordality of graphs,
test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs // SIAM Journal
of Computing. 1984. V. 13. P. 566579.
362. Toman D. Memoing evaluation for constraint extensions of Datalog // Constraints: An
International Journal. 1997. V. 2. P. 337-360.
363. Tsang E.P.K. The consistent labeling problem in temporal reasoning // Proceedings of
the 6th National Conference on Articial Intelligence, 1987. P. 251255.
364. Tsang E. Foundations of Constraint Satisfaction. New York: Academic Press, 1993. 421
p.
365. A computer aided constraint programming system / E. Tsang [et al.] // Proc. PACLP99,
1999.
366. Ullman J.R. An algorithm for subgraph isomorphism // Journal of the ACM. 1976. V.
23. P. 3142.
367. Van Beek P. Reasoning about qualitative temporal information // Articial Intelligence.
1992. V. 58. P. 297-326.
368. Van Hentenryck P. Constraint Satisfaction in Logic Programming. Cambridge: MIT
Press, 1989. 224 p.
369. Van Hentenryck P., Deville Y., Teng C.M. A generic arc-consistency algorithm and its
specializations // Articial Intelligence. 1992. V. 57. P. 291321.
370. Van Hentenryck P. Helios: a modeling language for global optimization // Proceedings
PACT'96, 1996. P. 317-335.
371. Van Hentenryck P., Michel L., Deville Y. Numerica: A Modeling Language for Global
Optimization. Cambridge: MIT Press, 1997. 210 p.
372. Van Hentenryck P., Saraswat V. (eds.) Special issue on Strategic Directions on Constraint
Programming // Constraints: An International Journal. 1997. V.2, N 1.
373. Van Hentenryck P. Visual solver: A modeling language for constraint program- ming
// Proc. 3rd Int. Conf. on Principles and Practice of Constraint Program- ming (CP97).
Springer-Verlag, LNCS 1330, 1997.
374. Van Hentenryck P. The OPL Optimization Programming Language. MIT Press, 1999.
255 p.
375. Van Hentenryck P., Perron L., Puget J.-F. Search and strategies in OPL // ACM
Transactions on Computational Logic. 2000. V. 1. P. 136.
82
376. Van Hentenryck P., Michel L. Constraint-Based Local Search. Cambridge: MIT Press,
2005. 442 p.
377. Wallace M. Practical applications of constraint programming // Constraints: An
International Journal. 1996. V. 1. P. 139-168.
378. Wallace M., Novello S., and Schimpf J. Eclipse: A platform for constraint logic
programming. Technical report, IC-Parc, London, Imperial College, 1997.
379. Wallace M., Novello S., and Schimpf J. Eclipse a platform for constraint programming
// ICL Systems Journal. 1997. V. 12(1). P. 159-200.
380. Wallace R.J., Freuder E.C. Stable solutions for dynamic constraint satisfaction problems
// Proc. 4th Int. Conf. on Principles and Practice of Constraint Programming (CP98).
Springer-Verlag, LNCS 1520, 1998.
381. Walsh T. Depth-bounded discrepancy search // Proceedings of the 15th International
Joint Conference on Articial Intelligence. Nagoya, Japan, 1997.
382. Walsh T. Reformulating propositional satisability as constraint satisfaction
// Proceedings of the 4th International Symposium on Abstraction, Reformulation, and
Approximation (July 26-29), 2000. P. 233-246.
383. Waltz D. Generating semantic descriptions from drawings of scenes with shadows.
Technical Report AI271. MIT, 1972.
384. Waltz D.L. Understanding line drawings of scenes with shadows // Psychology of
Computer Vision. New York: McGraw-Hill, 1975. P. 19-92.
385. Yakhno T.M., Zilberfaine V.Z., Petrov E.S. Applications of ECLiPSe: Interval domain
library // Proc. PACT97, 1997.
386. Yokoo M. Asynchronous weak-committment search for solving distributed constraint
satisfaction problems // Proc. Principles and Practice of Constraint Programming
(CP95). Springer-Verlag, LNCS 976, 1995.
387. Zabih R., McAllester D. A Rearrangement Strategy for Determining Propositional
Satisability // Proceedings of The 7th National Conference on Articial Intelligence.
St Paul, 1988. P. 155-160.
83
Скачать