{"id":209610,"date":"2014-01-19T20:19:02","date_gmt":"2014-01-19T16:19:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=209610"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=209610","title":{"rendered":"<span class=\"post_title\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e. \u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043e\u0442\u0436\u0438\u0433\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0445\u043e\u0434\u0447\u0438\u0432\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c, \u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u0430\u043a <a href=\"http:\/\/ru.wikipedia.org\/wiki\/\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c_\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438_\u043e\u0442\u0436\u0438\u0433\u0430\">\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043e\u0442\u0436\u0438\u0433\u0430<\/a> (simulated annealing). \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043a \u0434\u0430\u043b\u0451\u043a\u0438\u043c \u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430. <\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 9 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0448\u043a\u043e\u043b\u044b. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043b\u044e\u0434\u0435\u0439 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/366\/dcc\/e23\/366dcce23cab26db80f7717f6828cced.gif\" alt=\"image\" \/><\/div>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0427\u0442\u043e\u0431\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043a\u0440\u0443\u0433 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u043e\u0447\u043d\u044b\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441 \u0432\u043e\u0434\u043e\u0439 \u044f \u043d\u0435 \u0432\u044b\u043f\u043b\u0435\u0441\u043d\u0443\u043b \u0440\u0435\u0431\u0451\u043d\u043a\u0430 (\u0430 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e, \u0442\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0430\u0448\u0438\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c). <\/p>\n<h4>\u041e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0441\u0442\u043e\u0438\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0437\u043d\u0430\u0442\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0441 \u00ab\u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438\u00bb \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0437\u0430\u0432\u0438\u0434\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0435 \u043e\u0442\u0434\u0430\u0432\u0430\u044f \u0441\u0435\u0431\u0435 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u0447\u0451\u0442\u0430.<\/p>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0437\u0430\u0440\u043f\u043b\u0430\u0442\u0443, \u0440\u0435\u0448\u0430\u0435\u043c \u043f\u043e\u0434\u0431\u0438\u0442\u044c \u0441\u0435\u043c\u0435\u0439\u043d\u044b\u0439 \u0431\u044e\u0434\u0436\u0435\u0442. \u041d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 (\u0435\u0434\u0430, \u043f\u043b\u0430\u0442\u0430 \u0437\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438 \u0442.\u0434.), \u0430 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u043f\u043e\u043d\u0438\u0436\u0435. \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430 \u0432\u0441\u0435 \u0434\u0435\u043d\u044c\u0433\u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0441\u043a\u0438\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438 \u0443\u043c\u0435\u0440\u0435\u0442\u044c \u043e\u0442 \u0433\u043e\u043b\u043e\u0434\u0430 \u2013 \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435? <\/p>\n<p>  \u0418\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0445\u043e\u0434 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0430\u043d\u0435\u0446. \u041e\u0434\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2013 \u0432\u0435\u0449\u0435\u0439 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e, \u0430 \u0440\u0430\u043d\u0435\u0446 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 (\u0434\u0430 \u0438 \u0441\u0430\u043c\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u0443\u044e \u0433\u0440\u0443\u0437\u043e\u043f\u043e\u0434\u044a\u0451\u043c\u043d\u043e\u0441\u0442\u044c). \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u043c\u044b \u0438\u0434\u0451\u043c \u0432 \u0433\u043e\u0440\u044b, \u043f\u0440\u0438\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0442\u0440\u043e\u0441 \u2013 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0437\u044f\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u043b\u044e\u0431\u0438\u043c\u0443\u044e PlayStation Vita, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0431\u0438\u0442\u044c \u043f\u0435\u0447\u0435\u043d\u044c\u043a\u0430\u043c\u0438 \u2013 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c.<\/p>\n<p>  \u0422\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f? \u041e\u043d\u0430 \u0438\u0449\u0435\u0442 \u0442\u043e \u0441\u0430\u043c\u043e\u0435, \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u0432\u0441\u0435\u0445, \u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0435. <br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0435\u0435. \u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043d\u0430\u0439\u0442\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>  <i>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 (\u043e\u0442 \u043b\u0430\u0442. optimus \u2014 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0435) \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e \u0442\u0435\u043c \u0438\u043b\u0438 \u0438\u043d\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0434\u0440\u0443\u0433\u0438\u0445.<\/i> \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u2013 \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u00ab\u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u043e \u0440\u0430\u043d\u0435\u0446\u00bb, \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0449\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0447\u0438\u0441\u043b\u043e, \u0442\u0435\u043c \u0432\u0430\u0436\u043d\u0435\u0435 \u0432\u0435\u0449\u044c). \u0422\u043e\u0433\u0434\u0430 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0451\u0442\u043a\u0443\u044e \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443: \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0430\u043d\u0435\u0446 \u0442\u0430\u043a\u0438\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438, \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u0435\u043d, \u0430 \u0432\u0435\u0441 \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0422.\u0435. \u043c\u044b <i>\u0438\u0449\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/i>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <i>\u0446\u0435\u043b\u0435\u0432\u043e\u0439<\/i>.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0451 \u043a \u0435\u0434\u0438\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044e, \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e:<br \/>  \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f (\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430) \u2014 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430 (\u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 \u0438\u043b\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430) \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u043e\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u2013 \u00ab\u041a\u0430\u043a?\u00bb.<br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435-\u0432\u0441\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0440\u0430\u043d\u0446\u0435\u043c, \u043d\u0430\u043c, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u0430\u0436\u0435 \u044d\u0442\u043e \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448 \u0440\u0430\u043d\u0435\u0446 \u2013 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0440\u0430\u043d\u0435\u0446, \u0430 \u0446\u0435\u043b\u044b\u0439 \u043f\u043e\u0435\u0437\u0434 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u0430\u0433\u043e\u043d\u043e\u0432, \u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0437\u0438\u043c \u043c\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0433\u043e\u0440\u043e\u0434. \u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c (\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0446\u0435\u043d\u043d\u043e\u0433\u043e), \u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u043e\u0432. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0439\u0434\u0451\u0442 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0440\u0435\u0448\u0435\u043d\u0438\u0439? \u0414\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0441\u0442\u043e \u043a\u0430\u043a\u0438\u0445-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0437 \u043d\u0438\u0445 \u0432\u0437\u044f\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u043b\u0443\u0447\u0448\u0435\u0435. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430, \u043d\u043e \u043a\u0442\u043e \u0434\u0430\u0441\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e, \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0443? <\/p>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0443 \u0442\u043e\u043c\u0438\u0442\u044c \u0438 \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%CE%EF%F2%E8%EC%E8%E7%E0%F6%E8%FF_(%EC%E0%F2%E5%EC%E0%F2%E8%EA%E0)\">\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/a> \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u043b\u0438\u043a\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u041d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e \u0438\u0445 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u044b, \u0432\u0441\u0435 \u0438\u0445 \u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. \u0421\u043a\u0430\u0436\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u00ab\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043e\u0442\u0436\u0438\u0433\u0430\u00bb \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 (\u043e\u0442 \u0433\u0440\u0435\u0447. \u03c3\u03c4\u03bf\u03c7\u03b1\u03c3\u03c4\u03b9\u03ba\u03cc\u03c2 \u2014 \u00ab<i>\u0443\u043c\u0435\u044e\u0449\u0438\u0439 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c<\/i>\u00bb) \u0438\u043b\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0410 \u043f\u0440\u0438\u0447\u0451\u043c \u0437\u0434\u0435\u0441\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043a\u0430\u043a \u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435. <\/p>\n<h4>\u0418\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043e\u0442\u0436\u0438\u0433\u0430<\/h4>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u0441\u0451 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435, \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0443 \u043c\u0430\u0442\u0443\u0448\u043a\u0438 \u043f\u0440\u0438\u0440\u043e\u0434\u044b. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u0437\u044f\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u00ab\u043f\u0440\u0438\u0440\u0443\u0447\u0438\u043b\u0438\u00bb \u0445\u0438\u0442\u0440\u044b\u0435 \u043c\u0435\u0442\u0430\u043b\u043b\u0443\u0440\u0433\u0438, \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u0430\u043b\u043b\u0430. <\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u0430\u043b\u043b\u0430 \u0435\u0441\u0442\u044c <i>\u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0448\u0435\u0442\u043a\u0430<\/i>, \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u043e\u043d\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0430\u0442\u043e\u043c\u043e\u0432 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430. \u0421\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u0432\u0441\u0435\u0445 \u0430\u0442\u043e\u043c\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c <i>\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c<\/i> \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u0426\u0435\u043b\u044c \u043e\u0442\u0436\u0438\u0433\u0430 \u2013 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439. \u0427\u0435\u043c \u043d\u0438\u0436\u0435 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u0442\u0435\u043c \u00ab\u043b\u0443\u0447\u0448\u0435\u00bb \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0435\u0448\u0435\u0442\u043a\u0430, \u0442.\u0435. \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0443 \u043d\u0435\u0435 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0447\u043d\u0435\u0435 \u043c\u0435\u0442\u0430\u043b\u043b. <\/p>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u00ab\u043e\u0442\u0436\u0438\u0433\u0430\u00bb \u043c\u0435\u0442\u0430\u043b\u043b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u044e\u0442 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u0447\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0442\u043e\u043c\u044b \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0448\u0435\u0442\u043a\u0438 \u043f\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u0417\u0430\u0442\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0435 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043e\u0445\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u0435. \u0410\u0442\u043e\u043c\u044b \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439, \u043e\u0434\u043d\u0430\u043a\u043e, \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0438 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439. \u042d\u0442\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439. \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0445\u0443\u0434\u0448\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439 \u043c\u0435\u043d\u044c\u0448\u0435\u0439, \u0447\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \u041c\u0435\u043d\u044f\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u043d\u0430 \u043d\u0430\u0448\u0443 \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438 voil\u00e0! \u0418\u043b\u0438 \u043d\u0435\u0442? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0434\u0443\u043c\u0430\u0435\u043c\u0441\u044f, \u0430 \u0447\u0435\u043c \u0436\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448 \u0441\u0442\u043e\u043b\u044c \u043c\u0443\u0434\u0440\u0451\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441? \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0430\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439?<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0448\u0438\u0440\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434 <a href=\"http:\/\/www.machinelearning.ru\/wiki\/index.php?title=\u041c\u0435\u0442\u043e\u0434_\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e_\u0441\u043f\u0443\u0441\u043a\u0430\">\u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430<\/a>.<\/p>\n<p>  \u041d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0447\u0443\u0434\u0435\u0441\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u043f\u043b\u044e\u0441\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/8bc\/9a1\/02e\/8bc9a102e8d940b758ba21afc2997ac9.gif\" alt=\"image\" width=\"350\" align=\"left\"\/><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u043e\u0447\u043a\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u044f \u043b\u044b\u0436\u043d\u0438\u043a\u043e\u043c, \u043d\u0435\u0441\u0443\u0449\u0435\u043c\u0441\u044f \u043f\u043e \u043a\u0440\u0443\u0442\u043e\u043c\u0443 \u0441\u043a\u043b\u043e\u043d\u0443 \u043d\u0430\u0448\u0435\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u0443\u044e \u043d\u0438\u0436\u043d\u044e\u044e \u0442\u043e\u0447\u043a\u0443 (\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c). \u041d\u043e, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0441\u043a\u043b\u043e\u043d \u043d\u0430\u043c \u043f\u043e\u043f\u0430\u043b\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0440\u043e\u0432\u043d\u044b\u0439, \u0435\u0441\u0442\u044c \u043d\u0430 \u043d\u0451\u043c \u043d\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0437\u0430\u0435\u0445\u0430\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0443 \u043f\u043e\u0434\u043d\u043e\u0436\u044c\u044f. \u0414\u0430\u0431\u044b \u043d\u0435 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0443\u0440\u0430\u043a\u0430\u0445, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u043e \u0438 \u0432\u0441\u043a\u0430\u0440\u0430\u0431\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0445\u043e\u043b\u043c\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0441\u043f\u0443\u0441\u043a. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043c\u0435\u0442\u0430\u0444\u043e\u0440\u0430 \u0441\u0442\u0430\u043b\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0430, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u043b\u044b\u0436\u043d\u0438\u043a\u043e\u043c \u0441\u043a\u043b\u043e\u043d \u2013 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0430 (\u043e\u043d\u0430 \u0436\u0435 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f). \u0410 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439 \u2013 \u043a\u0430\u0440\u0430\u0431\u043a\u0430\u043d\u044c\u0435 \u043d\u0430 \u0445\u043e\u043b\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u043d\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0430\u043a\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u00ab\u0437\u0430\u0441\u0442\u0440\u0435\u0432\u0430\u043d\u0438\u044f\u00bb \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0435. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430. \u0412\u0432\u0435\u0434\u0451\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<br \/>  \u041f\u0443\u0441\u0442\u044c S \u2013 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (\u0440\u0435\u0448\u0435\u043d\u0438\u0439) \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043e \u0440\u0430\u043d\u0446\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0432\u0435\u0449\u0435\u0439.<br \/>  \u041f\u0443\u0441\u0442\u044c <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d7d\/67a\/d64\/d7d67ad64dc9a965cb9abbdd6d837f81.gif\"\/> \u2013 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 i-\u043c \u0448\u0430\u0433\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/1e8\/c15\/f0f\/1e8c15f0f7c42b8bdd56d798d8e0f04d.gif\"\/>. <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/857\/05e\/319\/85705e319fd13a8de4d16a6ca54fc6ba.gif\"\/> \u2013 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043d\u0430 i-\u043c \u0448\u0430\u0433\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044e \u043e\u0442\u0436\u0438\u0433\u0430, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:   <\/p>\n<ul>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044e \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0438\u043b\u0438, \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0442\u043e \u0447\u0442\u043e \u043c\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c. <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/cc1\/c3d\/293\/cc1c3d293034cc070c07ab39b64505df.gif\"\/>   <\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0431\u044b\u0432\u0430\u044e\u0449\u0435\u0439.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/2f7\/6ee\/1ad\/2f76ee1ad0cb2297112c4552712a2441.gif\"\/>   <\/li>\n<li> \u0424\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0443\u044e \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/aec\/5f8\/0b4\/aec5f80b45f173b3eb47fd6755e2fb9e.gif\"\/>   <\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. <br \/>  E \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443 \u0441\u0442\u0430\u0432\u0438\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0447\u0438\u0441\u043b\u043e. \u0417\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>  T \u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u043e\u043c\u0435\u0440\u0443 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 i \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u0434\u043e\u043b\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0430\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0442\u044c \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e). \u0415\u0441\u043b\u0438 T \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0436\u0435 \u0441\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u0441\u043a\u0430\u0436\u0435\u043c <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/0bb\/4a0\/4b9\/0bb4a04b909a3b40e62503735c4a7818.gif\"\/>, \u0432\u0441\u0451 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0437\u0430\u0441\u0442\u0440\u044f\u043d\u0435\u043c \u0432 \u043d\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043d\u0435 \u0434\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0434\u043e \u0444\u0438\u043d\u0438\u0448\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. <\/p>\n<pre><code class=\"matlab\">function [ T ] = DecreaseTemperature( initialTemperature, i) %initialTemperature - \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 %i - \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 T = initialTemperature * 0.1 \/ i;  end <\/code><\/pre>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/MATLAB\">Matlab<\/a>. \u042d\u0442\u0443 \u0441\u0440\u0435\u0434\u0443 \u044f \u0432\u044b\u0431\u0440\u0430\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u043c\u043e\u0436\u043d\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u2013 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435. \u041f\u0438\u0441\u0430\u0442\u044c \u044f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0439 \u043c\u0430\u0442\u043b\u0430\u0431\u043d\u043e\u0439 \u043c\u0430\u0433\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0412\u0430\u0448 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u044f\u0437\u044b\u043a. <\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f F \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0438 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0435\u0433\u043e <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9ef\/9a0\/f20\/9ef9a0f20ab0fbd35d3dae92c3825660.gif\"\/>. \u0421\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0412\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u0441\u0430\u043c\u043e\u043c \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0436\u0438\u0433\u0430:  <\/p>\n<ul>\n<li>\u041d\u0430 \u0432\u0445\u043e\u0434\u0435: \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e22\/39c\/5b2\/e2239c5b20bede6152f1777342809c7c.gif\"\/>, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/0e6\/92b\/c2e\/0e692bc2ed39a906bde6d75ab3c83502.gif\"\/><\/li>\n<li>\u0417\u0430\u0434\u0430\u0451\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a37\/918\/cc3\/a37918cc30b85855a6740d3b09e6c265.gif\"\/><\/li>\n<li><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/16c\/f39\/dd3\/16cf39dd392e2a6287b135793b570c81.gif\"\/><\/li>\n<li>\u041f\u043e\u043a\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/895\/de7\/a18\/895de7a18f3f71ab7ac1b7e5f4974f7d.gif\"\/><br \/> \n<ul>\n<li><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/55e\/703\/a3f\/55e703a3f6ab67fdc0a1a20e4b9003f2.gif\"\/><\/li>\n<li><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/148\/dd9\/95a\/148dd995a9997cd4ddee817741a5db4b.gif\"\/><\/li>\n<li>\u0415\u0441\u043b\u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/81f\/c61\/314\/81fc61314273e1868992ce7ed25d0c12.gif\"\/>, \u0442\u043e\u0433\u0434\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5c0\/eb7\/74e\/5c0eb774e4cc863cf137868254b3c550.gif\"\/><\/li>\n<li>\u0415\u0441\u043b\u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c94\/69b\/7af\/c9469b7af62b0638ec77cf9164285b26.gif\"\/> \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/816\/d5a\/71f\/816d5a71fccd9d985da0cb2012db3a0e.gif\"\/> <\/li>\n<li>\u041f\u043e\u043d\u0438\u0436\u0430\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/592\/061\/e29\/592061e2926eee2519aa4b618e93bcf2.gif\"\/><\/li>\n<\/ul>\n<p>  <\/li>\n<li>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 s<\/li>\n<\/ul>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u044f \u00ab\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u00bb \u043c\u0435\u043d\u044c\u0448\u0435, \u043e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u043c (\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u0435\u0442\u043e\u0434 \u043e\u0442\u043d\u043e\u0441\u044f\u0442 \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445). <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439, \u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u043c\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u041d\u0435\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u043a\u0430\u043a \u043c\u0435\u0440\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f (\u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u043e\u0447\u043d\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f) \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u2013 \u043d\u0443\u043b\u044e. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0431\u0440\u043e\u0441\u043a\u0435 \u0438\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0435, \u0430 \u0442\u0440\u043e\u0439\u043a\u0438 \u2013 1\/6.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u044d\u043d\u0435\u0440\u0433\u0438\u0439 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6e1\/b68\/2c8\/6e1b682c855a7da11e5ef69ad4c83aa3.gif\"\/> \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e35\/28c\/10a\/e3528c10a9704278f16bbbf7110a986b.gif\"\/> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430. \u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c, \u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? <\/p>\n<p>  \u041a\u043e\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438:  <\/p>\n<pre><code class=\"matlab\">function [ P ] = GetTransitionProbability( dE, T )      P = exp(-dE\/T); end <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0440\u0435\u0437\u043e\u043a \u0438 \u0440\u0430\u0437\u043e\u0431\u044c\u0451\u043c \u0435\u0433\u043e \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/76a\/44c\/882\/76a44c882c264425a5b0cc0aa98af372.png\" \/><\/div>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0432 Matlab \u044d\u0442\u043e rand (\u043a\u0430\u043a \u0438 \u043f\u043e\u0447\u0442\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445). \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/48d\/bd9\/f1c\/48dbd9f1cb254b3ce8b660c0c38cfde5.png\" \/><\/div>\n<p>  \u0415\u0441\u043b\u0438 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043f\u0430\u043b\u043e \u0432 \u043b\u0435\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u2013 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434, \u0432 \u043f\u0440\u0430\u0432\u0443\u044e \u2013 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e.  <\/p>\n<pre><code class=\"matlab\">function [ a ] = IsTransition(probability)     value = rand(1);      if(value &lt;= probability)         a = 1;     else         a = 0;      end  end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0443\u043c\u0430\u044e, \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430<\/h4>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u0435\u0431\u0435, \u0447\u0442\u043e \u0412\u044b \u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u0435\u0446 \u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u043e\u0432\u0430\u0440 \u0436\u0438\u0442\u0435\u043b\u044f\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 \u0441\u0442\u0440\u0430\u043d\u0435. \u041f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u0441\u0438\u043b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0447\u0442\u043e \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u0442\u044c, \u0431\u044b\u043b\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c. \u042d\u0442\u043e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u044b\u0441\u043a\u0430\u0442\u044c.<br \/>  \u0411\u043e\u043b\u0435\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0440\u0430\u0442\u0447\u0430\u0439\u0448\u0438\u0439 \u043f\u0443\u0442\u044c, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u0442\u043e\u0447\u043a\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. <br \/>  \u0412 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430. <\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u0443\u0441\u0442\u044c \u043d\u0430\u0448\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435 10&#215;10. \u041a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u0440\u043e\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442. \u0412\u0441\u0435\u0433\u043e 100 \u0433\u043e\u0440\u043e\u0434\u043e\u0432.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/3d0\/cf2\/519\/3d0cf2519c6bc23f3b8a6cb6def24774.png\" width=\"500\" \/><\/div>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 Matlab \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"matlab\">data = rand(2,100)*10; <\/code><\/pre>\n<p>  \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0438\u043a\u043b, \u043d\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442. \u041c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 rand() \u0438 \u0434\u043e\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u0438\u0445 \u043d\u0430 10, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043b\u0435\u0436\u0430\u043b\u0438 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0436\u0438\u0433\u0430<\/h4>\n<p>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 C, \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f |C| \u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0432\u043d\u043e 100. \u041a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/c37\/a52\/6a2\/c37a526a2da2af5949218475b0796df8.gif\"\/> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0430\u0440\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/2af\/3a0\/a2c\/2af3a0a2c104402c5c228e1b96fbd8bf.gif\"\/> \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c. <\/p>\n<p>  \u041f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e, \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0433\u043e\u0440\u043e\u0434\u0430\u043c\u0438, \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 S \u2013 \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0440\u043e\u0434. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 C, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0441\u044f\u043a\u0438\u0439 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/c37\/a52\/6a2\/c37a526a2da2af5949218475b0796df8.gif\"\/> \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 |C|. <\/p>\n<p>  \u041a\u0430\u043a \u043c\u044b \u043f\u043e\u043c\u043d\u0438\u043c, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0436\u0438\u0433\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u043d\u0435\u0440\u0433\u0438\u0438 E (\u0438\u043b\u0438 \u00ab\u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00bb \u0432 \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438) \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f F, \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. <br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u043c\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043e\u043d\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u00ab\u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439\u00bb. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u0448\u0430 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/fd1\/2d0\/aec\/fd12d0aec9f4af29c2de5286e809feb9.gif\" \/><\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u0441\u0443\u043c\u043c\u0430 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%C5%E2%EA%EB%E8%E4%EE%E2%E0_%EC%E5%F2%F0%E8%EA%E0\" title=\"\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\">\u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u044b\u0445 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/a> \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0438 \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0435 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/40b\/d8d\/059\/40bd8d059560f056ccfe25a35f0db609.gif\"\/>. \u0422\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u0430\u044f, \u043c\u044b \u0431\u044b\u043b\u0438 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/f7c\/3dd\/130\/f7c3dd130eceefa694739a437fad15db.gif\"\/> \u0432 \u043a\u043e\u043d\u0446\u0435, \u044d\u0442\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0433\u043e\u0440\u043e\u0434\u043e\u043c. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f, \u0442\u043e \u0415\u0432\u043a\u043b\u0438\u0434\u043e\u0432\u043e \u2013 \u044d\u0442\u043e \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 \u0443\u0440\u043e\u043a\u0430\u0445 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438. \u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u043e\u0439:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/2d7\/95a\/ebb\/2d795aebb28ef275dc0a6c673c45a0e6.gif\" \/><\/div>\n<p>  \u0413\u0434\u0435 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/d25\/361\/221\/d253612219d26ccd1b5d13433ee2d18a.gif\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435? \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2013 \u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u0434\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0435. \u0418\u0434\u0435\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f, \u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u0430\u0431\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/343\/f90\/43f\/343f9043f373172f510a0cff5ff064b6.gif\"\/>, \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043e\u043b\u0433\u043e \u0438 \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0435 \u0438 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b \u043c\u0430\u0440\u0448\u0440\u0443\u0442 (1,2,3,4,5,6,7). \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432\u044b\u0431\u0440\u0430\u043b \u0433\u043e\u0440\u043e\u0434\u0430 2 \u0438 7, \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 (1,7,6,5,4,3,2). <\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 F:  <\/p>\n<pre><code class=\"matlab\">function [ seq ] = GenerateStateCandidate(seq) \t%seq - \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442), \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e      %\u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442          n = size(seq,1); % \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438     i = randi(n,1); % \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0446\u0435\u043b\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e     j = randi(n, 1);% \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0446\u0435\u043b\u043e\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e              if(i &gt; j)          seq(j:i) = flipud(seq(j:i)); % \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c     else         seq(i:j) = flipud(seq(i:j));% \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c     end  end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u0430\u043d\u044f\u0442\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u043e\u0439 \u0430\u0431\u0437\u0430\u0446\u0435\u0432 \u0432\u044b\u0448\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u043e\u043c:  <\/p>\n<pre><code class=\"matlab\">function [ state ] = SimulatedAnnealing( cities, initialTemperature, endTemperature)      n = size(cities,1); % \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0433\u043e\u0440\u043e\u0434\u043e\u0432      state = randperm(n); % \u0437\u0430\u0434\u0430\u0451\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u0430\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442     % \u0424\u0443\u043d\u043a\u0446\u0438\u044f randperm(n) - \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0437 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043e\u0442 1 \u0434\u043e n          currentEnergy = CalculateEnergy(state, cities); % \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u044d\u043d\u0435\u0440\u0433\u0438\u044e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f     T = initialTemperature;          for i = 1:100000  %\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439     % \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b T                 stateCandidate = GenerateStateCandidate(state); % \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435-\u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442         candidateEnergy = CalculateEnergy(stateCandidate, cities); % \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u044d\u043d\u0435\u0440\u0433\u0438\u044e                  if(candidateEnergy &lt; currentEnergy) % \u0435\u0441\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0435\u0439             currentEnergy = candidateEnergy; % \u0442\u043e \u043e\u043d\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c             state = stateCandidate;         else             p = GetTransitionProbability(candidateEnergy-currentEnergy, T); % \u0438\u043d\u0430\u0447\u0435, \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c             if (MakeTransit(p)) % \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0441\u044f \u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434                 currentEnergy = candidateEnergy;                 state = stateCandidate;             end         end;          T = DecreaseTemperature(initialTemperature, i) ; % \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443                  if(T &lt;= endTemperature) % \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430             break;         end;     end  end   <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. <\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u0443\u044e \u043f\u0440\u0438\u0440\u043e\u0434\u0443, \u0441\u043b\u0443\u0447\u0430\u0439 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u00ab\u043e\u0442\u0436\u0438\u0433\u00bb \u0432\u043e\u0437\u044c\u043c\u0451\u0442, \u0434\u0430 \u0438 \u0437\u0430\u0441\u0442\u0440\u044f\u043d\u0435\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. <\/p>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0430\u0441\u044c \u0441 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/6bd\/7ce\/e90\/6bd7cee90c883948c8fca0114aaed232.gif\"\/> = 10 \u0438 <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/bd6\/345\/981\/bd63459812ad62b344bc14a77876d19a.gif\"\/> = 0.00001.<\/p>\n<p>  \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u0440\u044f\u0434 \u043b\u0438 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0435\u0440 \u0438\u0441\u043f\u044b\u0442\u0430\u043b \u0431\u044b \u043e\u0433\u0440\u043e\u043c\u043d\u0443\u044e \u0440\u0430\u0434\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438 \u043c\u044b \u0435\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/560\/0cc\/750\/5600cc750af7c269bcc624d3841c5c56.png\" width=\"500\" \/><\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0443\u0434\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/1db\/b97\/c2c\/1dbb97c2c168e6356c494d263c391f0c.png\" width=\"500\" \/><\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e (\u0442\u043e\u0447\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430), \u0435\u0441\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043a\u0443\u0434\u0430 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u00ab\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430\u00bb. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0412\u0430\u043c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 T \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u00ab\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043e\u0442\u0436\u0438\u0433\u0430\u00bb \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0435\u043d\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u0438\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c; \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0432\u0440\u043e\u0434\u0435 machine learning; \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u0432\u044f\u0437\u044c \u0441 \u041c\u0430\u0440\u043a\u043e\u0432\u0441\u043a\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0438 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0451. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u043e\u0431\u044a\u044f\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0447\u0442\u0451\u043d\u043d\u043e\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441. \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043a\u0440\u0438\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f. <\/p>\n<p>  P.S.<\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0435\u043c, \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0410\u043d\u0442\u043e\u043d\u043e\u0432\u0443 \u0410\u043d\u043d\u0443 \u0438 \u0414\u043c\u0438\u0442\u0440\u0438\u044f \u0418\u0433\u043d\u0430\u0442\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0447\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u0434\u0430\u043b\u0438 \u043c\u043d\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/209610\/\"> http:\/\/habrahabr.ru\/post\/209610\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0445\u043e\u0434\u0447\u0438\u0432\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c, \u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u0430\u043a <a href=\"http:\/\/ru.wikipedia.org\/wiki\/\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c_\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438_\u043e\u0442\u0436\u0438\u0433\u0430\">\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u043e\u0442\u0436\u0438\u0433\u0430<\/a> (simulated annealing). \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043a \u0434\u0430\u043b\u0451\u043a\u0438\u043c \u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u043c\u043c\u0438\u0432\u043e\u044f\u0436\u0451\u0440\u0430. <\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0432\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 9 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0448\u043a\u043e\u043b\u044b. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043b\u044e\u0434\u0435\u0439 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u0435\u0440\u0432\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/366\/dcc\/e23\/366dcce23cab26db80f7717f6828cced.gif\" alt=\"image\" \/><\/div>\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-209610","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209610","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=209610"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209610\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}