{"id":352100,"date":"2024-05-20T22:02:10","date_gmt":"2024-05-20T22:02:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=352100"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=352100","title":{"rendered":"<span>\u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c | \u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vk\/av\/ac\/vkavackbhbzzntdvs2nxon8t5xu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vk\/av\/ac\/vkavackbhbzzntdvs2nxon8t5xu.png\"\/><\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0443\u0440\u0438\u0441\u043b\u0430\u043c aka tonitaga, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/751762\/\">\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430 \u0433\u0440\u0430\u0444\u0430\u0445<\/a>.<\/p><\/blockquote>\n<p>  <\/p>\n<ul>\n<li><strong>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0440\u043e\u0434\u0430, \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443. \u041f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u0443\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439.<\/li>\n<\/ul>\n<p>  <\/p>\n<ul>\n<li><strong>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0435\u0440\u0430<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u043f\u043e\u043b\u043d\u043e\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <strong>\u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/strong> \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0421++<\/li>\n<\/ul>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li><strong>\u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/strong> \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0443\u0442\u0438 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u043a \u043c\u0435\u0441\u0442\u0443. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0435\u0440\u0430. \u0412 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e \u0432\u044b\u0431\u043e\u0440\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f <strong>\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445 \u0438 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430\u0445<\/strong>.<\/li>\n<li>\u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0433\u043e\u0440\u043e\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0443\u0442\u044f\u0445, \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041c\u0443\u0440\u0430\u0432\u044c\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 \u043f\u0443\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.<\/li>\n<li>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043c\u0443\u0440\u0430\u0432\u044c\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442 \u043f\u0443\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043a \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0435\u0440\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442 \u0438 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438.<\/li>\n<li>\u0414\u0435\u0440\u0436\u0438\u0442\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <strong>LeonardoAI<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/l8\/uh\/aq\/l8uhaqqamsubvhmb65qc_2lz5me.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/l8\/uh\/aq\/l8uhaqqamsubvhmb65qc_2lz5me.jpeg\" data-blurred=\"true\"\/><\/p>\n<\/div><\/div>\n<p>  <\/p>\n<blockquote><p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u043d\u044f\u0442\u0438\u044f\u0445 \u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0431 <strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>, \u043d\u0443\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/p><\/blockquote>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0433\u043e\u0440\u043e\u0434\u0430 \u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 (\u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0438 \u0440\u0435\u0431\u0440\u0430) \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>\u0413\u0440\u0430\u0444<\/strong>.<\/li>\n<li>\u0414\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0441\u043c\u0435\u0436\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>\u041c\u0430\u0442\u0440\u0438\u0446\u0430<\/strong>.<\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0437\u043d\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0435\u0440\u0448\u0438\u043d, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0431\u0435\u0440, \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0435\u0441\u0442\u044c \u043b\u0438 \u0440\u0435\u0431\u0440\u043e \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 V1 \u0438 V2<\/p><\/blockquote>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0441\u043d\u043e\u0432\u044b \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<h4 id=\"osnovy-muravinogo-algoritma\">\u041e\u0441\u043d\u043e\u0432\u044b \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/h4>\n<p>  <\/p>\n<ul>\n<li><strong>\u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e<\/strong>. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430:<\/li>\n<\/ul>\n<p>  <\/p>\n<ol>\n<li><strong>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>. \u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u043e\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432, \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0434\u0435\u043b\u0430\u044e\u0442 \u0440\u0430\u0432\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0435\u0440\u0448\u0438\u043d \u0432 \u0433\u0440\u0430\u0444\u0435. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u044f. \u0412\u0441\u0435 \u0440\u0451\u0431\u0440\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430.<\/li>\n<li><strong>\u041f\u043e\u0438\u0441\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/strong>. \u041c\u0443\u0440\u0430\u0432\u044c\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435. \u041c\u0443\u0440\u0430\u0432\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0435\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u0442\u0443\u043f\u0438\u043a \u0438\u043b\u0438 \u043d\u0435 \u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b. \u0420\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u0443\u0440\u0430\u0432\u044c\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0430\u0441\u043a\u0438\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0434\u043e \u0432\u0435\u0440\u0448\u0438\u043d.<\/li>\n<li><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432<\/strong>. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043b\u0438 \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u043e\u043d \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b. \u0415\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430, \u0442\u043e \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043f\u0443\u0442\u0438, \u0438\u043d\u0430\u0447\u0435 \u043c\u0443\u0440\u0430\u0432\u0435\u0439, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043b\u0438\u043d\u044b \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0443\u0442\u0438, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043f\u0443\u0442\u0438 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0438\u043b\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0438.<\/li>\n<li><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/strong>. \u0415\u0441\u043b\u0438 \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0435\u0433\u043e \u043f\u0443\u0442\u044c \u0438 \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f. (\u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043b\u0438\u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438, \u043a\u043e\u0440\u043e\u0447\u0435 \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f)<\/li>\n<li><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u0438 \u0438\u0441\u043f\u0430\u0440\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430.<\/li>\n<li><strong>\u041f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435<\/strong>. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437 \u0438\u043b\u0438 \u0434\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u0430 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442\u0441\u044f.<\/li>\n<\/ol>\n<p>  <\/p>\n<blockquote><p>\u041f\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f: \u0434\u043e\u0448\u0435\u043b \u043b\u0438 \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u043e\u0442 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043f\u043e\u0441\u0435\u0442\u0438\u0432 \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443.<br \/>  \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438, \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043c\u0435\u0436\u043d\u044b\u0435 \u0440\u0435\u0431\u0440\u0430.<\/p><\/blockquote>\n<p>  <\/p>\n<h4 id=\"ispolzuemye-formuly-i-obyasnenie\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li><strong>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0443\u0440\u0430\u0432\u044c\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/hl\/uy\/cm\/hluycmkinmmu6kybvl4mhktsc9m.png\" data-src=\"https:\/\/habrastorage.org\/webt\/hl\/uy\/cm\/hluycmkinmmu6kybvl4mhktsc9m.png\"\/><\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u044b\u0431\u043e\u0440 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043c\u0443\u0440\u0430\u0432\u044c\u044f, \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b i \u0432 j, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0430\u043d\u0441\u043e\u0432 \u0442\u0443\u0434\u0430 \u043f\u043e\u043f\u0430\u0441\u0442\u044c.<\/p><\/blockquote>\n<p>  <\/p>\n<ul>\n<li><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/zz\/6e\/n8\/zz6en8dd4ladwlopd9fht9ltpqe.png\" data-src=\"https:\/\/habrastorage.org\/webt\/zz\/6e\/n8\/zz6en8dd4ladwlopd9fht9ltpqe.png\"\/><\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u0441\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432 \u043f\u043e \u0433\u0440\u0430\u043d\u044f\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043c\u0443\u0440\u0430\u0432\u044c\u044f\u043c\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043d\u0435\u043a\u0438\u0439 \u0431\u0443\u0444\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0435\u0441\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<ul>\n<li><strong>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 i \u0438 j \u043d\u0430 \u043d\u043e\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u0430\u0440\u0435\u043d\u0438\u044f + \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 i \u0438 j<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/2g\/mt\/hf\/2gmthf27qa5nnaxe6iw5rxpljsk.png\" data-src=\"https:\/\/habrastorage.org\/webt\/2g\/mt\/hf\/2gmthf27qa5nnaxe6iw5rxpljsk.png\"\/><\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u044b, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043c\u0443\u0440\u0430\u0432\u044c\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e.<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0421++<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<blockquote><p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0438 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u0438\u044f \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432. \u0422\u0430\u0436\u043a\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0438 \u0438 \u0434\u043b\u0438\u043d\u044b \u043f\u0443\u0442\u0438, \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u043c.<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">struct AntPath {     std::vector&lt;std::size_t> vertices;     double distance = 0; };  struct Ant {      explicit Ant(std::size_t start_vertex = 0);       AntPath path;       std::vector&lt;std::size_t> visited;      std::size_t start_location = 0, current_location = 0;      bool can_continue = true;       void MakeChoice(const Graph&lt;double> &amp;g, const Matrix&lt;double> &amp;p, double a, double b);      double getRandomChoice();      std::vector&lt;std::size_t> getNeighborVertexes(const Graph&lt;double> &amp;g) };  class AntColonyOptimization { public:     explicit AntColonyOptimization(const Graph&lt;double> &amp;graph);      AntPath SolveSalesmansProblem();  private:     const double kAlpha_ = 1.0;     const double kBeta_ = 2.0;     const double kPheromone0_ = 1;     const double kQ_ = 5.0;     const double kEvaporation_ = 0.2;      Graph&lt;double> graph_;     Matrix&lt;double> pheromone_;      std::vector&lt;Ant> ants_;      void CreateAnts();     void UpdateGlobalPheromone(const Matrix&lt;double> &amp;local_pheromone_update); };<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"antcolonyoptimization-class\">AntColonyOptimization class<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f SolveSalesmansProblem, \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043c\u0443\u0440\u0430\u0432\u044c\u044f\u043c\u0438.<\/li>\n<li>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b kAlpha kBeta kPheromone0, kQ, kEvaporation \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443<\/li>\n<li>\u041a\u043b\u0430\u0441\u0441 AntColonyOptimization \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0433\u0440\u0430\u0444\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430.<\/li>\n<li>\u041c\u0435\u0442\u043e\u0434 CreateAnts \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0438 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043c\u0443\u0440\u0430\u0432\u044c\u044e<\/li>\n<li>\u041c\u0435\u0442\u043e\u0434 UpdateGlobalPheromone \u0434\u0435\u043b\u0430\u0435\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430, \u043f\u0440\u0438\u043c\u0438\u043d\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u043e\u043e\u0441\u0442\u043e\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"ant-struct\">Ant struct<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b.<\/li>\n<li>\u0425\u0440\u0430\u043d\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 AntPath \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u0438 \u0434\u043b\u0438\u043d\u044b \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438<\/li>\n<li>\u041f\u043e\u043b\u0435 visited \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043d\u0435 \u043f\u043e\u0441\u0435\u0449\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b.<\/li>\n<li>start_location \u2014 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 (\u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0430) \u043c\u0443\u0440\u0430\u0432\u044c\u044f, current_location \u2014 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u044f<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"konstruktor-antcolonyoptimization\">\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 AntColonyOptimization<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0433\u0440\u0430\u0444 \u043a \u0441\u0435\u0431\u0435 \u0432 \u043f\u043e\u043b\u0435 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u043e\u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/li>\n<li>\u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 kQ, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"cpp\">AntColonyOptimization::AntColonyOptimization(const Graph&lt;double> &amp;graph)         : graph_(graph), kQ_(0.015 * graph.getGraphWeight()) {    const std::size_t kVertexesCount = graph_.getVertexesCount();    Matrix&lt;double> matrix(kVertexesCount);    for (std::size_t row = 0; row != kVertexesCount; ++row)        for (std::size_t col = 0; col != kVertexesCount; ++col)            if (row != col) matrix(row, col) = kPheromone0_;     pheromone_ = std::move(matrix); }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"realizaciya-osnovnyh-metodov\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>  <\/p>\n<blockquote><p>\u041c\u0435\u0442\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432.<br \/>  \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u0432 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0435\u0440\u0448\u0438\u043d \u0432 \u0433\u0440\u0430\u0444\u0435.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u0443\u0440\u0430\u0432\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b.<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">void AntColonyOptimization::CreateAnts() {     const auto kAntsCount = graph_.getVertexesCount();     ants_.resize(kAntsCount);      for (std::size_t i = 0, size = ants_.size(); i != size; ++i)         ants_[i] = Ant(i); }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041c\u0435\u0442\u043e\u0434 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430<\/p><\/blockquote>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u0430\u0440\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430, \u043f\u0443\u0441\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u043d\u0435 \u0440\u0435\u0431\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 0.01<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"cpp\">void AntColonyOptimization::UpdateGlobalPheromone(const Matrix&lt;double> &amp;lpu) {     \/\/ lpu - local pheromone update     for (std::size_t from = 0, size = lpu.getRows(); from != size; ++from) {         for (std::size_t to = 0; to != size; ++to) {             pheromone_(from, to) = (1 - kEvaporation_) * pheromone_(from, to) + lpu(from, to);             if (pheromone_(from, to) &lt; 0.01 and from != to)                 pheromone_(from, to) = 0.01;         }     } }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041c\u0435\u0442\u043e\u0434 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438<br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 [0, 1], \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0432 \u044d\u0442\u0438\u0445 \u0436\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">double Ant::getRandomChoice() {     std::uniform_real_distribution&lt;> dist(0.0, 1.0);     std::default_random_engine re(system_clock::now().time_since_epoch().count());     return dist(re); }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">std::vector&lt;std::size_t> Ant::getNeighborVertexes(const Graph&lt;double> &amp;g) {     std::vector&lt;std::size_t> vertexes;     for (std::size_t to = 0; to != graph.getVertexesCount(); ++to) {          bool edge_is_exist = g(current_location, to) != 0;          bool vertex_is_unvisited = std::find(visited.begin(), visited.end(), to) == visited.end()          if (edge_is_exist and vertex_is_unvisited)               vertexes.push_back(to);     }     return vertexes;    }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u041c\u0435\u0442\u043e\u0434 \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">void Ant::MakeChoice(const Graph&lt;T> &amp;g, const Matrix&lt;double> &amp;p, double a, double b) {     if (path.vertices.empty()) {         path.vertices.push_back(current_location);         visited.push_back(current_location);     }     std::vector&lt;std::size_t> neighbor_vertexes = getNeighborVertexes(g);     if (neighbor_vertexes.empty()) {        can_continue = false;        if (graph(current_location, start_location) != 0) {            path.vertices.push_back(start_location);            path.distance += graph(current_location, start_location);        }        return;   }     std::vector&lt;double> choosing_probability(neighbor_vertexes.size());     {         \/\/ \u041f\u043e\u0434\u0441\u0447\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0443\u0440\u0430\u0432\u044c\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e         std::vector&lt;double> wish;         std::vector&lt;double> probability;          double summary_wish = 0.0f;         for (auto v : neighbor_vertexes) {                 double t = p(current_location, v);                 double w = g(current_location, v);                 double n = 1 \/ w;                 wish.push_back(std::pow(t, alpha) * std::pow(n, beta));                 summary_wish += wish.back();        }         for (std::size_t neighbor = 0; neighbor != neighbor_vertexes.size(); ++neighbor) {            probability.push_back(wish[neighbor] \/ summary_wish);            if (neighbor == 0)                choosing_probability[neighbor] = probability.back();            else                choosing_probability[neighbor] = choosing_probability[neighbor - 1] + probability.back();         }    }     \/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0441\u0435\u0442\u0438\u0442 \u043c\u0443\u0440\u0430\u0432\u0435\u0439    std::size_t next_vertex = 0;    double choose = getRandomChoice();     for (std::size_t n = 0; n != neighbor_vertexes.size(); ++n ) {        if (choose &lt;= choosing_probability[n ]) {            next_vertex = neighbor_vertexes[n ];            break;        }    }     path.vertices.push_back(next_vertex);    path.distance += graph(current_location, next_vertex);    visited.push_back(next_vertex);    current_location = next_vertex; }<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><strong>choosing_probability<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<br \/>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u0435\u0449\u0435\u043d\u0438\u044f \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0440\u0430\u0432\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e {0.2 0.5 0.3}<br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 choosing_probability \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c {0.2 0.7 1.0} \u2014 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 1.<\/li>\n<li><strong>wish<\/strong> \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 \u0436\u0435\u043b\u0430\u043d\u0438\u0439 \u043c\u0443\u0440\u0430\u0432\u044c\u044f, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 &#171;\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043c\u0443\u0440\u0430\u0432\u044c\u044f \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b i \u0432 j&#187;<\/li>\n<li><strong>summary_wish<\/strong> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044c \u0432 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430<\/p><\/blockquote>\n<p>  <\/p>\n<pre><code class=\"cpp\">AntPath AntColonyOptimization::SolveSalesmansProblem() {     if (graph_.IsEmpty())          return {};      constexpr std::size_t kMaxIterationsWithoutImprovement = 100;     const std::size_t kVertexesCount = graph_.getVertexesCount();     std::size_t counter = 0;      AntPath path;     path.distance = kInf&lt;double>;      while (counter++ != kMaxIterationsWithoutImprovement) {         Matrix&lt;double> local_pheromone_update(kVertexesCount, 0.0);         CreateAnts();          for (auto &amp;ant : ants_) {             while (ant.can_continue)                 ant.MakeChoice(graph_, pheromone_, kAlpha_, kBeta_);              auto ant_path = ant.path;             if (ant_path.vertices.size() == kVertexesCount + 1) {                  if (path.distance > ant.path.distance) {                      path = std::move(ant.path);                      counter = 0;                 }                  for (std::size_t v = 0; v != ant_path.vertices.size() - 1; ++v)                     local_pheromone_update(ant_path.vertices[v], ant_path.vertices[v + 1]) += kQ_ \/ ant_path.distance;             }         }         UpdateGlobalPheromone(local_pheromone_update);     }     return path; }<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u044f, \u043f\u043e\u043a\u0430 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0435\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0440\u0448\u0438\u043d\u0443.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043e\u043d \u043f\u043e\u0441\u0435\u0442\u0438\u043b \u0432\u0441\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b, \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u043f\u0443\u0442\u0438, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0443\u0440\u0430\u0432\u044c\u0435\u043c, \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0443\u0442\u044c \u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a.<\/li>\n<li>\u0421\u0447\u0435\u0442\u0447\u0438\u043a \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e (\u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0433\u043e \u043f\u0443\u0442\u0438) \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0443\u0442\u044c.<\/li>\n<li>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0447\u0442\u043e \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u044b \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0435\u0440\u043e\u043c\u043e\u043d\u0430 \u0432\u043b\u0438\u044f\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0435 \u043c\u0443\u0440\u0430\u0432\u044c\u0438.<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"poleznye-ssylki\">\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=8KTzAiusfPs\">\u0432\u0438\u0434\u0435\u043e<\/a>, \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430.<\/li>\n<li>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c github&#8217;\u043e\u043c, \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443: <a href=\"https:\/\/github.com\/tonitaga\">GitHub<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p><a href=\"https:\/\/timeweb.cloud\/vds-vps?utm_source=habr&amp;utm_medium=banner&amp;utm_campaign\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\"\/><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/754462\/\"> https:\/\/habr.com\/ru\/articles\/754462\/<\/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 article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/vk\/av\/ac\/vkavackbhbzzntdvs2nxon8t5xu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/vk\/av\/ac\/vkavackbhbzzntdvs2nxon8t5xu.png\"\/><\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0443\u0440\u0438\u0441\u043b\u0430\u043c aka tonitaga, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/companies\/timeweb\/articles\/751762\/\">\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043d\u0430 \u0433\u0440\u0430\u0444\u0430\u0445<\/a>.<\/p><\/blockquote>\n<p>  <\/p>\n<ul>\n<li><strong>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0440\u043e\u0434\u0430, \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443. \u041f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u043f\u0443\u0442\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439.<\/li>\n<\/ul>\n<p>  <\/p>\n<ul>\n<li><strong>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0435\u0440\u0430<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f NP-\u043f\u043e\u043b\u043d\u043e\u0439, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c <strong>\u041c\u0443\u0440\u0430\u0432\u044c\u0438\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c<\/strong> \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0421++<\/li>\n<\/ul>\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-352100","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352100","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=352100"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/352100\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=352100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=352100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=352100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}