{"id":329621,"date":"2022-02-15T21:00:37","date_gmt":"2022-02-15T21:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=329621"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=329621","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0433\u0440\u0430\u0444\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u0435\u0431\u0440\u044b  \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430. \u041e\u0431 \u044d\u0442\u043e\u043c \u0441\u044e\u0436\u0435\u0442\u0435 \u044f \u0443\u0437\u043d\u0430\u043b \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 <em>W.W. Adams, P. Loustanau. An Introduction to  Groebner Basis <\/em>(\u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 2.7).<\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f. \u041f\u0443\u0441\u0442\u044c<img decoding=\"async\" class=\"formula inline\" source=\"V\" alt=\"V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9fc\/8a3\/2c2\/9fc8a32c21f575d60c5001dbdecaf110.svg\"\/>  \u2014  \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0430 <img decoding=\"async\" class=\"formula inline\" source=\"E\" alt=\"E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f55\/11e\/27a\/f5511e27acdeea40791d5a577fe4c7f1.svg\"\/> \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0438\u0437 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440<img decoding=\"async\" class=\"formula inline\" source=\"\\{v,w\\}\" alt=\"\\{v,w\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea2\/568\/444\/ea25684445fd186ef296d9ed1cae6134.svg\"\/> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432  \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<img decoding=\"async\" class=\"formula inline\" source=\"V\" alt=\"V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1cd\/f49\/308\/1cdf49308d20e49324632680c6377b46.svg\"\/>. \u0422\u043e\u0433\u0434\u0430 <em>\u0433\u0440\u0430\u0444\u043e\u043c <\/em>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430<img decoding=\"async\" class=\"formula inline\" source=\"(V,E).\" alt=\"(V,E).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/099\/435\/f4a\/099435f4ab2b03adc39fabf6890e6391.svg\"\/> \u041f\u0440\u0438 \u044d\u0442\u043e\u043c<img decoding=\"async\" class=\"formula inline\" source=\"V\" alt=\"V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/13e\/4b6\/eee\/13e4b6eee173214dd19ec63d61448457.svg\"\/>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u0435\u0440\u0448\u0438\u043d<\/em> \u0433\u0440\u0430\u0444\u0430, \u0430<img decoding=\"async\" class=\"formula inline\" source=\"E\" alt=\"E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/29f\/ff7\/9f9\/29fff79f95089cce904171bac5eaf9c3.svg\"\/> \u2014  <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0451\u0431\u0435\u0440<\/em> \u0433\u0440\u0430\u0444\u0430. \u0412\u0435\u0440\u0448\u0438\u043d\u044b<img decoding=\"async\" class=\"formula inline\" source=\"v, w\\in V\" alt=\"v, w\\in V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b12\/59d\/07b\/b1259d07ba7c69837f80c51aa09056be.svg\"\/>\u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438<\/em>, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0440\u0435\u0431\u0440\u043e\u043c, \u0442\u043e \u0435\u0441\u0442\u044c<img decoding=\"async\" class=\"formula inline\" source=\"\\{v,w\\}\\in E\" alt=\"\\{v,w\\}\\in E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/236\/13a\/a7b\/23613aa7bc24648cf11d68548bd8ea75.svg\"\/>. <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u0440\u0430\u0444, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0432\u0435\u0440\u0448\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0440\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0440\u0435\u0431\u0440\u0430\u043c\u0438. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 <img decoding=\"async\" class=\"formula inline\" source=\"V=\\{x_1, x_2, x_3\\}\" alt=\"V=\\{x_1, x_2, x_3\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c3b\/1d8\/d0b\/c3b1d8d0bf98ce10a7689b8e2f3738c1.svg\"\/>, \u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0451\u0431\u0435\u0440  \u2014 <img decoding=\"async\" class=\"formula inline\" source=\"E=\\{ \\{x_1,x_2\\}, \\{x_1,x_3\\}, \\{x_2,x_3\\} \\}\" alt=\"E=\\{ \\{x_1,x_2\\}, \\{x_1,x_3\\}, \\{x_2,x_3\\} \\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b89\/622\/324\/b89622324b816bed1badd40bc8fba309.svg\"\/>.  \u0412\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0443  \u0433\u0440\u0430\u0444\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438. \u0423\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444, \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438.  <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"304\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/37b\/609\/481\/37b60948170c0dd1d96cd4aba3c24202.png\" data-width=\"304\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0431\u0440\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0435 \u0432\u0435\u0440\u0448\u0438\u043d. \u0413\u0440\u0430\u0444\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c\u0438 <\/em>\u0438\u043b\u0438 <em>\u043f\u043b\u043e\u0441\u043a\u0438\u043c\u0438<\/em>. \u041d\u0435 \u0432\u0441\u044f\u043a\u0438\u0439 \u0433\u0440\u0430\u0444 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0440\u0430\u0444 \u0441 \u043f\u044f\u0442\u044c\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u0430\u0440\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u043e\u0439, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c.<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c <img decoding=\"async\" class=\"formula inline\" source=\"C\" alt=\"C\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87d\/4ef\/6dd\/87d4ef6dd689305bd368b69b955e81bb.svg\"\/> \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0437<img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/599\/2bd\/8a7\/5992bd8a7a99309d90ae8d1713aef38f.svg\"\/>\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (<em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0430\u0441\u043e\u043a<\/em>). \u0422\u043e\u0433\u0434\u0430 <em>\u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d<\/em> \u0433\u0440\u0430\u0444\u0430<img decoding=\"async\" class=\"formula inline\" source=\"(V,E)\" alt=\"(V,E)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/023\/bbe\/e38\/023bbee387a32b5cd6e0416d78ccc5b4.svg\"\/>\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c3\/afd\/303\/6c3afd303d6ac5c3683c65bcf6b8035c.svg\"\/> \u043a\u0440\u0430\u0441\u043e\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435<img decoding=\"async\" class=\"formula inline\" source=\"c:V\\to C\" alt=\"c:V\\to C\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79e\/ccd\/4e6\/79eccd4e6b909e98fb591f278927ed2a.svg\"\/> \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u0440\u044b<img decoding=\"async\" class=\"formula inline\" source=\"v,w\" alt=\"v,w\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/028\/be7\/428\/028be74280e3cce95a7131027d0af784.svg\"\/> \u0441\u043c\u0435\u0436\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"c(v)\\neq c(w)\" alt=\"c(v)\\neq c(w)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/557\/ea2\/6d9\/557ea26d94bc6c6573be43d6457d8b08.svg\"\/>. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u043c\u044b \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/46c\/849\/b63\/46c849b638c1480b12c902752af790dd.svg\"\/> \u0446\u0432\u0435\u0442\u043e\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0431\u0440\u043e\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u043a\u0440\u0430\u0448\u0435\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430.  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0442\u0440\u0451\u0445 \u043a\u0440\u0430\u0441\u043e\u043a (<img decoding=\"async\" class=\"formula inline\" source=\"n=3\" alt=\"n=3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/295\/028\/9e3\/2950289e3e30a9c524b5b4e4167f316d.svg\"\/>), \u0445\u043e\u0442\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d1\/a37\/b85\/6d1a37b85f2ed8a0fbd8322580759ba0.svg\"\/>. \u041d\u0430\u0448 \u0442\u0440\u0435\u0445\u0432\u0435\u0440\u0448\u0438\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/513\/2dc\/a18\/5132dca181c6b0431b7cbe094e4c7673.png\" data-width=\"303\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e \u0433\u0440\u0430\u0444\u0443, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435.<\/p>\n<h2>\u0410\u043b\u0433\u0435\u0431\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c<\/h2>\n<p>\u041f\u0443\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<img decoding=\"async\" class=\"formula inline\" source=\"V=\\{x_1,\\ldots, x_n\\}\" alt=\"V=\\{x_1,\\ldots, x_n\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75a\/acc\/ab9\/75aaccab9f568540896f94bc6bd42f06.svg\"\/>\u0438<img decoding=\"async\" class=\"formula inline\" source=\"E\" alt=\"E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f7\/040\/7ab\/2f70407ab0e99ab0e6b0c83169a5c743.svg\"\/> \u0437\u0430\u0434\u0430\u043d \u0433\u0440\u0430\u0444. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u0440\u0430\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"C=\\{1, \\varepsilon, \\varepsilon^2\\},\" alt=\"C=\\{1, \\varepsilon, \\varepsilon^2\\},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e4d\/ba0\/c0e\/e4dba0c0ef359408be6eb428e1546cf3.svg\" width=\"121\" height=\"25\"\/><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\varepsilon=\\exp{\\tfrac{2}{3}\\pi i}.\" alt=\"\\varepsilon=\\exp{\\tfrac{2}{3}\\pi i}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c94\/afe\/fe9\/c94afefe91280587c85a1c715336d568.svg\"\/> \u042d\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u0440\u043d\u0435\u0439 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0438\u0445 \u0432  \u0442\u0440\u0435\u0442\u044c\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0430\u044e\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"1\" alt=\"1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c3\/49a\/13c\/6c349a13c0f507fd1eef66399196cdd8.svg\"\/> (\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u043d\u0435\u0439<img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26a\/d7f\/cae\/26ad7fcaeb0f3e888702874ae6920802.svg\"\/>-\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438).  \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"x_k,\\ k=1,\\ldots, m, \" alt=\"x_k,\\ k=1,\\ldots, m, \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/809\/658\/e3c\/809658e3cafc7ee0197b4462790a7ffb.svg\"\/> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.  \u041f\u0440\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <img decoding=\"async\" class=\"formula inline\" source=\"x_k\" alt=\"x_k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/71e\/12a\/67e\/71e12a67e2632cc0ba52ec2aa205cff7.svg\"\/> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<img decoding=\"async\" class=\"formula inline\" source=\"1, \\varepsilon, \\varepsilon^2.\" alt=\"1, \\varepsilon, \\varepsilon^2.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cfc\/1dc\/e16\/cfc1dce168672d1eee8fd791cec4ac81.svg\"\/> \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u0432 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0440\u0435\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"x_k\" alt=\"x_k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/efa\/9f1\/9a8\/efa9f19a8a7d5ed705139799892ecde2.svg\"\/> \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u0443\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x_k^3-1=(x-1)(x-\\varepsilon)(x-\\varepsilon^2).\" alt=\"x_k^3-1=(x-1)(x-\\varepsilon)(x-\\varepsilon^2).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/726\/a21\/3e2\/726a213e2bb075c355dc30ec528410c4.svg\" width=\"275\" height=\"27\"\/><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0437 <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6fd\/294\/699\/6fd294699fe34d0c1a8d1c8668d1536e.svg\"\/> \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x_k^3-1=0,\\ k=1\\ldots,m.\" alt=\"x_k^3-1=0,\\ k=1\\ldots,m.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e73\/e65\/903\/e73e6590354c8a24696c9fd9e83b5ce6.svg\" width=\"211\" height=\"26\"\/><\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0446\u0432\u0435\u0442. \u041f\u0443\u0441\u0442<img decoding=\"async\" class=\"formula inline\" source=\"x_k\" alt=\"x_k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/c1d\/a5b\/f21c1da5b30b15496165251d05353801.svg\"\/>\u0438<img decoding=\"async\" class=\"formula inline\" source=\"x_l\" alt=\"x_l\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30f\/3c3\/8d3\/30f3c38d338aa2b93267d67020d80470.svg\"\/>\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e<img decoding=\"async\" class=\"formula inline\" source=\"E\" alt=\"E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b4\/a59\/142\/3b4a59142ff0aad19725903a697cc3ee.svg\"\/> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0431\u0440\u043e<img decoding=\"async\" class=\"formula inline\" source=\"\\{x_k, x_l\\}.\" alt=\"\\{x_k, x_l\\}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/98c\/b01\/25c\/98cb0125ce5073709efe81c6d94d77c4.svg\"\/>  \u0422\u043e\u0433\u0434\u0430  \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"0=x_k^3-x_l^3=(x_k-x_l)(x_k^2+x_kx_l+x_l^2).\" alt=\"0=x_k^3-x_l^3=(x_k-x_l)(x_k^2+x_kx_l+x_l^2).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9ed\/ab7\/af2\/9edab7af27a00890c304bcdcaeaca48c.svg\" width=\"351\" height=\"26\"\/><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438, \u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u0440\u0430\u0441\u043a\u0438 \u0434\u043b\u044f \u043d\u0438\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"x_k\\neq x_l\" alt=\"x_k\\neq x_l\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96f\/171\/686\/96f171686fb01efc28121df46c21990a.svg\"\/>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0432 \u043d\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f <img decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c9c\/9e6\/8d1\/c9c9e68d19dc02d59870a70d8bd1adac.svg\"\/> \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c  \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0430<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x_k^2+x_kx_l+x_l^2=0\" alt=\"x_k^2+x_kx_l+x_l^2=0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f2\/0c9\/e5d\/2f20c9e5dee46d622e8b3214e6823034.svg\" width=\"162\" height=\"26\"\/><\/p>\n<p>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0440\u0430<img decoding=\"async\" class=\"formula inline\" source=\"\\{x_k, x_l\\}\\in E\" alt=\"\\{x_k, x_l\\}\\in E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a04\/e04\/3aa\/a04e043aa79dac09f146ce942f35f604.svg\"\/>. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0415\u0441\u043b\u0438 \u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0442\u043e \u0433\u0440\u0430\u0444 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0430\u0451\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430.<\/p>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0441 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0445\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043d\u0430\u0434 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441  \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u043b\u0430\u0431\u043e\u0439 \u0442\u0435\u043e\u0440\u0435\u043c\u044b \u0413\u0438\u043b\u044c\u0431\u0435\u0440\u0442\u0430 \u043e \u043d\u0443\u043b\u044f\u0445 \u0438 \u0442\u0435\u043e\u0440\u0438\u0438 \u0431\u0430\u0437\u0438\u0441\u043e\u0432 \u0413\u0440\u0435\u0431\u043d\u0435\u0440\u0430. \u041c\u044b \u0436\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c SciPy \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u0440\u0430\u0444\u0430\u043c\u0438, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/igraph.org\/python\/tutorial\/latest\/tutorial.html\" rel=\"noopener noreferrer nofollow\">igraph<\/a>.<\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u0440\u0430\u0444\u0435 \u0438\u0437 \u0432\u043e\u0441\u044c\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c, \u0445\u043e\u0442\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u041a\u0430\u0432\u0430\u0434\u044b \u0438 \u041a\u0430\u0432\u0430\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0443\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0431\u0435\u0440 \u0432\u043d\u0435 \u0432\u0435\u0440\u0448\u0438\u043d.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8ac\/e9a\/bf8\/8ace9abf8795f389d387927ab369e0f8.png\" data-width=\"303\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">from igraph import * from sympy import solve, symbols  # \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d NumberOfVertices = 8 # \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c \u0432\u0441\u0435 \u0440\u0435\u0431\u0440\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0430 EdgesList = [(0,1), (0,4), (0,5),  (1,7), (1,2), (2,3), (2,7), (1,3), (3,4), (3,6), (4,5), (4,6),(5,6), (6,7)]  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0432 \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 x1,...x8 TestGraph = Graph() TestGraph.add_vertices(NumberOfVertices) TestGraph.add_edges(EdgesList) x1, x2, x3, x4, x5, x6, x7, x8 = symbols(\"x1 x2 x3 x4 x5 x6 x7 x8\") TestGraph.vs[\"name\"] = [x1, x2, x3, x4, x5, x6, x7, x8] TestGraph.vs[\"label\"] = TestGraph.vs[\"name\"]  # \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443 EquationList=[] for edge in EdgesList:     EquationList.append(\"x%d^2 + x%d * x%d + x%d^2\"%(edge[0]+1,edge[0]+1,edge[1]+1,edge[1]+1)) for vertice in range(NumberOfVertices):     EquationList.append(\"x%d^3-1\"%(vertice+1))  # \u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u0440\u043d\u044f\u043c \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043a\u0440\u0430\u0441\u043d\u0443\u044e, \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0438 \u0441\u0438\u043d\u0438\u044e \u043a\u0440\u0430\u0441\u043a\u0438 Roots = solve(x1**3-1) RootsToColors = {Roots[0]: \"red\", Roots[1]: \"green\", Roots[2]: \"blue\"}  # \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 Colorings = solve(EquationList, dict=True) print(\"The number of colorings is %d.\"%len(Colorings))  # \u0415\u0441\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0430, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c k-\u044e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443.  # \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0433\u0440\u0430\u0444 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430. if(Colorings):     # \u0420\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0433\u0440\u0430\u0444\u0430     k = 0     RawColors = [Colorings[k][vertice] for vertice in TestGraph.vs[\"name\"]]     ColorDictionary = [RootsToColors[color] for color in RawColors]     TestGraph.vs[\"color\"]=ColorDictionary          # \u0423\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0438 \u0440\u0438\u0441\u0443\u0435\u043c     Layout = TestGraph.layout_kamada_kawai()     visual_style = {}     visual_style[\"vertex_size\"] = 40     visual_style[\"bbox\"] = (300, 300)     plot(TestGraph, layout=Layout, **visual_style) else:     print(\"The graph is non-colorable.\")<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043e\u043a.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"304\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b6\/2e1\/d99\/6b62e1d996f1e53510e8e4712ac425aa.png\" data-width=\"304\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0430\u0443\u043a\u0438, \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u0433\u0440\u0430\u0444\u0443 \u0440\u0435\u0431\u0440\u043e, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<img decoding=\"async\" class=\"formula inline\" source=\"x_2\" alt=\"x_2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/225\/92b\/ed6\/22592bed64620ab82489fbc9bf11bde9.svg\"\/>\u0438<img decoding=\"async\" class=\"formula inline\" source=\"x_5\" alt=\"x_5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/913\/559\/e50\/913559e50f1653e2bdea004b9df72f12.svg\"\/>, \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a \u0433\u0440\u0430\u0444\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0435\u0441\u0441\u0438\u043b\u0435\u043d.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" height=\"303\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ff8\/d29\/f6a\/ff8d29f6a0d61306815450326af96f0f.png\" data-width=\"302\"\/><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/651793\/\"> https:\/\/habr.com\/ru\/post\/651793\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a  \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u0435\u0431\u0440\u044b  \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430. \u041e\u0431 \u044d\u0442\u043e\u043c \u0441\u044e\u0436\u0435\u0442\u0435 \u044f \u0443\u0437\u043d\u0430\u043b \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 <em>W.W. Adams, P. Loustanau. An Introduction to  Groebner Basis <\/em>(\u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 2.7).<\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f. \u041f\u0443\u0441\u0442\u044c  \u2014  \u044d\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0430  \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0438\u0437 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432  \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430. \u0422\u043e\u0433\u0434\u0430 <em>\u0433\u0440\u0430\u0444\u043e\u043c <\/em>\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430 \u041f\u0440\u0438 \u044d\u0442\u043e\u043c\u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u0435\u0440\u0448\u0438\u043d<\/em> \u0433\u0440\u0430\u0444\u0430, \u0430 \u2014  <em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0451\u0431\u0435\u0440<\/em> \u0433\u0440\u0430\u0444\u0430. \u0412\u0435\u0440\u0448\u0438\u043d\u044b\u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438<\/em>, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0440\u0435\u0431\u0440\u043e\u043c, \u0442\u043e \u0435\u0441\u0442\u044c. <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u0440\u0430\u0444, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0432\u0435\u0440\u0448\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0440\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u0440\u0435\u0431\u0440\u0430\u043c\u0438. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0430\u043a\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434 , \u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0451\u0431\u0435\u0440  \u2014 .  \u0412\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0443  \u0433\u0440\u0430\u0444\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438. \u0423\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 \u0433\u0440\u0430\u0444, \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0432 \u0435\u0433\u043e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438.  <\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0431\u0440\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0435 \u0432\u0435\u0440\u0448\u0438\u043d. \u0413\u0440\u0430\u0444\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <em>\u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c\u0438 <\/em>\u0438\u043b\u0438 <em>\u043f\u043b\u043e\u0441\u043a\u0438\u043c\u0438<\/em>. \u041d\u0435 \u0432\u0441\u044f\u043a\u0438\u0439 \u0433\u0440\u0430\u0444 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0440\u0430\u0444 \u0441 \u043f\u044f\u0442\u044c\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043f\u0430\u0440\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u043e\u0439, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c.<\/p>\n<p>\u041f\u0443\u0441\u0442\u044c  \u2014 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (<em>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0430\u0441\u043e\u043a<\/em>). \u0422\u043e\u0433\u0434\u0430 <em>\u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d<\/em> \u0433\u0440\u0430\u0444\u0430\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e  \u043a\u0440\u0430\u0441\u043e\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u0440\u044b \u0441\u043c\u0435\u0436\u043d\u044b\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435 . \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u043c\u044b \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437  \u0446\u0432\u0435\u0442\u043e\u0432 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0431\u0440\u043e\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u043a\u0440\u0430\u0448\u0435\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430.  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0442\u0440\u0451\u0445 \u043a\u0440\u0430\u0441\u043e\u043a (), \u0445\u043e\u0442\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0433\u043e\u0434\u044f\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e . \u041d\u0430\u0448 \u0442\u0440\u0435\u0445\u0432\u0435\u0440\u0448\u0438\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0445\u043e\u0442\u0438\u043c  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e \u0433\u0440\u0430\u0444\u0443, \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0435 \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0448\u0435\u043d\u044b \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435.<\/p>\n<h2>\u0410\u043b\u0433\u0435\u0431\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c<\/h2>\n<p>\u041f\u0443\u0441\u0442\u044c \u043f\u0430\u0440\u043e\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0438 \u0437\u0430\u0434\u0430\u043d \u0433\u0440\u0430\u0444. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0448\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043a\u0440\u0430\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e<\/p>\n<p>\u0433\u0434\u0435  \u042d\u0442\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u0440\u043d\u0435\u0439 \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0438\u0445 \u0432  \u0442\u0440\u0435\u0442\u044c\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0430\u044e\u0442  (\u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0440\u043d\u0435\u0439-\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438).  \u0411\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430  \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.  \u041f\u0440\u0438 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f  \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u043a\u0442 \u0432 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u0440\u0435\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e  \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043d\u0443\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0437  \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u043e, \u0447\u0442\u043e \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0446\u0432\u0435\u0442. \u041f\u0443\u0441\u0442\u0438\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0431\u0440\u043e  \u0422\u043e\u0433\u0434\u0430  \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043c\u0435\u0436\u043d\u044b\u043c\u0438, \u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u0440\u0430\u0441\u043a\u0438 \u0434\u043b\u044f \u043d\u0438\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 . \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0432 \u043d\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f  \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u043c  \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0430<\/p>\n<p>\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0431\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0435 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0415\u0441\u043b\u0438 \u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0442\u043e \u0433\u0440\u0430\u0444 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442, \u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0430\u0451\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0438 \u0432\u0435\u0440\u0448\u0438\u043d \u0433\u0440\u0430\u0444\u0430.<\/p>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u0441 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0445\u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043d\u0430\u0434 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0441  \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u043b\u0430\u0431\u043e\u0439 \u0442\u0435\u043e\u0440\u0435\u043c\u044b \u0413\u0438\u043b\u044c\u0431\u0435\u0440\u0442\u0430 \u043e \u043d\u0443\u043b\u044f\u0445 \u0438 \u0442\u0435\u043e\u0440\u0438\u0438 \u0431\u0430\u0437\u0438\u0441\u043e\u0432 \u0413\u0440\u0435\u0431\u043d\u0435\u0440\u0430. \u041c\u044b \u0436\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c SciPy \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python.<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 Python<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u0440\u0430\u0444\u0430\u043c\u0438, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/igraph.org\/python\/tutorial\/latest\/tutorial.html\" rel=\"noopener noreferrer nofollow\">igraph<\/a>.<\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u0440\u0430\u0444\u0435 \u0438\u0437 \u0432\u043e\u0441\u044c\u043c\u0438 \u0432\u0435\u0440\u0448\u0438\u043d. \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u0440\u043d\u044b\u043c, \u0445\u043e\u0442\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u041a\u0430\u0432\u0430\u0434\u044b \u0438 \u041a\u0430\u0432\u0430\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0443\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0431\u0435\u0440 \u0432\u043d\u0435 \u0432\u0435\u0440\u0448\u0438\u043d.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">from igraph import * from sympy import solve, symbols  # \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d NumberOfVertices = 8 # \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c \u0432\u0441\u0435 \u0440\u0435\u0431\u0440\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0440\u0430\u0444\u0430 EdgesList = [(0,1), (0,4), (0,5),  (1,7), (1,2), (2,3), (2,7), (1,3), (3,4), (3,6), (4,5), (4,6),(5,6), (6,7)]  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0432 \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 x1,...x8 TestGraph = Graph() TestGraph.add_vertices(NumberOfVertices) TestGraph.add_edges(EdgesList) x1, x2, x3, x4, x5, x6, x7, x8 = symbols(\"x1 x2 x3 x4 x5 x6 x7 x8\") TestGraph.vs[\"name\"] = [x1, x2, x3, x4, x5, x6, x7, x8] TestGraph.vs[\"label\"] = TestGraph.vs[\"name\"]  # \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443 EquationList=[] for edge in EdgesList:     EquationList.append(\"x%d^2 + x%d * x%d + x%d^2\"%(edge[0]+1,edge[0]+1,edge[1]+1,edge[1]+1)) for vertice in range(NumberOfVertices):     EquationList.append(\"x%d^3-1\"%(vertice+1))  # \u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043a\u043e\u0440\u043d\u044f\u043c \u0438\u0437 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043a\u0440\u0430\u0441\u043d\u0443\u044e, \u0437\u0435\u043b\u0435\u043d\u0443\u044e \u0438 \u0441\u0438\u043d\u0438\u044e \u043a\u0440\u0430\u0441\u043a\u0438 Roots = solve(x1**3-1) RootsToColors = {Roots[0]: \"red\", Roots[1]: \"green\", Roots[2]: \"blue\"}  # \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 Colorings = solve(EquationList, dict=True) print(\"The number of colorings is %d.\"%len(Colorings))  # \u0415\u0441\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0430, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c k-\u044e \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443.  # \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0433\u0440\u0430\u0444 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432 \u0442\u0440\u0438 \u0446\u0432\u0435\u0442\u0430. if(Colorings):     # \u0420\u0430\u0441\u043a\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0433\u0440\u0430\u0444\u0430     k = 0     RawColors = [Colorings[k][vertice] for vertice in TestGraph.vs[\"name\"]]     ColorDictionary = [RootsToColors[color] for color in RawColors]     TestGraph.vs[\"color\"]=ColorDictionary          # \u0423\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0433\u0440\u0430\u0444 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c \u0438 \u0440\u0438\u0441\u0443\u0435\u043c     Layout = TestGraph.layout_kamada_kawai()     visual_style = {}     visual_style[\"vertex_size\"] = 40     visual_style[\"bbox\"] = (300, 300)     plot(TestGraph, layout=Layout, **visual_style) else:     print(\"The graph is non-colorable.\")<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043e\u043a.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0430 \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043d\u0430\u0443\u043a\u0438, \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u0433\u0440\u0430\u0444\u0443 \u0440\u0435\u0431\u0440\u043e, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0435\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b\u0438, \u043c\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u043a \u0433\u0440\u0430\u0444\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0435\u0441\u0441\u0438\u043b\u0435\u043d.<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/651793\/\"> https:\/\/habr.com\/ru\/post\/651793\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-329621","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329621"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329621\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}