Кіріспе
Комбинаторикадағы классикалық мәселе
The set cover problem is a classical question in combinatorics, computer science, operations research, and complexity theory. Given a set of elements {1, 2, , n} (called the universe) and a collection S of m subsets whose union equals the universe, the set cover problem is to identify the smallest sub collection of S whose union equals the universe. For example, consider the universe 1=U = {1, 2, 3, 4, 5} and the collection of sets 1=S = { {1, 2, 3}, {2, 4}, {3, 4}, {4, 5} }. Clearly the union of S is U. However, we can cover all elements with only two sets: { {1, 2, 3}, {4, 5} }, see picture. Therefore, the solution to the set cover problem has size 2. More formally, given a universe and a family of subsets of , a set cover is a subfamily of sets whose union is
In the set cover decision problem, the input is a pair and an integer ; the question is whether there is a set cover of size or less. In the set cover optimization problem, the input is a pair , and the task is to find a set cover that uses the fewest sets. The decision version of set covering is NP complete. It is one of Karp's 21 NP complete problems shown to be NP complete in 1972. The optimization/search version of set cover is NP hard. It is a problem "whose study has led to the development of fundamental techniques for the entire field" of approximation algorithms.
Жинақ жапқышы мәселесі – комбинаторика, компьютерлік ғылым, операциялар зерттеулері және күрделілік теориясындағы классикалық сұрақ. {1, 2, ..., n} элементтер жиынтығы (әлем) және м қосалқы жиынтықтардың S жиыны берілген, олардың бірігісі әлемге тең. Жинақ жапқышы мәселесі – бұл әлемге тең болатын S-тің ең кіші қосалқы жиынтығын анықтау. Мысалы, әлем U = {1, 2, 3, 4, 5} және жиындар S = { {1, 2, 3}, {2, 4}, {3, 4}, {4, 5} } болсын. S-тің бірігісі U-ға тең. Дегенмен, барлық элементтерді тек екі жиынмен жабуға болады: { {1, 2, 3}, {4, 5} }, суретті қараңыз. Сондықтан, жинақ жапқышы мәселесінің шешімі 2-ге тең. Көбірек формальды түрде, әлем және оның қосалқы жиынтықтар отбасы берілген кезде, жинақ жапқышы – жиынтықтардың қосалқы тобы, олардың бірігісі әлемге тең болады.
The set cover problem is a classical question in combinatorics, computer science, operations research, and complexity theory. Given a set of elements {1, 2, , n} (called the universe) and a collection S of m subsets whose union equals the universe, the set cover problem is to identify the smallest sub collection of S whose union equals the universe. For example, consider the universe 1=U = {1, 2, 3, 4, 5} and the collection of sets 1=S = { {1, 2, 3}, {2, 4}, {3, 4}, {4, 5} }. Clearly the union of S is U. However, we can cover all elements with only two sets: { {1, 2, 3}, {4, 5} }, see picture. Therefore, the solution to the set cover problem has size 2. More formally, given a universe and a family of subsets of , a set cover is a subfamily of sets whose union is
In the set cover decision problem, the input is a pair and an integer ; the question is whether there is a set cover of size or less. In the set cover optimization problem, the input is a pair , and the task is to find a set cover that uses the fewest sets. The decision version of set covering is NP complete. It is one of Karp's 21 NP complete problems shown to be NP complete in 1972. The optimization/search version of set cover is NP hard. It is a problem "whose study has led to the development of fundamental techniques for the entire field" of approximation algorithms.
Жинақ жапқышын шешу мәселесінде кіріс – жұп және бүтін сан; сұрақ – әлемді жабу үшін өлшемі немесе одан кем жинақ жапқышы бар ма? Жинақ жапқышын оңтайландыру мәселесінде кіріс – жұп , ал міндет – ең аз жиынтықты пайдаланатын жинақ жапқышын табу. Жинақ жабудың шешімдік нұсқасы NP-толық. Бұл 1972 жылы Карп көрсеткен 21 NP-толық проблеманың бірі. Жинақ жабудың оңтайландыру/іздеу нұсқасы NP-қиын. Бұл «оның зерттеуі бүкіл сала үшін негізгі техникалардың дамуына әкелген» мәселе.
The set cover problem is a classical question in combinatorics, computer science, operations research, and complexity theory. Given a set of elements {1, 2, , n} (called the universe) and a collection S of m subsets whose union equals the universe, the set cover problem is to identify the smallest sub collection of S whose union equals the universe. For example, consider the universe 1=U = {1, 2, 3, 4, 5} and the collection of sets 1=S = { {1, 2, 3}, {2, 4}, {3, 4}, {4, 5} }. Clearly the union of S is U. However, we can cover all elements with only two sets: { {1, 2, 3}, {4, 5} }, see picture. Therefore, the solution to the set cover problem has size 2. More formally, given a universe and a family of subsets of , a set cover is a subfamily of sets whose union is
In the set cover decision problem, the input is a pair and an integer ; the question is whether there is a set cover of size or less. In the set cover optimization problem, the input is a pair , and the task is to find a set cover that uses the fewest sets. The decision version of set covering is NP complete. It is one of Karp's 21 NP complete problems shown to be NP complete in 1972. The optimization/search version of set cover is NP hard. It is a problem "whose study has led to the development of fundamental techniques for the entire field" of approximation algorithms.
Нұсқалар
Салмақты жиынтық жапқыш мәселесінде әр жиынтыққа оң салмақ беріледі (оның құнын көрсетеді), ал мақсат – ең аз салмақты жиынтық жапқышты табу. Әдеттегі (салмақталмаған) жиынтық жапқыш салмағы 1-ге тең барлық жиынтықтарға сәйкес келеді. Фракциялық жиынтық жапқыш мәселесінде жиынтықтың толық бөліктерін емес, жиынтықтардың бөлшек бөліктерін таңдауға рұқсат етіледі. Фракциялық жиынтық жапқыш – бұл әр жиынтыққа фракция (0-ден 1-ге дейінгі сан) тағайындау, яғни ғаламдағы әр элемент x үшін, x кіретін жиынтықтардың фракцияларының қосындысы кем дегенде 1-ге тең болуы керек. Мақсат – фракциялардың қосындысы ең аз болатын фракциялық жиынтық жапқышты табу. Ескеріңіз, (әдеттегі) жиынтық жапқыш – бұл барлық фракциялары 0 немесе 1 болатын фракциялық жиынтық жапқышқа тең; сондықтан ең кішкентай фракциялық жапқыштың мөлшері ең кішкентай жапқыштың мөлшеріне тең немесе одан кіші болуы мүмкін. Мысалы, 1=U = {1, 2, 3} ғаламын және 1=S = { {1, 2}, {2, 3}, {3, 1} } жиынтығын қарастырайық. Ең кішкентай жиынтық жапқыштың мөлшері 2-ге тең, мысалы 1={ {1, 2}, {2, 3} }. Бірақ әр жиынның 0,5 бөлігі алынған 1,5 мөлшерлі фракциялық жиынтық жапқыш бар.
Сызықтық бағдарламаны құру
Жинақтарды жабу мәселесі келесі бүтін сандық сызықтық бағдарлама (ILP) түрінде қойылған: minimize (жинақтар санын азайту) subject to for all (әлемнің әрбір элементін қамту) for all (әрбір жиын жиынтыққа кіреді немесе кірмейді) Жабу шектеуін ықшамдау үшін, инциденттік матрицасын анықтауға болады, онда әрбір қатар элементке, ал әрбір баған жиынға сәйкес келеді, және егер элемент e жиын s-де болса, әйтпесе . Содан кейін, жабу шектеуін былай жазуға болады: Салмақты жиынды жабу жоғарыда келтірілген бағдарламамен бірдей сипатталады, бірақ азайтылатын мақсатты функция - , мұнда жиынның салмағы болады. Бөлшекті жиынды жабу жоғарыда келтірілген бағдарламамен бірдей сипатталады, бірақ ол бүтін сан емес болуы мүмкін, сондықтан соңғы шектеу мынамен алмастырылады: Бұл сызықтық бағдарлама жабу мәселелері үшін LP-нің жалпы класына жатады, өйткені мақсатты функциядағы барлық коэффициенттер және шектеулердің екі жағы да теріс емес. ILP-нің толықтық аралығы ең көп (әлемнің мөлшері қайда). Оның бос етуі, шындығында, ең аз жиынды жабу мәселесі үшін факторлық жуықтау алгоритмін береді. Толық түсіндіру үшін кездейсоқ дөңгелектеу #setcover қараңыз.
For a more compact representation of the covering constraint, one can define an incidence matrix , where each row corresponds to an element and each column corresponds to a set, and if element e is in set s, and otherwise. Then, the covering constraint can be written as
Weighted set cover is described by a program identical to the one given above, except that the objective function to minimize is , where is the weight of set
Fractional set cover is described by a program identical to the one given above, except that can be non integer, so the last constraint is replaced by
This linear program belongs to the more general class of LPs for covering problems, as all the coefficients in the objective function and both sides of the constraints are non negative. The integrality gap of the ILP is at most (where is the size of the universe). It has been shown that its relaxation indeed gives a factor approximation algorithm for the minimum set cover problem. See randomized rounding#setcover for a detailed explanation.
Төмен жиіліктегі жүйелер
Егер әрбір элемент ең көп жиынтықта кездессе, онда LP-релаксацияны қолдану арқылы оптималдыққа жақын, белгілі бір дәрежеде жуық шешімді полиномиалдық уақытта табуға болады. Егер жоғарыда көрсетілген бүтін сандық сызықтық бағдарламадағы шектеу for all in арқылы ауыстырылса, онда ол (бүтін сан емес) сызықтық бағдарламаға айналады. Алгоритмді былай сипаттауға болады: Сызықтық бағдарламаларды шешудің полиномиалдық уақыт әдісін қолдана отырып, бағдарлама үшін оңтайлы шешім табыңыз. Шешімде сәйкес айнымалысы кем дегенде 1/ мәніне ие барлық жиындарды таңдаңыз.
Find an optimal solution for the program using some polynomial time method of solving linear programs. Pick all sets for which the corresponding variable has value at least 1/ in the solution .
Қарап тұрмаушылық нәтижелері
Әлемнің көлемін қарастырғанда, NP квазиполиномиалдық уақыт алгоритмдеріне ие болмаса, жиынтықтарды қамтуды полиномиалдық уақытта 1/2-ге дейін жуықтау мүмкін емес екенін көрсетті. Feige (1998) осы төменгі шекті сол болжамдар бойынша 7/8-ге дейін жақсартты, бұл ашкөз алгоритмнің қол жеткізген жуықтау қатынасына жақын мән. одан әрі, белгілі бір тұрақты үшін, PNP болжамы бойынша төменгі шек белгіледі. Жақында одан да жоғары мәнді ұқсас нәтиже дәлелденді, ал көрсетті, егер PNP болмаса, оны 1/2-ге дейін жуықтау мүмкін емес екенін дәлелдеу арқылы жиынтықтарды қамтудың ең жақсы жуықтау мүмкін еместігін көрсетті.
of , where is a certain constant, under the weaker assumption that PNP. A similar result with a higher value of was recently proved by showed optimal inapproximability by proving that it cannot be approximated to unless PNP.
Салмақты жинақ жапқышы
Жоғарыда айтылған салмақталған жиынтық жабын үшін толық санды сызықтық бағдарламаны жеңілдету арқылы, факторлық жуықтау алу үшін кездейсоқ дөңгелектеуді қолдануға болады. Салмақталмаған жиынтық жабын салмақталған жағдайға бейімделуі мүмкін.