{"id":412547,"date":"2024-06-29T22:36:39","date_gmt":"2024-06-29T22:36:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=412547"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=412547","title":{"rendered":"<span>\u042d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a<\/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>\u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u0441\u0430\u0439\u0442\u0430-\u0445\u0440\u0435\u0441\u0442\u043e\u043c\u0430\u0442\u0438\u0438 RosettaCode. \u0420\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043e\u0432\u0451\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u2014 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e (\u0435\u0451 \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438), \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0434\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u0443, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430 Haskell.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0442\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043a\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u043c\u043d\u0435, \u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044f &#171;\u0430\u0432\u0442\u043e\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435&#187; \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439\u0441\u044f \u0432 \u043d\u0438\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u044b, \u0440\u0435\u0448\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a \u0431\u044b \u0441\u0430\u043c\u0438 \u0441\u043e\u0431\u043e\u0439, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0441\u0430\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0438\u043c \u0432 \u0435\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0438 \u0443\u0436\u0435 \u0441 \u044d\u0442\u0438\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 Haskell, \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438<\/h3>\n<p>\u0415\u0441\u0442\u044c \u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e:<img decoding=\"async\" class=\"formula inline\" source=\"?(x)\" alt=\"?(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4df\/c28\/e3d\/4dfc28e3d4e0859fb4f6110b6b43902e.svg\"\/>. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u043a\u043e\u0440\u043d\u044f\u043c\u0438 \u0432\u0441\u0435\u0445 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438. \u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u0442 \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0430\u044f \u0435\u0441\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441 1904 \u0433\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0435\u0451 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0432 \u0441\u0432\u043e\u0451\u043c \u0442\u0440\u0443\u0434\u0435 &#171;Zur Geometrie der Zahlen&#187; (&#171;\u041e \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b&#187;). \u041f\u043e\u0442\u043e\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0410\u0440\u043d\u043e \u0414\u0435\u043d\u0434\u0436\u043e\u044f \u0432 1938 \u0433\u043e\u0434\u0443, \u0430 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u044b\u0439 \u0414\u0436\u043e\u043d \u041a\u043e\u043d\u0432\u0435\u0439, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u043d\u0441\u0442\u0440\u0443\u043e\u0437\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f, \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u0438\u0433\u0440\u044b &#171;\u0416\u0438\u0437\u043d\u044c&#187; \u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0447\u0435\u043d\u044c-\u043e\u0447\u0435\u043d\u044c-\u043f\u0440\u0435\u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b. \u041d\u0435 \u0437\u043d\u0430\u044e \u0443\u0436 \u0447\u0435\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0414\u0436\u043e\u043d \u041a\u043e\u043d\u0432\u0435\u0439 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043e\u0431\u0432\u0435\u0434\u044f \u0435\u0451 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a\u043e\u043c. \u0418\u0442\u0430\u043a, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445: <img decoding=\"async\" class=\"formula inline\" source=\"?(x)\" alt=\"?(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de6\/86d\/d06\/de686dd060297f71516f4034556b5a86.svg\"\/> \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0435\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"?^{-1}(x) \\equiv \\boxed{x} \" alt=\"?^{-1}(x) \\equiv \\boxed{x} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/115\/7bc\/8d2\/1157bc8d2a51fa96033cd4aee65e65f3.svg\"\/> (<em>\u0438 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044f LaTeX-\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u043b\u0438 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u0442\u043e \u0438\u043c \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b?<\/em>). \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b, \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438.<\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u044d\u0442\u043e \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u0430\u044f \u043d\u0435\u0447\u0451\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0432\u0441\u0435\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043e\u0441\u0438. \u0412 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0438 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"?(x) = 2\\sum_{k=1}^{N}(-1)^{k+1}2^{-(a_1 + a_2 +  ... + a_k)},\" alt=\"?(x) = 2\\sum_{k=1}^{N}(-1)^{k+1}2^{-(a_1 + a_2 +  ... + a_k)},\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9e9\/79d\/d91\/9e979dd912efefec51b16a9efc4186ad.svg\" width=\"295\" height=\"61\"\/><\/p>\n<p>\u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"a_1, a_2, ...\" alt=\"a_1, a_2, ...\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c6c\/25e\/c3b\/c6c25ec3b338abfa3e71768562535469.svg\"\/>\u2014 \u044d\u0442\u043e \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0446\u0435\u043f\u043d\u0443\u044e \u0434\u0440\u043e\u0431\u044c: <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x = [a_0; a_1, a_2, a_3...] = a_0 + \\frac{1}{a_1+\\frac{1}{a_2 + \\frac{1}{a_3 +...}}}\" alt=\"x = [a_0; a_1, a_2, a_3...] = a_0 + \\frac{1}{a_1+\\frac{1}{a_2 + \\frac{1}{a_3 +...}}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/002\/e4b\/ec0\/002e4bec0794cbb89c34b8544e06a624.svg\" width=\"363\" height=\"66\"\/><\/p>\n<p>\u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0434\u0432\u043e\u0439\u043a\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438 \u0432 \u0435\u0451 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x = [a_0;a_1, a_2, a_3,a_4...] = a_0 + \\overbrace{\\underbrace{0.0...0}_{a_1}}^{\u043d\u0443\u043b\u0438}\\overbrace{\\underbrace{11..11}_{a_2}}^{\u0435\u0434\u0438\u043d\u0438\u0446\u044b}\\overbrace{\\underbrace{0...0}_{a_3}}^{\u043d\u0443\u043b\u0438}\\overbrace{\\underbrace{11..11}_{a_4}}^{\u0435\u0434\u0438\u043d\u0438\u0446\u044b}...\" alt=\"x = [a_0;a_1, a_2, a_3,a_4...] = a_0 + \\overbrace{\\underbrace{0.0...0}_{a_1}}^{\u043d\u0443\u043b\u0438}\\overbrace{\\underbrace{11..11}_{a_2}}^{\u0435\u0434\u0438\u043d\u0438\u0446\u044b}\\overbrace{\\underbrace{0...0}_{a_3}}^{\u043d\u0443\u043b\u0438}\\overbrace{\\underbrace{11..11}_{a_4}}^{\u0435\u0434\u0438\u043d\u0438\u0446\u044b}...\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87d\/6c3\/c12\/87d6c3c12916d14c528e58b301eee1a0.svg\" width=\"486\" height=\"76\"\/><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0438\u0441\u043b\u043e <img decoding=\"async\" class=\"formula inline\" source=\"119\/36\" alt=\"119\/36\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/260\/0f0\/04a\/2600f004a9db05ab68737d1b7a6ff228.svg\"\/>\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438 \u043a\u0430\u043a <img decoding=\"async\" class=\"formula inline\" source=\"[3;3,3,1,2]\" alt=\"[3;3,3,1,2]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/260\/ede\/c9a\/260edec9a51871e5fd7fe0ae2b0233cd.svg\"\/>\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 \u0442\u0430\u043a\u043e\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e: <img decoding=\"async\" class=\"formula inline\" source=\"3 + 0.00111011_{(2)}\" alt=\"3 + 0.00111011_{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/523\/ebd\/f62523ebd061f50b66b2f918721a77ad.svg\"\/>(\u0442\u0440\u0438 \u043d\u0443\u043b\u044f, \u0442\u0440\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u043e\u0434\u0438\u043d \u043d\u043e\u043b\u044c \u0438 \u0434\u0432\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b). \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e  \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"3 + 0.00111011_{(2)} = 3 + \\frac18+\\frac1{16}+\\frac1{32}+\\frac1{128}+\\frac1{256}=3+\\frac{59}{256}=\\frac{827}{256}.\" alt=\"3 + 0.00111011_{(2)} = 3 + \\frac18+\\frac1{16}+\\frac1{32}+\\frac1{128}+\\frac1{256}=3+\\frac{59}{256}=\\frac{827}{256}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/805\/69d\/53b\/80569d53bdf2fa2e31da00313f04ef8e.svg\" width=\"611\" height=\"43\"\/><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"?\\left(\\frac{119}{36}\\right)=\\frac{827}{256}.\" alt=\"?\\left(\\frac{119}{36}\\right)=\\frac{827}{256}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/962\/266\/96c\/96226696c74b60169609e9d07b475af5.svg\" width=\"146\" height=\"50\"\/><\/p>\n<p>\u041d\u0443, \u0438 \u0437\u0430\u0447\u0435\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0432\u0441\u044f \u044d\u0442\u0430 \u0432\u043e\u0437\u043d\u044f \u0441 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"?(x)\" alt=\"?(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a4c\/deb\/c95\/a4cdebc958d754c900979deb835b3da4.svg\"\/> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 <strong>\u0432\u0441\u0435<\/strong> <strong>\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/strong> \u0447\u0438\u0441\u043b\u0430 \u0432 <strong>\u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0432 \u0434\u0440\u043e\u0431\u0438 \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0434\u0432\u043e\u0439\u043a\u0438 (\u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043f\u043e\u0434\u043a\u043e\u043b\u044c\u0446\u043e \u043f\u043e\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u043e\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbb{Z}[\u00bd]\" alt=\"\\mathbb{Z}[\u00bd]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/649\/385\/33b\/64938533b30c31b5131e63e593ff10af.svg\"\/>).  \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0431\u044b &#171;\u0440\u0430\u0437\u0440\u0435\u0434\u0438\u0442\u044c&#187; \u043f\u043b\u043e\u0442\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0451. \u042d\u0442\u043e \u0438 \u0431\u044b\u043b\u043e \u0446\u0435\u043b\u044c\u044e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0413\u0435\u0440\u043c\u0430\u043d\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u0410 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u043e\u0431\u044c \u0441 \u0438\u043d\u044b\u043c \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c \u0438\u0437 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430? \u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u043c \u0447\u0438\u0441\u043b\u0430\u043c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043d\u0435 \u043a\u0440\u0430\u0442\u043d\u044b\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u044f\u043c \u0434\u0435\u0441\u044f\u0442\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0440\u043e\u0431\u0438, \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u043e\u0431\u044f\u0445 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{2}{7} = 0.110110110..._{(2)} = 0.(110)_{(2)}\" alt=\"\\frac{2}{7} = 0.110110110..._{(2)} = 0.(110)_{(2)}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a0\/741\/ed8\/5a0741ed8a2cd8bfd815c47b4e7b9f7f.svg\" width=\"289\" height=\"43\"\/><\/p>\n<p>\u041f\u0440\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439, \u043d\u043e \u0442\u043e\u0436\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u044c\u044e. \u0410 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442  \u043e\u0442 \u043f\u0440\u043e\u0447\u0438\u0445 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0438\u0441\u043b\u0430 \u0432\u0438\u0434\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"p+\\sqrt{q}\" alt=\"p+\\sqrt{q}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cce\/705\/fdc\/cce705fdc3c636e3b01abbebe531a6fb.svg\"\/>, \u0433\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"p\" alt=\"p\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/86b\/f75\/c82\/86bf75c820e5ab1297e49b48936e739b.svg\"\/>\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"q\" alt=\"q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c12\/0e0\/105\/c120e0105a733b15df1e587d6358a8ec.svg\"\/>\u2014\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"2\/7\" alt=\"2\/7\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f36\/868\/f34\/f36868f34ba97e079a40a898b953f086.svg\"\/>\u043f\u0440\u043e\u043e\u0431\u0440\u0430\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"?^{-1}\\left(\\frac{2}{7}\\right) = ?^{-1}\\left(0.110110110..._{(2)}\\right) = [0;1,2,1,2,1...] = \\frac{\\sqrt3 - 1}{2}.\" alt=\"?^{-1}\\left(\\frac{2}{7}\\right) = ?^{-1}\\left(0.110110110..._{(2)}\\right) = [0;1,2,1,2,1...] = \\frac{\\sqrt3 - 1}{2}.\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/462\/4b4\/431\/4624b443187d018bb5a4ea25be8e6a5c.svg\" width=\"544\" height=\"53\"\/><\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0432\u0448\u0435\u0435\u0441\u044f &#171;\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e&#187; \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0440\u0435\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438\u0447\u0451\u043c \u043e\u043d\u0430 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e: \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e, \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u0438 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0435\u0449\u0451 \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c) \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\{\\sqrt{n}\\ |\\  n\\in\\mathbb{Z}\\}\" alt=\"\\{\\sqrt{n}\\ |\\  n\\in\\mathbb{Z}\\}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2c5\/38c\/502\/2c538c502ea7e3189e9128e003adf8ab.svg\"\/>, \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445. \u041d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u043e\u0434\u043d\u0438\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u043c\u043e\u0433. \u0422\u0430\u043a \u0447\u0442\u043e, \u0445\u043e\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043d\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0449 \u0440\u044f\u0434 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0439, \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0441\u0442\u044c, \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u044e\u0434\u0443 \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0432 \u0447\u0443\u0442\u044c \u043b\u0438 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/240\/485\/9a1\/2404859a1d44c89708e98755c12618fc.png\" alt=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e.\" title=\"\u0413\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e.\" width=\"600\" height=\"368\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/240\/485\/9a1\/2404859a1d44c89708e98755c12618fc.png\"\/><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e.<\/figcaption><\/figure>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0443 \u0441 \u0441\u0443\u043c\u043c\u043e\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0432\u0432\u0451\u043b \u0414\u0435\u043d\u0434\u0436\u043e\u0439. \u0421\u0430\u043c \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b \u0441\u0432\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\begin{eqnarray}&amp;?(0)=0,\\\\&amp;?(x+1)=?(x)+1,\\\\&amp;?\\left(\\frac{p+r}{q+s}\\right) = \\frac12 \\left[?\\left(\\frac{p}{q}\\right) + ?\\left(\\frac{r}{s}\\right)\\right].\\end{eqnarray}\" alt=\"\\begin{eqnarray}&amp;?(0)=0,\\\\&amp;?(x+1)=?(x)+1,\\\\&amp;?\\left(\\frac{p+r}{q+s}\\right) = \\frac12 \\left[?\\left(\\frac{p}{q}\\right) + ?\\left(\\frac{r}{s}\\right)\\right].\\end{eqnarray}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/54a\/55d\/862\/54a55d862d62464b354ce157c66efa23.svg\" width=\"299\" height=\"103\"\/><\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442, a \u0432\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[0,1]\" alt=\"[0,1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c01\/430\/c58\/c01430c5848b13f0435c8086cc47959b.svg\"\/> \u043d\u0430 \u0432\u0441\u044e \u0447\u0438\u0441\u043b\u043e\u0432\u0443\u044e \u043e\u0441\u044c. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0434 \u0434\u0432\u0443\u043c\u044f \u0434\u0440\u043e\u0431\u044f\u043c\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"p\/q\" alt=\"p\/q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b98\/add\/d6c\/b98addd6c72178cc757801dc37764b3f.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"r\/s\" alt=\"r\/s\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/efc\/ced\/52e\/efcced52efafcb6af637613b8a8126ae.svg\"\/>, \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0%D0%BD%D1%82%D0%B0_(%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0434\u0438\u0430\u043d\u0442\u043e\u0439<\/a> \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u043d\u043e \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u041c\u043d\u0435 \u0434\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u043c 5-7 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0423\u0447\u0435\u043d\u0438\u043a\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b \u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0438 \u043d\u0435 \u043b\u044e\u0431\u044f\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0437\u0430\u0442\u044c: &#171;\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0421\u0430\u0434\u0438\u0441\u044c.&#187;, \u0432\u043e\u0441\u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c: &#171;\u041d\u0443 \u0438 \u043d\u0443, \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0443 \u0442\u0435\u0431\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c!?&#187;, \u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443\u0447\u0435\u043d\u0438\u043a \u043f\u0438\u0448\u0435\u0442 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435: .<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac12 + \\frac13 = \\frac25\" alt=\"\\frac12 + \\frac13 = \\frac25\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9d2\/eff\/170\/9d2eff1707d1c1d182271805ff69358c.svg\" width=\"101\" height=\"43\"\/><\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e.. \u0434\u0440\u043e\u0431\u044c \u043e\u043f\u044f\u0442\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u0432\u0435\u043a\u0442\u043e\u0440! \u041d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u0432\u0435\u0434\u044c \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043d\u0435\u0432\u0435\u0441\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0432\u0448\u0438\u0435\u0441\u044f <img decoding=\"async\" class=\"formula inline\" source=\"5\/6\" alt=\"5\/6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f0f\/866\/8b5\/f0f8668b5c826c7191afa48fb047a6aa.svg\"\/>. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043c\u044b \u0434\u0440\u043e\u0431\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a: \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c \u2014 \u0441 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u0435\u043c, \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044c \u2014 \u0441 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c. \u0412\u043e\u0442 \u0431\u044b \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435!.. \u0414\u0430\u0432\u0430\u0439\u0442\u0435-\u043a\u0430 \u0441\u043f\u0440\u043e\u0441\u0438\u043c \u0441\u0435\u0431\u044f (\u0438 \u0437\u0430\u043e\u0434\u043d\u043e, \u0432\u0435\u0441\u044c \u043a\u043b\u0430\u0441\u0441): &#171;\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u043d\u0430\u0448\u0430 \u0441\u0443\u043c\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445?&#187; \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0434\u0440\u043e\u0431\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u044f \u0438\u0445 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439. \u0420\u0438\u0441\u0443\u0435\u043c \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"2\/5\" alt=\"2\/5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/06f\/ece\/940\/06fece94018a78f75f94384cde542c4a.svg\"\/>\u043b\u0435\u0436\u0438\u0442 \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043c\u0435\u0436\u0434\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a03\/9cd\/9c9\/a039cd9c9ce29b594af67951f557aa86.svg\"\/>\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/2\" alt=\"1\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/384\/121\/b73\/384121b7317f0bac5b1f8788d2021cb1.svg\"\/>. \u0412\u0440\u044f\u0434 \u043b\u0438 \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430, \u0441\u043a\u043e\u0440\u0435\u0435, \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u043e\u0442 \u0442\u0443\u0442-\u0442\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c: &#171;\u0410 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0443\u043c\u043c\u044b? \u2014 \u041c\u0435\u0434\u0438\u0430\u043d\u0442\u0443!&#187; \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u0435\u043b: <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\frac{p}{q}\\oplus\\frac{r}{s} = \\frac{p+r}{q+s}\" alt=\"\\frac{p}{q}\\oplus\\frac{r}{s} = \\frac{p+r}{q+s}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fc6\/004\/313\/fc6004313e5a37f38972e5872cd02f4b.svg\" width=\"133\" height=\"45\"\/><\/p>\n<p>\u041c\u0435\u0434\u0438\u0430\u043d\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0438\u0442 \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430\u043c\u0438, \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0440\u0430\u0432\u043d\u0430 \u0438\u043c \u043e\u0431\u043e\u0438\u043c, \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u0430, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u043c\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u043c, \u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0442.\u0434. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u0442\u0430\u043a\u043e\u0435, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u0440\u043e\u0431\u0435\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"p\/q\" alt=\"p\/q\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21b\/c12\/e08\/21bc12e08f7d9ff9740e30b448c5ea9a.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"r\/s\" alt=\"r\/s\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/303\/8c5\/b59\/3038c5b592fdfa2fd46bb9ac65f18197.svg\"\/>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <img decoding=\"async\" class=\"formula inline\" source=\"|ps-qr|=1\" alt=\"|ps-qr|=1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/24e\/b2d\/cfd\/24eb2dcfd072894a3a10facf5107ac54.svg\"\/>(\u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0440\u043e\u0431\u044f\u043c\u0438 \u0440\u0430\u0432\u043d\u0430 \u0447\u0438\u0441\u043b\u0443, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0438\u0445 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u0439), \u0442\u043e \u0438\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u043e\u0431\u044c \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c, \u043b\u0435\u0436\u0430\u0449\u0430\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u041d\u0430\u0448\u0438 \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0435 \u0434\u0440\u043e\u0431\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d8\/6f0\/36a\/6d86f036a78fae4f6c9085189c2bff89.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/2\" alt=\"1\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/840\/b9a\/0bf\/840b9a0bf22b09c9f00c99458715311b.svg\"\/> \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438\u0435: <img decoding=\"async\" class=\"formula inline\" source=\"|2\u00b71 \u2013 3\u00b71| = 1\" alt=\"|2\u00b71 \u2013 3\u00b71| = 1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/98d\/b51\/fd0\/98db51fd029d299af4c9b4f870476d90.svg\"\/>. \u041c\u0435\u0436\u0434\u0443 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/47b\/cdd\/2f3\/47bcdd2f3b3a72d3a315e5499a1f47c5.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/2\" alt=\"1\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f80\/e72\/136\/f80e721361994682cf1a380f6183acfa.svg\"\/> \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u0430 \u0434\u0440\u043e\u0431\u044c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"4\" alt=\"4\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/062\/0eb\/65a\/0620eb65a33d8723032686a6922961f7.svg\"\/>, \u0430 \u0434\u0440\u043e\u0431\u0438 \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"6\" alt=\"6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e93\/524\/859\/e93524859e891fde9ffbbc7357b94024.svg\"\/>\u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3 = 2\/6\" alt=\"1\/3 = 2\/6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e6\/0c3\/fd3\/8e60c3fd3ab749aefe45b2bede716919.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/2 = 3\/6\" alt=\"1\/2 = 3\/6\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/850\/826\/199\/850826199a7921ebef912a753cfbba1c.svg\"\/>. \u0410 \u0432\u043e\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3 \\oplus 1\/2 = 2\/5\" alt=\"1\/3 \\oplus 1\/2 = 2\/5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/51d\/b9c\/951\/51db9c95181e191ff8a3c165309c39c0.svg\"\/> \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f! \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440 \u0434\u0440\u043e\u0431\u0435\u0439 <img decoding=\"async\" class=\"formula inline\" source=\"(1\/3,2\/5)\" alt=\"(1\/3,2\/5)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d2a\/e58\/3fc\/d2ae583fc3682b53c3f6d095ef7c54b3.svg\"\/>\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"(2\/5,1\/2)\" alt=\"(2\/5,1\/2)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ad\/e89\/971\/5ade89971479004b81506bd37a4a58b4.svg\"\/>\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b: <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%94%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%A8%D1%82%D0%B5%D1%80%D0%BD%D0%B0_%E2%80%94_%D0%91%D1%80%D0%BE%D0%BA%D0%BE\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e<\/a>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u043a-\u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u0443\u044e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0435\u0433\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u044f\u043c\u0438 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438. \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u043d\u0430 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <a href=\"https:\/\/rosettacode.org\/wiki\/Minkowski_question-mark_function\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u0439<\/a> \u043d\u0430 RosettaCode \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0431\u044b \u043f\u0440\u044f\u043c\u043e\u0435 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u041c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u044f\u0437\u044b\u043a <a href=\"https:\/\/rosettacode.org\/wiki\/Category:Haskell\" rel=\"noopener noreferrer nofollow\">Haskell<\/a> \u0438 \u044f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0442\u043d\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f RosettaCode \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043c\u044b\u0441\u043b \u0441\u0430\u0439\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u043c\u0438, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0438\u0433\u0440\u044b \u0432 <em>code golf<\/em>. <\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u0440\u043e\u043c\u0435 Wolfram \u0438 Haskell \u0431\u044b\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 &#171;\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430\u043c\u0438&#187; \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Minkowski%27s_question-mark_function#CITEREFMinkowski1904\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438 \u043d\u0430 Haskell \u0442\u043e\u0436\u0435. \u041f\u0440\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u0443\u043a\u043e\u0432\u043e\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c\u043e\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u0435, \u043d\u043e, \u0432 \u043e\u0431\u0449\u0435\u043c, \u0442\u043e\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0440 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u2014 \u0443\u0436\u0435 \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b, \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u042d\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0441\u0447\u0443\u0440 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Haskell \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0437\u0430\u0447\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c \u043c\u0438\u0440\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0443, \u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e! <\/p>\n<h3>\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043c\u0432\u043e\u043b <img decoding=\"async\" class=\"formula inline\" source=\"\\boxplus\" alt=\"\\boxplus\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a97\/110\/fb0\/a97110fb0a825333b3b679d698c590da.svg\"\/> \u0434\u043b\u044f \u0432\u0437\u044f\u0442\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"?(p \\oplus q) = ?(p) \\boxplus\\,  ?(q).\" alt=\"?(p \\oplus q) = ?(p) \\boxplus\\,  ?(q).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ef3\/4c6\/1e2\/ef34c61e2ba43371dc5bcace11dc7e9c.svg\" width=\"181\" height=\"22\"\/><\/p>\n<p>\u041d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"?^{-1}(p\\boxplus q) = ?^{-1}(p)\\, \\oplus\\, ?^{-1}(q).\" alt=\"?^{-1}(p\\boxplus q) = ?^{-1}(p)\\, \\oplus\\, ?^{-1}(q).\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/64f\/b14\/8ee\/64fb148eedf9caf6eb68754e5e0be26f.svg\" width=\"242\" height=\"25\"\/><\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0432\u0430 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 <em>\u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430<\/em> <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}: (\\mathbb{Q}, \\oplus) \\to (\\mathbb{Z}[\u00bd], \\boxplus)\" alt=\"\\mathbf{M}: (\\mathbb{Q}, \\oplus) \\to (\\mathbb{Z}[\u00bd], \\boxplus)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/279\/03c\/8e7\/27903c8e7390eb842bf6213e3e23fd55.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}^{-1}: (\\mathbb{Z}[\u00bd], \\boxplus) \\to (\\mathbb{Q}, \\oplus)\" alt=\"\\mathbf{M}^{-1}: (\\mathbb{Z}[\u00bd], \\boxplus) \\to (\\mathbb{Q}, \\oplus)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fa7\/67c\/af6\/fa767caf6b1fd462e3ddb54a0f46c7b3.svg\"\/>\u0438\u043b\u0438 <em>\u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c<\/em> \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u044f. \u041d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0433\u043e <strong>\u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u043e\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e.<\/strong> (<em>\u041f\u043e\u0445\u043e\u0436\u0435, \u043b\u044e\u0431\u0430\u044f \u0441\u043e\u043b\u0438\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c &#171;Haskell&#187; \u043e\u0431\u044f\u0437\u0430\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u043a\u043e\u0440\u043d\u0435\u043c &#171;\u043c\u043e\u0440\u0444\u0438\u0437\u043c&#187;. \u0423 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f!<\/em>)<\/p>\n<p>\u0427\u0435\u043c \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0449\u0435\u0439 \u043e\u0434\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u0435? \u041e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u043d\u043e \u0438 \u043d\u0430 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0451\u043c, \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0430 \u0435\u0433\u043e \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f, \u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043b\u0438, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0414\u043b\u044f \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u0432 \u0434\u0440\u0443\u0433\u0430 <strong>\u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f<\/strong> \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432. \u0415\u0441\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435 \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u0440\u0430\u0437\u0430 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0434\u043d\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0432 \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0413\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043f\u0440\u0438\u0447\u0451\u043c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043d\u043e \u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D1%83%D0%B3%D0%B8_%D0%A4%D0%BE%D1%80%D0%B4%D0%B0\" rel=\"noopener noreferrer nofollow\">\u043a\u0440\u0443\u0433\u0438 \u0424\u043e\u0440\u0434\u0430<\/a> \u043e\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435. (<em>\u0411\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0414\u0436\u043e\u043d \u041a\u043e\u043d\u0432\u0435\u0439 \u0432\u044b\u0431\u0440\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442?<\/em>)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8e\/957\/694\/b8e95769423e640b5de12dc84676934e.png\" alt=\"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u043a\u0440\u0443\u0433\u0438 \u0424\u043e\u0440\u0434\u0430. \u0414\u0440\u043e\u0431\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0444\u0438\u0433\u0443\u0440\u044b.\" title=\"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u043a\u0440\u0443\u0433\u0438 \u0424\u043e\u0440\u0434\u0430. \u0414\u0440\u043e\u0431\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0444\u0438\u0433\u0443\u0440\u044b.\" width=\"2507\" height=\"2402\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8e\/957\/694\/b8e95769423e640b5de12dc84676934e.png\"\/><figcaption>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u043a\u0440\u0443\u0433\u0438 \u0424\u043e\u0440\u0434\u0430. \u0414\u0440\u043e\u0431\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u0444\u0438\u0433\u0443\u0440\u044b.<\/figcaption><\/figure>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"[0,1]\" alt=\"[0,1]\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/45e\/034\/e8d\/45e034e8d5fa1bcb8e1749bcabc3ad8f.svg\"\/>\u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0442\u043e\u0447\u043a\u0438: <img decoding=\"async\" class=\"formula inline\" source=\"0, 1\/2\" alt=\"0, 1\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bad\/f96\/615\/badf96615840e0dc24f6a5d4f52e766c.svg\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\" alt=\"1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/abf\/af2\/0e1\/abfaf20e1b5df1a1debdca5df04797a7.svg\"\/>. \u0412\u0442\u043e\u0440\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e <img decoding=\"async\" class=\"formula inline\" source=\"?(x+1)=?(x)+1\" alt=\"?(x+1)=?(x)+1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac1\/3c2\/01b\/ac13c201bf4d2410e738549358fda928.svg\"\/>\u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u0432\u0442\u0440\u043e\u044f\u0435\u0442 \u0441\u0432\u043e\u0451 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}\" alt=\"\\mathbf{M}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f3f\/aae\/acb\/f3faaeacb4de0917eade2a8b6cb2fc88.svg\"\/> \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0432\u0441\u0435 \u0446\u0435\u043b\u044b\u0435 \u0438 \u043f\u043e\u043b\u0443\u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u042d\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043c \u0435\u0449\u0451 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0412 <a href=\"https:\/\/www.researchgate.net\/publication\/273471586_Three_analogues_of_Stern%27s_diatomic_sequence?enrichId=rgreq-a82b1e0a2e7d3c382bebe08b0adffecd-XXX&amp;enrichSource=Y292ZXJQYWdlOzI3MzQ3MTU4NjtBUzoyMzc4ODA0NDIzNTU3MTJAMTQzMzcyNjUyNTA5Nw%3D%3D&amp;el=1_x_2&amp;_esc=publicationCoverPdf\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0421\u044d\u043c\u0430 \u041d\u043e\u0440\u0442\u0448\u0438\u043b\u044c\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}\" alt=\"\\mathbf{M}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e5e\/4d3\/3ca\/e5e4d33ca2b793c5a83fe4ac681ec149.svg\"\/>\u0435\u0449\u0451 \u043d\u0430 \u043e\u0434\u0438\u043d \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0442.\u043d. \u043a\u043e\u0432\u0451\u0440 \u0410\u043f\u043e\u043b\u043b\u043e\u043d\u0438\u044f, \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0421\u0435\u0440\u043f\u0438\u043d\u0441\u043a\u043e\u0433\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/608\/9f6\/e5e\/6089f6e5e63a1d510bfb4bb4fec561fb.png\" alt=\"\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0432\u0440\u043e\u043c \u0410\u043f\u043e\u043b\u043b\u043e\u043d\u0438\u044f \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0421\u0435\u0440\u043f\u0438\u043d\u0441\u043a\u043e\u0433\u043e\" title=\"\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0432\u0440\u043e\u043c \u0410\u043f\u043e\u043b\u043b\u043e\u043d\u0438\u044f \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0421\u0435\u0440\u043f\u0438\u043d\u0441\u043a\u043e\u0433\u043e\" width=\"2497\" height=\"1013\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/608\/9f6\/e5e\/6089f6e5e63a1d510bfb4bb4fec561fb.png\"\/><figcaption>\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0432\u0440\u043e\u043c \u0410\u043f\u043e\u043b\u043b\u043e\u043d\u0438\u044f \u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0421\u0435\u0440\u043f\u0438\u043d\u0441\u043a\u043e\u0433\u043e<\/figcaption><\/figure>\n<p>\u041d\u0435 \u043d\u0430\u0434\u043e \u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043a\u0440\u0443\u0433\u0438 (\u043a\u0430\u043a \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b) \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0438\u043b\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438. \u041e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438\u0448\u044c \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0442\u043e\u0447\u0435\u043a \u0438\u0445 \u043a\u0430\u0441\u0430\u043d\u0438\u044f, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u0438\u0445 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043b\u0438 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0442\u043e\u0447\u0435\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043d\u043e \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 (\u0438\u043b\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c) \u043d\u043e, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0435 \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438 \u0440\u0438\u0441\u0443\u043d\u043a\u0430, \u0430 \u0432 \u0442\u043e\u043c \u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d\u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442.<\/p>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u043e\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u0430 \u043a\u0430\u043a \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}: (\\mathbb{Q}, \\oplus) \\to (\\mathbb{Z}[\u00bd], \\boxplus) \" alt=\"\\mathbf{M}: (\\mathbb{Q}, \\oplus) \\to (\\mathbb{Z}[\u00bd], \\boxplus) \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27b\/99d\/ac9\/27b99dac911e125955e32a56744ddb68.svg\"\/>\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043b\u0438\u0448\u044c \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0443\u043c\u0443\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u0430 (\u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u0435\u043c \u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e)? \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, &#171;\u0445\u043e\u0440\u043e\u0448\u0438\u0439&#187; \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u0431\u0443\u0434\u0443\u0447\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u043e \u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432. \u0418\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f, \u043a\u0430\u043a \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u043e\u0432 \u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbf{M}\" alt=\"\\mathbf{M}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81a\/706\/d50\/81a706d50f277c0a0754ccf73e801ebc.svg\"\/>\u0441 \u0443\u0432\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0441 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435-\u043e\u0431\u0440\u0430\u0437\u0435, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 (\u0445\u043e\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u043e\u0435), \u0441\u0445\u043e\u0434\u044f\u0449\u0430\u044f\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0438 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435, \u043f\u0440\u0438\u0447\u0451\u043c \u043a \u043e\u0431\u0440\u0430\u0437\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430. \u041a\u0440\u0430\u0441\u0438\u0432\u043e!<\/p>\n<p>\u041d\u0430\u043c \u0436\u0435 \u0441 \u0432\u0430\u043c\u0438 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"?(x)\" alt=\"?(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/098\/ade\/a10\/098adea10ad97cd2546b66857c1756bf.svg\"\/>\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"?^{-1}(x)\" alt=\"?^{-1}(x)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/493\/346\/de2\/493346de26b24317ce390d0e1ae27ece.svg\"\/> \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438 \u044f \u0431\u044b \u0434\u0430\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u043d\u0430\u0445\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u0437 \u043d\u0438\u0445 \u0432 \u043f\u0430\u0440\u0443 \u043e\u0431\u0440\u0430\u0437 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u0412\u0441\u0435\u0433\u043e-\u0442\u043e! <\/p>\n<h3>\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u0435\u043c \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0433\u0440\u043e\u0437\u0438\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u044f \u043d\u0435 \u0438\u0437\u0434\u0435\u0432\u0430\u043b\u0441\u044f, \u0430 \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u044b\u0448\u0435, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e. \u0414\u043b\u044f \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0442\u0438\u043f<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\mathrm{Tree}\\ a = \\mathrm{Node}\\ (\\mathrm{Tree}\\ a)\\ a\\ (\\mathrm{Tree}\\ a)\" alt=\"\\mathrm{Tree}\\ a = \\mathrm{Node}\\ (\\mathrm{Tree}\\ a)\\ a\\ (\\mathrm{Tree}\\ a)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d36\/619\/2c7\/d366192c7c16a1c06b4353c4399abe78.svg\" width=\"290\" height=\"22\"\/><\/p>\n<p>\u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437 c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430, \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(a, b) \\to \\mathrm{Tree}\\ (a, m)\\ m\\ (m, b),\\quad \\text{where}\\ m = a \\oplus b\" alt=\"(a, b) \\to \\mathrm{Tree}\\ (a, m)\\ m\\ (m, b),\\quad \\text{where}\\ m = a \\oplus b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dc7\/9d8\/6f3\/dc79d86f3d35f5e3bdd57fffe75a79e0.svg\" width=\"416\" height=\"22\"\/><\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u043a\u0438 (\u0430\u043d\u0430\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430) \u0434\u0435\u0440\u0435\u0432\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0438\u0441\u0443\u043d\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/363\/063\/0a3\/3630630a3e19a6b82a93b01cfe7d8d48.png\" alt=\"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e\" title=\"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e\" width=\"1278\" height=\"2171\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/363\/063\/0a3\/3630630a3e19a6b82a93b01cfe7d8d48.png\"\/><figcaption>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u043d\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u0440\u044f\u043c\u044b\u043c \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u043e\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0437\u043b\u044b \u0434\u0435\u0440\u0435\u0432\u0430, \u043d\u043e \u0438 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b, \u0438\u043b\u0438, \u0447\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438, \u0438\u0445 \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0435, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0443\u0441\u0443\u043d\u043a\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0435\u0440\u0435\u0432\u043e-\u043e\u0431\u0440\u0430\u0437 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0440\u043e\u0434\u0438\u0442\u044c \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u043a\u043e\u0439 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0432\u0437\u044f\u0442\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"(a, b) \\to \\mathrm{Tree}\\ (a, m)\\ m\\ (m, b),\\quad \\text{where}\\ m = a \\boxplus b\" alt=\"(a, b) \\to \\mathrm{Tree}\\ (a, m)\\ m\\ (m, b),\\quad \\text{where}\\ m = a \\boxplus b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fe1\/ae5\/f18\/fe1ae5f18465a72d7f58e61d2597afbc.svg\" width=\"416\" height=\"22\"\/><\/p>\n<p>\u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u0430\u044f \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044c \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u043e  \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435. \u0410 \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u0436\u0435 \u043d\u0435 \u0442\u0435\u0440\u043f\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f.<\/p>\n<p>\u0412\u044b\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043d\u0430 Haskell \u2014 \u043e\u0434\u043d\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435! \u041e\u043d \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0442\u0438\u043f <code>Data.Tree<\/code> \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430 <code>containers<\/code>, \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0432 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<pre><code class=\"haskell\">import Data.Tree import Data.Ratio<\/code><\/pre>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 <code>node<\/code>, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 <code>unfoldTree<\/code><\/p>\n<pre><code class=\"haskell\">intervalTree :: (a -> a -> a) -> (a, a) -> Tree a intervalTree node = unfoldTree $   \\(a, b) -> let m = node a b, in (m, [(a,m), (m,b)])<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e:<\/p>\n<pre><code class=\"haskell\">sternBrocot :: Tree Rational sternBrocot = toRatio &lt;$> intervalTree mediant ((0,1), (1,0))    mediant (p, q) (r, s) = (p + r, q + s) toRatio (p, q) = p % q<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043f\u0430\u0440\u044b, \u0430 \u043d\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u0440\u0430\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u2014 &#171;\u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c&#187; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"1\/0\" alt=\"1\/0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/484\/861\/9b9\/4848619b9f353a1fb845d734ca0e6e0a.svg\"\/>. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0430\u043c\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0432 \u0434\u0435\u0440\u0435\u0432\u043e \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0442, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0447\u0438\u0441\u0435\u043b \u0441 \u043d\u0443\u043b\u0451\u043c \u0432 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043f\u0430\u0440\u044b \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0442\u043e\u0440\u043e\u043c. <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043b\u043e\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430:<\/p>\n<pre><code class=\"powershell\">\u03bb> mapM_ print $ take 4 $ levels sternBrocot [1 % 1] [1 % 2,2 % 1] [1 % 3,2 % 3,3 % 2,3 % 1] [1 % 4,2 % 5,3 % 5,3 % 4,4 % 3,5 % 3,5 % 2,4 % 1]<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0442\u043e\u0447\u043d\u043e, \u043e\u043d\u043e \u2014 \u0434\u0435\u0440\u0435\u0432\u043e, \u043c\u0435\u0442\u043e\u0434\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0435\u0435 \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430! \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0435 \u0435\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u043e,  \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u043e\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>mediant<\/code> \u043d\u0430 <code>mean<\/code>. \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0438, \u043e\u0431\u0440\u0430\u0437\u044b \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a: \u043d\u0443\u043b\u044f \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u043f\u0440\u043e\u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438.<\/p>\n<pre><code class=\"haskell\">minkowski :: Tree Rational minkowski = toRatio &lt;$> intervalTree mean ((0,1), (1,0))  mean (p, q) (r, s) = (p*s + q*r, 2*q*s)<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> mapM_ print $ take 4 $ levels minkowski [*** Exception: Ratio has zero denominator<\/code><\/pre>\n<p>\u041e\u0443, \u043a\u0430\u043a\u0430\u044f \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u044c! \u0421\u0440\u0435\u0434\u043d\u0435\u0435 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043c\u0435\u0436\u0434\u0443 \u043b\u044e\u0431\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"1\/0\" alt=\"1\/0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/75a\/6e0\/503\/75a6e0503920a124d0a7e7e745ee7ee4.svg\"\/>, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u043e\u043b\u044c \u0432 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043e\u0431\u043e\u0439\u0442\u0438, \u043c\u044b \u0441\u0445\u0438\u0442\u0440\u0438\u043c. \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u044b\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e, \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u0430\u0432\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u043e\u0439, \u0430 \u043d\u0435 \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c:<\/p>\n<pre><code class=\"haskell\">mean (p, q) (1, 0) = (p+1, q) mean (p, q) (r, s) = (p*s + q*r, 2*q*s)<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> mapM_ print $ take 4 $ levels minkowski [1 % 1] [1 % 2,2 % 1] [1 % 4,3 % 4,3 % 2,3 % 1] [1 % 8,3 % 8,5 % 8,7 % 8,5 % 4,7 % 4,5 % 2,4 % 1]<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u043e\u043d\u0438 \u2014 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u0430\u043c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e! \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0430\u043a\u0438\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043a\u0430\u043a \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u043d\u0435\u043f\u043e\u0434\u0432\u0438\u0436\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0438 \u0430\u043d\u0430\u043c\u043e\u0440\u0444\u0438\u0437\u043c. \u041a\u0440\u0443\u0442\u043e, \u043d\u043e \u043a\u0430\u043a \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0430\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0449\u0443\u044e \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435?<\/p>\n<h3>\u041e\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0438<\/h3>\n<p>\u041d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e \u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0438\u0434\u0442\u0438 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044f \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b \u0432 \u0443\u0437\u043b\u0430\u0445. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435: \u0438\u0441\u043a\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438 &#171;\u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0436\u0435 \u0430\u0434\u0440\u0435\u0441\u0443&#187; \u043e\u0442\u044b\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043e\u0431\u0440\u0430\u0437. <\/p>\n<p>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u043c \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445 \u043f\u043e\u0432\u0435\u0437\u043b\u043e! \u041c\u0435\u0434\u0438\u0430\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u0438\u0442 \u0434\u0435\u0440\u0435\u0432\u043e, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u0430 \u2014 \u044d\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a (\u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0442\u0435\u043e\u0440\u0435\u043c\u0435 \u041a\u0430\u043d\u0442\u043e\u0440\u0430 \u043e\u0431 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u0447\u0451\u0442\u043d\u044b\u0445 \u043f\u043b\u043e\u0442\u043d\u044b\u0445 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u043b\u0438\u043d\u0435\u0439\u043d\u043e-\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u0445). \u0417\u043d\u0430\u0447\u0438\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a:<\/p>\n<pre><code class=\"haskell\">(==>) :: Ord a => Tree a -> Tree b -> a -> b Node _ []        ==>  Node b _ = const b Node _ _         ==>  Node b [] = const b Node a [l1, r1]  ==>  Node b [l2, r2] =   \\x -> case x `compare` a of           LT -> (l1 ==> l2) x           EQ -> b           GT -> (r1 ==> r2) x<\/code><\/pre>\n<p>\u042f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0441\u0435\u0431\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u044b\u043b\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u043a\u0430\u043a\u043e\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0443\u0436\u043d\u044b \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432. \u0412\u043e\u0442, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u0432\u0441\u0451:<\/p>\n<pre><code class=\"haskell\">questionMark, invQuestionMark :: Rational -> Rational  questionMark    = sternBrocot ==> minkowski invQuestionMark = minkowski ==> sternBrocot<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> questionMark (1\/2) 1 % 2 \u03bb> questionMark (3\/4) 7 % 8 \u03bb> questionMark (22\/7) 193 % 64 \u03bb> invQuestionMark (13\/128) 5 % 22 \u03bb> questionMark 3.1415926 23433441659799429120906882473922936672367506843746678324850962561154188813677753172015 % 7770675568902916283677847627294075626569627356208558085007249638955617140820833992704 \u03bb> invQuestionMark it 15707963 % 5000000<\/code><\/pre>\n<p>\u041f\u043e\u0445\u043e\u0436\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u041d\u043e.. \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 &#171;\u041d\u041e&#187;, \u043a\u0443\u0434\u0430 \u0436\u0435 \u0431\u0435\u0437 \u043d\u0438\u0445!<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 &#171;\u041d\u041e&#187;. \u0412 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u0445 \u043d\u0435\u0442 \u043d\u0443\u043b\u044f \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043d\u043e \u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043d\u043e, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043b\u043e\u0433\u0438\u043a\u0443, \u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u2014 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0432 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043d\u0430 \u0432\u0441\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041c\u043d\u0435, \u043a\u0430\u043a \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443, \u0431\u043b\u0438\u0436\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0443\u044e \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c &#171;\u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c&#187; \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u043b\u044f:<\/p>\n<pre><code class=\"haskell\">mirror :: Num a => Tree a -> Tree a mirror t = Node 0 [reflect (negate &lt;$> t), t]   where     reflect (Node a [l,r]) = Node a [reflect r, reflect l]  questionMark    = mirror sternBrocot ==> mirror minkowski invQuestionMark = mirror minkowski ==> mirror sternBrocot<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> questionMark 0 0 % 1 \u03bb> invQuestionMark (-3\/8) (-2) % 5 \u03bb> questionMark (-2000) (-2000) % 1<\/code><\/pre>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 &#171;\u041d\u041e&#187; \u043f\u043e\u0441\u0435\u0440\u044c\u0451\u0437\u043d\u0435\u0435. \u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u0448\u0442\u0443\u043a\u0430 \u0445\u043e\u0440\u043e\u0448\u0430\u044f. \u041e\u043d\u0430  \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u0438 \u043e\u0447\u0435\u043d\u044c \u0438\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u0430 \u0437\u0430 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0438 \u043f\u043b\u044e\u0448\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e-\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u0445. \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0435 \u0442\u0430\u043a\u043e\u0435, \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043d\u0435\u043f\u0443\u0441\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043d\u0435\u0442 \u043d\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u043d\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043e\u043d\u043e \u043f\u043b\u043e\u0442\u043d\u043e\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438\u0441\u043a\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0430\u044f\u0441\u044c \u043a \u0438\u0441\u043a\u043e\u043c\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443 \u0438 \u0437\u0430\u0431\u0438\u0432\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u044d\u043a\u0437\u043e\u0442\u0438\u043a\u0438 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0430\u043c \u043d\u0435\u0442, <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/551\/8c2\/10f\/5518c210f97983183d2ac2188d7928c6.svg\"\/> \u0438\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"2\/7\" alt=\"2\/7\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/54a\/f2a\/84a\/54af2a84ae7dea581052e07043845323.svg\"\/>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. \u041d\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u043b\u0447\u0430 \u0443\u0439\u0434\u0451\u0442 \u0438\u0441\u043a\u0430\u0442\u044c. \u0418 \u043f\u043e\u0436\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c. \u041d\u0430\u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<p>\u042d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e. \u0417\u0430\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u2014 \u043f\u043b\u043e\u0445\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a. \u0418 \u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u0430\u0448\u0435 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0430\u0445, \u0430 \u0432\u0435\u0441\u044c \u0441\u043c\u044b\u0441\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u0413\u0435\u0440\u043c\u0430\u043d\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0431\u044b\u043b \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043a\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0445 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439. \u041d\u0438 \u043e\u0434\u043d\u043e \u043d\u0438 \u0432\u0442\u043e\u0440\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442, \u043d\u0438 \u0438\u0445, \u043d\u0438 \u0438\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432. \u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u0432\u0441\u044f \u044d\u0442\u0430 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0438 \u043a \u0447\u0435\u043c\u0443? \u0418 \u0434\u0430 \u0438 \u043d\u0435\u0442.<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0432\u043e\u0437\u044c \u043c\u043e\u0440\u0444\u0438\u0437\u043c <code>sternBrocot ==> minkowski<\/code> \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b, \u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0418 \u0434\u0430\u0436\u0435 \u0442\u043e \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u043e\u0440\u0444\u0438\u0437\u043c <code>minkowski ==> sternBrocot<\/code>  \u0447\u0438\u0441\u043b\u0430 \u0442\u0438\u043f\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db6\/2dd\/1b7\/db62dd1b7471353a37a27912182d46d3.svg\"\/> \u0438\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"2\/7\" alt=\"2\/7\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/487\/428\/6b0\/4874286b095ace7ceae41c5ddf71bf07.svg\"\/>\u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439  \u0434\u0440\u043e\u0431\u0438. \u042f \u043a\u043b\u043e\u043d\u044e \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u043a \u0447\u0438\u0441\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u0445, \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a  <code>0.3333333333333333 :: Double<\/code> \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441, \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"1\/3\" alt=\"1\/3\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e3b\/c78\/35f\/e3bc7835f05522be901883f77fbf5df3.svg\"\/>. \u0414\u0430, \u043f\u043e\u0438\u0441\u043a \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u043d\u0435\u0442\u043e\u0442\u0430\u043b\u0435\u043d (\u0438 \u043d\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u043d), \u043d\u043e \u043e\u043d \u0442\u043e\u0447\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u043a\u043e\u043c\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438 \u0435\u0433\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u0443\u044e \u0441\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0415\u0433\u043e \u0434\u0435\u043d\u043e\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a\u0443 \u043f\u0440\u0435\u0434\u0435\u043b\u0430 \u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0439\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044e \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0447\u0438\u0441\u043b\u0443.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u0431\u043e\u0440 \u2014 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0434\u0435\u0440\u0435\u0432\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0438\u043b\u0438 \u043e\u0431\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0438\u0441\u043a\u0430? \u041f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430 \u043b\u0435\u043d\u0438\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0438 \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0435, \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f &#171;\u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e&#187; \u0434\u0435\u0440\u0435\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0431\u0435\u0440\u0451\u0442 \u0432 \u0441\u0435\u0431\u044f \u0438 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430, \u0442\u0430\u043a \u0438 \u043f\u043e\u0438\u0441\u043a\u0443 \u0432 \u043d\u0451\u043c. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<pre><code class=\"haskell\">truncateOn :: (Ord a, Num a) => a -> Tree a -> Tree a truncateOn eps (Node a [l,r])   | small (rootLabel l, rootLabel r) = Node a []   | otherwise = Node a $ truncateOn eps &lt;$> [l,r]   where     small (a, b) = abs (a - b) &lt; eps ||                    abs (a - b) &lt; abs (a + b) * eps<\/code><\/pre>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u0447\u0442\u043e <img decoding=\"async\" class=\"formula inline\" source=\"?(\\sqrt{2})=7\/5\" alt=\"?(\\sqrt{2})=7\/5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b19\/71f\/06c\/b1971f06cd9027793f2935f0af22b5e4.svg\"\/>. \u0422\u0430\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0435\u0442 \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b:<\/p>\n<pre><code class=\"powershell\">\u03bb> sqrt 2 1.4142135623730951 \u03bb> truncateOn (1\/100) sternBrocot ==> minkowski $ 1.4142135623730951 23 % 16 \u03bb> truncateOn (1\/10^6) sternBrocot ==> minkowski $ 1.4142135623730951 45875 % 32768 \u03bb> truncateOn (1\/10^12) sternBrocot ==> minkowski $ 1.4142135623730951 3006477107 % 2147483648 \u03bb> fromRational it 1.3999999999068677 \u03bb> truncateOn (1\/10^12) minkowski ==> sternBrocot  $ 1.4 54608393 % 38613965 \u03bb> fromRational it 1.4142135623730947<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0436\u0430\u0436\u0434\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u043d\u0430\u0441 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0442\u0438\u043f\u043e\u043c <code>Double<\/code>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0440\u0443\u0434\u0438\u0442\u044c \u0434\u0432\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439.<\/p>\n<pre><code class=\"haskell\">sternBrocotF :: Tree Double sternBrocotF = fromRational &lt;$> sternBrocot  minkowskiF :: Tree Double minkowskiF = intervalTree mean (0, 1\/0)   where     mean a b | isInfinite b = a + 1              | otherwise = (a + b) \/ 2  questionMarkF, invQuestionMarkF :: Double -> Double questionMarkF = mirror sternBrocotF ==> mirror minkowskiF invQuestionMarkF = mirror minkowskiF ==> mirror sternBrocotF<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> questionMarkF (sqrt 2) 1.400000000000091 \u03bb> invQuestionMarkF 1.4 1.4142135623730951 \u03bb> invQuestionMarkF (2\/7) 0.36602540378443865 \u03bb> (sqrt 3 - 1) \/ 2 0.3660254037844386<\/code><\/pre>\n<p>\u0416\u0438\u0442\u044c \u0441\u0442\u0430\u043b\u043e \u043b\u0435\u0433\u0447\u0435! \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 \u0442\u043e\u0447\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438 \u043d\u0430 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u043c\u0438. <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044f\u0445. \u0410 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0441 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e? \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043d\u0438\u043c \u043c\u043e\u0433\u0443\u0442 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c &#171;\u043f\u043b\u043e\u0442\u043d\u044b\u043c&#187; \u0446\u0438\u043a\u043b\u043e\u043c \u0438\u0437 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 RosettaCode? \u0425\u0430\u0441\u043a\u0435\u043b\u043b\u0438\u0441\u0442\u044b \u0437\u043d\u0430\u044e\u0442, \u0447\u0442\u043e \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u044f\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043c\u043d\u043e\u0433\u043e \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432 \u0441 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 &#171;\u043e\u043f\u0430\u0441\u043d\u044b\u0445&#187; \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043a\u043b\u043e\u043d\u043d\u044b\u0445 \u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044e \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f, \u044d\u0442\u043e \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 <em>\u043a\u043e\u0434\u0430\u043d\u043d\u044b\u0445<\/em> \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e \u0438 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a JavaScript \u0438\u043b\u0438 Python, \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0435\u0433\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 <code>yield<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0443\u044e \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0441\u043f\u0443\u0441\u043a \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e (\u0442\u043e \u0435\u0441\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c\u0430\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b) \u043f\u043e \u043c\u0435\u0440\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0435\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"1\/2\" alt=\"1\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/808\/854\/b1c\/808854b1c22aa3e1ba229460f6b217eb.svg\"\/>, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0430\u0432\u044b\u043c \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430\u043c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u044d\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 &#171;\u043d\u0438\u0437\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c&#187; \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u0438 \u043e\u0431\u0430 \u043e\u043d\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0432 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c, \u043d\u043e \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435: \u0441\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0443 \u0434\u0435\u0440\u0435\u0432\u0430 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u043e\u0431\u0440\u0430\u0437 \u0438\u0437 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438.<\/p>\n<p>\u041d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043d\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0442 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u0438\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u2014 \u0441\u0442\u0440\u043e\u0433\u043e, \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u043e\u0434. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u0430 \u0442\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u0418 \u043e\u043f\u044f\u0442\u044c, \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0430 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0446\u0438\u043a\u043b\u044b, \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u0446\u0438\u043a\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u043d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e, \u0434\u0435\u043b\u043e \u044d\u0442\u043e \u043c\u0443\u0442\u043e\u0440\u043d\u043e\u0435.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0439 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b? \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0434\u043e \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e. \u0422\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0430\u0442\u0441\u044f \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432. \u041f\u0440\u0438\u0447\u0451\u043c, \u043d\u0435 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0434\u0435\u043d\u043e\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u043e \u0447\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u043d\u0430\u0448\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432. \u041f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f &#171;\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430&#187;, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438, \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u0442\u043e \u0435\u0441\u0442\u044c, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>==><\/code>. \u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u043e \u0438\u043d\u0434\u0443\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b: \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u043a\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u043c\u0435\u0442\u043e\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432, \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0438\u0445 \u0433\u043b\u0443\u0431\u0438\u043d\u044b, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u0432\u0441\u0435 \u043e\u043d\u0438 \u043e\u0440\u0442\u043e\u0433\u043e\u043d\u0430\u043b\u044c\u043d\u044b \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443. \u041e\u043d\u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0437\u043d\u0430\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u043e \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u2014 \u044d\u0442\u043e \u0437\u0430\u0441\u043b\u0443\u0433\u0430 \u0447\u0438\u0441\u0442\u043e\u0442\u044b \u0438 \u043b\u0435\u043d\u0438\u0432\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0438\u0445 \u043d\u0430 \u043a\u0440\u043e\u0448\u0435\u0447\u043d\u044b\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0447\u0438\u0441\u0442\u044b\u0435 \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u044f\u0437\u044b\u043a\u0438 Miranda, Hope, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 Haskell.<\/p>\n<h3>\u041f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0431\u043e\u043d\u0443\u0441\u044b<\/h3>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043d\u0430\u0448\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0439, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0441\u0438\u0442 \u0441\u043a\u043e\u0440\u0435\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 <em>proof of concept<\/em>.<\/p>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u0435\u0440\u0435\u0432\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0443\u0442\u0438 \u0434\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0442\u0438. <\/p>\n<pre><code class=\"haskell\">track :: Ord a => Tree a -> a -> [Int] track (Node a [l, r]) x =   case x `compare` a of     LT -> 0 : track l x     EQ -> [1]     GT -> 1 : track r x      follow :: Tree a -> [t] -> a follow t = rootLabel . foldl (\\t x -> subForest t !! x) t<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u0430\u044f: \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438. \u0415\u0451 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u043a\u043e\u0439 \u0438 \u0441\u0432\u0451\u0440\u0442\u043a\u043e\u0439 (\u043e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e), \u0430 \u043c\u043e\u0436\u043d\u043e &#8212; \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0434\u0435\u0440\u0435\u0432\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0440\u0430\u0437 \u0443\u0436 \u043e\u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c:<\/p>\n<pre><code class=\"haskell\">toDiadic = tail . track minkowskiF fromDiadic = follow minkowskiF . (1:)<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0435\u0434\u0438\u043d\u0438\u0447\u043a\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e \u043e\u0442 \u043d\u0443\u043b\u044f. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u043e\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"0\" alt=\"0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/12f\/53f\/efb\/12f53fefb91b144e4b942eef10a07bad.svg\"\/>\u0434\u043e <img decoding=\"async\" class=\"formula inline\" source=\"1\" alt=\"1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4c\/885\/1db\/b4c8851db91149ffee0cfe32ea9aef27.svg\"\/>, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u044d\u0442\u043e\u0442 \u043f\u0440\u0435\u0434\u0435\u043b, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>properFraction<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0446\u0435\u043b\u0443\u044e \u0438 \u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0447\u0438\u0441\u043b\u0430.<\/p>\n<pre><code class=\"powershell\">\u03bb> toDiadic (2\/5) [0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1, 1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,1] \u03bb> toDiadic (3\/32) [0,0,0,0,1,1] \u03bb> fmap toDiadic . properFraction $ sqrt 2  (1,[0,0,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1, 1,1,1,0,0,1,1,1,0,1,1,1,1,0,0,1,1,0,1]) \u03bb> fromDiadic [0,1,1,0,0,1] 0.796875 \u03bb> fromDiadic $ toDiadic (2\/5) 0.4000000000000001 \u03bb> fromDiadic $ take 100 $ cycle [0,1,1] 0.8571428571428572<\/code><\/pre>\n<p>\u0422\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0443\u0442\u0435\u0439 \u0432 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u0445, \u043a\u0441\u0442\u0430\u0442\u0438, \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"haskell\">questionMarkF = follow minkowskiF . init . track sternBrocotF invQuestionMarkF = follow sternBrocotF . init . track minkowskiF<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0431\u0438\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438: <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbb{N} \\leftrightarrow \\mathbb{Q}\" alt=\"\\mathbb{N} \\leftrightarrow \\mathbb{Q}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/164\/a6b\/869\/164a6b86966f32da5be5b3bf26e0ef7b.svg\"\/>. \u041d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u043e\u0440\u0438\u0438, \u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0432\u0437\u0430\u0438\u043c\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u0443\u043c\u0435\u0440\u0443\u044e\u0449\u0438\u0445 \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0430\u043a \u0436\u0435 \u0438\u0437\u044f\u0449\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043d\u0435 \u043f\u043b\u043e\u0442\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u0438 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u043b\u0438\u0431\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043d\u0438 &#171;\u0440\u0430\u0437\u0431\u0435\u0433\u0443\u0442\u0441\u044f&#187; \u043f\u043e \u0432\u0441\u0435\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439. <\/p>\n<figure class=\"float full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d5e\/83b\/2e4\/d5e83b2e4227513483a292d20b954678.png\" width=\"1211\" height=\"797\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d5e\/83b\/2e4\/d5e83b2e4227513483a292d20b954678.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u0441\u0451 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0442\u0430\u043a\u043e\u0435, \u043a\u0430\u043a \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435. \u041e\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u0443 \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u0431\u0435\u0434\u0430 &#8212; \u043e\u043d\u043e \u043d\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 <code>==><\/code>. \u041d\u0443, \u0447\u0442\u043e \u0436\u0435, \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c! \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u043d\u043e\u0435 \u0435\u043c\u0443 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043d\u0430\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u0412 Haskell \u0442\u0430\u043a\u0438\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0435 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u044b \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0438\u043f\u043e\u0432-\u043e\u0431\u0451\u0440\u0442\u043e\u043a <code>newtype<\/code>:<\/p>\n<pre><code class=\"haskell\">newtype N = N Integer   deriving (Eq, Num, Show) via Integer  instance Ord N where   compare (N x) (N n)     | x == n    = EQ     | x &lt; m     = LT     | otherwise = GT     where       m = 2^(level x - level n - 1) * (2*n + 1)       level = floor . logBase 2 . fromIntegral<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>deriving ... via<\/code>  \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0430\u0433\u043c\u0443 <code>{-# LANGUAGE DerivingVia #-}<\/code>, \u0442\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0438\u043f <code>N<\/code> \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0442\u043b\u0438\u0447\u0438\u043c\u044b\u043c \u043e\u0442 \u0442\u0438\u043f\u0430 <code>Integer<\/code>. \u041d\u043e\u0432\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u0434\u0435\u0440\u0435\u0432\u0435, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"haskell\">nats :: Tree N nats = unfoldTree (\\b -> (N b, [2*b, 2*b+1])) 1<\/code><\/pre>\n<pre><code class=\"powershell\">\u03bb> take 4 $ levels nats [[1],[2,3],[4,5,6,7],[8,9,10,11,12,13,14,15]]<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0435\u043a\u0446\u0438\u0435\u0439: <img decoding=\"async\" class=\"formula inline\" source=\"\\mathbb{N}\\leftrightarrow\\mathbb{Q}\" alt=\"\\mathbb{N}\\leftrightarrow\\mathbb{Q}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bae\/9f5\/646\/bae9f564697b3bc946c466a3f0e174e6.svg\"\/>. <\/p>\n<pre><code class=\"powershell\">\u03bb> (nats ==> sternBrocot) 1 1 % 1 \u03bb> (nats ==> sternBrocot) 2 1 % 2 \u03bb> (nats ==> sternBrocot) 3 2 % 1 \u03bb> (nats ==> sternBrocot) 10 3 % 5 \u03bb> (nats ==> sternBrocot) 12345 124 % 107 \u03bb> (sternBrocot ==> nats) $ 124\/107 12345 \u03bb> (sternBrocot ==> nats) $ 22\/7 960 \u03bb> (sternBrocot ==> nats) $ 3.1415926 116620841010089084390104384205431489294873722730688873310023351406477925807920135487511<\/code><\/pre>\n<p>\u041f\u043e\u043b\u044c\u0437\u044b \u0432 \u044d\u0442\u043e\u043c, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0438\u043a\u0430\u043a\u043e\u0439, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442, \u0440\u0430\u0437 \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c?<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fe8\/a85\/bcf\/fe8a85bcf5f9bfa85ff83707d50fc014.svg\" width=\"31\" height=\"8\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u0430 \u0432\u044b\u0448\u043b\u043e \u0438\u0437 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0438 \u043f\u0440\u043e\u0447\u043d\u043e \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0435\u0433\u043e \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0442\u043e\u0440\u043e\u0432. \u0418 \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u043c, \u0442\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u044b\u043b\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043f\u0440\u0435\u0434\u0435\u043b\u043e\u0432, \u0432\u044b\u0432\u043e\u0434\u044f\u0449\u0438\u0445 \u043d\u0430\u0441 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 \u0434\u0432\u0443\u0445 \u043c\u043e\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (<a href=\"https:\/\/habr.com\/ru\/post\/429530\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e \u043f\u043e\u0440\u043e\u0441\u0451\u043d\u043a\u0430<\/a> \u0438 \u043f\u0440\u043e <a href=\"https:\/\/habr.com\/ru\/post\/323832\/\" rel=\"noopener noreferrer nofollow\">\u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0414\u0435 \u041c\u043e\u0440\u0433\u0430\u043d\u0430<\/a>) \u0438\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0433\u043e\u043c\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c\u043e\u0432 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445. \u042d\u0442\u043e \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0438 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044c \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0432 \u0441\u0435\u0431\u0435 \u043a\u043e\u0440\u0435\u043d\u044c &#171;<em>\u043c\u043e\u0440\u0444\u0438\u0437\u043c&#187;<\/em>.<\/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\/591949\/\"> https:\/\/habr.com\/ru\/articles\/591949\/<\/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>\u0412 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0441 \u0441\u0430\u0439\u0442\u0430-\u0445\u0440\u0435\u0441\u0442\u043e\u043c\u0430\u0442\u0438\u0438 RosettaCode. \u0420\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0449\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043e\u0432\u0451\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u043a\u043e\u043c \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u2014 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e (\u0435\u0451 \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438), \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0434\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u0443, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430 Haskell.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0442\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043a\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u043c\u043d\u0435, \u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u044f &#171;\u0430\u0432\u0442\u043e\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435&#187; \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439\u0441\u044f \u0432 \u043d\u0438\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u044b, \u0440\u0435\u0448\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043a\u0430\u043a \u0431\u044b \u0441\u0430\u043c\u0438 \u0441\u043e\u0431\u043e\u0439, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0441\u0430\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0438\u043c \u0432 \u0435\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0438\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0438 \u0443\u0436\u0435 \u0441 \u044d\u0442\u0438\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 Haskell, \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h3>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438<\/h3>\n<p>\u0415\u0441\u0442\u044c \u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c: \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e:. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u043a\u043e\u0440\u043d\u044f\u043c\u0438 \u0432\u0441\u0435\u0445 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438. \u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u0442 \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u0430\u043a\u0430\u044f \u0435\u0441\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441 1904 \u0433\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0435\u0451 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0432 \u0441\u0432\u043e\u0451\u043c \u0442\u0440\u0443\u0434\u0435 &#171;Zur Geometrie der Zahlen&#187; (&#171;\u041e \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b&#187;). \u041f\u043e\u0442\u043e\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0410\u0440\u043d\u043e \u0414\u0435\u043d\u0434\u0436\u043e\u044f \u0432 1938 \u0433\u043e\u0434\u0443, \u0430 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u0437\u043d\u0430\u043c\u0435\u043d\u0438\u0442\u044b\u0439 \u0414\u0436\u043e\u043d \u041a\u043e\u043d\u0432\u0435\u0439, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u043d\u0441\u0442\u0440\u0443\u043e\u0437\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f, \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u0438\u0433\u0440\u044b &#171;\u0416\u0438\u0437\u043d\u044c&#187; \u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0447\u0435\u043d\u044c-\u043e\u0447\u0435\u043d\u044c-\u043f\u0440\u0435\u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0447\u0438\u0441\u0435\u043b. \u041d\u0435 \u0437\u043d\u0430\u044e \u0443\u0436 \u0447\u0435\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0414\u0436\u043e\u043d \u041a\u043e\u043d\u0432\u0435\u0439 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043e\u0431\u0432\u0435\u0434\u044f \u0435\u0451 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u043a\u043e\u043c. \u0418\u0442\u0430\u043a, \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445:  \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0435\u0439  (<em>\u0438 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044f LaTeX-\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u043b\u0438 \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u0447\u0442\u043e \u0438\u043c \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043d\u043e\u0432\u044b\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b?<\/em>). \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u043f\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u0447\u0438\u0441\u0435\u043b, \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438.<\/p>\n<p>\u0412\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u044d\u0442\u043e \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u0430\u044f \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u0430\u044f \u043d\u0435\u0447\u0451\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0437\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0432\u0441\u0435\u0439 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043e\u0441\u0438. \u0412 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430\u0445 \u0438 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e:<\/p>\n<p>\u0433\u0434\u0435 \u2014 \u044d\u0442\u043e \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0446\u0435\u043f\u043d\u0443\u044e \u0434\u0440\u043e\u0431\u044c: <\/p>\n<p>\u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0434\u0432\u043e\u0439\u043a\u0438 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438 \u0432 \u0435\u0451 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0432 \u0442\u0430\u043a\u043e\u0435 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e: (\u0442\u0440\u0438 \u043d\u0443\u043b\u044f, \u0442\u0440\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u043e\u0434\u0438\u043d \u043d\u043e\u043b\u044c \u0438 \u0434\u0432\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b). \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e  \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438:<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>\u041d\u0443, \u0438 \u0437\u0430\u0447\u0435\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0432\u0441\u044f \u044d\u0442\u0430 \u0432\u043e\u0437\u043d\u044f \u0441 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u0438, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f  \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 <strong>\u0432\u0441\u0435<\/strong> <strong>\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/strong> \u0447\u0438\u0441\u043b\u0430 \u0432 <strong>\u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0432 \u0434\u0440\u043e\u0431\u0438 \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0434\u0432\u043e\u0439\u043a\u0438 (\u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043f\u043e\u0434\u043a\u043e\u043b\u044c\u0446\u043e \u043f\u043e\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u043e\u0435 ).  \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u0431\u044b &#171;\u0440\u0430\u0437\u0440\u0435\u0434\u0438\u0442\u044c&#187; \u043f\u043b\u043e\u0442\u043d\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0451. \u042d\u0442\u043e \u0438 \u0431\u044b\u043b\u043e \u0446\u0435\u043b\u044c\u044e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0413\u0435\u0440\u043c\u0430\u043d\u0430 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u0410 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u043e\u0431\u044c \u0441 \u0438\u043d\u044b\u043c \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c \u0438\u0437 \u0434\u0432\u043e\u0438\u0447\u043d\u043e-\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430? \u0422\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u043c \u0447\u0438\u0441\u043b\u0430\u043c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u043d\u0435 \u043a\u0440\u0430\u0442\u043d\u044b\u043c \u0441\u0442\u0435\u043f\u0435\u043d\u044f\u043c \u0434\u0435\u0441\u044f\u0442\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0440\u043e\u0431\u0438, \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u043e\u0431\u044f\u0445 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <\/p>\n<p>\u041f\u0440\u043e\u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439, \u043d\u043e \u0442\u043e\u0436\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0446\u0435\u043f\u043d\u043e\u0439 \u0434\u0440\u043e\u0431\u044c\u044e. \u0410 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e, \u0447\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442  \u043e\u0442 \u043f\u0440\u043e\u0447\u0438\u0445 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0438\u0441\u043b\u0430 \u0432\u0438\u0434\u0430 , \u0433\u0434\u0435 \u0438 \u2014\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u043e\u043e\u0431\u0440\u0430\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e:<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0432 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0432\u0448\u0435\u0435\u0441\u044f &#171;\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e&#187; \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0440\u0435\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438\u0447\u0451\u043c \u043e\u043d\u0430 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e: \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e, \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u0438 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0434\u0432\u0430 \u0438\u043b\u0438 \u0435\u0449\u0451 \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c) \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0447\u0438\u0441\u043b\u0430 , \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u0445. \u041d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0438 \u043e\u0434\u043d\u0438\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u043c\u043e\u0433. \u0422\u0430\u043a \u0447\u0442\u043e, \u0445\u043e\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u043d\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0435\u0439 \u043f\u0440\u0438\u0441\u0443\u0449 \u0440\u044f\u0434 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0439, \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0444\u0440\u0430\u043a\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e\u0441\u0442\u044c, \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u044e\u0434\u0443 \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e \u0432 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438 \u2014 \u0432 \u0438\u0440\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u0430\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0432 \u0447\u0443\u0442\u044c \u043b\u0438 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<figure class=\"full-width\"><figcaption>\u0413\u0440\u0430\u0444\u0438\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e.<\/figcaption><\/figure>\n<p>\u0424\u043e\u0440\u043c\u0443\u043b\u0443 \u0441 \u0441\u0443\u043c\u043c\u043e\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0432\u0432\u0451\u043b \u0414\u0435\u043d\u0434\u0436\u043e\u0439. \u0421\u0430\u043c \u0413\u0435\u0440\u043c\u0430\u043d \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b \u0441\u0432\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u043d\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442, a \u0432\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0435  \u043d\u0430 \u0432\u0441\u044e \u0447\u0438\u0441\u043b\u043e\u0432\u0443\u044e \u043e\u0441\u044c. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0434 \u0434\u0432\u0443\u043c\u044f \u0434\u0440\u043e\u0431\u044f\u043c\u0438  \u0438 , \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0%D0%BD%D1%82%D0%B0_(%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B0)\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0434\u0438\u0430\u043d\u0442\u043e\u0439<\/a> \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u043d\u043e \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u041c\u043d\u0435 \u0434\u043e\u0432\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0443 \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a\u0430\u043c 5-7 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u0423\u0447\u0435\u043d\u0438\u043a\u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u043d\u044b \u0438 \u0443\u0447\u0435\u043d\u0438\u043a\u0438 \u043d\u0435 \u043b\u044e\u0431\u044f\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0430\u0437\u0430\u0442\u044c: &#171;\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0421\u0430\u0434\u0438\u0441\u044c.&#187;, \u0432\u043e\u0441\u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c: &#171;\u041d\u0443 \u0438 \u043d\u0443, \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0443 \u0442\u0435\u0431\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c!?&#187;, \u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443\u0447\u0435\u043d\u0438\u043a \u043f\u0438\u0448\u0435\u0442 \u043d\u0430 \u0434\u043e\u0441\u043a\u0435: .<\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e.. \u0434\u0440\u043e\u0431\u044c \u043e\u043f\u044f\u0442\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u0432\u0435\u043a\u0442\u043e\u0440! \u041d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u0432\u0435\u0434\u044c \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u043d\u0435\u0432\u0435\u0441\u0442\u044c \u043e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u0432\u0448\u0438\u0435\u0441\u044f . \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043c\u044b \u0434\u0440\u043e\u0431\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a: \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c \u2014 \u0441 \u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u0435\u043c, \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044c \u2014 \u0441 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c. \u0412\u043e\u0442 \u0431\u044b \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435!.. \u0414\u0430\u0432\u0430\u0439\u0442\u0435-\u043a\u0430 \u0441\u043f\u0440\u043e\u0441\u0438\u043c \u0441\u0435\u0431\u044f (\u0438 \u0437\u0430\u043e\u0434\u043d\u043e, \u0432\u0435\u0441\u044c \u043a\u043b\u0430\u0441\u0441): &#171;\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043b\u0438 \u043d\u0430\u0448\u0430 \u0441\u0443\u043c\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445?&#187; \u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0434\u0440\u043e\u0431\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0430\u044f \u0438\u0445 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u044f\u043c\u043e\u0439. \u0420\u0438\u0441\u0443\u0435\u043c \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043b\u0435\u0436\u0438\u0442 \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043c\u0435\u0436\u0434\u0443 \u0438 . \u0412\u0440\u044f\u0434 \u043b\u0438 \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430, \u0441\u043a\u043e\u0440\u0435\u0435, \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412\u043e\u0442 \u0442\u0443\u0442-\u0442\u043e \u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044c: &#171;\u0410 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0443\u043c\u043c\u044b? \u2014 \u041c\u0435\u0434\u0438\u0430\u043d\u0442\u0443!&#187; \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u0435\u043b: <\/p>\n<p>\u041c\u0435\u0434\u0438\u0430\u043d\u0442\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0436\u0438\u0442 \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430\u043c\u0438, \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0440\u0430\u0432\u043d\u0430 \u0438\u043c \u043e\u0431\u043e\u0438\u043c, \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u0430, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0440\u0435\u0434\u043d\u044f\u0435\u043c\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u043c, \u0442\u043e \u043e\u0431\u0449\u0435\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0442.\u0434. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u0442\u0430\u043a\u043e\u0435, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0434\u0440\u043e\u0431\u0435\u0439  \u0438 , \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e (\u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0440\u043e\u0431\u044f\u043c\u0438 \u0440\u0430\u0432\u043d\u0430 \u0447\u0438\u0441\u043b\u0443, \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0438\u0445 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u0439), \u0442\u043e \u0438\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u0440\u043e\u0431\u044c \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c, \u043b\u0435\u0436\u0430\u0449\u0430\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u041d\u0430\u0448\u0438 \u0448\u043a\u043e\u043b\u044c\u043d\u044b\u0435 \u0434\u0440\u043e\u0431\u0438  \u0438  \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438\u0435: . \u041c\u0435\u0436\u0434\u0443  \u0438  \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u0430 \u0434\u0440\u043e\u0431\u044c \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435\u043c , \u0430 \u0434\u0440\u043e\u0431\u0438 \u0441\u043e \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0438  \u0438 . \u0410 \u0432\u043e\u0442  \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f! \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u0440 \u0434\u0440\u043e\u0431\u0435\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u0442 \u0436\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438. \u042d\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u0435\u0434\u0438\u0430\u043d\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b: <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%94%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%A8%D1%82%D0%B5%D1%80%D0%BD%D0%B0_%E2%80%94_%D0%91%D1%80%D0%BE%D0%BA%D0%BE\" rel=\"noopener noreferrer nofollow\">\u0434\u0435\u0440\u0435\u0432\u043e \u0428\u0442\u0435\u0440\u043d\u0430-\u0411\u0440\u043e\u043a\u043e<\/a>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u043a-\u0442\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u0443\u044e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443 \u0435\u0433\u043e \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0431\u044f\u043c\u0438 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f\u043c\u0438. \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043e\u043d\u0430 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <a href=\"https:\/\/rosettacode.org\/wiki\/Minkowski_question-mark_function\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u043e \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u0438\u0439<\/a> \u043d\u0430 RosettaCode \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043b\u044e\u0431\u0438\u043c\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0431\u044b \u043f\u0440\u044f\u043c\u043e\u0435 \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e. \u041c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u044f\u0437\u044b\u043a <a href=\"https:\/\/rosettacode.org\/wiki\/Category:Haskell\" rel=\"noopener noreferrer nofollow\">Haskell<\/a> \u0438 \u044f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0441\u043e\u0442\u043d\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f RosettaCode \u043d\u0430 \u044d\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u043c\u044b\u0441\u043b \u0441\u0430\u0439\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0438 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u043c\u0438, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0438\u0433\u0440\u044b \u0432 <em>code golf<\/em>. <\/p>\n<p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0441\u0435\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u0440\u043e\u043c\u0435 Wolfram \u0438 Haskell \u0431\u044b\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 &#171;\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430\u043c\u0438&#187; \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Minkowski%27s_question-mark_function#CITEREFMinkowski1904\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a> \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0439 \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0438 \u043d\u0430 Haskell \u0442\u043e\u0436\u0435. \u041f\u0440\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0431\u0443\u043a\u043e\u0432\u043e\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c\u043e\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u0445 \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u0435, \u043d\u043e, \u0432 \u043e\u0431\u0449\u0435\u043c, \u0442\u043e\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0440 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u2014 \u0443\u0436\u0435 \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u0435 \u043c\u0435\u043d\u044f\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b, \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u042d\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0432 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0441\u0447\u0443\u0440 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 Haskell \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0437\u0430\u0447\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c \u043c\u0438\u0440\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0447\u0438\u0441\u0442\u044b\u0439 \u043b\u0435\u043d\u0438\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0443, \u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e! <\/p>\n<h3>\u0418\u0437\u043e\u043c\u043e\u0440\u0444\u0438\u0437\u043c \u0432 \u043f\u043e\u043c\u043e\u0449\u044c<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u041c\u0438\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0438\u043c\u0432\u043e\u043b  \u0434\u043b\u044f \u0432\u0437\u044f\u0442\u0438\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p>\u041d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u044b<\/p>\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-412547","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412547","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=412547"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412547\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}