{"id":365384,"date":"2024-05-21T02:36:58","date_gmt":"2024-05-21T02:36:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=365384"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T02:36:58","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=365384","title":{"rendered":"<span>\u041b\u043e\u0433\u0438\u0441\u0442\u0438\u043a\u0430. \u0427\u0430\u0441\u0442\u044c 6. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043d\u0435\u0441\u0442\u0438\u043d\u0433?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u043e\u0438\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0440\u044b\u043d\u043a\u0430\u043c, \u043a\u0430\u043a \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \u0441\u0442\u0430\u043b\u043e \u0443\u0436\u0435 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u0436. \u0421\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u043e\u0442, \u043a\u0442\u043e \u043d\u0435 \u0442\u043e\u0440\u0433\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0435\u0447\u0435\u0441\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0434\u0435\u043b \u0441 \u043d\u0438\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c. \u041a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043d\u044b\u043d\u0435\u0448\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043b\u0430\u0433 \u0438 \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0434\u0430\u044e\u0442\u0441\u044f \u0442\u044f\u0436\u0435\u043b\u044b\u043c \u0442\u0440\u0443\u0434\u043e\u043c. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043d\u0435\u043a\u0438\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u043c \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u043d\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d \u0432 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<h3>1. \u0426\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0440\u0438\u0432\u043e\u0439 \u0441\u043f\u0440\u043e\u0441\u0430<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u0438\u043d \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u043c (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u044e\u0431\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u0443\u0441\u043b\u0443\u0433\u0438), \u0432\u0435\u0434\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e. \u0421\u043f\u0440\u043e\u0441 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0443\u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0438 \u0446\u0435\u043d\u044b \u043a \u043d\u0443\u043b\u044e. \u0412 \u0446\u0435\u043b\u043e\u043c, \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441, \u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0438 \u043b\u0443\u0447\u0448\u0435\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0432\u0435\u0441\u044b: \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0448\u0435 \u0441\u043f\u0440\u043e\u0441, \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445: \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0440\u043e\u0441, \u0442\u043e \u0431\u0438\u043b\u0435\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0430\u0442\u0441\u044f; \u0435\u0441\u043b\u0438 \u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0443 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0442\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u0440\u0435\u0441\u0435\u043b. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u0435, \u0438 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0435\u0433\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u044b \u0433\u0440\u0443\u0437\u043e\u0432 \u043d\u0430 \u0447\u0430\u0448\u0430\u0445 \u0432\u0435\u0441\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0435\u043c\u043a\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 \u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/116\/fd6\/dd6\/116fd6dd639ef80c87586060a0c7f763.svg\" width=\"12\" height=\"12\"\/>-\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0441\u0435\u043b. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81c\/a10\/7d9\/81ca107d992b68d96da6c1aba7307e44.svg\" width=\"12\" height=\"12\"\/>-\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043b\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u0443\u043f\u0438\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u044b.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431: \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u0432\u043e\u0437\u0434\u0438\u043a\u0430, \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0438\u043d\u0430 \u0441 \u0447\u0430\u0448\u0430\u043c\u0438. \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0441\u043f\u0440\u043e\u0441 \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432 \u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0430 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043f\u0440\u043e\u0441\u0430, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0443\u0436\u0435 \u043a \u043d\u0435\u043c\u0443.<\/p>\n<p>\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0438\u043d\u044b \u0432\u0435\u0441\u043e\u0432 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0446\u0435\u043d\u0430, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0441\u0435\u043b \u0432 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0440\u0435\u0439\u0441\u044b \u041c\u043e\u0441\u043a\u0432\u0430 \u2014 \u041f\u0430\u0440\u0438\u0436, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439. \u041f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f: \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0431\u0438\u043b\u0435\u0442\u044b \u0440\u0430\u0441\u043a\u0443\u043f\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0411\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0438 \u0441\u043f\u0440\u043e\u0441: \u043e\u043d \u043e\u0431\u044b\u0447\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0430 \u0432\u043e\u0442 \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043f\u0440\u043e\u0441 \u2014 \u043d\u0435\u0442. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0434\u0430\u0442\u044c 10 \u043c\u0435\u0441\u0442. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0446\u0435\u043d\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439 \u0447\u0430\u0448\u0435 \u0432\u0435\u0441\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c 10 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439. \u0421\u043f\u0440\u043e\u0441 \u0441\u043b\u0443\u0447\u0430\u0435\u043d, \u0432\u0435\u0434\u044c \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0446\u0435\u043d\u0430\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u0446\u0435\u043d\u0443, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0441\u044b \u043d\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u043b\u0438\u0441\u044c \u0431\u044b \u043e\u0442 \u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441 \u2014 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d \u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0415\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<blockquote>\n<p><strong>\u0421\u043f\u0440\u043e\u0441<\/strong> \u2014 \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u043e\u0439 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438 \u0436\u0435\u043b\u0430\u044e\u0442 \u043a\u0443\u043f\u0438\u0442\u044c \u043f\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435, \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/blockquote>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b:<\/p>\n<ul>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}\" alt=\"\\mathrm{Price}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e87\/5a0\/578\/e875a0578d64f362d6d28a09a1865f9c.svg\" width=\"43\" height=\"17\"\/> \u2014 \u0446\u0435\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438);<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q\" alt=\"Q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/25b\/bd3\/da3\/25bbd3da35d15a3742975892c1f12885.svg\" width=\"15\" height=\"20\"\/> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433);<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T\" alt=\"T\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6dc\/c94\/83b\/6dcc9483b781ed19bf9d18820f1b4b30.svg\" width=\"14\" height=\"17\"\/> \u2014 \u043f\u0435\u0440\u0438\u043e\u0434 (\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a) \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"Q = f(\\mathrm{Price}, T).\" alt=\"Q = f(\\mathrm{Price}, T).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b55\/acd\/359\/b55acd3596459c8b0b96368f89186823.svg\" width=\"137\" height=\"22\"\/><\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043d\u044b. \u0414\u0430\u043d\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043b\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u043a\u0438\u0434\u043e\u043a \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0446\u0435\u043d\u044b \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u043f\u0440\u043e\u0441, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: \u043f\u043e\u0433\u043e\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043f\u0440\u0438\u0431\u044b\u0442\u0438\u044f \u0438\u043b\u0438 \u0440\u0435\u0437\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043f\u0440\u043e\u0441 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u2014 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u043d\u043e \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439.<\/p>\n<h4>1.1. \u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0438\u043a\u0430\u043a\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435. \u041d\u043e \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0439\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445, \u0430 \u0441\u0430\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"Q_{1} = [-20 \\cdot \\mathrm{Price} + 43]\" alt=\"Q_{1} = [-20 \\cdot \\mathrm{Price} + 43]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c7\/e6f\/446\/4c7e6f44647650507886e5f3d9dc0c72.svg\" width=\"195\" height=\"22\"\/><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"Q_{2} = [-15 \\cdot \\mathrm{Price} + 38],\" alt=\"Q_{2} = [-15 \\cdot \\mathrm{Price} + 38],\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d95\/34e\/bb5\/d9534ebb52c0c34a423b8858c8624614.svg\" width=\"200\" height=\"22\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price} \\in [1.0; 1.4]\" alt=\"\\mathrm{Price} \\in [1.0; 1.4]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30e\/cff\/4c0\/30ecff4c08d9e57522684fb3fad57809.svg\" width=\"135\" height=\"22\"\/> \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c 0.1, \u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import numpy as np import pandas as pd np.random.seed(42) from scipy import stats from scipy.stats import uniform, betabinom, randint, poisson, gamma import matplotlib.pyplot as plt from pylab import rcParams rcParams['figure.figsize'] = 7, 4 rcParams['figure.dpi'] = 140 %config InlineBackend.figure_format = 'png' import seaborn as sns #sns.set() #from matplotlib import cm sns.set_style(\"whitegrid\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 2, figsize=(12, 3))  price = np.round(np.arange(1, 1.5, 0.1), 1) q1 = np.round(-20 * price + 43) q2 = np.round(-15 * price + 38)  ax[0].plot(price, q1, 'bo-', label=r'$Q_{1}$') ax[0].plot(price, q2, 'ro-', label=r'$Q_{2}$') ax[0].legend() ax[0].set_yticks(np.r_[15:25]) ax[0].set_xticks(price) ax[0].set_xlabel('Price') ax[0].set_ylabel('Quantity') ax[0].set_title('Demand')  ax[1].plot(price, price * q1, 'bo-', label=r'$Q_{1}$') ax[1].plot(price, price * q2, 'ro-', label=r'$Q_{2}$') ax[1].legend() ax[1].set_xlabel('Price') ax[1].set_ylabel('Profit') ax[1].set_xticks(price) ax[1].set_title('Profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/579\/8f2\/b61\/5798f2b6139621e3c123980fadcf1e66.png\" width=\"1391\" height=\"438\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/579\/8f2\/b61\/5798f2b6139621e3c123980fadcf1e66.png\"\/><\/figure>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u043a\u0430\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0443\u0441\u043b\u0443\u0433, \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u2014 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u043e\u0441 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u0440\u0430\u0437\u0430 &#171;\u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043f\u0440\u043e\u0441\u0430&#187; \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c\u043e\u0439 \u0446\u0435\u043d\u044b \u0432\u043e\u0432\u0441\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0433\u043b\u0430\u0434\u043a\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathrm{Profit} = \\sum_{i} f_{i}(\\mathrm{Price_{i}}, T_{i}) \\cdot \\mathrm{Price_{i}} = \\sum_{i} Q_{i} \\cdot \\mathrm{Price_{i}} \\to \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" alt=\"\\mathrm{Profit} = \\sum_{i} f_{i}(\\mathrm{Price_{i}}, T_{i}) \\cdot \\mathrm{Price_{i}} = \\sum_{i} Q_{i} \\cdot \\mathrm{Price_{i}} \\to \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e50\/f5d\/751\/e50f5d75153c83b46c333d77a8c9b6df.svg\" width=\"506\" height=\"45\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/673\/a4d\/339\/673a4d339c8c117eb975fb33b3e52818.svg\" width=\"7\" height=\"16\"\/> \u2014 \u043d\u043e\u043c\u0435\u0440 \u043f\u0435\u0440\u0438\u043e\u0434\u0430, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q_{i}\" alt=\"Q_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fad\/f48\/50e\/fadf4850e13e80c72f8d3f816b078ec9.svg\" width=\"22\" height=\"20\"\/> \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u0446\u0435\u043d\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{i}\" alt=\"\\mathrm{Price}_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed9\/aab\/843\/ed9aab843dea81dc8914da2d5066ff75.svg\" width=\"50\" height=\"20\"\/>, \u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec}\" alt=\"\\mathrm{PriceVec}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56c\/835\/aa1\/56c835aa11b295f0cb0f465c740f57e9.svg\" width=\"75\" height=\"17\"\/> \u2014 \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043d, \u0434\u043b\u0438\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0432\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/67a\/72a\/047\/67a72a0476998e9045404e9439d81a95.svg\" width=\"7\" height=\"16\"\/>.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044b \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u0432 \u0438\u0445 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0445 \u0444\u043e\u0440\u043c. \u041f\u0440\u0438\u0447\u0435\u043c \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u0438\u0435. \u0418\u0437-\u0437\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0447\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445, \u0438, \u043a\u0430\u043a \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0434\u0430\u043b\u0435\u0435, \u044d\u0442\u0430 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0435 \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u0442.\u0435. \u0441\u0443\u043c\u043c\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432\u0441\u0435\u0433\u043e V \u043a\u0440\u0435\u0441\u0435\u043b \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"V = 40\" alt=\"V = 40\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/39b\/328\/f75\/39b328f75de7b0f3254fff65aae7ef5a.svg\" width=\"60\" height=\"17\"\/>, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0438\u043c\u0435\u044e\u0449\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p><img class=\"formula\" source=\"Q_{2} = \\begin{cases}Q_{2}, &amp; \\text{ if } Q_{2}  \\leqslant  V -  Q_{1} \\\\V - Q_{1}, &amp; \\text{ if } Q_{2} > V &#8212;  Q_{1}\\end{cases}.&#187; alt=&#187;Q_{2} = \\begin{cases}Q_{2}, &amp; \\text{ if } Q_{2}  \\leqslant  V &#8212;  Q_{1} \\\\V &#8212; Q_{1}, &amp; \\text{ if } Q_{2} > V &#8212;  Q_{1}\\end{cases}.&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a57\/119\/c59\/a57119c590d54d4b2569306e37f67523.svg&#187; width=&#187;299&#8243; height=&#187;49&#8243;\/><\/p>\n<p>\u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 1.1 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432, \u0442.\u0435. <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec} = (1.1, 1.1)\" alt=\"\\mathrm{PriceVec} = (1.1, 1.1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/249\/292\/399\/249292399357f1dcb6f4650fa2f8cbc7.svg\" width=\"173\" height=\"22\"\/>, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q_2 = np.where(Q_1 + Q_2 > 40, 40 - Q_1, Q_2) profit = pd.DataFrame((Q_1 * price)[:, np.newaxis] + Q_2 * price,                       columns=price,                       index=price) sns.heatmap(profit, annot=True, fmt=\".2f\", cmap='viridis') plt.ylabel(r'Price for $T_{1}$') plt.xlabel(r'Price for $T_{2}$') plt.title('Resulting profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/108\/c4f\/105\/108c4f105a3acb36ef9c31b4b45a9554.png\" width=\"791\" height=\"549\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/108\/c4f\/105\/108c4f105a3acb36ef9c31b4b45a9554.png\"\/><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0430\u044f \u0446\u0435\u043d\u0430 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0440\u0430\u0432\u043d\u0430 1.1, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 1.3.<\/p>\n<h4>1.2. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438? \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u0440\u0438\u0432\u044b\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0445 \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e. \u041f\u0443\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 \u0434\u0432\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0442.\u0435. \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0440\u0430\u0432\u043d\u043e\u0435 19, \u0442\u043e \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b 21 \u0438 17, \u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 [17, 18, 19, 20, 21] \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u0438 \u0440\u0430\u0432\u043d\u044b 0.2.<\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u0432\u0435\u0434\u044c \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{Profit}) = \\sum_{j} \\left (q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)} \\cdot P(q^{(2)}_{k} | \\mathrm{Price}^{(2)}) \\right ) \\cdot P(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" alt=\"E(\\mathrm{Profit}) = \\sum_{j} \\left (q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)} \\cdot P(q^{(2)}_{k} | \\mathrm{Price}^{(2)}) \\right ) \\cdot P(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/901\/0ca\/8c7\/9010ca8c730ef45a8bd29d19c19fe303.svg\" width=\"799\" height=\"62\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(1)}_{j}\" alt=\"q^{(1)}_{j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b2b\/0da\/6ca\/b2b0da6ca90afdd32264f6d7b4c2839e.svg\" width=\"28\" height=\"32\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(2)}_{k}\" alt=\"q^{(2)}_{k}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3cd\/e7c\/3f3\/3cde7c3f314b0d6e362212c553bf586c.svg\" width=\"28\" height=\"30\"\/> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435. <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(q^{(1)}_{j} | \\mathrm{Price}^{(1)})\" alt=\"P(q^{(1)}_{j} | \\mathrm{Price}^{(1)})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/728\/5e7\/f18\/7285e7f184110cec0d450a24f657a5dc.svg\" width=\"126\" height=\"32\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(q^{(2)}_{k} | \\mathrm{Price}^{(2)})\" alt=\"P(q^{(2)}_{k} | \\mathrm{Price}^{(2)})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f1c\/9bf\/e85\/f1c9bfe8532c716ac41f23981abf31b8.svg\" width=\"126\" height=\"30\"\/> \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(1)}_{j}\" alt=\"q^{(1)}_{j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0b7\/1c0\/ef2\/0b71c0ef262057d40bf14d53f4e6e21f.svg\" width=\"28\" height=\"32\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(2)}_{k}\" alt=\"q^{(2)}_{k}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/783\/c10\/ee4\/783c10ee479bda0db52681eca3377b03.svg\" width=\"28\" height=\"30\"\/> \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0446\u0435\u043d\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(1)}\" alt=\"\\mathrm{Price}^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a35\/aef\/8bb\/a35aef8bb994bec2e0cef0d9d83ee4e4.svg\" width=\"63\" height=\"22\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(2)}\" alt=\"\\mathrm{Price}^{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8b4\/f99\/a81\/8b4f99a81b3b55e220ffc1d94f484932.svg\" width=\"63\" height=\"22\"\/>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442:<\/p>\n<p><img class=\"formula\" source=\"q^{(2)}_{k} = \\begin{cases}q^{(2)}_{k}, &amp; \\text{ if } q^{(2)}_{k}  \\leqslant  V -  q^{(1)}_{j} \\\\V - q^{(1)}_{j}, &amp; \\text{ if } q_{j}^{(2)} > V &#8212;  q^{(1)}_{j}\\end{cases},&#187; alt=&#187;q^{(2)}_{k} = \\begin{cases}q^{(2)}_{k}, &amp; \\text{ if } q^{(2)}_{k}  \\leqslant  V &#8212;  q^{(1)}_{j} \\\\V &#8212; q^{(1)}_{j}, &amp; \\text{ if } q_{j}^{(2)} > V &#8212;  q^{(1)}_{j}\\end{cases},&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/978\/97f\/beb\/97897fbeb8e1ce3093d0a6757878aea8.svg&#187; width=&#187;317&#8243; height=&#187;65&#8243;\/><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">res_profit = [] for i in range(5):     profit_row = []     for j in range(5):         Q1 = (np.c_[-2:3] + q1[i])         Q2 = (np.r_[-2:3] + q2[j])         Q2 = np.where(Q1 + Q2 > 40, 40 - Q1, Q2)         profit_ij = np.sum((price[i] * Q1.flatten() + price[j] * Q2.sum(axis=1)*0.2)*0.2)         profit_row.append(profit_ij)     res_profit.append(profit_row)      res_profit = pd.DataFrame(res_profit,                           columns=price,                           index=price)  sns.heatmap(res_profit, annot=True, fmt=\".2f\", cmap='viridis') plt.ylabel(r'Price in $T_{1}$') plt.xlabel(r'Price in $T_{2}$') plt.title('Resulting Average Profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0f4\/c3d\/37e\/0f4c3d37e03f6b661dff412d9cdc66f8.png\" width=\"791\" height=\"549\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f4\/c3d\/37e\/0f4c3d37e03f6b661dff412d9cdc66f8.png\"\/><\/figure>\n<p>\u041b\u0443\u0447\u0448\u0430\u044f \u0446\u0435\u043d\u0430 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0441 1.3 \u043d\u0430 1.4: \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 40 \u043c\u0435\u0441\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0442\u044c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0440\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec} = (1.2, 1.2)\" alt=\"\\mathrm{PriceVec} = (1.2, 1.2)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/271\/518\/676\/271518676fc7109d1ea4b70e4785e8b3.svg\" width=\"173\" height=\"22\"\/>, \u0442\u0440\u0435\u0431\u0443\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b\u0448\u0435 \u0448\u043b\u0430 \u0440\u0435\u0447\u044c \u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u043e\u043c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0435 \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u0435\u0437 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c. \u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0447\u044c \u0442\u0430\u043a\u0436\u0435 \u0438\u0434\u0435\u0442 \u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0431\u0435\u0436\u0430\u0442\u044c \u0432\u043f\u0435\u0440\u0435\u0434 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u043d\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0430 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, 100 \u0440\u0430\u0437 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u044b \u0446\u0435\u043d:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def demand(price, period, high=2, low=2):     a = [-20, -15]     b = [43, 38]     q = np.round(a[period] * price + b[period])     d = randint.rvs(q - low, q + high + 1)     return d  def profit_s(price_1, price_2):     q1 = demand(price_1, 0)     q2 = demand(price_2, 1)     if q1 + q2 > 40:         q2 = 40 - q1     profit = q1 * price_1 + q2 * price_2     return profit  means_profit_1 = [np.mean([profit_s(1.2, 1.2) for i in range(100)]) for j in range(100)] sns.kdeplot(means_profit_1, label='(1.2, 1.2)')  means_profit_2 = [np.mean([profit_s(1.1, 1.4) for i in range(100)]) for j in range(100)] sns.kdeplot(means_profit_2, label='(1.1, 1.4)')  means_profit_3 = [np.mean([profit_s(1.2, 1.4) for i in range(100)]) for j in range(100)] sns.kdeplot(means_profit_3, label='(1.2, 1.4)') plt.title('KDE of average profit deviations') plt.legend(title=r'$\\overrightarrow{\\mathrm{Price}}$');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/093\/25b\/d06\/09325bd06d3748829280714c2a983a98.png\" width=\"865\" height=\"520\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/093\/25b\/d06\/09325bd06d3748829280714c2a983a98.png\"\/><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c\u0441\u044f, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435. \u0422\u0430\u043a\u0438\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0443\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u0432 0.35% \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0438 \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u043e\u0440\u043e\u0442\u0430\u0445, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0438\u043b\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0435\u043d\u0430\u0445 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0445 \u043d\u0435\u0442 \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u0434\u0430\u0436:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(2, 2, figsize=(12, 8))  def sales(ind):     n_iter = 5000     test_data = []     for _ in range(n_iter):         q1 = demand(price[ind[0]], 0)         q2 = demand(price[ind[1]], 1)                  if q1 + q2 > 40:             q2_correct = 40 - q1             res_profit = q1 * price[ind[0]] + q2_correct * price[ind[1]]             test_data.append([q1 + q2, res_profit, 'larger capacity'])         if q1 + q2 == 40:             res_profit = q1 * price[ind[0]] + q2 * price[ind[1]]             test_data.append([q1 + q2, res_profit, 'equal to capacity'])         if q1 + q2 &lt; 40:             res_profit = q1 * price[ind[0]] + q2 * price[ind[1]]             test_data.append([q1 + q2, res_profit, 'less capacity'])     test_data_df = pd.DataFrame(test_data,                        columns=['demand', 'profit', 'occupancy'])     return test_data_df  data = sales((1, 4))  sns.histplot(data=data,               x=data['demand'],              hue='occupancy',              hue_order=['less capacity', 'equal to capacity', 'larger capacity'],              discrete=True,              stat='probability',              palette='Dark2',              ax=ax[0, 0])  ax[0, 0].set_xticks(np.r_[31:45]) ax[0, 0].set_title('Occupancy rate\\nwhen using a prices vector (1.1; 1.4)')  sns.histplot(data.profit, bins=np.r_[40.01 : 52 : 1], stat='probability', ax=ax[0, 1]) ax[0, 1].axvline(data.profit.mean(), color='r') ax[0, 1].set_title('Distribution of profit values\\nwhen using a price vector (1.1; 1.4)')  data = sales((2, 4))  sns.histplot(data=data,               x=data['demand'],              hue='occupancy',              hue_order=['less capacity', 'equal to capacity', 'larger capacity'],              discrete=True,              stat='probability',              palette='Dark2',              ax=ax[1, 0])   ax[1, 0].set_xticks(np.r_[31:45]) ax[1, 0].set_title('Occupancy rate\\nwhen using a prices vector (1.2; 1.4)')  sns.histplot(data.profit, bins=np.r_[40.01 : 52 : 1], stat='probability', ax=ax[1, 1]) ax[1, 1].axvline(data.profit.mean(), color='r') ax[1, 1].set_title('Distribution of profit values\\nwhen using a price vector (1.2; 1.4)')  plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/488\/105\/1d5\/4881051d5fc54aff3e2953bbe1e6d164.png\" width=\"1666\" height=\"1105\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/488\/105\/1d5\/4881051d5fc54aff3e2953bbe1e6d164.png\"\/><\/figure>\n<p>\u0424\u0438\u043e\u043b\u0435\u0442\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043e \u0434\u043e 40, \u043e\u043d\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0443\u0434\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0431\u0438\u043b\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u043f\u0430\u0441\u0442\u044c \u0438\u0437 \u043f\u0440\u043e\u0434\u0430\u0436\u0438. \u0420\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 10%. \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u044e\u0442\u0441\u044f \u0438 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u0445\u043e\u0442\u044f \u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u0438 \u0434\u0440\u0443\u0433 \u043a \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0446\u0435\u043d\u044b \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u0430\u0436: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0439 \u0431\u043e\u0440\u044c\u0431\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u0449\u0443\u0442\u0438\u043c\u043e\u043c\u0443 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043d\u043e \u0437\u0430 \u044d\u0442\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u0438\u043b\u0435\u0442\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u043d\u044c\u0448\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0443\u0431\u044b\u0442\u043a\u0438 \u043a\u0430\u043a \u043e\u0442 \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u0440\u0435\u0441\u0435\u043b, \u0442\u0430\u043a \u0438 \u043e\u0442 \u0443\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u043a\u0440\u0435\u0441\u0435\u043b (\u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c). \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438 \u0438\u0445, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0445 \u0443\u0447\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u0435\u043d\u044f\u0442\u044c \u0435\u043c\u043a\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 \u2014 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0435\u043c\u043a\u043e\u0441\u0442\u044c \u0435\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043d\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0444\u043b\u043e\u0442\u0430 \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0435\u0448\u0430\u044e\u0442 \u0432 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u044b \u0432\u0437\u044f\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 36 \u0438\u043b\u0438 38. \u0412 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0436\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<h4>1.3. \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b \u0438 \u0438\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/h4>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f, \u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430 1.2, \u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u044b \u043b\u044e\u0431\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 [17; 21]. \u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u043b \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0443\u044e \u0446\u0435\u043d\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430, \u0440\u0430\u0432\u043d\u043e\u0435 18 \u0438\u043b\u0438 20.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043a\u0430\u043a \u0432 \u043f\u0435\u0440\u0432\u043e\u043c, \u0442\u0430\u043a \u0438 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{Profit}) = \\sum_{j}  \\left (  q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)}_{j} \\cdot P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j}) \\right )  \\cdot P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to  \\underset{(\\mathrm{Price}^{(1)}, \\mathrm{PriceVec}^{(2)})}{\\mathrm{max}},\" alt=\"E(\\mathrm{Profit}) = \\sum_{j}  \\left (  q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)}_{j} \\cdot P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j}) \\right )  \\cdot P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to  \\underset{(\\mathrm{Price}^{(1)}, \\mathrm{PriceVec}^{(2)})}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a26\/b47\/9f6\/a26b479f634de1d458d47da935c52f51.svg\" width=\"912\" height=\"62\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(1)}_{j}\" alt=\"q^{(1)}_{j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f23\/d15\/d09\/f23d15d095f017660ec4b71d09171a6c.svg\" width=\"28\" height=\"32\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q^{(2)}_{k}\" alt=\"q^{(2)}_{k}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/092\/601\/d69\/092601d69cebd86f2b12a994f240addc.svg\" width=\"28\" height=\"30\"\/> \u2014 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 (\u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u043f\u0435\u0440\u0438\u043e\u0434\u0430), <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3d1\/c6d\/743\/3d1c6d743c04e00da0d119a415ea2fc0.svg\" width=\"8\" height=\"19\"\/> \u2014 \u043d\u0443\u043c\u0435\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u0430 \u0438\u043d\u0434\u0435\u043a\u0441 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k\" alt=\"k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5c8\/c52\/ca2\/5c8c52ca29587531e54d2868e7e41dc6.svg\" width=\"10\" height=\"17\"\/> \u2014 \u043d\u0443\u043c\u0435\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0446\u0435\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(2)}_{j}\" alt=\"\\mathrm{Price}^{(2)}_{j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d01\/12b\/342\/d0112b34210094e5464e453e018b92cc.svg\" width=\"63\" height=\"32\"\/>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ebd\/6f0\/c88\/ebd6f0c88cdad560def08e8a5c969976.svg\" width=\"8\" height=\"19\"\/>-\u043c\u0443 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044e \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435. <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)})\" alt=\"P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/248\/755\/c89\/248755c897e6ac658e37aec7c3b34b98.svg\" width=\"146\" height=\"32\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j})\" alt=\"P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/90f\/2ee\/7f7\/90f2ee7f70d0efdb5b38917cb3db9aeb.svg\" width=\"146\" height=\"32\"\/> \u2014 \u044d\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0446\u0435\u043d\u0435. \u0410 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"V=40\" alt=\"V=40\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3d1\/026\/438\/3d1026438a5dea804b0424bc155e6183.svg\" width=\"60\" height=\"17\"\/>.<\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0446\u0435\u043d\u0443 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(1)} = 1.2\" alt=\"\\mathrm{Price}^{(1)} = 1.2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ba\/0a8\/e18\/3ba0a8e18e2201bbe7a89fdcc7f97c1b.svg\" width=\"113\" height=\"22\"\/> \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438 \u043d\u0430\u0448\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec}^{(2)} = (1.2, 1.2, 1.4, 1.4, 1.4)\" alt=\"\\mathrm{PriceVec}^{(2)} = (1.2, 1.2, 1.4, 1.4, 1.4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3f0\/096\/a03\/3f0096a032346f1684a74cdfc99132e0.svg\" width=\"292\" height=\"26\"\/> \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435. \u0414\u043b\u044f \u0438\u0445 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/153\/2d8\/187\/1532d8187fe331d0c13c0db79d488ef0.svg\" width=\"11\" height=\"12\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Y\" alt=\"Y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c69\/28c\/ab1\/c6928cab1001e48cd0a0f11eb05b86cf.svg\" width=\"15\" height=\"16\"\/>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">q1 = np.round(-20 * price + 43).astype(int) q2 = np.round(-15 * price + 38).astype(int)  x, Y = 2, [2, 2, 4, 4, 4]<\/code><\/pre>\n<pre><code class=\"python\">q1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">array([23, 21, 19, 17, 15])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412  \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 [17, 18, 19, 20, 21], \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b-\u0441\u0442\u043e\u043b\u0431\u0446\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q_{1}\" alt=\"Q_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc1\/bbc\/76a\/dc1bbc76a50cc4dc95b059c17bbba481.svg\" width=\"24\" height=\"20\"\/>:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q1 = np.c_[-2:3] + q1[x] Q1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>array([[17],        [18],        [19],        [20],        [21]])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043d\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q_{2}\" alt=\"Q_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2bf\/f18\/42e\/2bff1842ef774ad169e229f6774f8085.svg\" width=\"24\" height=\"20\"\/>:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y] Q2<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y] Q2 Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y] Q2 array([[18, 19, 20, 21, 22],        [18, 19, 20, 21, 22],        [15, 16, 17, 18, 19],        [15, 16, 17, 18, 19],        [15, 16, 17, 18, 19]])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440, \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a\u0438\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430. \u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 17, \u0442\u043e \u043c\u044b \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0446\u0435\u043d\u0443 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c 0 \u0438\u0437 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Y\" alt=\"Y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbb\/b7a\/012\/fbbb7a0127618ca33f3b997d9ff281ef.svg\" width=\"15\" height=\"16\"\/>, \u0442.\u0435. 1.1. \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438 \u0446\u0435\u043d\u0435 1.1 \u0441\u043f\u0440\u043e\u0441 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 [19, 20, 21, 22, 23] \u2014 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q_{2}\" alt=\"Q_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68f\/ee4\/8c2\/68fee48c265df6988e2fcb97646b884b.svg\" width=\"24\" height=\"20\"\/>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>Q2_trunc = np.where(Q1 + Q2 > 40, 40 - Q1, Q2) Q2_trunc<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">array([[18, 19, 20, 21, 22],        [18, 19, 20, 21, 22],        [15, 16, 17, 18, 19],        [15, 16, 17, 18, 19],        [15, 16, 17, 18, 19]])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q1 * price[x] + Q2_trunc * np.c_[price[Y]]<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>array([[42. , 43.2, 44.4, 45.6, 46.8],        [43.2, 44.4, 45.6, 46.8, 48. ],        [43.8, 45.2, 46.6, 48. , 49.4],        [45. , 46.4, 47.8, 49.2, 50.6],        [46.2, 47.6, 49. , 50.4, 51.8]])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0423\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0438 \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">prob_1 = np.full((5, 1), 0.2) prob_2 = np.full((5, 5), 0.2) np.sum((prob_1 * prob_2) * (Q1 * price[x] + Q2_trunc * np.c_[price[Y]]))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">46.680000000000014<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u044b\u043b\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u0430\u043a\u043e\u043d\u043e\u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439. \u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u0440\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 46.68. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0438 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 \u043f\u0440\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e04\/4ff\/e00\/e044ffe005cab1e523f0efff16f31613.svg\" width=\"11\" height=\"12\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Y\" alt=\"Y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f6\/433\/8b9\/8f64338b97a9e96ffce82c167c3e5027.svg\" width=\"15\" height=\"16\"\/>:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">np.sum((prob_1 * prob_2) * (Q1 + Q2_trunc))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">37.20000000000001<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def e_cp(x, Y):     Q1 = np.c_[-2:3] + q1[x]     Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y]     Q2_trunc = np.where(Q1 + Q2 > 40, 40 - Q1, Q2)     prob_1 = np.full((5, 1), 0.2)     prob_2 = np.full((5, 5), 0.2)     # e_occupancy = np.sum((prob_1 * prob_2) * (Q1 + Q2_trunc))     e_profit = np.sum((prob_1 * prob_2) * (Q1 * price[x] + Q2_trunc * np.c_[price[Y]]))     return e_profit  def sale_correct(price_1):     n_iter = 5000     test_data = []     for _ in range(n_iter):         q1 = demand(price_1, 0)                  if q1 in [17, 18]:             price_2 = 1.2         if q1 in [19, 20, 21]:             price_2 = 1.4          q2 = demand(price_2, 1)                  if q1 + q2 > 40:             q2_correct = 40 - q1             res_profit = q1 * price_1 + q2_correct * price_2             test_data.append([q1 + q2, q1 + q2_correct, res_profit, 'larger capacity'])         if q1 + q2 == 40:             res_profit = q1 * price_1 + q2 * price_2             test_data.append([q1 + q2, q1 + q2, res_profit, 'equal to capacity'])         if q1 + q2 &lt; 40:             res_profit = q1 * price_1 + q2 * price_2             test_data.append([q1 + q2, q1 + q2, res_profit, 'less capacity'])                  test_data_df = pd.DataFrame(test_data,                        columns=['demand', 'Q', 'profit', 'occupancy'])                  return test_data_df  data = sale_correct(price[x])  fig, ax = plt.subplots(1, 2, figsize=(12, 4))  sns.histplot(data=data,               x=data['demand'],              hue='occupancy',              hue_order=['less capacity', 'equal to capacity', 'larger capacity'],              discrete=True,              stat='probability',              palette='Dark2',              ax=ax[0])  ax[0].axvline(data.Q.mean(), color='r') ax[0].set_xticks(np.r_[33:44]) ax[0].set_title('Aircraft occupancy\\n(adjustment prices)')  sns.histplot(data.profit, bins=np.r_[41.01 : 51 : 1], stat='probability', ax=ax[1]) ax[1].axvline(data.profit.mean(), color='r') ax[1].set_title('Distribution of profit values\\n(adjustment prices)');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c7f\/b13\/d3a\/c7fb13d3af7a2769834520adca0d6a7e.png\" width=\"1418\" height=\"572\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c7f\/b13\/d3a\/c7fb13d3af7a2769834520adca0d6a7e.png\"\/><\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438. \u0410\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0432\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u0441 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def hist_res(res_vals):     bins = np.r_[0:6]      h = np.array([np.histogram(res_vals.T[col],                                bins=bins,                                density=True)[0]                   for col in range(5)])          return h  ''' a = [0, 0, 0, 0, 0] b = [5, 5, 5, 5, 5] V = randint.rvs(low=a, high=b, size=(200, 5))  h = hist_res(V) h ''';<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def rand_vec(h):     indices = np.r_[0:5]          vec = [np.random.choice(indices,                             size=1                             , p=h_i)[0]            for h_i in h]          return vec  # rand_vec(h)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def opt_price_vec(x):     h = np.array([[0.2]*5]*5)          while h.max(axis=1).sum() != 5:         V = np.array([rand_vec(h) for _ in range(1000)])         R = np.array([e_cp(x, v) for v in V])         idx = np.argsort(R)[::-1][:50]         h = hist_res(V[idx])     opt_vec = np.nonzero(h)[1]     return e_cp(x, opt_vec), opt_vec<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0446\u0435\u043d \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412\u044b\u044f\u0441\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0446\u0435\u043d \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">X = np.r_[:5] res_e_profit = [] opt_vec = []  for x_i in X:     solution = opt_price_vec(x_i)     res_e_profit.append(solution[0])     opt_vec.append(solution[1])<\/code><\/pre>\n<pre><code class=\"python\">plt.plot(price, res_e_profit, 'o-') plt.title('Dependence of maximum average profit\\non price in the first period') plt.ylabel('Average profit') plt.xlabel(r'Price in $T_{1}$');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b61\/14e\/a63\/b6114ea63f740173302d418aeb0257a7.png\" width=\"865\" height=\"576\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b61\/14e\/a63\/b6114ea63f740173302d418aeb0257a7.png\"\/><\/figure>\n<p>\u0420\u0430\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(1)} = 1.1\" alt=\"\\mathrm{Price}^{(1)} = 1.1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/22b\/4be\/ee1\/22b4beee154b0fe976bbec70cb692606.svg\" width=\"113\" height=\"22\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}^{(1)} = 1.2\" alt=\"\\mathrm{Price}^{(1)} = 1.2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bef\/5f0\/45a\/bef5f045ae26c0ba40b38bc832df44c6.svg\" width=\"113\" height=\"22\"\/> \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(1, 5, figsize=(12, 2.5))  for i in range(5):     ax[i].plot(np.r_[:5], price[opt_vec[i]], 'o-')     if i == 0:         ax[i].set_ylabel(r'Price$^{(2)}$')     ax[i].set_xlabel(r'$q^{(1)}$')     ax[i].set_yticks(price)     ax[i].set_xticks(np.r_[:5], np.r_[-2:3] + q1[i])     ax[i].set_title(r'Price$^{(1)}$ = ' + str(price[i]))     ax[i].set_ylim(1, 1.5)      plt.tight_layout()  fig.suptitle('Optimal vectors of adjustment prices',              fontsize=15, y=1.05);<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3ef\/e3b\/530\/3efe3b5302c0844330622b17f7ef9694.png\" width=\"1665\" height=\"374\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ef\/e3b\/530\/3efe3b5302c0844330622b17f7ef9694.png\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438 \u0431\u044b\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec}^{(2)} = (1.2, 1.2, 1.4, 1.4, 1.4)\" alt=\"\\mathrm{PriceVec}^{(2)} = (1.2, 1.2, 1.4, 1.4, 1.4)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c3\/d9a\/4cf\/9c3d9a4cf4f63d53c02dce851fc4af6e.svg\" width=\"292\" height=\"26\"\/>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u043c\u0435\u0441\u0442. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436, \u0430 \u0435\u0441\u043b\u0438 \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435? \u041c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u0435 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0438\u043b\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u043c\u043e\u0433\u0443\u0442 \u043b\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445? \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u043c\u043e\u0433\u0443\u0442 \u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u0442\u044c\u0441\u044f, \u0441\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u0430\u043a\u043e\u043d\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f? \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0430\u043a\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e, \u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u044b. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u044b \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0442\u043e \u0431\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u043c\u0435\u0441\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443\u043d\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<h4>1.4. \u041a\u0432\u043e\u0442\u044b<\/h4>\n<p>\u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u044b\u0435, \u0442\u0430\u043a \u0438 \u043d\u0435\u0442, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438. \u041f\u0440\u0438 \u0440\u0435\u0437\u043a\u043e\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u0432\u0435\u0440\u0445 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u043d\u0430 \u043f\u043e \u043d\u0435\u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0439 \u0446\u0435\u043d\u0435, \u043b\u0438\u0431\u043e \u0431\u0438\u043b\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0432\u0441\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u0441\u044f. \u041f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430 \u0441\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0432\u043e\u0442, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0434\u0430\u0436\u0443 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0438\u0445 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445, \u0431\u043b\u0438\u0437\u043a\u0438\u0445 \u043a \u0432\u044b\u043b\u0435\u0442\u0443 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430, \u0433\u0434\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u043d\u044b \u043f\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0439 \u0446\u0435\u043d\u0435. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e, \u0430 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438.<\/p>\n<p>\u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043a\u0432\u043e\u0442\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"r^{(1)}\" alt=\"r^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e37\/5cd\/e4c\/e375cde4c4b929566f5662be9d02c9ed.svg\" width=\"28\" height=\"22\"\/> \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{j}\" alt=\"q_{j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/604\/5ae\/a5e\/6045aea5e7a889a7fb7f44101c54e6af.svg\" width=\"16\" height=\"17\"\/>. \u041f\u0443\u0441\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j\" alt=\"j\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe1\/8ed\/771\/fe18ed771314c398fd06a8f33aee4d39.svg\" width=\"8\" height=\"19\"\/> \u0440\u0430\u0432\u0435\u043d 2, \u0442.\u0435. \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u0432\u043e\u0442\u0435 \u0432 19 \u043a\u0440\u0435\u0441\u0435\u043b. \u0410 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/061\/4bd\/9a9\/0614bd9a99ce99332c3eee2c8167c0a6.svg\" width=\"11\" height=\"12\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Y\" alt=\"Y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/200\/caa\/348\/200caa348a4ec31dd7e9b9ef79741ce4.svg\" width=\"15\" height=\"16\"\/> \u0431\u0443\u0434\u0443\u0442 \u0442\u0435\u043c\u0438 \u0436\u0435, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, \u0442.\u0435. \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 u \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 j x, u, Y = 2, 2, [1, 1, 2, 2, 3]<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0430\u044f \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{Profit}) = \\sum_{j}  \\left (  q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)}_{j} \\cdot P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j}) \\right )  \\cdot P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to  \\underset{(\\mathrm{Price}^{(1)}, \\mathrm{PriceVec}^{(2)})}{\\mathrm{max}}.\" alt=\"E(\\mathrm{Profit}) = \\sum_{j}  \\left (  q^{(1)}_{j} \\cdot \\mathrm{Price}^{(1)} + \\sum_{k} q^{(2)}_{k} \\cdot \\mathrm{Price}^{(2)}_{j} \\cdot P^{(2)}_{k}(q^{(2)}_{k} | \\mathrm{Price}^{(2)}_{j}) \\right )  \\cdot P^{(1)}_{j}(q^{(1)}_{j} | \\mathrm{Price}^{(1)}) \\to  \\underset{(\\mathrm{Price}^{(1)}, \\mathrm{PriceVec}^{(2)})}{\\mathrm{max}}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/408\/e22\/9e2\/408e229e29f5ed711d39da514feb611e.svg\" width=\"912\" height=\"62\"\/><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u0432\u043e\u0442\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"r^{(1)}\" alt=\"r^{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d45\/f3b\/232\/d45f3b2323212d1054840c6e8b229324.svg\" width=\"28\" height=\"22\"\/>, \u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"V = r^{(1)} + r^{(2)}.\" alt=\"V = r^{(1)} + r^{(2)}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/297\/29b\/060\/29729b0603d5b1737162efecb01b4a4a.svg\" width=\"126\" height=\"23\"\/><\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0432\u043e\u0442\u0430 \u043c\u0435\u0441\u0442 \u0434\u043b\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(q_{j}^{(1)}, r^{(1)}) = \\begin{cases}(q_{j}^{(1)}, r^{(1)} - q_{j}^{(1)}), &amp; \\text{ if } q_{j}^{(1)} &lt; r^{(1)} \\\\(r^{(1)}, 0), &amp; \\text{ if } q_{j}^{(1)} \\geqslant  r^{(1)}\\end{cases}.\" alt=\"(q_{j}^{(1)}, r^{(1)}) = \\begin{cases}(q_{j}^{(1)}, r^{(1)} - q_{j}^{(1)}), &amp; \\text{ if } q_{j}^{(1)} &lt; r^{(1)} \\\\(r^{(1)}, 0), &amp; \\text{ if } q_{j}^{(1)} \\geqslant  r^{(1)}\\end{cases}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/786\/9e0\/f47\/7869e0f474a50ad8b1a57ee559050e6c.svg\" width=\"395\" height=\"65\"\/><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u0447\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043a\u0432\u043e\u0442\u0435, \u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435:<\/p>\n<p><img class=\"formula\" source=\"q_{k}^{(2)} = \\begin{cases}q_{k}^{(2)}, &amp; \\text{ if } q_{k}^{(2)} \\leqslant r^{(2)} + r^{(1)} \\\\r^{(2)} + r^{(1)}, &amp; \\text{ if } q_{k}^{(2)} >  r^{(2)} + r^{(1)}\\end{cases}&#187; alt=&#187;q_{k}^{(2)} = \\begin{cases}q_{k}^{(2)}, &amp; \\text{ if } q_{k}^{(2)} \\leqslant r^{(2)} + r^{(1)} \\\\r^{(2)} + r^{(1)}, &amp; \\text{ if } q_{k}^{(2)} >  r^{(2)} + r^{(1)}\\end{cases}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fdd\/1f9\/2dd\/fdd1f92dda5c5466f8bf2e7c25f5a207.svg&#187; width=&#187;335&#8243; height=&#187;61&#8243;\/><\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"u\" alt=\"u\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7e7\/6c4\/108\/7e76c4108bb03a7bd5123e3815adce00.svg\" width=\"11\" height=\"12\"\/>, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u043b\u0438\u0448\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def e_ucp(x, u, Y):     Q1 = np.c_[-2:3] + q1[x]     Q1[Q1 > Q1[u]] = Q1[u]     Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y]     Q2_trunc = np.where(Q1 + Q2 > 40, 40 - Q1, Q2)     prob_1 = np.full((5, 1), 0.2)     prob_2 = np.full((5, 5), 0.2)     # e_occupancy = np.sum((prob_1 * prob_2) * (Q1 + Q2_trunc))     e_profit = np.sum((prob_1 * prob_2) * (Q1 * price[x] + Q2_trunc * np.c_[price[Y]]))     return e_profit  def opt_price_vec(x, u):     h = np.array([[0.2]*5]*5)          while h.max(axis=1).sum() != 5:         V = np.array([rand_vec(h) for _ in range(1000)])         R = np.array([e_ucp(x, u, v) for v in V])         idx = np.argsort(R)[::-1][:50]         h = hist_res(V[idx])     opt_vec = np.nonzero(h)[1]     return e_ucp(x, u, opt_vec), u, opt_vec<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0432\u043e\u0442\u044b \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">q1<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">array([23, 21, 19, 17, 15])<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">q1 = np.round(-20 * price + 43).astype(int) q2 = np.round(-15 * price + 38).astype(int) res_xu = [] for x_i in range(5):     Q1 = np.r_[-2:3] + q1[x_i]     res_xu_row = []     #print('-' * 100)     #print('x_i =', x_i)     for u_j in range(5):         vec_price = opt_price_vec(x_i, u_j)         res_xu_row.append([Q1[vec_price[1]], vec_price[0]])         # print(x_i, vec_price)     res_xu.append(res_xu_row)      res_xu = np.array(res_xu)<\/code><\/pre>\n<pre><code class=\"python\">for i in range(5):     plt.plot(res_xu[i][:, 0], res_xu[i][:, 1], 'o-', label=str(price[i]))  plt.legend(title=r'Price$^{(1)}$') plt.ylabel('Average profit') plt.xlabel(r'quota for the $q^{(1)}$') plt.xticks(np.r_[13:26]) plt.title('Dependence of average profit\\non the size of the quota of places in the first period');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/225\/84a\/892\/22584a892dff3673a379bd1799d3436b.png\" width=\"848\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/225\/84a\/892\/22584a892dff3673a379bd1799d3436b.png\"\/><\/figure>\n<p>\u041e \u0435\u0434\u0432\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430 1.1. \u0412\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043b\u044e\u0431\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043b\u0438\u0448\u044c \u043a \u044f\u0432\u043d\u043e\u043c\u0443 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438.<\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0432\u043e\u0442\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"x\" alt=\"x\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7be\/555\/5a0\/7be5555a0ba4f7b8382a8f411696c544.svg\" width=\"11\" height=\"12\"\/> \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043c\u0435\u0441\u0442\u0438\u043b\u043e\u0441\u044c \u0432\u0432\u0435\u0440\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 [23, 24, 25, 26, 27], \u0430 \u043d\u0435 [17, 18, 19, 20, 21]. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">q1 = np.round(-20 * price + 43).astype(int) q2 = np.round(-15 * price + 38).astype(int) res_xu = [] for x_i in range(5):     Q1 = np.r_[-2:3] + q1[x_i]     res_xu_row = []     #print('-' * 100)     #print('x_i =', x_i)     for u_j in range(5):         vec_price = opt_price_vec(x_i, u_j)         res_xu_row.append([Q1[vec_price[1]], vec_price[0]])         # print(x_i, vec_price)     res_xu.append(res_xu_row)      res_xu = np.array(res_xu)<\/code><\/pre>\n<pre><code class=\"python\">def e_ucp(x, u, Y):     Q1 = np.c_[-2:3] + q1[x]     if x == 2:         Q1 = np.array([[23], [24], [25], [26], [27]])     Q1[Q1 > Q1[u]] = Q1[u]     Q2 = (np.tile(np.c_[-2:3], (1, 5)) + q2).T[Y]     Q2_trunc = np.where(Q1 + Q2 > 40, 40 - Q1, Q2)     prob_1 = np.full((5, 1), 0.2)     prob_2 = np.full((5, 5), 0.2)     # e_occupancy = np.sum((prob_1 * prob_2) * (Q1 + Q2_trunc))     e_profit = np.sum((prob_1 * prob_2) * (Q1 * price[x] + Q2_trunc * np.c_[price[Y]]))     return e_profit  q1 = np.round(-20 * price + 43).astype(int) q2 = np.round(-15 * price + 38).astype(int)  res_xu = [] for x_i in range(5):     Q1 = np.r_[-2:3] + q1[x_i]     if x_i == 2:         Q1 = np.array([23, 24, 25, 26, 27])     res_xu_row = []     #print('-' * 100)     #print('x_i =', x_i)     for u_j in range(5):         vec_price = opt_price_vec(x_i, u_j)         res_xu_row.append([Q1[vec_price[1]], vec_price[0]])         #print(x_i, vec_price)     res_xu.append(res_xu_row)      res_xu = np.array(res_xu)<\/code><\/pre>\n<pre><code class=\"python\">for i in range(5):     plt.plot(res_xu[i][:, 0], res_xu[i][:, 1], 'o-', label=str(price[i]))  plt.legend(title=r'Price$^{(1)}$') plt.ylabel('Average profit') plt.xlabel(r'quota for the $q^{(1)}$') plt.xticks(np.r_[13:36]) plt.title('Dependence of average profit\\non the size of the quota of places in the first period');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/527\/494\/36d\/52749436dfcc47218860568633186d0a.png\" width=\"859\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/527\/494\/36d\/52749436dfcc47218860568633186d0a.png\"\/><\/figure>\n<\/p>\n<p>\u0418\u0437-\u0437\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u0440\u043e\u0441\u043b\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u0432\u043e\u0442\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0443\u0447\u0448\u0430\u044f \u043a\u0432\u043e\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u043e \u0446\u0435\u043d\u0435 1.2, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 25 \u043a\u0440\u0435\u0441\u0435\u043b.<\/p>\n<p>\u041a\u0432\u043e\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043e\u0442\u0441\u0435\u0447\u044c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430, \u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b \u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0432\u0432\u0435\u0440\u0445, \u0442\u0430\u043a \u0438 \u0432\u043d\u0438\u0437, \u0442\u043e \u043a\u0432\u043e\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u0447\u0435\u0440\u043f\u0430\u043d\u044b \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436, \u0430 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0436\u0435 \u0442\u0440\u0438, \u0442\u043e \u044d\u0442\u0438 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u2014 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e.<\/p>\n<h3>2. \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0412 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u043e\u0439 \u0430\u0432\u0438\u0430\u0446\u0438\u0438 \u0446\u0435\u043d\u0430 \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u043c\u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438. \u041a\u043b\u0430\u0441\u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0441 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, &#171;\u0411\u0418\u0417\u041d\u0415\u0421&#187; \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0442\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: J, C \u0438 D, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0435\u043c \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0442\u0430\u043a \u044d\u0442\u043e \u0446\u0435\u043d\u043e\u0439 (\u0442\u0430\u0440\u0438\u0444\u0430\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u0443\u0433\u0438 \u043f\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0437\u043a\u0435). \u0412 \u0442\u0430\u0440\u0438\u0444\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 J \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 3 \u0434\u043d\u044f \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430, \u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 C \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 7 \u0434\u043e 3 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430.<\/p>\n<p>\u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0440\u0438\u0444\u043e\u0432 (\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430 \u0431\u0438\u043b\u0435\u0442\u043e\u0432) \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e. \u042d\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u043f\u0440\u043e\u0441 \u0438 \u0440\u0435\u0448\u0438\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043f\u0435\u0440\u0438\u043e\u0434 c 10-\u0442\u0438 \u0434\u043e 3-\u0445 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c 18 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D \u043f\u043e \u0446\u0435\u043d\u0435 110 \u0443.\u0435.;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043f\u0435\u0440\u0438\u043e\u0434 c 3-\u0445 \u0434\u043e 1-\u0433\u043e \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c 14 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C \u043f\u043e \u0446\u0435\u043d\u0435 120 \u0443.\u0435.;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430 \u0434\u0435\u043d\u044c \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0430\u0442\u044c 8 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 J \u043f\u043e \u0446\u0435\u043d\u0435 140 \u0443.\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u043f\u043b\u0430\u043d \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f:<\/p>\n<ul>\n<li>\n<p>\u043f\u0435\u0440\u0438\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0434\u043d\u044f\u0445: <\/p>\n<ul>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{1} = [10, 3)\" alt=\"T_{1} = [10, 3)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/52b\/527\/4ed\/52b5274eddb0eaa9c9641ca6bcac9af0.svg\" width=\"96\" height=\"22\"\/>;<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{2} = [3, 1)\" alt=\"T_{2} = [3, 1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58a\/aa2\/481\/58aaa2481eb6ee6bd81616f8e6047e21.svg\" width=\"86\" height=\"22\"\/>;<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{3} = [1, 0.05]\" alt=\"T_{3} = [1, 0.05]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10d\/397\/6da\/10d3976da41b40e7b5cee247b6b694c7.svg\" width=\"109\" height=\"22\"\/>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0446\u0435\u043d\u044b: <\/p>\n<ul>\n<li>\n<p>D = 110 \u0443.\u0435.;<\/p>\n<\/li>\n<li>\n<p>C = 120 \u0443.\u0435.;<\/p>\n<\/li>\n<li>\n<p>J = 140 \u0443.\u0435..<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u043a\u0432\u043e\u0442\u044b \u043c\u0435\u0441\u0442: <\/p>\n<ul>\n<li>\n<p>D = 18 \u0431\u0438\u043b\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0421 = 14 \u0431\u0438\u043b\u0435\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>J = 8 \u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u0430\u043a-\u0442\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438: \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043c\u0435\u0441\u0442 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 D \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 C \u0438\u043b\u0438 J. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0435\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432, \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0442\u0440\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b I \u0438 Z. \u041a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0432\u0441\u0435, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0438\u0445 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u0432\u043e\u0442\u044b, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0443 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0434\u0430\u043d\u044b \u0438\u0445 \u043c\u0435\u0441\u0442\u0430 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442 \u043c\u0435\u0441\u0442, \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0435\u0441\u0442\u0438\u043d\u0433. \u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u0442\u0438\u043d\u0433 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 (\u0446\u0435\u043d) \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043a\u0432\u043e\u0442, \u0442.\u0435. \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u043c\u0435\u0441\u0442 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0438\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0417\u0432\u0443\u0447\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430, \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043b\u0438\u0431\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043d\u0435\u0442 \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0435 (\u0447\u0435\u0433\u043e \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e), \u043b\u0438\u0431\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u2014 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043d\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a\u0438\u043c, \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c, \u0442.\u0435. \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c \u0438 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0436 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430. \u0418 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0430\u0436\u0435 \u0434\u0432\u0435. \u041f\u0435\u0440\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432\u044b\u0448\u0435: \u0432 \u043d\u0435\u0439 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043d\u0435.<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{1}\" alt=\"T_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9a8\/313\/6ff\/9a83136ff4d061d28b543dabc997359c.svg\" width=\"20\" height=\"19\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{2}\" alt=\"T_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/69e\/1e1\/965\/69e1e19657c618331361046eaf1c854f.svg\" width=\"20\" height=\"19\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{3}\" alt=\"T_{3}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/853\/7b0\/a6d\/8537b0a6d181c5e9f94165d95bd74505.svg\" width=\"20\" height=\"20\"\/> \u0438 \u0442\u0440\u0438 \u043a\u0440\u0438\u0432\u044b\u0445 \u0441\u043f\u0440\u043e\u0441\u0430: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f_{1}(\\mathrm{price})\" alt=\"f_{1}(\\mathrm{price})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2a\/4e0\/cc4\/d2a4e0cc48ae45e0a4c9ead21e90560a.svg\" width=\"74\" height=\"22\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f_{2}(\\mathrm{price})\" alt=\"f_{2}(\\mathrm{price})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b32\/b6a\/bf1\/b32b6abf1d20993eda5245cea1188ebe.svg\" width=\"74\" height=\"22\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f_{2}(\\mathrm{price})\" alt=\"f_{2}(\\mathrm{price})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c1\/1ea\/517\/9c11ea51732aa7ed32b92c13fe490821.svg\" width=\"74\" height=\"22\"\/>:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">price = np.round(price, 1) mu1 = np.array([22, 20, 17, 14, 8]) mu2 = np.array([24, 21, 19, 15, 11]) mu3 = np.array([21, 19, 18, 17, 16])  plt.plot(price, mu1, 'bo-', label=r'$T_{1}$') plt.plot(price, mu2, 'ro-', label=r'$T_{2}$') plt.plot(price, mu3, 'go-', label=r'$T_{3}$') plt.xlabel('price') plt.ylabel('demand') plt.title('Dependence of demand on price and period')  plt.legend();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d14\/d12\/118\/d14d1211833d0db2f401d1f2b0bd05b1.png\" width=\"848\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d14\/d12\/118\/d14d1211833d0db2f401d1f2b0bd05b1.png\"\/><\/figure>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u2014 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0431\u044b \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{3}\" alt=\"T_{3}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcc\/5e8\/5a3\/dcc5e85a333fe26d0c2d4193e00a114b.svg\" width=\"20\" height=\"20\"\/> \u0431\u0435\u0441\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437 \u0438 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u0431\u0438\u043b\u0435\u0442\u044b \u043f\u043e \u0446\u0435\u043d\u0435 1.2, \u0442\u043e \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u0441\u043a\u0430\u0436\u0435\u043c, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u041f\u0443\u0430\u0441\u0441\u043e\u043d\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">mu = 18 Q = np.arange(5, 35)  plt.stem(Q, poisson.pmf(Q, mu), label='poisson pmf') plt.xlabel('Demand') plt.ylabel('Probability') plt.title(r'Distribution of demand in the $T_{3}$ at price 1.2') plt.legend();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f96\/008\/f60\/f96008f600309f2c9a4b09c004e3af5c.png\" width=\"865\" height=\"548\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f96\/008\/f60\/f96008f600309f2c9a4b09c004e3af5c.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0435\u043d \u044d\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u043c\u0438: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">P1 = poisson.pmf(Q, mu1.reshape(5, 1)) P2 = poisson.pmf(Q, mu2.reshape(5, 1)) P3 = poisson.pmf(Q, mu3.reshape(5, 1)) for t in range(5):     plt.plot(Q, P3[t], 'o-', ms=4, label=str(price[t])) plt.legend(title='Price:') plt.xlabel('Demand') plt.ylabel('Probability') plt.title('Demand distributions in the third period');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4e9\/4fa\/903\/4e94fa9033a272988d32c71f7152a8a3.png\" width=\"865\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e9\/4fa\/903\/4e94fa9033a272988d32c71f7152a8a3.png\"\/><\/figure>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0441\u043f\u0440\u043e\u0441 \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0438\u0432\u044b\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043f\u043b\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(1, 3, figsize=(12, 4), sharex=True, sharey=True) cbar_ax = fig.add_axes([.15, -.07, .7, .05]) cbar_ax.set_title('Probability', y=-2.3) P1_df = pd.DataFrame(P1.T[::-1], index=Q[::-1],                      columns=price)  sns.heatmap(P1_df, cmap='copper', cbar_ax=cbar_ax, cbar_kws={'orientation':'horizontal'}, ax=ax[0]) ax[0].plot(np.r_[0.5:5.5:1], 35 - mu1, 'o-', c='darkred', label='f1') ax[0].set_xlabel('Price') ax[0].set_ylabel('Demand') ax[0].legend() ax[0].set_title(r'Demand distributions in the $T_{1}$')  P2_df = pd.DataFrame(P2.T[::-1], index=Q[::-1],                      columns=price) sns.heatmap(P2_df, cmap='copper', cbar=False, ax=ax[1]) ax[1].plot(np.r_[0.5:5.5:1], 35 - mu2, 'o-', c='darkred', label='f2') ax[1].set_xlabel('Price') ax[1].set_ylabel('Demand') ax[1].legend() ax[1].set_title(r'Demand distributions in the $T_{2}$')  P3_df = pd.DataFrame(P3.T[::-1], index=Q[::-1],                      columns=price) sns.heatmap(P3_df, cmap='copper', cbar=False, ax=ax[2]) ax[2].plot(np.r_[0.5:5.5:1], 35 - mu3, 'o-', c='darkred', label='f3') ax[2].set_xlabel('Price') ax[2].set_ylabel('Demand') ax[2].legend() ax[2].set_title(r'Demand distributions in the $T_{3}$');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/336\/0e5\/804\/3360e5804d834e181d24be7f979cb456.png\" width=\"1387\" height=\"649\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/336\/0e5\/804\/3360e5804d834e181d24be7f979cb456.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0442\u0435\u043f\u043b\u043e\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c, \u0442\u043e\u0447\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0441\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0441\u043f\u0440\u043e\u0441\u0430. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u2014 \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u0443\u044e. \u0414\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u043c \u0440\u044f\u0434\u043e\u043c \u0432\u0430\u0436\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442\u0441\u044f \u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0448\u0443\u043c. \u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0441\u0430\u043c\u044b\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043d\u043e\u0439 \u043d\u0430 \u0442\u0443\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0443\u0442\u0435\u0432\u043a\u0438). \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u0437 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0432 \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0435, \u0430 \u0442\u043e\u0447\u043a\u0438 \u0433\u0438\u043f\u0435\u0440\u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0430 \u044d\u0442\u0438\u043c \u043d\u043e\u0432\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c. \u041d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f (\u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c), \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u2014 \u044d\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0443\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0442\u0430\u0440\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u043c\u0443\u0441\u043e\u0440 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u2014 \u043c\u0443\u0441\u043e\u0440 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u041f\u043b\u043e\u0445\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0435\u0442 \u0432\u0441\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0440\u0443\u0433\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0441 \u0446\u0435\u043d\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u0424\u0440\u0435\u043a\u0432\u0435\u043d\u0442\u0438\u0441\u0442\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f. \u041e\u043d \u043f\u043b\u043e\u0445 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430). \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u2014 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0435 &#171;\u0442\u043e\u043f\u043b\u0438\u0432\u043e&#187; \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0411\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043f\u0440\u043e\u0441\u0430 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e. \u0412 \u0444\u0440\u0435\u043a\u0432\u0435\u043d\u0442\u0438\u0441\u0442\u0441\u043a\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u0447\u0435\u0442\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0432 \u0431\u0430\u0439\u0435\u0441\u043e\u0432\u0441\u043a\u043e\u043c \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u043c\u0438. \u042d\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u0432 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u043d\u0435 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u044d\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0432\u0435\u0434\u044c \u0446\u0435\u043d\u044b \u0438 \u043a\u0432\u043e\u0442\u044b \u0446\u0435\u043d\u0437\u0443\u0440\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436 \u0438\u0437-\u0437\u0430 \u043a\u0432\u043e\u0442 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430 \u2014 \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0431\u0438\u043b\u0435\u0442\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0446\u0435\u043d\u044b \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u043e\u0439 \u0431\u0438\u043b\u0435\u0442\u0430 \u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445 \u0435\u0433\u043e \u043a\u0443\u043f\u0438\u043b\u0438, \u0438\u043c\u0435\u0435\u0442 \u043e\u0441\u043e\u0431\u0443\u044e \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u043b\u0443\u0447\u0448\u0435 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P(d|t)\" alt=\"P(d|t)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a7a\/4be\/f6b\/a7a4bef6bf0cb5fee846766d5323e7de.svg\" width=\"52\" height=\"22\"\/> \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"d\" alt=\"d\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e0\/b67\/ada\/9e0b67adac7eddc351b67a2c25a98fc2.svg\" width=\"10\" height=\"17\"\/> \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac8\/81f\/067\/ac881f067aec9f0ce257b6ff6de028c4.svg\" width=\"7\" height=\"16\"\/> \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0433\u0430\u043c\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"P(d|t) \\sim \\Gamma (0.9, 3)\" alt=\"P(d|t) \\sim \\Gamma (0.9, 3)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/334\/968\/429\/334968429e650ae5b9f1ec8fe1bece56.svg\" width=\"148\" height=\"22\"\/><\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 2, figsize=(12, 3.5))  x = np.linspace(0, 10) y = gamma.pdf(x, a=0.9, scale=3) ax[0].plot(x, y) ax[0].set_ylabel(r'$P(d|t)$') ax[0].set_xlabel('t (day)') ax[0].set_title(r'$P(d|t) \\sim \\Gamma (0.9, 3)$')  t = gamma.rvs(a=0.9, scale=3, size=100) t = t[t &lt; 10] sns.histplot(t, ax=ax[1], bins=np.r_[:10]) ax[1].set_xlabel('t (day)') ax[1].set_title('Dependence of the number of potential buyers\\non the time interval');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec0\/383\/114\/ec03831146a2029622a151f1385528bd.png\" width=\"1412\" height=\"518\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec0\/383\/114\/ec03831146a2029622a151f1385528bd.png\"\/><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f \u0437\u0430 10 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0437\u0430 5, \u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u044b\u0441\u043e\u043a\u0430 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0434\u043e \u043d\u0435\u0433\u043e. \u0412\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0439\u0441\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0436\u0435\u043b\u0430\u0435\u0442 \u043b\u0435\u0442\u0435\u0442\u044c \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 100 \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442 \u0431\u0438\u043b\u0435\u0442 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435, \u0442\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0431\u0438\u043b\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043d\u0435 \u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436 \u0438 \u0446\u0435\u043d\u044b, \u0430 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0438 \u0446\u0435\u043d\u044b. \u042d\u0442\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0430 \u0431\u0435\u0442\u0430\u0431\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"f(t|n=4, a=1, b=0.99t+0.1)\" alt=\"f(t|n=4, a=1, b=0.99t+0.1)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/017\/81e\/d83\/01781ed83a8e7ef78d77159f2861c071.svg\" width=\"271\" height=\"22\"\/>:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 2, figsize=(12, 3.5))  x = np.arange(5) n, a, b = 4, 1, 0.99*9 + 0.1  ax[0].plot(x, betabinom.pmf(x, n, a, b), 'bo', ms=8, label='betabinom pmf') ax[0].vlines(x, 0, betabinom.pmf(x, n, a, b), colors='b', lw=5, alpha=0.5) ax[0].set_xticks(x, map(str, price)) ax[0].set_xlabel('Price') ax[0].set_ylabel('Probability') ax[0].set_title('Dependence of the probability of purchasing a ticket\\non the price 9 days before departure')  n, a, b = 4, 1, 0.99*1 + 0.1  ax[1].plot(x, betabinom.pmf(x, n, a, b), 'bo', ms=8, label='betabinom pmf') ax[1].vlines(x, 0, betabinom.pmf(x, n, a, b), colors='b', lw=5, alpha=0.5) ax[1].set_xticks(x, map(str, price)) ax[1].set_xlabel('Price') ax[1].set_ylabel('Probability') ax[1].set_title('Dependence of the probability of purchasing a ticket\\non the price 1 day before departure');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7a0\/431\/912\/7a0431912257142effc37786e049e594.png\" width=\"1396\" height=\"518\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7a0\/431\/912\/7a0431912257142effc37786e049e594.png\"\/><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0430 9 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0446\u0435\u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0432\u043d\u0430 0, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0437\u0430 \u043e\u0434\u0438\u043d \u0434\u0435\u043d\u044c \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u0437\u0430 \u0432\u0441\u0435 10 \u0434\u043d\u0435\u0439 \u043f\u0440\u043e\u0434\u0430\u0436 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439, \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u0443\u043f\u0438\u0442\u044c \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">t = np.sort(gamma.rvs(a=0.9, scale=3, size=10000))[::-1] t = t[t &lt; 10] price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1) demand = price[price_idx] sns.histplot(demand, bins=np.r_[0.95:1.5:0.1], stat='probability') plt.xlabel('price') plt.title('pmf of purchasing a ticket at a certain price for all 10 days');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/040\/c25\/958\/040c2595800d8d4705d41392447a4c36.png\" width=\"865\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/040\/c25\/958\/040c2595800d8d4705d41392447a4c36.png\"\/><\/figure>\n<p>\u0414\u0430\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f &#171;\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438&#187;, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0435\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u0443\u044e. \u041f\u0443\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0442 10 \u0434\u043e 3-\u0445 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0435\u043d\u0430\u0445:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(1, 5, figsize=(15, 3)) mu_t1 = [] for i in range(5):     dem1 = []     for _ in range(1000):         t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]         t = t[t &lt; 10]         price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)         demand = price[price_idx]         end_t1 = np.where(t > 3)[0][-1]         dem1.append(np.cumsum(demand[: end_t1 + 1] >= price[i])[-1])     mu_t1.append(np.mean(dem1))     xx = np.arange(poisson.ppf(0.001, mu_t1[-1]),                    poisson.ppf(0.999, mu_t1[-1]))     yy = poisson.pmf(xx, mu_t1[-1])     ax[i].set_title(f'price = {price[i]}')     ax[i].plot(xx, yy, 'bo', ms=3, label=rf'$\\mu$ = {mu_t1[-1]}')     ax[i].legend()     ax[i].vlines(xx, 0, yy, colors='b', lw=1, alpha=0.5)      sns.histplot(dem1, discrete=True, stat='density', ax=ax[i]) fig.suptitle(r'Period $T_{1}=[10, 3)$') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ffb\/cb3\/f42\/ffbcb3f42c86cdc262813bf1257ea259.png\" width=\"2086\" height=\"418\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ffb\/cb3\/f42\/ffbcb3f42c86cdc262813bf1257ea259.png\"\/><\/figure>\n<p>\u041d\u0430 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u043d\u0435\u0441\u0435\u043d\u044b \u0442\u043e\u0447\u043a\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0430\u0441\u0441\u043e\u043d\u043e\u0432\u0441\u043a\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0441 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mu\" alt=\"\\mu\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/55d\/9b9\/1a1\/55d9b91a190174e3105933b6a780425c.svg\" width=\"12\" height=\"16\"\/> (\u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e), \u0440\u0430\u0432\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430. \u041e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u041f\u0443\u0430\u0441\u043e\u043d\u043e\u0432\u0441\u043a\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u0430\u0436\u0434\u0430\u044f \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0437\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{1}\" alt=\"T_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/539\/245\/6b9\/5392456b98a71337e67fbd5027ed312c.svg\" width=\"20\" height=\"19\"\/>.<\/p>\n<p>\u041f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0441 3-\u0433\u043e \u043f\u043e 1-\u0439 \u0434\u0435\u043d\u044c \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(1, 5, figsize=(15, 3)) mu_t2 = [] for i in range(5):     dem2 = []     for _ in range(1000):         t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]         t = t[t &lt; 10]         price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)         demand = price[price_idx]         start_t2 = np.where(t > 3)[0][-1]         end_t2 = np.where(t > 1)[0][-1]         dem2.append(np.sum(demand[start_t2 : end_t2 + 1] >= price[i]))     mu_t2.append(np.mean(dem2))     xx = np.arange(poisson.ppf(0.001, mu_t2[-1]),                    poisson.ppf(0.999, mu_t2[-1]))     yy = poisson.pmf(xx, mu_t2[-1])     ax[i].set_title(f'price = {price[i]}')     ax[i].plot(xx, yy, 'bo', ms=3, label=rf'$\\mu$ = {mu_t2[-1]}')     ax[i].legend()     ax[i].vlines(xx, 0, yy, colors='b', lw=1, alpha=0.5)      sns.histplot(dem2, discrete=True, stat='density', ax=ax[i]) #print(mu_t2) fig.suptitle(r'Period $T_{2}=[3, 1)$') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7b9\/f5f\/cca\/7b9f5fccababe3a02346ca62b4f6584d.png\" width=\"2086\" height=\"418\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7b9\/f5f\/cca\/7b9f5fccababe3a02346ca62b4f6584d.png\"\/><\/figure>\n<p>\u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0446\u0435\u043d\u0430 (\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mu\" alt=\"\\mu\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4e\/9a9\/3bb\/f4e9a93bb27cb41b5972f61ccc290922.svg\" width=\"12\" height=\"16\"\/>), \u0442\u0435\u043c \u0445\u0443\u0436\u0435 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0431\u0438\u043b\u0435\u0442\u0430 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0438\u0445 \u0446\u0435\u043d, \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u041f\u0443\u0430\u0441\u0441\u043e\u043d\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0439\u043c\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u0432\u0440\u0435\u043c\u044f, \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">fig, ax = plt.subplots(1, 5, figsize=(15, 3)) mu_t3 = [] for i in range(5):     dem3 = []     for _ in range(1000):         t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]         t = t[t &lt; 10]         price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)         demand = price[price_idx]         start_t3 = np.where(t > 1)[0][-1]         dem3.append(np.sum(demand[start_t3 + 1 : ] >= price[i]))      mu_t3.append(np.mean(dem3))     xx = np.arange(poisson.ppf(0.001, mu_t3[-1]),                    poisson.ppf(0.999, mu_t3[-1]))     yy = poisson.pmf(xx, mu_t3[-1])     ax[i].set_title(f'price = {price[i]}')     ax[i].plot(xx, yy, 'bo', ms=3, label=rf'$\\mu$ = {mu_t3[-1]}')     ax[i].legend()     ax[i].vlines(xx, 0, yy, colors='b', lw=1, alpha=0.5)      sns.histplot(dem3, discrete=True, stat='density', ax=ax[i]) #print(mu_t3) fig.suptitle(r'Period $T_{3}$') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fc6\/1d9\/393\/fc61d9393942902d68a66098be9b2db2.png\" width=\"2086\" height=\"418\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc6\/1d9\/393\/fc61d9393942902d68a66098be9b2db2.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0445 \u044f\u0432\u043b\u0435\u043d\u0438\u0439. \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u0435\u0441\u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mu\" alt=\"\\mu\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86b\/281\/349\/86b2813495533bd92f5b322239e845c1.svg\" width=\"12\" height=\"16\"\/> \u043e\u0442 \u0446\u0435\u043d\u044b \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0441\u044f \u043a\u0440\u0438\u0432\u044b\u0435 \u0441\u043f\u0440\u043e\u0441\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">plt.plot(price, mu_t1, 'ro-', label=r'$T_{1}$') plt.plot(price, mu_t2, 'go-', label=r'$T_{2}$') plt.plot(price, mu_t3, 'bo-', label=r'$T_{3}$') plt.legend() plt.xlabel('Price') plt.ylabel('Mean demand') plt.title('Demand curves derived from a differential demand model');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/028\/b1f\/303\/028b1f303f39705904905fc045a5e71c.png\" width=\"848\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/028\/b1f\/303\/028b1f303f39705904905fc045a5e71c.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0438 \u0440\u0435\u0448\u0438\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0434\u0430\u0436 \u043d\u0430 \u0435\u0435 \u043e\u0441\u043d\u043e\u0432\u0435. \u041f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: J, C \u0438 D, \u0433\u0434\u0435 J \u2014 \u0441\u0430\u043c\u044b\u0439 \u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441, D \u2014 \u0441\u0430\u043c\u044b\u0439 \u0434\u0435\u0448\u0435\u0432\u044b\u0439, \u0430 \u0432 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435 \u0432\u0441\u0435\u0433\u043e 40 \u043c\u0435\u0441\u0442. <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def profit_poisson(x):          q1 = poisson.rvs(mu=mu_t1[x[0]])     if q1 > 40:         q1 = 40         q2 = 0         q3 = 0     else:         q2 = poisson.rvs(mu=mu_t2[x[1]])         if q1 + q2 > 40:             q2 = 40 - q1             q3 = 0         else:             q3 = poisson.rvs(mu=mu_t3[x[2]])             if q1 + q2 + q3 > 40:                 q3 = 40 - q1 - q2                      profit = q1 * price[x[0]] + q2 * price[x[1]] + q3 * price[x[2]]     return profit  def e_profit_poisson(x):     return np.mean([profit_poisson(x) for _ in range(300)])  def hist_res_x(res_vals):     bins = np.r_[0:6]     h = np.array([np.histogram(res_vals.T[col],                                bins=bins,                                density=True)[0]                   for col in range(3)])          return h  def rand_vec_x(h):     indices = np.r_[0:5]          vec = [np.random.choice(indices,                             size=1                             , p=h_i)[0]            for h_i in h]          return vec  def opt_price_vecs(n_iter):     h_x = np.array([[0.2]*5]*3)     c_iter = 0     while h_x.max(axis=1).sum() != 3:         V_X = np.array([rand_vec_x(h_x) for _ in range(n_iter)])         R = np.array([e_profit_poisson(V_X[i]) for i in range(n_iter)])         idx = np.argsort(R)[::-1][:30]         h_x = hist_res_x(V_X[idx])         print(np.argmax(h_x, axis=1))         print('-'*30)         c_iter += 1         if c_iter == 7:             break     opt_price = price[np.nonzero(h_x)[1]]     print('opt_price =', opt_price)     x = np.argmax(h_x, axis=1)     return e_profit_poisson(x), x  opt_price_vecs(100)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">[1 2 3] ------------------------------ [1 2 2] ------------------------------ [1 2 3] ------------------------------ [1 2 3] ------------------------------ opt_price = [1.1 1.2 1.3] (47.53566666666667, array([1, 2, 3], dtype=int64))<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1.1, 1.2, 1.3.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a \u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0446\u0435\u043d \u0432 &#171;\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438&#187;:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def profit_real(x):          t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]     t = t[t &lt; 10]     price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)     demand = price[price_idx]      end_t1 = np.where(t > 3)[0][-1]     q1_cumsum = np.cumsum(demand[: end_t1 + 1] >= price[x[0]])     idx_u1 = np.where(q1_cumsum == 40)[0]     if idx_u1.size != 0:         end_t1 = idx_u1[0]         q1 = q1_cumsum[end_t1]         q2 = 0         q3 = 0         end_t2 = end_t1         end_t3 = end_t1     else:         q1 = q1_cumsum[end_t1]                  end_t2 = np.where(t > 1)[0][-1]         q2_cumsum = np.cumsum(demand[end_t1 + 1 : end_t2 + 1] >= price[x[1]])         idx_u2 = np.where(q2_cumsum == (40 - q1))[0] + end_t1 + 1         if idx_u2.size != 0:             end_t2 = idx_u2[0]             q2 = q2_cumsum[end_t2 - end_t1 - 1]             q3 = 0             end_t3 = end_t2         else:             q2 = q2_cumsum[end_t2 - end_t1 - 1]                          q3_cumsum = np.cumsum(demand[np.where(t &lt; t[end_t2])[0]] >= price[x[2]])             idx_u3 = np.where(q3_cumsum == (40 - q1 - q2))[0] + end_t2 + 1             if idx_u3.size != 0:                 end_t3 = idx_u3[0]                 q3 = q3_cumsum[end_t3 - end_t2 - 1]             else:                 end_t3 = t.size - 1                 q3 = q3_cumsum[end_t3 - end_t2 - 1]      profit = q1 * price[x[0]] + q2 * price[x[1]] + q3 * price[x[2]]      return profit , q1, q2, q3, q1 + q2 + q3, t[end_t1], t[end_t2], t[end_t3]  x = [1, 2, 3] #profit_real(x)  sales_real = [profit_real(x) for _ in range(3000)] sales_real_df = pd.DataFrame(sales_real,                 columns=['profit', 'D', 'C', 'J', 'All',                          'end_t1', 'end_t2', 'end_t3']                ) #sales_real_df.head()<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">sns.histplot(sales_real_df.profit) E_p = sales_real_df.profit.mean() plt.axvline(E_p, color='r', label=f'E(Profit) = {E_p:.2f}') plt.legend() plt.title('Average profit distribution');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e6c\/a6d\/0da\/e6ca6d0dae31382701cd4feaf1edeee5.png\" width=\"859\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e6c\/a6d\/0da\/e6ca6d0dae31382701cd4feaf1edeee5.png\"\/><\/figure>\n<p>\u0422\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_real_df.D, discrete=True, ax=ax[0]) ax[0].set_title('D (price = 1.1)') ax[0].set_xlabel('Occupancy') sns.histplot(sales_real_df.C, discrete=True, ax=ax[1]) ax[1].set_title('C (price = 1.2)') ax[1].set_xlabel('Occupancy') sns.histplot(sales_real_df.J, discrete=True, ax=ax[2]) ax[2].set_title('J (price = 1.3)') ax[2].set_xlabel('Occupancy') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e43\/b4e\/38f\/e43b4e38f5161f789828ef7336228ca6.png\" width=\"1666\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e43\/b4e\/38f\/e43b4e38f5161f789828ef7336228ca6.png\"\/><\/figure>\n<p>\u0412\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_real_df.end_t1, ax=ax[0]) e_t1 = sales_real_df.end_t1.mean() ax[0].axvline(e_t1, color='r', label=f'E(end_t1) = {e_t1:.2f}') ax[0].legend() ax[0].set_title('End of period T1 (D sales)') ax[0].set_xlabel('Day') sns.histplot(sales_real_df.end_t2, ax=ax[1]) e_t2 = sales_real_df.end_t2.mean() ax[1].axvline(e_t2, color='r', label=f'E(end_t2) = {e_t2:.2f}') ax[1].legend() ax[1].set_title('End of period T2') ax[1].set_xlabel('Day') sns.histplot(sales_real_df.end_t3, ax=ax[2]) e_t3 = sales_real_df.end_t3.mean() ax[2].axvline(e_t3, color='r', label=f'E(end_t3) = {e_t3:.2f}') ax[2].legend() ax[2].set_title('End of period T3') ax[2].set_xlabel('Day') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/359\/0f6\/2f5\/3590f62f54136ca20b6eb075e3adcc25.png\" width=\"1665\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/359\/0f6\/2f5\/3590f62f54136ca20b6eb075e3adcc25.png\"\/><\/figure>\n<p>\u0412 \u0438\u0434\u0435\u0430\u043b\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{3}\" alt=\"T_{3}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e38\/4cb\/7b9\/e384cb7b959a8e58d71e72d83f51d6e0.svg\" width=\"20\" height=\"20\"\/> (\u0442.\u0435. \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432) \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0438\u0436\u0435 \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043b\u0435\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441\u0443\u0434\u044f \u043f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443, \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0437\u0430 12 \u0447\u0430\u0441\u043e\u0432 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u2014 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0438 \u043d\u0435 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u043d\u0438\u0437\u043a\u0438\u043c \u0446\u0435\u043d\u0430\u043c. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0443\u043c\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0434 \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0432\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D \u043a\u0432\u043e\u0442\u0443 \u0432 12 \u043c\u0435\u0441\u0442, \u0430 \u043f\u0440\u043e\u0434\u0430\u043b\u0438 \u0432\u0441\u0435\u0433\u043e 10, \u0442\u043e \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f 2. \u0418 \u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0443\u0436\u043d\u043e \u043a\u0443\u0434\u0430-\u0442\u043e \u0434\u0435\u0442\u044c \u2014 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043b\u0438\u0431\u043e \u043a \u043a\u0432\u043e\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C, \u043b\u0438\u0431\u043e \u043a \u043a\u0432\u043e\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 J. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u0442\u0438\u043d\u0433.<\/p>\n<p>\u041d\u0435\u0441\u0442\u0438\u043d\u0433 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0435\u0441\u0442 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043d\u0438\u0445. \u041c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0432\u043e\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 D \u0438 \u0421, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0435\u0440\u0430\u0441\u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u043b\u0435\u0442\u044b \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 D \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043a \u043a\u0432\u043e\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C. \u0410 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 J \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u043c\u0443\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043c\u0435\u0441\u0442, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0446\u0435\u043d\u044b \u0434\u043b\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0442 \u043f\u0440\u0438 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0440\u0435\u043c\u044f-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 # \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0430, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0435\u0441\u0442:  def profit_lin(X, Up):          U = np.copy(Up)     t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]     t = t[t &lt; 10]     price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)     demand = price[price_idx]      end_t1 = np.where(t > 3)[0][-1]     q1_cumsum = np.cumsum(demand[: end_t1 + 1] >= X[0])     idx_u1 = np.where(q1_cumsum == U[0])[0]     if idx_u1.size != 0:         end_t1 = idx_u1[0]         q1 = q1_cumsum[end_t1]     else:         q1 = q1_cumsum[end_t1]      U[1] = U[1] + U[0] - q1      end_t2 = np.where(t > 1)[0][-1]     q2_cumsum = np.cumsum(demand[end_t1 + 1 : end_t2 + 1] >= X[1])     idx_u2 = np.where(q2_cumsum == U[1])[0] + end_t1 + 1     if idx_u2.size != 0:         end_t2 = idx_u2[0]         q2 = q2_cumsum[end_t2 - end_t1 - 1]     else:         q2 = q2_cumsum[end_t2 - end_t1 - 1]      U[2] = 40 - q1 - q2      q3_cumsum = np.cumsum(demand[np.where(t &lt; t[end_t2])[0]] >= X[2])     idx_u3 = np.where(q3_cumsum == U[2])[0] + end_t2 + 1     if idx_u3.size != 0:         end_t3 = idx_u3[0]         q3 = q3_cumsum[end_t3 - end_t2 - 1]     else:         end_t3 = t.size - 1         q3 = q3_cumsum[end_t3 - end_t2 - 1]      profit = q1 * X[0] + q2 * X[1] + q3 * X[2]      return profit, q1, q2, q3, q1 + q2 + q3, t[end_t1], t[end_t2], t[end_t3]  #X = np.array([1.1, 1.2, 1.3]) #Up = np.array([9, 9, 40]) #profit_lin(X, Up)  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c: def e_profit_lin(X, Up, n_iter):     return np.mean([profit_lin(X, Up)[0] for _ in range(n_iter)])  #e_profit_lin(X, Up, 10000)  # \u0440\u044f\u0434 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438: def hist_res_x(res_vals):     bins = np.r_[0:6]     h = np.array([np.histogram(res_vals.T[col],                                bins=bins,                                density=True)[0]                   for col in range(3)])          return h  def rand_vec_x(h):     indices = np.r_[0:5]          vec = [np.random.choice(indices,                             size=1                             , p=h_i)[0]            for h_i in h]          return vec  def hist_res_u(res_vals):     bins = np.r_[1:22]     h = np.array([np.histogram(res_vals.T[col],                                bins=bins,                                density=True)[0]                   for col in range(2)])          return h  def rand_vec_u(h):     indices = np.r_[1:21]          vec = [np.random.choice(indices,                             size=1                             , p=h_i)[0]            for h_i in h]          return vec + [40]  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e: def opt_price_vecs(n_iter):     h_x = np.array([[0.2]*5]*3)     h_u = np.array([[0.05]*20]*2)     c_iter = 0     while h_u.max(axis=1).sum() != 2:         V_X = np.array([rand_vec_x(h_x) for _ in range(n_iter)])         V_U = np.array([rand_vec_u(h_u) for _ in range(n_iter)])         R = np.array([e_profit_lin(price[V_X[i_vec]], V_U[i_vec], 200) for i_vec in range(n_iter)])         idx = np.argsort(R)[::-1][:20]         h_x = hist_res_x(V_X[idx])         h_u = hist_res_u(V_U[idx])         print(np.argmax(h_x, axis=1))         print(np.argmax(h_u, axis=1))         print('-'*30)         c_iter += 1         if c_iter == 7:             break     opt_vec_x = price[np.nonzero(h_x)[1]]     opt_vec_u = np.hstack((np.argmax(h_u, axis=1), [40]))     print(opt_vec_x, opt_vec_u)     return e_profit_lin(opt_vec_x, opt_vec_u, 200)  opt_price_vecs(200)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">[1 2 3] [18  8] ------------------------------ [1 2 3] [17  8] ------------------------------ [1 2 3] [10 10] ------------------------------ [1 2 3] [10 10] ------------------------------ [1 2 3] [ 7 10] ------------------------------ [1 2 3] [ 7 10] ------------------------------ [1 2 3] [ 7 10] ------------------------------ [1.1 1.2 1.3] [ 7 10 40] 48.27900000000002<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0442\u0435\u043c\u0438 \u0436\u0435 \u0441\u0430\u043c\u044b\u043c\u0438, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0432\u043e\u0442:<\/p>\n<ul>\n<li>\n<p>D \u2014 7 \u043c\u0435\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>C \u2014 10 \u043c\u0435\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>J \u2014 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u0435\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0432\u043e\u0442, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u0442, \u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u0432\u043e\u0442 \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043d\u0430\u0445:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">epm = [] for u1 in range(1, 20):     p_row = []     #print(u1, end=', ')     for u2 in range(1, 20):         p_row.append(e_profit_lin([1.1, 1.2, 1.3], [u1, u2, 40], 1000))     epm.append(p_row)      epm = pd.DataFrame(epm, columns=range(1, 20), index=range(1, 20)) plt.figure(figsize=(12, 7)) sns.heatmap(epm, annot=True, fmt=\".2f\", cmap='nipy_spectral') plt.ylabel('Subclass D quota') plt.xlabel('Subclass C quota') plt.title('Dependence of average profit\\non quotas of subclasses D and C');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a9\/420\/696\/6a9420696fc77bdc867ce476e84e6f4b.png\" width=\"1265\" height=\"896\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a9\/420\/696\/6a9420696fc77bdc867ce476e84e6f4b.png\"\/><\/figure>\n<p>\u0421\u0432\u0435\u0442\u043b\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0441\u0435\u043c \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u0436 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043e\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435 &#171;\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438&#187;? \u041a \u043e\u0442\u0432\u0435\u0442\u0443 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043d\u0438\u0436\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0442\u043e, \u043a \u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0432\u043e\u0442 \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u0430\u0436. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D \u043a\u0432\u043e\u0442\u0443, \u0440\u0430\u0432\u043d\u0443\u044e 7, \u0430 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C \u2014 \u043a\u0432\u043e\u0442\u0443, \u0440\u0430\u0432\u043d\u0443\u044e 15. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0436\u0443\u043b\u044c\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, \u0430 \u0435\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u043d\u0430 1.5%:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">X = np.array([1.1, 1.2, 1.3]) Up = np.array([7, 15, 40]) sales_lin = [profit_lin(X, Up) for _ in range(3000)] sales_lin_df = pd.DataFrame(sales_lin,                 columns=['profit', 'D', 'C', 'J', 'All',                          'end_t1', 'end_t2', 'end_t3']                ) #sales_lin_df.head()  sns.histplot(sales_lin_df.profit, binwidth=1) E_p = sales_lin_df.profit.mean() plt.axvline(E_p, color='r', label=f'E(Profit) = {E_p:.2f}') plt.legend() plt.title('Average profit distribution');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/954\/1c4\/3db\/9541c43dbc1777e10129974054a4c5aa.png\" width=\"870\" height=\"516\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/954\/1c4\/3db\/9541c43dbc1777e10129974054a4c5aa.png\"\/><\/figure>\n<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 (\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c):  <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_lin_df.D, discrete=True, ax=ax[0]) ax[0].set_title('D (price = 1.1)') ax[0].set_xlabel('Occupancy') sns.histplot(sales_lin_df.C, discrete=True, ax=ax[1]) ax[1].set_title('C (price = 1.2)') ax[1].set_xlabel('Occupancy') sns.histplot(sales_lin_df.J, discrete=True, ax=ax[2]) ax[2].set_title('J (price = 1.3)') ax[2].set_xlabel('Occupancy') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7be\/bb8\/949\/7bebb89490681a25271c30fcdd16d30e.png\" width=\"1665\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7be\/bb8\/949\/7bebb89490681a25271c30fcdd16d30e.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442 \u0440\u0435\u0437\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c, \u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0442\u044b C \u0434\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0440\u0430\u0432\u043d\u043e\u0433\u043e 11, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0441\u0434\u0432\u0438\u0433\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 J \u0432\u043f\u0440\u0430\u0432\u043e \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044e \u0435\u0433\u043e \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0445\u0432\u043e\u0441\u0442\u0430.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0436 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_lin_df.end_t1, ax=ax[0]) e_t1 = sales_lin_df.end_t1.mean() ax[0].axvline(e_t1, color='r', label=f'E(end_t1) = {e_t1:.2f}') ax[0].legend() ax[0].set_title('End of period T1 (D sales)') ax[0].set_xlabel('Day') sns.histplot(sales_lin_df.end_t2, ax=ax[1]) e_t2 = sales_lin_df.end_t2.mean() ax[1].axvline(e_t2, color='r', label=f'E(end_t2) = {e_t2:.2f}') ax[1].legend() ax[1].set_title('End of period T2 (C sales)') ax[1].set_xlabel('Day') sns.histplot(sales_lin_df.end_t3, ax=ax[2]) e_t3 = sales_lin_df.end_t3.mean() ax[2].axvline(e_t3, color='r', label=f'E(end_t3) = {e_t3:.2f}') ax[2].legend() ax[2].set_title('End of period T3 (J sales)') ax[2].set_xlabel('Day') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/80d\/9f3\/89a\/80d9f389a7331e6be85455d51d037231.png\" width=\"1666\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80d\/9f3\/89a\/80d9f389a7331e6be85455d51d037231.png\"\/><\/figure>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{1}\" alt=\"T_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/080\/699\/72a\/08069972a933f19dacaf74449e7f23ea.svg\" width=\"20\" height=\"19\"\/> \u2014 \u0438\u0437-\u0437\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0442\u044b \u043e\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0437\u0430 3 \u0434\u043d\u044f \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438 \u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"T_{2}\" alt=\"T_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b1f\/80d\/2f4\/b1f80d2f425f0b19d4ef724b104372b7.svg\" width=\"20\" height=\"19\"\/>. \u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0436 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043c\u0435\u0441\u0442\u0438\u043b\u043e\u0441\u044c \u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043b\u0435\u0442\u0430, \u0430 \u0431\u0438\u043b\u0435\u0442\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0434\u043e\u043b\u044c\u0448\u0435.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043a\u0430\u043a \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u0430\u0436. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043d \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041f\u0443\u0441\u0442\u044c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043c\u0435\u0441\u0442 \u0431\u0443\u0434\u0443\u0442 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 J \u2014 \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def profit_par(X, Up):          U = np.copy(Up)     t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]     t = t[t &lt; 10]     price_idx = betabinom.rvs(n, 1, 0.99 * t + 0.1)     demand = price[price_idx]      end_t1 = np.where(t > 3)[0][-1]     q1_cumsum = np.cumsum(demand[: end_t1 + 1] >= X[0])     idx_u1 = np.where(q1_cumsum == U[0])[0]     if idx_u1.size != 0:         end_t1 = idx_u1[0]         q1 = q1_cumsum[end_t1]     else:         q1 = q1_cumsum[end_t1]      end_t2 = np.where(t > 1)[0][-1]     q2_cumsum = np.cumsum(demand[end_t1 + 1 : end_t2 + 1] >= X[1])     idx_u2 = np.where(q2_cumsum == U[1])[0] + end_t1 + 1     if idx_u2.size != 0:         end_t2 = idx_u2[0]         q2 = q2_cumsum[end_t2 - end_t1 - 1]     else:         q2 = q2_cumsum[end_t2 - end_t1 - 1]      U[2] = 40 - q1 - q2      q3_cumsum = np.cumsum(demand[np.where(t &lt; t[end_t2])[0]] >= X[2])     idx_u3 = np.where(q3_cumsum == U[2])[0] + end_t2 + 1     if idx_u3.size != 0:         end_t3 = idx_u3[0]         q3 = q3_cumsum[end_t3 - end_t2 - 1]     else:         end_t3 = t.size - 1         q3 = q3_cumsum[end_t3 - end_t2 - 1]      profit = q1 * X[0] + q2 * X[1] + q3 * X[2]      return profit, q1, q2, q3, q1 + q2 + q3, t[end_t1], t[end_t2], t[end_t3]  #X = np.array([1.1, 1.2, 1.3]) #Up = np.array([9, 9, 40]) #profit_par(X, Up)  def e_profit_par(X, Up, n_iter):     return np.mean([profit_par(X, Up)[0] for _ in range(n_iter)])  def opt_price_vecs(n_iter):     h_x = np.array([[0.2]*5]*3)     h_u = np.array([[0.05]*20]*2)     c_iter = 0     while h_u.max(axis=1).sum() != 2:         V_X = np.array([rand_vec_x(h_x) for _ in range(n_iter)])         V_U = np.array([rand_vec_u(h_u) for _ in range(n_iter)])         R = np.array([e_profit_par(price[V_X[i_vec]], V_U[i_vec], 200) for i_vec in range(n_iter)])         idx = np.argsort(R)[::-1][:20]         h_x = hist_res_x(V_X[idx])         h_u = hist_res_u(V_U[idx])         print(np.argmax(h_x, axis=1))         print(np.argmax(h_u, axis=1))         print('-'*30)         c_iter += 1         if c_iter == 7:             break     opt_vec_x = price[np.nonzero(h_x)[1]]     opt_vec_u = np.hstack((np.argmax(h_u, axis=1), [40]))     print(opt_vec_x, opt_vec_u)     return e_profit_par(opt_vec_x, opt_vec_u, 200)  opt_price_vecs(200)<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">[1 3 3] [10 11] ------------------------------ [1 2 3] [17  9] ------------------------------ [1 2 3] [10  9] ------------------------------ [1 2 3] [10  9] ------------------------------ [1 2 3] [10  9] ------------------------------ [1 2 3] [10  9] ------------------------------ [1 2 3] [10  9] ------------------------------ [1.1 1.2 1.3] [10  9 40] 48.53200000000001<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u0432\u043e\u0442\u044b \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>D \u2014 10 \u043c\u0435\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>C \u2014 9 \u043c\u0435\u0441\u0442;<\/p>\n<\/li>\n<li>\n<p>J \u2014 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u0435\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f, \u043f\u0443\u0441\u043a\u0430\u0439 \u0438 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u2014 \u0434\u0430\u0436\u0435 \u0444\u043e\u0440\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0436\u043d\u0435\u0439:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">X = np.array([1.1, 1.2, 1.3]) Up = np.array([10, 9, 40]) sales_par = [profit_par(X, Up) for _ in range(3000)] sales_par_df = pd.DataFrame(sales_par,                 columns=['profit', 'D', 'C', 'J', 'All',                          'end_t1', 'end_t2', 'end_t3']                ) #sales_par_df.head()  sns.histplot(sales_par_df.profit, binwidth=1) E_p = sales_par_df.profit.mean() plt.axvline(E_p, color='r', label=f'E(Profit) = {E_p:.2f}') plt.legend() plt.title('Average profit distribution');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/876\/c26\/ddf\/876c26ddfa9e3ed382141b2a66bc1aca.png\" width=\"870\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/876\/c26\/ddf\/876c26ddfa9e3ed382141b2a66bc1aca.png\"\/><\/figure>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_par_df.D, discrete=True, ax=ax[0]) ax[0].set_title('D (price = 1.1)') ax[0].set_xlabel('Occupancy') sns.histplot(sales_par_df.C, discrete=True, ax=ax[1]) ax[1].set_title('C (price = 1.2)') ax[1].set_xlabel('Occupancy') sns.histplot(sales_par_df.J, discrete=True, ax=ax[2]) ax[2].set_title('J (price = 1.3)') ax[2].set_xlabel('Occupancy') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/367\/b4d\/4cc\/367b4d4cc6953134b03694085c0d3b66.png\" width=\"1664\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/367\/b4d\/4cc\/367b4d4cc6953134b03694085c0d3b66.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043f\u043e\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C \u0438\u0441\u0447\u0435\u0437 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u0430\u0432\u044b\u0439 \u0445\u0432\u043e\u0441\u0442\u0438\u043a. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 D \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0434\u0430\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 J, \u0430 \u043d\u0435 C. \u042d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430.<\/p>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 3, figsize=(12, 4))  sns.histplot(sales_par_df.end_t1, ax=ax[0]) e_t1 = sales_par_df.end_t1.mean() ax[0].axvline(e_t1, color='r', label=f'E(end_t1) = {e_t1:.2f}') ax[0].legend() ax[0].set_title('End of period T1 (D sales)') ax[0].set_xlabel('Day') sns.histplot(sales_par_df.end_t2, ax=ax[1]) e_t2 = sales_par_df.end_t2.mean() ax[1].axvline(e_t2, color='r', label=f'E(end_t2) = {e_t2:.2f}') ax[1].legend() ax[1].set_title('End of period T2 (C sales)') ax[1].set_xlabel('Day') sns.histplot(sales_par_df.end_t3, ax=ax[2]) e_t3 = sales_par_df.end_t3.mean() ax[2].axvline(e_t3, color='r', label=f'E(end_t3) = {e_t3:.2f}') ax[2].legend() ax[2].set_title('End of period T3 (J sales)') ax[2].set_xlabel('Day') plt.tight_layout();<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/89f\/9e1\/348\/89f9e134875863907feb3a295246b761.png\" width=\"1666\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/89f\/9e1\/348\/89f9e134875863907feb3a295246b761.png\"\/><\/figure>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u0434\u0430\u043b\u0438\u043b\u043e\u0441\u044c \u043e\u0442 \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430, \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435\u043c \u0436\u0435\u0441\u0442\u043a\u043e\u0439 \u043a\u0432\u043e\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C.<\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u043c\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043d\u043e \u043d\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u0436 \u2014 \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442 \u044d\u0442\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435, \u0430 \u044d\u043c\u0435\u0440\u0434\u0436\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043a\u0430 \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u0435\u043d\u0438\u044f &#171;\u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u0430&#187;, \u0447\u0435\u043c &#171;\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0434\u0430&#187;. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043b\u044e\u0447\u043e\u043c \u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430.<\/p>\n<h2>3. \u041e\u0431\u0449\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0447\u0435\u0433\u043e \u2014 \u0432\u0435\u0434\u044c \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u0446\u0435\u043d\u044b \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0442\u0440\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0438 \u0442\u0440\u0438 \u043a\u0440\u0438\u0432\u044b\u0445 \u0441\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u043d \u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u2014 \u0431\u044b\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u0446\u0435\u043d\u044b: <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{1}\" alt=\"\\mathrm{Price}_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8c\/cc6\/156\/b8ccc6156e2114ae512b1530720773ef.svg\" width=\"52\" height=\"19\"\/>, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{2}\" alt=\"\\mathrm{Price}_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96b\/40d\/4f0\/96b40d4f0caca042847ed71c44a16370.svg\" width=\"52\" height=\"19\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{3}\" alt=\"\\mathrm{Price}_{3}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f4d\/80d\/385\/f4d80d3851171a81b159613b7130a80e.svg\" width=\"52\" height=\"20\"\/>. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0430 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p>\u0433\u0434\u0435, \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435:<\/p>\n<ul>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/767\/06c\/69b\/76706c69bd47e1933ff22755cf4df77a.svg\" width=\"7\" height=\"16\"\/> \u2014 \u043d\u043e\u043c\u0435\u0440 \u043f\u0435\u0440\u0438\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i,j}\" alt=\"q_{i,j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ed4\/ae2\/3ac\/ed4ae23ace4513f9d64cd1185cdfdc81.svg\" width=\"25\" height=\"17\"\/> \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2a0\/77b\/8b5\/2a077b8b51069727df9afde96bcdf08e.svg\" width=\"7\" height=\"16\"\/>-\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P_{i,j}(q_{i,j} | \\mathrm{Price}_{i})\" alt=\"P_{i,j}(q_{i,j} | \\mathrm{Price}_{i})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7f1\/19e\/ccb\/7f119eccbf1a416d6dd0b4a4f805b786.svg\" width=\"123\" height=\"23\"\/> \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i,j}\" alt=\"q_{i,j}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe4\/c17\/b46\/fe4c17b468b6ebc3a20a947bc18df823.svg\" width=\"25\" height=\"17\"\/> \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0446\u0435\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{i}\" alt=\"\\mathrm{Price}_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9fd\/24c\/1b6\/9fd24c1b6ac232b530813754ae619eba.svg\" width=\"50\" height=\"20\"\/>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u043e\u0433\u0434\u0430 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{ResProfit}\" alt=\"\\mathrm{ResProfit}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/018\/6c2\/e3c\/0186c2e3c748981038f6f2f56141b8af.svg\" width=\"81\" height=\"17\"\/> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 \u0441\u0443\u043c\u043c\u0435 \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u0438\u0431\u044b\u043b\u0435\u0439 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{ResProfit}) = \\sum_{i}E(\\mathrm{Profit}_{i}) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" alt=\"E(\\mathrm{ResProfit}) = \\sum_{i}E(\\mathrm{Profit}_{i}) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/482\/c72\/d8c\/482c72d8c42548807afcb6c5008808f9.svg\" width=\"342\" height=\"45\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{PriceVec}\" alt=\"\\mathrm{PriceVec}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f3e\/794\/3ce\/f3e7943ce3bbd0a6a395038c86404ea0.svg\" width=\"75\" height=\"17\"\/> \u2014 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0434\u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0443. \u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{ResProfit}\" alt=\"\\mathrm{ResProfit}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56a\/cc2\/1db\/56acc21db152e2fd1046c62d1ab1a023.svg\" width=\"81\" height=\"17\"\/> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u0431\u0449\u0435\u0439 \u0435\u043c\u043a\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u0435\u0441\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"V\" alt=\"V\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/718\/caa\/de8\/718caade8f2fbbd0486364bd1d25a520.svg\" width=\"15\" height=\"17\"\/> \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i+1}\" alt=\"q_{i+1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/08c\/5c6\/7f4\/08c5c67f4a579b286ac1523143e25731.svg\" width=\"33\" height=\"16\"\/> \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i}, q_{i-1},..., q_{1}\" alt=\"q_{i}, q_{i-1},..., q_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/766\/c3f\/7f8\/766c3f7f8d75588eb30e6e9e5254cf67.svg\" width=\"117\" height=\"16\"\/>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/691\/348\/b80\/691348b80735df44e61be3caccbcbda5.png\" width=\"1020\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/691\/348\/b80\/691348b80735df44e61be3caccbcbda5.png\"\/><\/figure>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u0435\u043c\u043a\u043e\u0441\u0442\u0438. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i+1}\" alt=\"q_{i+1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/496\/16c\/f77\/49616cf77e576ab6c6b7453e2d888c6d.svg\" width=\"33\" height=\"16\"\/> \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i}, q_{i-1},..., q_{1}\" alt=\"q_{i}, q_{i-1},..., q_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0fb\/7d5\/595\/0fb7d5595927a4e54f93f396f7925e4a.svg\" width=\"117\" height=\"16\"\/> (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u044d\u0442\u043e \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436). \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{Profit}_{i}) = \\sum_{j}q_{i,j}\\mathrm{Price}_{i}P_{i,j}(q_{i,j} | \\mathrm{Price}_{i}, q_{i-1},..., q_{1}) \\to  \\underset{\\mathrm{Price}}{\\mathrm{max}},\" alt=\"E(\\mathrm{Profit}_{i}) = \\sum_{j}q_{i,j}\\mathrm{Price}_{i}P_{i,j}(q_{i,j} | \\mathrm{Price}_{i}, q_{i-1},..., q_{1}) \\to  \\underset{\\mathrm{Price}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1f0\/47e\/e01\/1f047ee01a83ccd78454f7d3d6c1c25b.svg\" width=\"514\" height=\"47\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P_{i,j}(q_{i,j} | \\mathrm{Price}_{i}, q_{i-1},..., q_{1})\" alt=\"P_{i,j}(q_{i,j} | \\mathrm{Price}_{i}, q_{i-1},..., q_{1})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9fe\/175\/ca1\/9fe175ca12ff3166ff8595cfb3d5fd05.svg\" width=\"225\" height=\"23\"\/> \u2014 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0441\u043f\u0440\u043e\u0441\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i}\" alt=\"q_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/531\/bce\/d85\/531bced85296284987f509ba71fddc5e.svg\" width=\"15\" height=\"15\"\/> \u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ee0\/870\/1b0\/ee08701b0c57b6a60a7558c6fa2b7726.svg\" width=\"7\" height=\"16\"\/>-\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0446\u0435\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mathrm{Price}_{i}\" alt=\"\\mathrm{Price}_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f18\/f55\/30b\/f18f5530b1462c57d15c0298f0a0f68e.svg\" width=\"50\" height=\"20\"\/> \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043e <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{i-1},..., q_{1}\" alt=\"q_{i-1},..., q_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb1\/988\/e13\/cb1988e1318c6654ae89c861a3cda382.svg\" width=\"93\" height=\"16\"\/> \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412\u044b\u0448\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043f\u0443\u0442\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u0436, \u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{ResProfit}) = \\sum_{k} \\left ( \\left ( \\sum_{i} q_{i}\\mathrm{Price}_{i}\\right ) P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{PriceVec}) \\right ) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" alt=\"E(\\mathrm{ResProfit}) = \\sum_{k} \\left ( \\left ( \\sum_{i} q_{i}\\mathrm{Price}_{i}\\right ) P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{PriceVec}) \\right ) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1ab\/07d\/e20\/1ab07de206c4f27f47682346f5ca3330.svg\" width=\"562\" height=\"61\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\overrightarrow{Q}_{k}\" alt=\"\\overrightarrow{Q}_{k}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/489\/9de\/017\/4899de017ccc13d954f53eefef26373a.svg\" width=\"30\" height=\"33\"\/> \u2014 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(q_{i}, q_{i-1}, ..., q_{1})\" alt=\"(q_{i}, q_{i-1}, ..., q_{1})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/343\/de6\/d12\/343de6d123fda410f4b482b5983099e0.svg\" width=\"132\" height=\"22\"\/>, \u0442.\u0435. \u0432\u0435\u043a\u0442\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0430\u0436 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{Price})\" alt=\"P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{Price})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/023\/0e4\/f61\/0230e4f6151b36f050abcb2e468e90e4.svg\" width=\"115\" height=\"33\"\/> \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043f\u0440\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0446\u0435\u043d\u0430\u0445, \u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k\" alt=\"k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/027\/4d2\/67c\/0274d267cbf5d3e0773bf946efed2c96.svg\" width=\"10\" height=\"17\"\/> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0440\u0430\u0432\u043d\u043e\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"k = \\prod_{i}j_{i}.\" alt=\"k = \\prod_{i}j_{i}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/54e\/dcf\/33e\/54edcf33e5e00b6e088b0cbdaa4e6bc0.svg\" width=\"84\" height=\"45\"\/><\/p>\n<p>\u0421\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043c\u043e\u043d\u0441\u0442\u0440\u0443\u043e\u0437\u043d\u043e\u0439, \u043d\u043e \u0432\u043e\u0442 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"k\" alt=\"k\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4a8\/be8\/318\/4a8be83184e2a1918b5d4225e20ee35a.svg\" width=\"10\" height=\"17\"\/>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"Q\" alt=\"Q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c0\/73d\/fe9\/4c073dfe988707366feadbdd2f240aae.svg\" width=\"15\" height=\"20\"\/>, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(q_{i}, q_{i-1}, ..., q_{1})\" alt=\"(q_{i}, q_{i-1}, ..., q_{1})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/913\/9c4\/221\/9139c4221c0135a8136e0a4258efc9aa.svg\" width=\"132\" height=\"22\"\/> \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0434\u0430\u0436 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u2014 \u0437\u0430 \u044d\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438 \u043a\u0440\u0430\u0439\u043d\u0435 \u0433\u0438\u0431\u043e\u043a, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u043e\u043f\u0430\u0441\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u0441\u0443\u0431\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043d \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432.<\/p>\n<p>\u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0445 \u0446\u0435\u043d: \u0432\u044b\u0448\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u044d\u0442\u0430\u043f\u043e\u0432 (\u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432) \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0442\u043e \u0441\u0430\u043c\u0430 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b&#187; \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u0430\u043f\u0430\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0438\u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0445. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b&#187; \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0435\u043d\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043f\u043e \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0422\u043e\u0433\u0434\u0430 \u0447\u0435\u043c \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b?<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0430\u0436:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{Profit}_{1}) = \\sum_{j}q_{1,j}\\cdot\\mathrm{Price}^{(1)} \\cdot P_{1,j}(q_{1,j} | \\mathrm{Price}^{(1)}) \\to  \\underset{\\mathrm{Price}}{\\mathrm{max}},\" alt=\"E(\\mathrm{Profit}_{1}) = \\sum_{j}q_{1,j}\\cdot\\mathrm{Price}^{(1)} \\cdot P_{1,j}(q_{1,j} | \\mathrm{Price}^{(1)}) \\to  \\underset{\\mathrm{Price}}{\\mathrm{max}},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec8\/811\/49c\/ec881149c9f3ab5d35ba61fb37afc3cb.svg\" width=\"474\" height=\"47\"\/><\/p>\n<p>\u0415\u0441\u043b\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j = 3\" alt=\"j = 3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/247\/99b\/3c9\/24799b3c9b11b43c3ceff162b77614b4.svg\" width=\"44\" height=\"19\"\/>, \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 3 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0441\u0445\u043e\u0434\u0430 \u0438 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043d\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445. \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"(\\mathrm{Price}^{(2)}_{1}, \\mathrm{Price}^{(2)}_{2}, \\mathrm{Price}^{(2)}_{3})\" alt=\"(\\mathrm{Price}^{(2)}_{1}, \\mathrm{Price}^{(2)}_{2}, \\mathrm{Price}^{(2)}_{3})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/51d\/cfc\/2c3\/51dcfc2c3ea04b5eb48ccf47730121ab.svg\" width=\"220\" height=\"30\"\/> \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430. \u0421\u0430\u043c\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/369\/513\/578\/369513578972f0f5bc700487ddf05e70.png\" width=\"1900\" height=\"726\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/369\/513\/578\/369513578972f0f5bc700487ddf05e70.png\"\/><\/figure>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"E_{1}\" alt=\"E_{1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/05b\/eca\/bd0\/05becabd09083aa4a84bb8d2469828e1.svg\" width=\"23\" height=\"19\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"E_{2}\" alt=\"E_{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/070\/23b\/8b9\/07023b8b9c78323e01497cf1b204d4d9.svg\" width=\"23\" height=\"19\"\/> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044f\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445 \u2014 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432. \u0414\u043b\u044f \u0442\u0440\u0435\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{ResProfit}) = E_{1}(\\mathrm{Profit}^{(1)}) + E_{1}(E_{2}(\\mathrm{Profit}^{(2)}) + E_{2}(E_{3}(\\mathrm{Profit}^{(3)})))\" alt=\"E(\\mathrm{ResProfit}) = E_{1}(\\mathrm{Profit}^{(1)}) + E_{1}(E_{2}(\\mathrm{Profit}^{(2)}) + E_{2}(E_{3}(\\mathrm{Profit}^{(3)})))\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eb9\/2a8\/547\/eb92a85471c58944fce4bcdce6ac4857.svg\" width=\"583\" height=\"26\"\/><\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e, \u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0446\u0435\u043d \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0434\u043b\u0438\u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0446\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j_{i}\" alt=\"j_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d5c\/c4e\/463\/d5cc4e463dd785e4ce44b788643953e4.svg\" width=\"15\" height=\"19\"\/>. \u0417\u0430\u0442\u0435\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u0431\u0435\u0437\u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u0431\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f &#171;\u0432 \u043b\u043e\u0431&#187;.<\/p>\n<p>\u0420\u0430\u0434\u0438 \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0431\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u041f\u0443\u0430\u0441\u0441\u043e\u043d\u0430 \u0441 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\mu=13\" alt=\"\\mu=13\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/906\/d73\/a46\/906d73a4653af4a2d82a0f8a61a4f83c.svg\" width=\"57\" height=\"20\"\/>,  \u0430 \u043a\u0432\u043e\u0442\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"r^{(1)}=16\" alt=\"r^{(1)}=16\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/71c\/778\/0e3\/71c7780e3aa8ffe63fac6018664d6ed2.svg\" width=\"73\" height=\"22\"\/>, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">mu = 13  xx = np.arange(poisson.ppf(0.01, mu),                poisson.ppf(0.99, mu)) yy = poisson.pmf(xx, mu)  r = 16 ind_r = np.where(xx == r)[0][0] pq1 = yy[:ind_r+1] pq1[-1] = np.sum(yy[ind_r:]) q1 = xx[:ind_r+1] plt.stem(q1, pq1) plt.xlabel(r'$q_{1}$') plt.ylabel('Probability') plt.title(r'Distribution of $q_{1}$ with a $r_{1} = 16$');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d11\/41d\/4de\/d1141d4de00eabd22180229058c432a7.png\" width=\"865\" height=\"549\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d11\/41d\/4de\/d1141d4de00eabd22180229058c432a7.png\"\/><\/figure>\n<p>\u0415\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0430\u044f \u0446\u0435\u043d\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e\u0439, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a \u043b\u0443\u0447\u0448\u0438\u0445 \u0446\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432: \u0434\u043b\u044f <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{(1)} = 16\" alt=\"q_{(1)} = 16\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/35c\/d00\/7e0\/35cd007e071571f268b4284b7f46bf02.svg\" width=\"73\" height=\"23\"\/> \u0438 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"q_{(1)}\" alt=\"q_{(1)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be5\/4f9\/e06\/be54f9e06c4c44afee89308d21cbd44b.svg\" width=\"28\" height=\"19\"\/>. \u041f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u043c\u043d\u043e\u0433\u043e\u044d\u0442\u0430\u043f\u043d\u043e\u043c\u0443 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0435 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b.<\/p>\n<p>\u0421\u0430\u043c\u0430 \u0444\u0440\u0430\u0437\u0430 &#171;\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436&#187;, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0446\u0435\u043d\u044b&#187; \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443: \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043d\u044b \u043d\u0430 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u043f\u0440\u043e\u0434\u0430\u0436 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043b\u0435\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u043d\u0430 \u0432\u0435\u0441\u044c \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043f\u0435\u0440\u0438\u043e\u0434 \u043f\u0440\u043e\u0434\u0430\u0436, \u0442\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0446\u0435\u043d\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0432\u043e\u043e\u0431\u0449\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0439 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445.<\/p>\n<p>\u0428\u0443\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043d\u0435\u0432\u044f\u0437\u043a\u0435 \u2014 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f. \u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043d\u0435\u0432\u044f\u0437\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043c\u0435\u0440\u0435 \u0438\u0445 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430. \u0424\u0440\u0430\u0437\u0430 &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0446\u0435\u043d\u0430&#187; (\u0438\u043b\u0438 &#171;\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u043b\u0430\u043d&#187;) \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u0443\u044e \u043d\u0435\u0432\u044f\u0437\u043a\u0443. &#171;\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436&#187; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043d\u044b \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u0441\u043f\u0440\u043e\u0441\u0430, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043d\u0435\u0432\u044f\u0437\u043e\u043a.<\/p>\n<p>\u0412\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043d\u044e\u0430\u043d\u0441\u044b. \u041a\u0432\u043e\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0437\u0430\u0434\u0430\u0442\u044c \u0436\u0435\u0441\u0442\u043a\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0442.\u0435. \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c. \u0426\u0435\u043d\u044b \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u043b\u0430\u0431\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u0432\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043e\u043f\u0430\u0441\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0435\u0448\u0435\u0432\u043e\u0439 \u0446\u0435\u043d\u0435, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0446\u0435\u043d\u0443. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u043c. \u0427\u0442\u043e  \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0436\u0435\u0441\u0442\u043a\u0438\u0435 \u0438 \u0441\u043b\u0430\u0431\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f?<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u0434\u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u0436, \u0438 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u043c. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0446\u0435\u043d\u044b. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e \u2014 \u0432\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u0441\u043f\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0434\u0430\u0442\u044c, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u0430\u043d\u043e \u043c\u0430\u043b\u043e \u0431\u0438\u043b\u0435\u0442\u043e\u0432. \u0421\u043f\u0440\u043e\u0441 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u044c\u0441\u044f \u0438 \u0432\u0432\u0435\u0440\u0445. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0432\u044b\u0433\u043e\u0434\u043d\u044b\u043c (\u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0441\u043f\u0440\u043e\u0441 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c\u0441\u044f), \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0432\u043e\u0442\u0443.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0440\u0438\u0441\u043a \u043f\u0440\u043e\u0433\u0430\u0434\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u0435\u043b\u0438\u043a. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0441\u043f\u0440\u043e\u0441 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u0442\u0441\u044f \u0432\u043d\u0438\u0437, \u0442\u043e \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u0432 \u0442\u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434, \u0433\u0434\u0435 \u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0448\u0435 \u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u0447\u0435\u0440\u043f\u0430\u043d. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u0442\u0438\u043d\u0433 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u2014 \u043f\u0443\u0441\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043f\u044f\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: J, C, D, I, Z. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0434\u043e\u0440\u043e\u0433\u043e\u0433\u043e \u2014 J \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0434\u0435\u0448\u0435\u0432\u043e\u043c\u0443 \u2014 Z, \u0442\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2ff\/0b1\/aee\/2ff0b1aee78135c3ea65bf563730d025.png\" width=\"1827\" height=\"675\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2ff\/0b1\/aee\/2ff0b1aee78135c3ea65bf563730d025.png\"\/><\/figure>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043c\u0435\u0441\u0442 \u0438 \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f. \u0415\u0441\u043b\u0438 \u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043d\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0446\u0435\u043d\u043e\u0439 \u0438\/\u0438\u043b\u0438 \u0436\u0435\u0441\u0442\u043a\u043e\u0439 \u043a\u0432\u043e\u0442\u043e\u0439. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u0435\u0441\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u044b, \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043d\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0446\u0435\u043d\u043e\u0439, \u0436\u0435\u0441\u0442\u043a\u043e\u0439 \u043a\u0432\u043e\u0442\u043e\u0439 \u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043c\u0435\u0441\u0442 \u0432 \u043d\u0438\u0436\u0435\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u2014 \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0434\u043b\u044f \u043d\u0435\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 J \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0430 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438. \u041e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u043b\u0438\u043a\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0440\u043e\u0441\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u0441\u0430\u043c\u044b\u0445 \u0434\u0435\u0448\u0435\u0432\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043a \u0441\u0430\u043c\u044b\u043c \u0434\u043e\u0440\u043e\u0433\u0438\u043c, \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u043d\u0443\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0446\u0435\u043d\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0432\u0441\u0435, \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u0432\u043e\u0442\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0435\u0441\u0442 \u0438 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u2014 \u0442\u0440\u0438:<\/p>\n<ul>\n<li>\n<p><strong>Top-Down<\/strong> \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0437\u0430\u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u0432\u043e\u0442\u044b \u043d\u0438\u0436\u0435\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u043f\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u0433\u0434\u0435 \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>Up-Sell<\/strong> \u2014 \u0437\u0430\u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u0432\u043e\u0442\u044b \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u0442\u0430 (&#171;\u0436\u0430\u0434\u043d\u044b\u0439&#187;);<\/p>\n<\/li>\n<li>\n<p><strong>Bottom-Up<\/strong> \u2014 \u0437\u0430\u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u0432\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u043f\u0440\u0438 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043a\u0432\u043e\u0442\u044b \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0430, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043d\u0438\u0445.<\/p>\n<p>\u041d\u0435\u0441\u0442\u0438\u043d\u0433 \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"E(\\mathrm{ResProfit}) = \\sum_{k} \\left ( \\left ( \\sum_{i} q_{i}\\mathrm{Price}_{i}\\right ) P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{PriceVec}) \\right ) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}}.\" alt=\"E(\\mathrm{ResProfit}) = \\sum_{k} \\left ( \\left ( \\sum_{i} q_{i}\\mathrm{Price}_{i}\\right ) P_{k}(\\overrightarrow{Q}_{k} | \\mathrm{PriceVec}) \\right ) \\to  \\underset{\\mathrm{PriceVec}}{\\mathrm{max}}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a1b\/d6f\/92b\/a1bd6f92b72a641d0661927d4b6cec9b.svg\" width=\"562\" height=\"61\"\/><\/p>\n<p>\u041f\u0443\u0441\u0442\u044c <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\overrightarrow{R}_{i} = (r_{1}^{(J)}, r_{1}^{(C)}, r_{1}^{(D)}, r_{1}^{(I)}, r_{1}^{(Z)})\" alt=\"\\overrightarrow{R}_{i} = (r_{1}^{(J)}, r_{1}^{(C)}, r_{1}^{(D)}, r_{1}^{(I)}, r_{1}^{(Z)})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/508\/587\/8fc\/5085878fc3faa17b1348c62899657ac9.svg\" width=\"256\" height=\"33\"\/> \u2014 \u044d\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u043a\u0432\u043e\u0442, \u043f\u0440\u0438\u0447\u0435\u043c \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e \u043a\u0432\u043e\u0442\u0430\u0445, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i = 1\" alt=\"i = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fb3\/715\/179\/fb371517980929cc2517c6486da1d76d.svg\" width=\"42\" height=\"16\"\/>. \u0415\u0441\u043b\u0438 <img class=\"formula inline\" source=\"i > 1&#8243; alt=&#187;i > 1&#8243; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/130\/8e5\/995\/1308e5995d4ec2027b9f785fde120553.svg&#187; width=&#187;42&#8243; height=&#187;16&#8243;\/>, \u0442\u043e \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0443\u0436\u0435 \u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 \u0432 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"i\" alt=\"i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/efc\/c1c\/e85\/efcc1ce853b40399c6b85fa08bd25edb.svg\" width=\"7\" height=\"16\"\/>-\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0430\u0436.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e <strong>Up-Sell<\/strong>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0430\u0436. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(q_{i}^{(D)}, r_{i}^{(D)}) = \\begin{cases} (q_{i}^{(D)}, r_{i}^{(D)} - q_{i}^{(D)}), &amp; \\text{ if } q_{i}^{(D)} &lt; r_{i}^{(D)} \\\\ (r_{i}^{(D)}, 0), &amp; \\text{ if } q_{i}^{(D)} \\geqslant r_{i}^{(D)} \\end{cases} \" alt=\"(q_{i}^{(D)}, r_{i}^{(D)}) = \\begin{cases} (q_{i}^{(D)}, r_{i}^{(D)} - q_{i}^{(D)}), &amp; \\text{ if } q_{i}^{(D)} &lt; r_{i}^{(D)} \\\\ (r_{i}^{(D)}, 0), &amp; \\text{ if } q_{i}^{(D)} \\geqslant r_{i}^{(D)} \\end{cases} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/711\/93d\/7aa\/71193d7aac49e39e0d67c00d23dd5feb.svg\" width=\"418\" height=\"61\"\/><\/p>\n<p>\u042d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0446\u0435\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u043a\u0432\u043e\u0442\u0443 \u0438\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C, \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c:<\/p>\n<p><img class=\"formula\" source=\"(q_{i}^{(C)}, r_{i}^{(C)}, r_{i}^{(D)}) = \\begin{cases} (q_{i}^{(C)}, r_{i}^{(C)}, r_{i}^{(D)} - q_{i}^{(C)}), &amp; \\text{ if } q_{i}^{(C)} &lt; r_{i}^{(D)} \\\\ (q_{i}^{(C)}, r_{i}^{(C)} + r_{i}^{(D)} - q_{i}^{(C)}, 0), &amp; \\text{ if } r_{i}^{(C)} + r_{i}^{(D)} > q_{i}^{(C)} \\geqslant r_{i}^{(D)} \\\\ (r_{i}^{(C)} + r_{i}^{(D)}, 0, 0), &amp; \\text{ if } r_{i}^{(C)} + r_{i}^{(D)} &lt; q_{i}^{(C)} \\end{cases}&#187; alt=&#187;(q_{i}^{(C)}, r_{i}^{(C)}, r_{i}^{(D)}) = \\begin{cases} (q_{i}^{(C)}, r_{i}^{(C)}, r_{i}^{(D)} &#8212; q_{i}^{(C)}), &amp; \\text{ if } q_{i}^{(C)} &lt; r_{i}^{(D)} \\\\ (q_{i}^{(C)}, r_{i}^{(C)} + r_{i}^{(D)} &#8212; q_{i}^{(C)}, 0), &amp; \\text{ if } r_{i}^{(C)} + r_{i}^{(D)} > q_{i}^{(C)} \\geqslant r_{i}^{(D)} \\\\ (r_{i}^{(C)} + r_{i}^{(D)}, 0, 0), &amp; \\text{ if } r_{i}^{(C)} + r_{i}^{(D)} &lt; q_{i}^{(C)} \\end{cases}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b74\/695\/701\/b746957014eda17ed2cc059af8039499.svg&#187; width=&#187;643&#8243; height=&#187;90&#8243;\/><\/p>\n<p>\u042d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u0435\u0441\u0442 \u0432 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445  C \u0438 D. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c <strong>Up-Sell<\/strong> \u2014 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u0430 \u0438\u0437 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 D, \u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 C.<\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 Z \u0438 I:<\/p>\n<p><img class=\"formula\" source=\"(q_{i}^{(Z)}, r_{i}^{(Z)}) = \\begin{cases} (q_{i}^{(Z)}, r_{i}^{(Z)} - q_{i}^{(Z)}), &amp; \\text{ if } q_{i}^{(Z)} &lt; r_{i}^{(Z)} \\\\ (r_{i}^{(Z)}, 0), &amp; \\text{ if } q_{i}^{(Z)} >= r_{i}^{(Z)} \\end{cases}&#187; alt=&#187;(q_{i}^{(Z)}, r_{i}^{(Z)}) = \\begin{cases} (q_{i}^{(Z)}, r_{i}^{(Z)} &#8212; q_{i}^{(Z)}), &amp; \\text{ if } q_{i}^{(Z)} &lt; r_{i}^{(Z)} \\\\ (r_{i}^{(Z)}, 0), &amp; \\text{ if } q_{i}^{(Z)} >= r_{i}^{(Z)} \\end{cases}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/637\/ba1\/20c\/637ba120ce3e9035689354384f017f23.svg&#187; width=&#187;423&#8243; height=&#187;61&#8243;\/><img class=\"formula\" source=\"(q_{i}^{(I)}, r_{i}^{(I)}, r_{i}^{(Z)}) = \\begin{cases} (q_{i}^{(I)}, r_{i}^{(I)}, r_{i}^{(Z)} - q_{i}^{(I)}), &amp; \\text{ if } q_{i}^{(I)} &lt; r_{i}^{(Z)} \\\\ (q_{i}^{(I)}, r_{i}^{(I)} + r_{i}^{(Z)} - q_{i}^{(I)}, 0), &amp; \\text{ if } r_{i}^{(I)} + r_{i}^{(Z)} > q_{i}^{(I)} > r_{i}^{(Z)} \\\\ (r_{i}^{(I)} + r_{i}^{(Z)}, 0, 0), &amp; \\text{ if } r_{i}^{(I)} + r_{i}^{(Z)} &lt; q_{i}^{(I)} \\end{cases}&#187; alt=&#187;(q_{i}^{(I)}, r_{i}^{(I)}, r_{i}^{(Z)}) = \\begin{cases} (q_{i}^{(I)}, r_{i}^{(I)}, r_{i}^{(Z)} &#8212; q_{i}^{(I)}), &amp; \\text{ if } q_{i}^{(I)} &lt; r_{i}^{(Z)} \\\\ (q_{i}^{(I)}, r_{i}^{(I)} + r_{i}^{(Z)} &#8212; q_{i}^{(I)}, 0), &amp; \\text{ if } r_{i}^{(I)} + r_{i}^{(Z)} > q_{i}^{(I)} > r_{i}^{(Z)} \\\\ (r_{i}^{(I)} + r_{i}^{(Z)}, 0, 0), &amp; \\text{ if } r_{i}^{(I)} + r_{i}^{(Z)} &lt; q_{i}^{(I)} \\end{cases}&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10d\/e69\/ef4\/10de69ef420d94d21438b8d8134f82ec.svg&#187; width=&#187;613&#8243; height=&#187;90&#8243;\/><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441 J \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u0432\u0435\u0440\u0445\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438, \u0442\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u043f\u043e \u0446\u0435\u043d\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0447\u0435\u0442\u0443 \u043c\u0435\u0441\u0442 \u0432\u043e \u0432\u0441\u0435\u0445 \u043d\u0438\u0436\u0435\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u0445:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/37e\/31b\/af2\/37e31baf22a019d1723a3c869357d329.png\" width=\"3178\" height=\"564\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/37e\/31b\/af2\/37e31baf22a019d1723a3c869357d329.png\"\/><\/figure>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043f\u0440\u043e\u0441\u0430 \u043b\u0443\u0447\u0448\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0442\u0438\u043f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0443\u044e \u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c Up-Sell \u0438 \u0443\u0436\u0435 \u0437\u0430\u0442\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u044d\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0438\u043d\u0433, \u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043d\u044b \u043b\u044e\u0431\u0430\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u0430\u044f \u043d\u0435\u0432\u044f\u0437\u043a\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u043e 5, \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043c \u0434\u043e 5, \u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0446\u0435\u043d \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0434\u043e 9: [1.00, 1.05, 1.10, 1.15, 1.20, 1.25, 1.30, 1.35, 1.40].<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">price = np.round(np.linspace(1, 1.4, 9), 2) MU = [] T = [[10, 4], [4, 2.5], [2.5, 1.5], [1.5, 0.5], [0.5, 0]]  for i in range(len(T)):     mu = []     for j in range(len(price)):         dem = []         for _ in range(1000):             t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]             t = t[t &lt; 10]             price_idx = betabinom.rvs(8, 1, 0.99 * t + 0.1)             demand = price[price_idx]             if len(np.where(t > T[i][0])[0]) != 0:                 start_t = np.where(t > T[i][0])[0][-1]             else:                 start_t = 0             end_t = np.where(t > T[i][1])[0][-1]             dem.append(np.sum(demand[start_t : end_t + 1] >= price[j]))         mu.append(np.mean(dem))     MU.append(mu) MU = np.array(MU)  plt.plot(price, MU[0], 'o-', label=r'$T_{1}$') plt.plot(price, MU[1], 'o-', label=r'$T_{2}$') plt.plot(price, MU[2], 'o-', label=r'$T_{3}$') plt.plot(price, MU[3], 'o-', label=r'$T_{4}$') plt.plot(price, MU[4], 'o-', label=r'$T_{5}$') plt.legend() plt.xlabel('Price') plt.ylabel('Mean demand') plt.title('Demand curves');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15f\/87e\/e9d\/15f87ee9dbef2a941c83ae15e16d6c05.png\" width=\"848\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/15f\/87e\/e9d\/15f87ee9dbef2a941c83ae15e16d6c05.png\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u044f\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043f\u0440\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0435: def profit(ps, Up):     U = np.copy(Up)     Z, I, D, C, J = np.argsort(ps)      #print(U)     #print('-'*30)      # Z     q1 = poisson.rvs(MU[0][ps[0]])     #print('q1 = ', q1)     if q1 &lt; U[Z]:         U[Z] = U[Z] - q1     else:         q1 = U[Z]         U[Z] = 0     #print('q1 =', q1, '; U =', U)     #print('-'*30)      # I     q2 = poisson.rvs(MU[1][ps[1]])     #print('q2 = ', q2)     if q2 &lt; U[Z]:         U[Z] = U[Z] - q2     elif U[Z] &lt;= q2 &lt; U[Z] + U[I]:         U[I] = U[Z] + U[I] - q2         U[Z] = 0     else:         q2 = U[Z] + U[I]         U[Z] = 0         U[I] = 0     #print('q2 =', q2, '; U =', U)     #print('-'*30)      # D     q3 = poisson.rvs(MU[2][ps[2]])     #print('q3 = ', q3)     if q3 &lt; U[D]:         U[D] = U[D] - q3     else:         q3 = U[D]         U[D] = 0     #print('q3 =', q3, '; U =', U)     #print('-'*30)      # C      q4 = poisson.rvs(MU[3][ps[3]])     #print('q4 = ', q4)     if q4 &lt; U[D]:         U[D] = U[D] - q4     elif U[D] &lt;= q4 &lt; U[D] + U[C]:         U[C] = U[D] + U[C] - q4         U[D] = 0     else:         q4 = U[D] + U[C]         U[D] = 0         U[C] = 0     #print('q4 =', q4, '; U =', U)     #print('-'*30)      # J      q5 = poisson.rvs(MU[4][ps[4]])     #print('q5 = ', q5)     if q5 &lt; U[Z]:         U[Z] = U[Z] - q5     elif U[Z] &lt;= q5 &lt; U[Z] + U[I]:         U[I] = U[Z] + U[I] - q5         U[Z] = 0     elif U[Z] + U[I] &lt;= q5 &lt; U[Z] + U[I] + U[D]:         U[D] = U[Z] + U[I] + U[D] - q5         U[I] = 0         U[Z] = 0     elif U[Z] + U[I] + U[D] &lt;= q5 &lt; U[Z] + U[I] + U[D] + U[C]:         U[C] = U[Z] + U[I] + U[D] + U[C] - q5         U[D] = 0         U[I] = 0         U[Z] = 0     elif U[Z] + U[I] + U[D] + U[C] &lt;= q5 &lt; U[Z] + U[I] + U[D] + U[C] + U[J]:         U[J] = U[Z] + U[I] + U[D] + U[C] + U[J] - q5         U[C] = 0         U[D] = 0         U[I] = 0         U[Z] = 0     else:         q5 = U[Z] + U[I] + U[D] + U[C] + U[J]         U = np.zeros(5, dtype=int)     #print('q5 =', q5, '; U =', U)     #print('-'*30)      vec_q = np.array([q1, q2, q3, q4, q5])     profit = np.sum(vec_q * price[ps])     #print('profit =', profit)          return profit, vec_q, U  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043f\u0440\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0435 def profit(ps, Up):      U = np.copy(Up)     Z, I, D, C, J = np.argsort(ps)     #print(U)     #print('-'*30)      # Z     q1 = poisson.rvs(MU[0][ps[0]])     #print('q1 = ', q1)     if q1 &lt; U[Z]:         U[Z] = U[Z] - q1     else:         q1 = U[Z]         U[Z] = 0     #print('q1 =', q1, '; U =', U)     #print('-'*30)      # I     q2 = poisson.rvs(MU[1][ps[1]])     #print('q2 = ', q2)     if q2 &lt; U[I]:         U[I] = U[I] - q2     else:         q2 = U[I]         U[I] = 0     #print('q2 =', q2, '; U =', U)     #print('-'*30)      # D     q3 = poisson.rvs(MU[2][ps[2]])     #print('q3 = ', q3)     if q3 &lt; U[D]:         U[D] = U[D] - q3     else:         q3 = U[D]         U[D] = 0     #print('q3 =', q3, '; U =', U)     #print('-'*30)      # C      q4 = poisson.rvs(MU[3][ps[3]])     #print('q4 = ', q4)     if q4 &lt; U[C]:         U[C] = U[C] - q4     else:         q4 = U[C]         U[C] = 0     #print('q4 =', q4, '; U =', U)     #print('-'*30)      # J      q5 = poisson.rvs(MU[4][ps[4]])     #print('q5 = ', q5)     if q5 &lt; U[Z]:         U[Z] = U[Z] - q5     elif U[Z] &lt;= q5 &lt; U[Z] + U[I]:         U[I] = U[Z] + U[I] - q5         U[Z] = 0     elif U[Z] + U[I] &lt;= q5 &lt; U[Z] + U[I] + U[D]:         U[D] = U[Z] + U[I] + U[D] - q5         U[I] = 0         U[Z] = 0     elif U[Z] + U[I] + U[D] &lt;= q5 &lt; U[Z] + U[I] + U[D] + U[C]:         U[C] = U[Z] + U[I] + U[D] + U[C] - q5         U[D] = 0         U[I] = 0         U[Z] = 0     elif U[Z] + U[I] + U[D] + U[C] &lt;= q5 &lt; U[Z] + U[I] + U[D] + U[C] + U[J]:         U[J] = U[Z] + U[I] + U[D] + U[C] + U[J] - q5         U[C] = 0         U[D] = 0         U[I] = 0         U[Z] = 0     else:         q5 = U[Z] + U[I] + U[D] + U[C] + U[J]         U = np.zeros(5, dtype=int)     #print('q5 =', q5, '; U =', U)     #print('-'*30)      vec_q = np.array([q1, q2, q3, q4, q5])     profit = np.sum(vec_q * price[ps])     #print('profit =', profit)          return profit, vec_q, U  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c: def e_profit(ps, Up, n_iter):     return np.mean([profit(ps, Up)[0] for _ in range(n_iter)])  # \u0421\u043e\u0444\u0442\u043c\u0430\u043a\u0441 \u0422\u0435\u0439\u043b\u043e\u0440\u0430 def tsm(z):     numerator = 1 + z + 0.5*z**2# + (1\/6)*z**3     denominator = np.sum(1 + z + 0.5*z**2) # + (1\/6)*z**3     return numerator \/ denominator  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d # \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432: def hist_ps(res_vals):     bins = np.r_[0:10]      h = np.array([tsm(np.histogram(res_vals.T[col],                                bins=bins)[0])    #, density=True                   for col in range(5)])          return h  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  # \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: def rand_ps(h):     indices = np.r_[0:9]     vec = [np.random.choice(indices,                             size=1,                             p=h_i)[0]            for h_i in h]     return vec  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 # \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043c\u0435\u0441\u0442 \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c: def hist_up(res_vals):     bins = np.r_[0:42]     h = np.array([tsm(np.histogram(res_vals.T[col],                                bins=bins)[0])    # , density=True                   for col in range(4)])     return h  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  # \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: def rand_up(h):     indices = np.r_[0:41]     vec = [np.random.choice(indices,                             size=1,                             p=h_i)[0]            for h_i in h]     return vec  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 # \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439: def calc_up(rand_vec_up):     vec_up = np.diff(np.sort(np.hstack((rand_vec_up, 0, 40))))     return vec_up  # \u0421\u043a\u0440\u0438\u043f\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e: ''' for _ in range(5):     h_ps = np.array([[1\/9]*9]*5)     h_up = np.array([[1\/41]*41]*4)      flag_ps = np.all(np.max(h_ps, axis=1) >= 0.98)     flag_up = np.all(np.max(h_up, axis=1) >= 0.98)     while not(flag_ps and flag_up):         ps_vecs = np.array([rand_ps(h_ps) for _ in range(3000)])         up_vecs = np.array([rand_up(h_up) for _ in range(3000)])         R = np.array([e_profit(ps_vecs[i], calc_up(up_vecs[i]), 20) for i in range(3000)])         idx = np.argsort(R)[::-1][:300]         h_ps = hist_ps(ps_vecs[idx])         h_up = hist_up(up_vecs[idx])         print('price_vec =', price[np.argmax(h_ps, axis=1)], '; quotas_vec = ', calc_up(np.argmax(h_up, axis=1)))         flag_ps = np.all(np.max(h_ps, axis=1) >= 0.98)         flag_up = np.all(np.max(h_up, axis=1) >= 0.98)     print('-' * 100)     print(np.argmax(h_ps, axis=1), calc_up(np.argmax(h_up, axis=1)))     print(e_profit(np.argmax(h_ps, axis=1), calc_up(np.argmax(h_up, axis=1)), 5000))     print('=' * 100) ''';  ################################################################ ################################################################  # \u041a\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u043e\u0434\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f # \u043f\u0440\u043e\u0434\u0430\u0436 \u0441 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u0435\u0439 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0439 \u043d\u0435\u0432\u044f\u0437\u043a\u0438  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d # \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432: def hist_ps(res_vals):     cols = res_vals.T     bins = np.r_[0:10]      h = np.array([tsm(np.histogram(cols[col],                                bins=bins)[0])                   for col in range(len(cols))])     return h  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  # \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: def rand_ps(h):     indices = np.r_[0:9]          vec = [np.random.choice(indices,                             size=1,                             p=h_i)[0]            for h_i in h]     return vec  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  # \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432: def hist_up(res_vals, seats, num_T):     bins = np.r_[0 : seats + 2]     if num_T != 1:         cols = res_vals.T         h = np.array([tsm(np.histogram(cols[col],                                        bins=bins)[0])                       for col in range(num_T - 1)])     else:         h = tsm(np.histogram(res_vals, bins=bins)[0])     return h  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435  # \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f: def rand_up(h, seats, num_T):     indices = np.r_[0: seats + 1]     if num_T != 1:         vec = [np.random.choice(indices,                                 size=1,                                 p=h_i)[0]                for h_i in h]     else:         vec = np.random.choice(indices,                                 size=1,                                 p=h)[0]     return vec  # \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0435 # \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439: def calc_up(rand_vec_up, seats, num_T):     if num_T != 1:         vec_up = np.diff(np.sort(np.hstack((rand_vec_up, 0, seats))))         return vec_up     else:         return [rand_vec_up]      # \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432:: def profit(ps, Up):     U = np.copy(Up)     L = len(ps)     mu_tmp = MU[-L:]     #print('U_pre =', U)     vec_q = np.asarray(poisson.rvs(mu_tmp[np.r_[:L], ps]))     #print('q_pre =', vec_q)     if L != 1:         vec_q[vec_q > U] = U[vec_q > U]         #print('q_post =', vec_q)         U = U - vec_q         #print('U_post =', U)     else:         if vec_q &lt; U[0]:             U[0] = U[0] - vec_q         else:             vec_q =U[0]             U[0] = 0         #print('q_post =', vec_q)         #print('U_post =', U)          profit = np.sum(vec_q * price[ps])     #print('profit =', profit)          return profit, vec_q, U  # \u0421\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0446\u0435\u043d\u043d\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c: ''' def opt_s(seats, num_T):     h_ps = np.array([[1\/9]*9]*num_T)     if num_T != 1:         h_up = np.array([[1\/(seats + 1)]*(seats + 1)]*(num_T - 1))     else:         h_up = np.array([1\/(seats + 1)]*(seats + 1))     if num_T != 1:         flag_ps = np.all(np.max(h_ps, axis=1) >= 0.98)         flag_up = np.all(np.max(h_up, axis=1) >= 0.98)     else:         flag_ps = np.max(h_ps) >= 0.98         flag_up = np.max(h_up) >= 0.98      while not(flag_ps and flag_up):         ps_vecs = np.array([rand_ps(h_ps) for _ in range(3000)])         up_vecs = np.array([rand_up(h_up, seats, num_T) for _ in range(3000)])         R = np.array([e_profit(ps_vecs[i], calc_up(up_vecs[i], seats, num_T), 20) for i in range(3000)])         idx = np.argsort(R)[::-1][:300]         h_ps = hist_ps(ps_vecs[idx])         h_up = hist_up(up_vecs[idx], seats, num_T)         ps_tmp = price[np.argmax(h_ps, axis=1)]         if num_T != 1:             up_tmp = calc_up(np.argmax(h_up, axis=1), seats, num_T)         else:             up_tmp = calc_up(np.argmax(h_up), seats, num_T)         #print('price_vec =', ps_tmp, '; quotas_vec = ', up_tmp)         if num_T != 1:             flag_ps = np.all(np.max(h_ps, axis=1) >= 0.98)             flag_up = np.all(np.max(h_up, axis=1) >= 0.98)         else:             flag_ps = np.max(h_ps) >= 0.98             flag_up = np.max(h_up) >= 0.98     ps_opt = np.argmax(h_ps, axis=1)     if num_T != 1:         up_opt = calc_up(np.argmax(h_up, axis=1), seats, num_T)     else:         up_opt = calc_up(np.argmax(h_up), seats, num_T)     res_ep = e_profit(ps_opt, up_opt, 2000)     print('res_ep =', res_ep, 'price_vec =', ps_opt, '; quotas_vec = ', up_opt)     print('-' * 100)     return res_ep, ps_opt, up_opt ''';<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0434\u0430\u0436: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0435\u0441\u0442\u0438\u043d\u0433 comb_1 = np.array([48.5 , 48.05, 49.1 , 48.2 , 49.3 , 47.8 , 47.2 , 48.95, 45.6 ,                   42.05, 47.75, 47.8 , 48.05, 47.65, 48.2 , 48.1 , 49.15, 40.85,                   48.05, 47.7 ]) comb_2 = np.array([44.25, 48.05, 47.8 , 48.25, 48.15, 47.95, 47.95, 47.8 , 48.  ,                   48.  , 44.15, 48.45, 47.7 , 44.15, 47.85, 44.3 , 44.55, 48.1 ,                   44.25, 48.05]) comb_3 = np.array([47.4 , 47.4 , 47.55, 47.3 , 47.45, 47.75, 47.55, 47.45, 47.5 ,                   47.6 , 47.35, 47.35, 47.45, 47.55, 42.75, 47.5 , 47.4 , 42.75,                   47.9 , 47.55]) comb_4 = np.array([47.1, 46.6, 47.2, 46.6, 47.8, 41.9, 47.2, 46.6, 47.8, 46.8, 47.5,                   48. , 47.1, 47.7, 47.5, 47.7, 46.7, 47.7, 48.7, 47.2]) comb_5 = np.array([47.7 , 48.45, 47.45, 48.15, 48.25, 48.3 , 47.5 , 47.3 , 34.4 ,                   47.3 , 49.  , 46.45, 46.95, 48.4 , 47.8 , 42.55, 47.85, 41.85,                   48.55, 47.5]) comb = np.hstack((comb_1, comb_2, comb_3, comb_4, comb_5))   ## \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0441\u0442\u0438\u043d\u0433 par_1 = np.array([46.65, 47.3 , 45.  , 47.15, 47.3 , 39.7 , 46.2 , 46.8 , 46.65,                   46.8 , 45.65, 47.2 , 47.2 , 47.6 , 47.55, 46.85, 46.6 , 46.65,                   39.85, 47.  ]) par_2 = np.array([46.3 , 47.45, 47.25, 46.15, 47.4 , 47.1 , 44.15, 46.15, 44.95,                   47.2 , 43.55, 47.35, 47.05, 47.25, 47.4 , 47.5 , 47.45, 47.45,                   46.1 , 42.3 ]) par_3 = np.array([40.3 , 43.75, 48.  , 47.7 , 47.8 , 46.6 , 48.15, 47.6 , 47.8 ,                   45.4 , 46.5 , 47.5 , 47.4 , 47.4 , 43.85, 47.8 , 48.4 , 48.  ,                   47.6 , 47.4 ]) par_4 = np.array([47.9 , 47.95, 47.15, 47.95, 47.9 , 45.95, 48.05, 47.55, 42.05,                   44.35, 41.95, 43.35, 48.35, 47.85, 47.85, 48.3 , 40.75, 48.3 ,                   48.05, 47.65]) par_5 = np.array([46.1 , 40.05, 47.35, 43.6 , 47.35, 46.1 , 47.35, 47.35, 47.55,                   45.65, 47.35, 41.3 , 47.35, 47.35, 47.35, 47.35, 47.35, 43.35,                   47.35, 47.35]) par = np.hstack((par_1, par_2, par_3, par_4, par_5))   ## \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430  dyn = np.array([46.8, 47.4, 46.95, 46.45, 46.8, 41.2, 46.4, 46.75, 46.5, 46.8,                 47.25, 46.2, 46.95, 46.6, 46.65, 38.7, 42.9, 46.7, 46.75, 46.9])  # \u0411\u0443\u0442\u0441\u0442\u0440\u0430\u043f:  comb_var_e = [np.mean(comb[np.random.randint(0, comb.size, size=20)]) for _ in range(1000)] par_var_e = [np.mean(par[np.random.randint(0, par.size, size=20)]) for _ in range(1000)] dyn_var_e = [np.mean(dyn[np.random.randint(0, dyn.size, size=20)]) for _ in range(1000)]   sns.kdeplot(comb_var_e, c='b', label='Combined') plt.axvline(np.mean(comb_var_e), c='b', ls=':') sns.kdeplot(par_var_e, c='r', label='Parallel') plt.axvline(np.mean(par_var_e), c='r', ls=':') sns.kdeplot(dyn_var_e, c='g', label='Dynamic Pricing') plt.axvline(np.mean(dyn_var_e), c='g', ls=':') plt.legend() plt.title('Estimation of maximum average profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72e\/753\/1f8\/72e7531f8087a5006cbf9528f9fc6e8f.png\" width=\"854\" height=\"520\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72e\/753\/1f8\/72e7531f8087a5006cbf9528f9fc6e8f.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0430\u0441\u044c \u2014 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u0435\u0439 \u043d\u0435\u0432\u044f\u0437\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043f\u043e\u0437\u0430\u0434\u0438. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u044f\u0437\u043a\u0438, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u043e\u0434\u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u043c\u0435\u0441\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u044f \u043d\u0435\u0432\u044f\u0437\u043a\u0438 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u043e, \u0447\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043f\u0440\u043e\u0434\u0430\u044e\u0449\u0438\u0439 \u0431\u0438\u043b\u0435\u0442\u044b. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043a\u0440\u0430\u0439\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u044e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u0432 \u2014 \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u0435\u0439 \u043d\u0435\u0432\u044f\u0437\u043e\u043a, \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430. \u041a\u0430\u043a\u0438\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438 \u043f\u0440\u0438\u0431\u044b\u043b\u0438? \u0420\u0430\u0437\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0445\u0443\u0434\u0448\u0438\u043c \u0438 \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043d\u0430 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 2%. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0442\u0435\u0440\u0438 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e 30%, \u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 15-20%.<\/p>\n<p>\u041e\u0446\u0435\u043d\u043a\u0430 \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u0442\u0435\u0440\u044c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439, \u043d\u043e \u0442\u0443\u0442 \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0434\u0435\u043b DS. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f RMS \u2014 \u0430 \u0435\u0441\u043b\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u044b\u0431\u043e\u0440\u0443 \u0446\u0435\u043d\u044b \u0437\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c. \u0414\u0430\u043b\u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e RMS \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u0442 \u0432 \u043c\u0435\u0448\u043a\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043d\u0438 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u0438 \u0447\u0435\u043c\u043f\u0438\u043e\u043d\u0430\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u0438\u0445 RMS.<\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043f\u0440\u043e\u0441\u0430. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043f\u0440\u043e\u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0435 \u043a \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u0438 \u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">xd = np.array([0.1, 1.0, 2.0, 4.0, 6.0,  8.0,  9.5, 9.9]) yd = np.array([0.6, 0.6, 0.6, 9.9, 7.1, 0.8, 0.5, 0.5]) z = np.polyfit(xd, yd, 10) p = np.poly1d(z)  MU = [] T = [[10, 4], [4, 2.5], [2.5, 1.5], [1.5, 0.5], [0.5, 0]]  for i in range(len(T)):     mu = []     for j in range(len(price)):         dem = []         for _ in range(1000):             t = np.sort(gamma.rvs(a=0.9, scale=3, size=100))[::-1]             t = t[t &lt; 10]             price_idx = betabinom.rvs(8, 1, p(t))             demand = price[price_idx]             if len(np.where(t > T[i][0])[0]) != 0:                 start_t = np.where(t > T[i][0])[0][-1]             else:                 start_t = 0             end_t = np.where(t > T[i][1])[0][-1]             dem.append(np.sum(demand[start_t : end_t + 1] >= price[j]))         mu.append(np.mean(dem))     MU.append(mu) MU = np.array(MU)  plt.plot(price, MU[0], 'o-', label=r'$T_{1}$') plt.plot(price, MU[1], 'o-', label=r'$T_{2}$') plt.plot(price, MU[2], 'o-', label=r'$T_{3}$') plt.plot(price, MU[3], 'o-', label=r'$T_{4}$') plt.plot(price, MU[4], 'o-', label=r'$T_{5}$') plt.legend() plt.xlabel('Price') plt.ylabel('Mean demand') plt.title('Demand curves');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/37f\/03f\/752\/37f03f752d505de190a5c68102cd8d85.png\" width=\"848\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/37f\/03f\/752\/37f03f752d505de190a5c68102cd8d85.png\"\/><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b, \u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u0435: <\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">comb_1 = np.array([49.65, 49.55, 49.45, 49.9 , 49.55, 49.05, 48.6 , 48.4 , 47.9 ,        49.5 , 48.9 , 48.65, 48.15, 48.1 , 47.75, 49.8 , 48.4 , 48.45,        49.5 , 49.6]) comb_2 = np.array([49.15, 49.85, 49.55, 44.7 , 50.05, 50.  , 48.05, 49.15, 48.2 ,        49.25, 45.5 , 49.2 , 49.75, 50.3 , 49.4 , 50.65, 49.2 , 49.9 ,        49.65, 48.6]) comb_3 = np.array([48.95, 38.4 , 49.1 , 48.35, 36.  , 48.8 , 49.25, 48.75, 48.45,        48.7 , 49.  , 48.7 , 48.8 , 49.05, 49.35, 48.65, 48.7 , 48.2 ,        48.45, 48.85]) comb_4 = np.array([48.6 , 48.85, 44.65, 48.75, 49.4 , 49.45, 37.9 , 48.45, 48.4 ,        46.95, 47.25, 42.  , 48.55, 49.6 , 48.6 , 49.3 , 48.4 , 48.75,        48.8 , 50.]) comb_5 = np.array([47.25, 48.3 , 47.4 , 47.5 , 47.8 , 48.  , 48.1 , 48.7 , 49.2 ,        48.6 , 48.8 , 48.7 , 49.3 , 47.7 , 44.55, 49.2 , 48.9 , 48.  ,        48.  , 48.9]) comb = np.hstack((comb_1, comb_2, comb_3, comb_4, comb_5))    par_1 = np.array([48.8 , 48.2 , 47.75, 48.8 , 49.1 , 47.85, 48.8 , 49.7 , 48.35,                   46.45, 48.5 , 48.05, 48.  , 48.95, 48.95, 45.6 , 48.65, 49.1 ,                   49.1 , 47.75]) par_2 = np.array([48.35, 48.95, 47.1 , 47.75, 48.35, 48.35, 48.  , 48.95, 49.1 ,                   47.75, 48.25, 46.35, 48.35, 49.15, 49.55, 41.65, 48.05, 47.9 ,                   48.15, 43.65]) par_3 = np.array([47.05, 48.25, 46.85, 46.25, 47.05, 48.05, 47.25, 47.85, 48.05,                   48.5 , 44.4 , 48.65, 48.45, 48.45, 46.9 , 47.85, 47.65, 48.1 ,                   48.65, 47.05]) par_4 = np.array([49.65, 49.2 , 48.6 , 49.2 , 46.95, 49.35, 49.25, 47.85, 48.6 ,                   49.5 , 48.75, 48.75, 48.95, 49.2 , 48.75, 48.15, 48.9 , 48.6 ,                   49.05, 48.3]) par_5 = np.array([48.45, 49.35, 47.1 , 47.85, 49.35, 48.5 , 48.05, 47.85, 47.55,                   49.2 , 48.85, 49.05, 48.9 , 48.85, 45.45, 49.35, 47.6 , 48.25,                   48.1 , 48.3]) par = np.hstack((par_1, par_2, par_3, par_4, par_5))    dyn = np.array([46.8, 47.1, 47.75, 47.5, 47.3, 47.75, 47.45, 47.65, 47.8, 46.85,                 47.85, 47.1, 42.9, 46.7, 47.5, 47.05, 46.95, 45.15, 48.0, 47.4])    # \u0411\u0443\u0442\u0441\u0442\u0440\u0430\u043f:  comb_var_e = [np.mean(comb[np.random.randint(0, comb.size, size=20)]) for _ in range(1000)] par_var_e = [np.mean(par[np.random.randint(0, par.size, size=20)]) for _ in range(1000)] dyn_var_e = [np.mean(dyn[np.random.randint(0, dyn.size, size=20)]) for _ in range(1000)]  sns.kdeplot(comb_var_e, c='b', label='Combined') plt.axvline(np.mean(comb_var_e), c='b', ls=':') sns.kdeplot(par_var_e, c='r', label='Parallel') plt.axvline(np.mean(par_var_e), c='r', ls=':') sns.kdeplot(dyn_var_e, c='g', label='Dynamic Pricing') plt.axvline(np.mean(dyn_var_e), c='g', ls=':') plt.legend() plt.title('Estimation of maximum average profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d10\/93e\/93e\/d1093e93ec40fbf2d21a40647ac8434c.png\" width=\"854\" height=\"520\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d10\/93e\/93e\/d1093e93ec40fbf2d21a40647ac8434c.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430, \u043a\u0430\u043a \u0438 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0441\u043f\u0440\u043e\u0441\u0430. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u0446\u0435\u043d\u044b \u0438 \u043a\u0432\u043e\u0442\u044b \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430. \u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, \u0432\u0435\u0434\u044c \u0442\u0430\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0433\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043b\u043e\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u043e\u043f\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u2014 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0432\u044b\u0441\u043e\u0442\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043d\u0435\u043c. \u0422\u0438\u043f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0446\u0435\u043d\u0435\u043d\u044b. \u041c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430, \u0432\u0432\u0435\u0441\u0442\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043f\u0440\u043e\u0441\u0430, \u0430 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0443 \u0438\u0445 \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 ML.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u0435\u0441\u0442\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u043d\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430\u0441\u044c \u043a\u0430\u043a \u043d\u0435\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430.<\/p>\n<p>\u0414\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0432\u0441\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u0430\u043c\u0438 \u0431\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u043e &#171;\u0440\u0430\u043d\u043d\u0435\u0439 \u043f\u0442\u0430\u0448\u043a\u0435&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u043a\u043e\u0447\u0435\u0432\u0430\u043b\u0430 \u0432 \u0430\u0432\u0438\u0430\u0446\u0438\u044e (!) \u0438\u0437 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0438\u0437\u043d\u0435\u0441\u0430. \u0418\u043d\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u0430, \u0434\u0430\u0431\u044b \u043d\u0435 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0431\u0435\u0437 \u0441\u0442\u043e\u043b\u0438\u043a\u0430, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0438 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u043d\u043d\u0438\u043c\u0438 \u043f\u0442\u0430\u0448\u043a\u0430\u043c\u0438. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432 \u2014 \u0432\u0435\u0434\u044c \u0441\u0442\u043e\u043b, \u0437\u0430\u043d\u044f\u0442\u044b\u0439 \u0440\u0430\u043d\u043d\u0438\u043c\u0438 \u043f\u0442\u0430\u0448\u043a\u0430\u043c\u0438, \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0437\u0430\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u0442 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0434 \u0432 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d. \u0422\u0430\u043a\u0438\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f, \u043a\u0430\u043a \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u044f\u0442\u044c \u043a \u043a\u0432\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e) \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0437\u0430\u0434\u043e\u043b\u0433\u043e \u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e, \u0447\u0442\u043e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043e \u0440\u0430\u043d\u043d\u0435\u0439 \u043f\u0442\u0430\u0448\u043a\u0435 \u043f\u0435\u0440\u0435\u043a\u043e\u0447\u0435\u0432\u0430\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0441\u043f\u0440\u043e\u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u0435\u0442\u044b \u0432 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u043e\u0439 \u0430\u0432\u0438\u0430\u0446\u0438\u0438, \u0438 \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e \u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0441\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0435\u043c\u044c\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0442\u0434\u044b\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430, \u043d\u043e \u0435\u0439 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430 \u0441\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u044c. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043e\u043f\u044b\u0442 \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0433\u043e\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430 \u0441\u0440\u043e\u0447\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u0432 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u0440\u0430\u043d\u043d\u0435\u0439 \u043f\u0442\u0430\u0448\u043a\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043b\u044c\u043d\u0435\u043c\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0439\u0441\u043e\u0432: \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u0435\u0437\u0434\u043a\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043a\u0443\u043f\u0438\u0442\u044c \u0431\u0438\u043b\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0440\u0438\u0441\u043a \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0432\u0441\u0435 \u0431\u0435\u0437 \u0431\u0438\u043b\u0435\u0442\u0430. \u0417\u0430\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u0442\u044c \u0440\u0438\u0441\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u0443\u043f\u0438\u0442\u044c \u0431\u0438\u043b\u0435\u0442 \u0437\u0430\u0434\u043e\u043b\u0433\u043e \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430, \u043f\u0443\u0441\u0442\u044c \u0438 \u043f\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0446\u0435\u043d\u0435. \u0415\u0441\u043b\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u0441\u0435\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432, \u0442\u043e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0430 \u043a\u0440\u0430\u0439\u043d\u0435 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0435: \u0435\u0441\u043b\u0438 \u0441\u043f\u0440\u043e\u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c, \u0431\u043b\u0438\u0437\u043a\u0438\u043c \u043a \u0434\u0430\u0442\u0435 \u0432\u044b\u043b\u0435\u0442\u0430, \u0442\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u0437\u0430 \u0441\u0447\u0435\u0442 \u043c\u0435\u0441\u0442 \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438? \u0418\u0434\u0435\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f, \u043d\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u043b\u0430 \u0431\u0430\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>\u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0437\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c\u0438. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430, \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0438\u0445 \u0432\u0441\u0435 \u0441\u043d\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c \u2014 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0435\u043c \u0436\u0435 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u043c, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u044f\u043b\u0430 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0438, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u043e \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439.<\/p>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0436\u0435\u0441\u0442\u043a\u043e\u0435 \u043a\u0432\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u043d\u0435\u0435 \u0434\u043e\u0440\u043e\u0433\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u2014 \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f, \u0432\u0435\u0434\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u0447\u0435\u043d, \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u044b \u043f\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0446\u0435\u043d\u0435 \u0437\u0430 \u0441\u0447\u0435\u0442 \u043c\u0435\u0441\u0442 \u0438\u0437 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u0441\u043f\u0440\u043e\u0441 \u0434\u0432\u0438\u043d\u0435\u0442\u0441\u044f \u0432\u0432\u0435\u0440\u0445, \u0442\u043e \u0442\u0435\u0440\u044f\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 \u043f\u043e \u0441\u0430\u043c\u044b\u043c \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0446\u0435\u043d\u0430\u043c \u0442\u043e\u0436\u0435 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u2014 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043d\u0435\u0441\u0442\u0438\u043d\u0433. \u041a\u043e\u0433\u0434\u0430 \u0443 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u043f\u0440\u043e\u0434\u0430\u0436, \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u2014 \u0442\u0430\u043a \u0443\u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0435\u0441\u0442\u0438\u043d\u0433.<\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0442\u0430\u043a\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432\u0441\u0435 \u0442\u0430\u043a \u0438 \u0431\u044b\u043b\u043e. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0445 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u0445: \u0437\u043d\u0430\u043d\u0438\u044f\u0445 + \u043b\u043e\u0433\u0438\u043a\u0435. \u0415\u0441\u043b\u0438 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u0442\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a: \u0441\u043a\u0438\u0434\u043a\u0438, \u0446\u0435\u043d\u044b \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432 \u0438 \u0442.\u0434. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u043f\u0440\u043e\u0441\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0433\u043e \u0438\u043b\u0438 \u0438\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u0435\u0441\u0442\u0438\u043d\u0433\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e.<\/p>\n<p>\u041d\u0435\u0441\u0442\u0438\u043d\u0433 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0434\u0430\u0432\u043d\u043e, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0446\u0435\u043d\u0430\u043c\u0438 \u0438 \u043a\u0432\u043e\u0442\u0430\u043c\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c. \u041f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u044b\u043b \u0431\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0431\u0435\u0437 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e, \u0438 \u0434\u0430\u0436\u0435 \u043e\u043d \u0431\u044b\u043b \u0431\u044b \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0431\u0435\u0437 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d \u0441\u0430\u043c\u044b\u043c\u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043d\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u044d\u0442\u043e \u0441\u043e\u0444\u0442\u043c\u0430\u043a\u0441 \u0422\u0435\u0439\u043b\u043e\u0440\u0430:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathrm{Tsm}(\\vec{z})_{i} = \\frac{1+z_{i}+0.5z_{i}^{2}}{\\sum_{j=1}^{K}(1+z_{j}+0.5z_{j}^{2})},\" alt=\"\\mathrm{Tsm}(\\vec{z})_{i} = \\frac{1+z_{i}+0.5z_{i}^{2}}{\\sum_{j=1}^{K}(1+z_{j}+0.5z_{j}^{2})},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/705\/e75\/081\/705e750810be1951a95d8fea1ba5e407.svg\" width=\"284\" height=\"60\"\/><\/p>\n<p>\u0433\u0434\u0435 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"j = 1, ..., K\" alt=\"j = 1, ..., K\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96a\/8da\/d40\/96a8dad40aaacbfaf33b06f0ee2fe2d2.svg\" width=\"104\" height=\"20\"\/> \u0438 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"\\vec{z} = (z_{1}, ..., z_{K}) \\in R^{K}\" alt=\"\\vec{z} = (z_{1}, ..., z_{K}) \\in R^{K}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/925\/0e7\/339\/9250e7339a999c11c247ead2d23ca781.svg\" width=\"187\" height=\"25\"\/>. \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0446\u0438\u0435\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439. \u041f\u0440\u0438 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0432\u0435\u0441 \u0442\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043b\u0438\u0448\u044c \u0438\u0437-\u0437\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0444\u0442\u043c\u0430\u043a\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0439:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathrm{Sm}(\\vec{z})_{i} = \\frac{z_{i}^{m}}{\\sum_{j=1}^{K}(z_{j}^{m})}.\" alt=\"\\mathrm{Sm}(\\vec{z})_{i} = \\frac{z_{i}^{m}}{\\sum_{j=1}^{K}(z_{j}^{m})}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a7\/46e\/7e1\/6a746e7e192bb6ed35c5d25594fe05fd.svg\" width=\"180\" height=\"57\"\/><\/p>\n<p>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <img loading=\"lazy\" decoding=\"async\" class=\"formula inline\" source=\"m\" alt=\"m\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aaa\/aca\/6d5\/aaaaca6d527bbf60ae68c21aa534f1f4.svg\" width=\"17\" height=\"12\"\/> \u043e\u0442 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043a \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u043c\u0443 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u043e\u043c\u0443 \u0441\u0443\u0436\u0435\u043d\u0438\u044e \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0437\u0430\u0434\u0430\u0447\u0430 \u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0439 \u0432\u0441\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0435\u043c\u043a\u043e\u0441\u0442\u0438 \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u0430\u043c. \u0412 \u043a\u043e\u0434\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0438\u0445 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \u043a\u0440\u043e\u0441\u0441-\u044d\u043d\u0442\u0440\u043e\u043f\u0438\u0438, \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435 \u0447\u0438\u0441\u043b\u0430, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044b \u2014 \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0440\u0430\u0437\u043b\u0438\u0447\u0438\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c. \u041a\u0432\u043e\u0442\u044b \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 Z \u0438 I \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 13 \u0438 8 \u0438\u043b\u0438 10 \u0438 11, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u043e \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438, \u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0441\u0443\u043c\u043c\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 21).<\/p>\n<p>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c. \u041d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u0442\u0430\u043a\u0436\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0441\u0442\u0438\u043d\u0433 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0430\u0446\u0438\u0435\u0439 \u043d\u0435\u0432\u044f\u0437\u043a\u0438. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0432\u0438\u043d\u043e\u0432\u043d\u0438\u043a \u0442\u043e\u043c\u0443 \u2014 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0435.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f RMS \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0440\u043e\u0441\u0442\u0443 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041a \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u043e\u0431 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u0441\u043a\u0435\u043f\u0442\u0438\u0447\u043d\u043e, \u0432\u0435\u0434\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043e\u0431\u0449\u0435\u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f RMS \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442: \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0441\u0442 \u0438\u043b\u0438 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433, \u0440\u043e\u0441\u0442 \u0438\u043b\u0438 \u0441\u043f\u0430\u0434 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0438 \u0438 \u0442.\u0434. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c IATA, \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u043e\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u043a\u043e\u043b\u043e 70% (\u0430 \u043d\u0430 \u0434\u0435\u043b\u0435 \u0434\u0430\u0436\u0435 95% \u2014 \u044d\u0442\u043e \u043c\u0430\u043b\u043e!). \u042d\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0421\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u043e\u0439 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u043b\u0435\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u043f\u0443\u0441\u0442\u044b\u043c\u0438, \u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0438 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043b\u0438\u0431\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0432\u0441\u0435 \u2014 \u044d\u0442\u043e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0435\u0437\u043a\u0438\u043c \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f\u043c \u0446\u0435\u043d\u044b. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0435\u0435 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438? \u041e\u0442\u0432\u0435\u0442 \u2014 \u0434\u0430, \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a DS, \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043b\u044e\u0431\u043e\u0439 \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u044f\u043c\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0442\u0438\u043d\u0433, \u0441\u043c\u0435\u0449\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0441 \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u043a\u0440\u0443\u0442\u043a\u0438 \u0446\u0435\u043d (\u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u043e\u043c \u0438\u043b\u0438 \u0432\u0435\u0434\u0443\u0449\u0438\u043c \u0442\u0430\u0440\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c) \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0443\u0441\u043b\u0443\u0433. \u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432: \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0440\u0430\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u043b\u043e\u0442\u0430 \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0447\u0438\u0445 \u0438\u0437\u0434\u0435\u0440\u0436\u0435\u043a.<\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0440\u044b\u043d\u043a\u0430. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0437\u0430\u0433\u043e\u043d\u044f\u044e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0445\u0430\u043e\u0441\u0430, \u043d\u0435\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043d\u0435\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u044f\u0432\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0441\u043b\u0443\u0433\u0430\u043c\u0438 \u043e\u0442\u0440\u0430\u0441\u043b\u0438. \u0418 \u043f\u0440\u0430\u0432\u0434\u0430, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u0437\u0430 30 \u0434\u043d\u0435\u0439 \u0434\u043e \u0432\u044b\u043b\u0435\u0442\u0430 \u0431\u0438\u043b\u0435\u0442 \u0441\u0442\u043e\u0438\u0442 40 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439, \u0437\u0430\u0442\u0435\u043c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043d\u0435\u0434\u0435\u043b\u044c \u0446\u0435\u043d\u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0435\u043b\u044c\u0442\u0430\u043c\u0438 \u0434\u043e 48 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c \u0440\u0435\u0437\u043a\u043e \u043f\u0430\u0434\u0430\u0435\u0442 \u0434\u043e 33 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439? \u0412\u0435\u0434\u044c \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0446\u0435\u043d\u0430 \u0441\u043d\u0438\u0437\u0438\u043b\u0430\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 30% \u0438 \u0434\u0435\u0440\u0436\u0430\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043d\u0435\u0439 \u2014 \u0438 \u044d\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0430\u044f \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0434\u0430\u0436\u0435.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0435 &#171;\u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435&#187; \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u043b\u043e\u0448\u044c \u0438 \u0440\u044f\u0434\u043e\u043c \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u043d\u0438\u0447\u0435\u0433\u043e, \u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441 \u0443\u0441\u043b\u0443\u0433\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u0430 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0431\u0438\u043b\u0435\u0442 \u0438 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439, \u043e\u0441\u0442\u0430\u0432\u0430\u044f\u0441\u044c \u0432 \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u0435.<\/p>\n<p>\u0412\u0435\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u0434\u0435\u0435: \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430 \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0446\u0435\u043d\u044b \u043a\u0430\u043a \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0442\u0430\u043a \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0430. \u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0435\u043d\u0435\u0433 \u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u0443\u044e \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0438 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u043e\u0442\u0440\u0430\u0441\u043b\u0438 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0440\u0430\u0441\u043b\u044c\u044e \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f\u043c\u0438.<\/p>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u043e\u0442\u0440\u0430\u0441\u043b\u044f\u0445 e-commerce \u0431\u044c\u0435\u0442\u0441\u044f \u0437\u0430 user experience (\u043e\u043f\u044b\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f), \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0435\u0433\u043e \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u0430\u0432\u0438\u0430\u043e\u0442\u0440\u0430\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0442 \u043e\u0442 \u0441\u043b\u043e\u0432\u0430 \u0441\u043e\u0432\u0441\u0435\u043c (\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u2014 \u0440\u0430\u0441\u043f\u0440\u043e\u0434\u0430\u0436\u0438). \u0414\u043b\u044f \u043d\u0430\u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0438 \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0436\u0435 \u044d\u0442\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u044b\u0441\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438: \u043b\u0438\u0431\u043e \u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0441\u0435\u0439\u0447\u0430\u0441, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0442 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435.<\/p>\n<p>\u041e\u043f\u044b\u0442 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043a \u043f\u043e\u043b\u0435\u0442\u0430\u043c \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u043c\u0435\u0449\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u044b \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430: \u0436\u0434, \u0430\u0432\u0442\u043e\u0431\u0443\u0441\u044b, \u043b\u0438\u0447\u043d\u043e\u0435 \u0430\u0432\u0442\u043e. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u044b\u0445\u0430: \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0449\u0435 \u043e\u0442\u0434\u043e\u0445\u043d\u0443\u0442\u044c \u043d\u0430 \u0434\u0430\u0447\u0435 \u0438\u043b\u0438 \u0432 \u0441\u0430\u043d\u0430\u0442\u043e\u0440\u0438\u0438 \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0440\u043e\u0434\u043d\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430, \u0447\u0435\u043c \u0441\u043b\u0435\u0442\u0430\u0442\u044c \u0437\u0430 1500 \u043a\u043c \u043d\u0430 \u043c\u043e\u0440\u0435 \u0438\u043b\u0438 \u0433\u043e\u0440\u043d\u043e\u043b\u044b\u0436\u043d\u044b\u0439 \u043a\u0443\u0440\u043e\u0440\u0442. \u041e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0442\u0430\u043a\u0438\u0445 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0439 \u043f\u0440\u044f\u043c\u044b\u043c \u0438 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u0439 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0435. \u041b\u043e\u0433\u0438\u0441\u0442\u0438\u043a\u0430 \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 \u0410 \u0432 \u0442\u043e\u0447\u043a\u0443 \u0411, \u044d\u0442\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0441\u0442\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0438.<\/p>\n<p>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u043a \u043f\u043e\u043b\u0435\u0442\u0430\u043c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0430\u0432\u0438\u0430\u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u0438 \u0435\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043d\u043e \u0438 \u043d\u0430 \u0432\u0441\u044e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0443 \u0432 \u0446\u0435\u043b\u043e\u043c \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0430\u0441.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/786628\/\"> https:\/\/habr.com\/ru\/articles\/786628\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u043e\u0438\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0440\u044b\u043d\u043a\u0430\u043c, \u043a\u0430\u043a \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0438\u0445 \u0441\u0442\u0430\u043b\u043e \u0443\u0436\u0435 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0434\u0430\u0436. \u0421\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0442\u043e\u0442, \u043a\u0442\u043e \u043d\u0435 \u0442\u043e\u0440\u0433\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0435\u0447\u0435\u0441\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u0438 \u0434\u0435\u043b \u0441 \u043d\u0438\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c. \u041a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043d\u044b\u043d\u0435\u0448\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u043b\u0430\u0433 \u0438 \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0434\u0430\u044e\u0442\u0441\u044f \u0442\u044f\u0436\u0435\u043b\u044b\u043c \u0442\u0440\u0443\u0434\u043e\u043c. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043d\u0435\u043a\u0438\u043c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u043c \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0435\u0442 \u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u043d\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d \u0432 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<h3>1. \u0426\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0440\u0438\u0432\u043e\u0439 \u0441\u043f\u0440\u043e\u0441\u0430<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u0438\u043d \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u043c (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u044e\u0431\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b \u0438 \u0443\u0441\u043b\u0443\u0433\u0438), \u0432\u0435\u0434\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e. \u0421\u043f\u0440\u043e\u0441 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0443\u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0438 \u0446\u0435\u043d\u044b \u043a \u043d\u0443\u043b\u044e. \u0412 \u0446\u0435\u043b\u043e\u043c, \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441, \u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0439 \u0438 \u043b\u0443\u0447\u0448\u0435\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0435\u0439 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0432\u0435\u0441\u044b: \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0447\u0430\u0448\u0435 \u0441\u043f\u0440\u043e\u0441, \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445: \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u043f\u0440\u043e\u0441, \u0442\u043e \u0431\u0438\u043b\u0435\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0430\u0442\u0441\u044f; \u0435\u0441\u043b\u0438 \u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0443 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0442\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u0440\u0435\u0441\u0435\u043b. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u0435, \u0438 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0435\u0433\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u044b \u0433\u0440\u0443\u0437\u043e\u0432 \u043d\u0430 \u0447\u0430\u0448\u0430\u0445 \u0432\u0435\u0441\u043e\u0432. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0435\u043c\u043a\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430 \u043d\u0430 -\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0441\u0435\u043b. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0431\u0435\u0434\u0438\u0442\u044c -\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0441\u0441\u0430\u0436\u0438\u0440\u043e\u0432 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043b\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u0443\u043f\u0438\u0442\u044c \u0431\u0438\u043b\u0435\u0442\u044b.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431: \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u0432\u043e\u0437\u0434\u0438\u043a\u0430, \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0438\u043d\u0430 \u0441 \u0447\u0430\u0448\u0430\u043c\u0438. \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u0441\u043f\u0440\u043e\u0441 \u2014 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432 \u0435\u0433\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0430 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043f\u0440\u043e\u0441\u0430, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0443\u0436\u0435 \u043a \u043d\u0435\u043c\u0443.<\/p>\n<p>\u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u0438\u043d\u044b \u0432\u0435\u0441\u043e\u0432 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0446\u0435\u043d\u0430, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0435\u0441\u0435\u043b \u0432 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0440\u0435\u0439\u0441\u044b \u041c\u043e\u0441\u043a\u0432\u0430 \u2014 \u041f\u0430\u0440\u0438\u0436, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439. \u041f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f: \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0431\u0438\u043b\u0435\u0442\u044b \u0440\u0430\u0441\u043a\u0443\u043f\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u0411\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0438 \u0441\u043f\u0440\u043e\u0441: \u043e\u043d \u043e\u0431\u044b\u0447\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u044b \u0432\u044b\u043b\u0435\u0442\u0430.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0430 \u0432\u043e\u0442 \u043a\u0430\u043a\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043f\u0440\u043e\u0441 \u2014 \u043d\u0435\u0442. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0434\u0430\u0442\u044c 10 \u043c\u0435\u0441\u0442. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0446\u0435\u043d\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043d\u0435\u0434\u0435\u043b\u0438 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439 \u0447\u0430\u0448\u0435 \u0432\u0435\u0441\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c 10 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0435\u0439. \u0421\u043f\u0440\u043e\u0441 \u0441\u043b\u0443\u0447\u0430\u0435\u043d, \u0432\u0435\u0434\u044c \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0446\u0435\u043d\u0430\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e \u0446\u0435\u043d\u0443, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0441\u044b \u043d\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u043b\u0438\u0441\u044c \u0431\u044b \u043e\u0442 \u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0421\u043f\u0440\u043e\u0441 \u2014 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u043d \u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0415\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<blockquote>\n<p><strong>\u0421\u043f\u0440\u043e\u0441<\/strong> \u2014 \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u043e\u0439 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438 \u0436\u0435\u043b\u0430\u044e\u0442 \u043a\u0443\u043f\u0438\u0442\u044c \u043f\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435, \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/blockquote>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0445\u043e\u0434\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b:<\/p>\n<ul>\n<li>\n<p> \u2014 \u0446\u0435\u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438);<\/p>\n<\/li>\n<li>\n<p> \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0442\u043e\u0432\u0430\u0440\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433);<\/p>\n<\/li>\n<li>\n<p> \u2014 \u043f\u0435\u0440\u0438\u043e\u0434 (\u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a) \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043d\u044b. \u0414\u0430\u043d\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043b\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0440\u0435\u043c\u044f \u0433\u043e\u0434\u0430;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u043a\u0438\u0434\u043e\u043a \u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0446\u0435\u043d\u044b \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u0441\u043e\u0442\u043d\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u043f\u0440\u043e\u0441, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: \u043f\u043e\u0433\u043e\u0434\u0430 \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043f\u0440\u0438\u0431\u044b\u0442\u0438\u044f \u0438\u043b\u0438 \u0440\u0435\u0437\u043a\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043f\u0440\u043e\u0441 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u2014 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u043d\u043e \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439.<\/p>\n<h4>1.1. \u0414\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430<\/h4>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u0435\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043f\u0440\u043e\u0441\u0430 \u043d\u0438\u043a\u0430\u043a\u043e\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0446\u0435\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435. \u041d\u043e \u0441 \u0447\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u0440\u043e\u0441\u0430 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0439\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445, \u0430 \u0441\u0430\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c\u0438:<\/p>\n<p>\u0433\u0434\u0435  \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c 0.1, \u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043a \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c\u0443 \u0446\u0435\u043b\u043e\u043c\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import numpy as np import pandas as pd np.random.seed(42) from scipy import stats from scipy.stats import uniform, betabinom, randint, poisson, gamma import matplotlib.pyplot as plt from pylab import rcParams rcParams['figure.figsize'] = 7, 4 rcParams['figure.dpi'] = 140 %config InlineBackend.figure_format = 'png' import seaborn as sns #sns.set() #from matplotlib import cm sns.set_style(\"whitegrid\")<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">f, ax = plt.subplots(1, 2, figsize=(12, 3))  price = np.round(np.arange(1, 1.5, 0.1), 1) q1 = np.round(-20 * price + 43) q2 = np.round(-15 * price + 38)  ax[0].plot(price, q1, 'bo-', label=r'$Q_{1}$') ax[0].plot(price, q2, 'ro-', label=r'$Q_{2}$') ax[0].legend() ax[0].set_yticks(np.r_[15:25]) ax[0].set_xticks(price) ax[0].set_xlabel('Price') ax[0].set_ylabel('Quantity') ax[0].set_title('Demand')  ax[1].plot(price, price * q1, 'bo-', label=r'$Q_{1}$') ax[1].plot(price, price * q2, 'ro-', label=r'$Q_{2}$') ax[1].legend() ax[1].set_xlabel('Price') ax[1].set_ylabel('Profit') ax[1].set_xticks(price) ax[1].set_title('Profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0434\u0430\u0436 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432, \u043a\u0430\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0443\u0441\u043b\u0443\u0433, \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u2014 \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u043e\u0441 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u0440\u0430\u0437\u0430 &#171;\u043a\u0440\u0438\u0432\u0430\u044f \u0441\u043f\u0440\u043e\u0441\u0430&#187; \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c\u043e\u0439 \u0446\u0435\u043d\u044b \u0432\u043e\u0432\u0441\u0435 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0438 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0433\u043b\u0430\u0434\u043a\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<p>\u0433\u0434\u0435  \u2014 \u043d\u043e\u043c\u0435\u0440 \u043f\u0435\u0440\u0438\u043e\u0434\u0430,  \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u0438 \u0446\u0435\u043d\u0435 , \u0430  \u2014 \u0432\u0435\u043a\u0442\u043e\u0440 \u0446\u0435\u043d, \u0434\u043b\u0438\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0432\u043d\u0430 .<\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u043d\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u044b \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u043e\u0432 \u0438\u0445 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u0445 \u0444\u043e\u0440\u043c. \u041f\u0440\u0438\u0447\u0435\u043c \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u0438\u0435. \u0418\u0437-\u0437\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u0447\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445, \u0438, \u043a\u0430\u043a \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0434\u0430\u043b\u0435\u0435, \u044d\u0442\u0430 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0435 \u043d\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u0442.\u0435. \u0441\u0443\u043c\u043c\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043a \u043f\u0440\u043e\u0434\u0430\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432\u0441\u0435\u0433\u043e V \u043a\u0440\u0435\u0441\u0435\u043b \u0438 , \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0438\u043c\u0435\u044e\u0449\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p> V &#8212;  Q_{1}\\end{cases}.&#187; alt=&#187;Q_{2} = \\begin{cases}Q_{2}, &amp; \\text{ if } Q_{2}  \\leqslant  V &#8212;  Q_{1} \\\\V &#8212; Q_{1}, &amp; \\text{ if } Q_{2} > V &#8212;  Q_{1}\\end{cases}.&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a57\/119\/c59\/a57119c590d54d4b2569306e37f67523.svg&#187; width=&#187;299&#8243; height=&#187;49&#8243;\/><\/p>\n<p>\u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u043c\u0438 \u0446\u0435\u043d\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 1.1 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u0432, \u0442.\u0435. , \u043d\u043e \u0438\u0437-\u0437\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">Q_2 = np.where(Q_1 + Q_2 > 40, 40 - Q_1, Q_2) profit = pd.DataFrame((Q_1 * price)[:, np.newaxis] + Q_2 * price,                       columns=price,                       index=price) sns.heatmap(profit, annot=True, fmt=\".2f\", cmap='viridis') plt.ylabel(r'Price for $T_{1}$') plt.xlabel(r'Price for $T_{2}$') plt.title('Resulting profit');<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><\/figure>\n<p>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0430\u044f \u0446\u0435\u043d\u0430 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435 \u0440\u0430\u0432\u043d\u0430 1.1, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 1.3.<\/p>\n<h4>1.2. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438? \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u0440\u0438\u0432\u044b\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u043f\u0440\u043e\u0434\u0430\u0436 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0430 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0445 \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u044d\u0442\u0438 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0447\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e. \u041f\u0443\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 \u0434\u0432\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0442.\u0435. \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0435\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u043e\u0441\u0430 \u0440\u0430\u0432\u043d\u043e\u0435 19, \u0442\u043e \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0432\u043d\u044b 21 \u0438 17, \u0430 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 [17, 18, 19, 20, 21] \u0431\u0443\u0434\u0443\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b \u0438 \u0440\u0430\u0432\u043d\u044b 0.2.<\/p>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u0432\u0435\u0434\u044c \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043c\u0430\u0442\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0446\u0435\u043b\u0435\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>\u0433\u0434\u0435  \u0438  \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u043e\u0441\u0430 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0438 \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u0435, \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435.  \u0438  \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439  \u0438  \u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0446\u0435\u043d\u044b  \u0438 .<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442:<\/p>\n<p> V &#8212;  q^{(1)}_{j}\\end{cases},&#187; alt=&#187;q^{(2)}_{k} = \\begin{cases}q^{(2)}_{k}, &amp; \\text{ if } q^{(2)}_{k}  \\leqslant  V &#8212;  q^{(1)}_{j} \\\\V &#8212; q^{(1)}_{j}, &amp; \\text{ if } q_{j}^{(2)} > V &#8212;  q^{(1)}_{j}\\end{cases},&#187; src=&#187;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/978\/97f\/beb\/97897fbeb8e1ce3093d0a6757878aea8.svg&#187; width=&#187;317&#8243; height=&#187;65&#8243;\/><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>Python<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">res_profit = [] for i in range(5):     profit_row = []     for j in range(5):         Q1 = (np.c_[-2:3] + q1[i])         Q2 = (np.r_[-2:3] + q2[j])         Q2 = np.where(Q1 + Q2 > 40, 40 - Q1, Q2)         profit_ij = np.sum((price[i] * Q1.flatten() + price[j] *<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/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-365384","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/365384","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=365384"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/365384\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=365384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=365384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=365384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}