{"id":321606,"date":"2021-04-17T15:00:09","date_gmt":"2021-04-17T15:00:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321606"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321606","title":{"rendered":"\u041e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u043f\u043e\u0438\u0441\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438[1], \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c, \u0434\u0430 \u0438 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0433\u0434\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. <\/p>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u0437\u0430\u043d\u044f\u043b\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0431\u0438\u043b\u0438\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u0438\u0434\u0435\u0438 1974 \u0433\u043e\u0434\u0430[2], \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0434\u0430\u0436\u0435 \u043d\u0430 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u0435 \u043c\u043e\u0434\u044b \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u0424\u043e\u0440\u0442\u0440\u0430\u043d\u0435 \u044f \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b. \u0412 \u0441\u0435\u043c\u0438\u043d\u0430\u0440\u0430\u0445  \u0438 \u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0434\u0430 \u0438 \u0432 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u043b\u0438\u0441\u0442\u0430\u043b\u043e \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u043e\u0431\u0440\u0430\u0432 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0443\u0447\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0445\u043e\u0447\u0435\u0442 &#171;\u043f\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0440\u0443\u043a\u0430\u0445&#187;.<\/p>\n<p>\u0418 \u0442\u0430\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u0432 \u043a\u043e\u0434 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0438\u043b\u0438 \u0431\u0430\u0439\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438. \u0422\u0430\u043a\u043e\u0432 \u0443\u0436 \u043c\u043e\u0439 \u043e\u043f\u044b\u0442, &#8212; \u0438\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043d\u043e \u0442\u043e\u0447\u043d\u043e, \u0438\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u043e \u0442\u043e \u0447\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u041f\u043e\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Wolfram Language \u0438 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0430\u043a\u0435\u0442\u0430 Mathematica V 12.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0447\u0435\u043c \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438\u0434\u0435\u0438: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (DFT) \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442 &#171;\u043d\u0430\u0438\u0432\u043d\u043e\u0433\u043e&#187; O(n*m) \u0434\u043e O(n Log(n)), \u0433\u0434\u0435 n &#8212; \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0430 \u0430 m &#8212; \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0441 &#171;\u0414\u0436\u043e\u043a\u0435\u0440\u043e\u043c&#187;, &#8212; \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u043c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0435, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442. <\/p>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &#171;\u043d\u0430\u0438\u0432\u043d\u043e\u0433\u043e&#187; \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 T \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c n \u0438 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 P \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c m, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"S_i^F = \\sum\\nolimits_{j = 0}^{m - 1} {({t_{i + j}}}  - {p_j}{)^2} = \\sum\\nolimits_{j = 0}^{m - 1} {t_{i + j}^2}  - 2\\sum\\nolimits_{j = 0}^{m - 1} {{t_{i + j}}} {p_j} + \\sum\\nolimits_{j = 0}^{m - 1} {p_j^2}  = T{T_i} - 2P{T_i} +P{P_i}\" alt=\"S_i^F = \\sum\\nolimits_{j = 0}^{m - 1} {({t_{i + j}}}  - {p_j}{)^2} = \\sum\\nolimits_{j = 0}^{m - 1} {t_{i + j}^2}  - 2\\sum\\nolimits_{j = 0}^{m - 1} {{t_{i + j}}} {p_j} + \\sum\\nolimits_{j = 0}^{m - 1} {p_j^2}  = T{T_i} - 2P{T_i} +P{P_i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f9f\/504\/dba\/f9f504dba506694a649bd44771370ef4.svg\" width=\"637\" height=\"32\"><\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u043f\u043e\u0434 \u0441\u0443\u043c\u043c\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u0441\u0443\u043c\u043c\u044b.  \u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 S \u0442\u0440\u0435\u0431\u0443\u0435\u0442 O((n-m+1)*m)  \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0438\u043b\u0438 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u043e O(n*m). <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5ac\/8ba\/145\/5ac8ba14523535add6cee9bbac70b127.png\" alt=\"&quot;Test.png&quot;\" title=\"&quot;Test.png&quot;\" width=\"418\" height=\"208\"><figcaption>&#171;Test.png&#187;<\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u044f\u043c\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"{S_i} = \\sum\\nolimits_{j = 0}^{m - 1} {t_{i + j}^2}  - 2\\sum\\nolimits_{j = 0}^{m - 1} {{t_{i + j}}} {p_j} = T{T_i} - 2P{T_i} \" alt=\"{S_i} = \\sum\\nolimits_{j = 0}^{m - 1} {t_{i + j}^2}  - 2\\sum\\nolimits_{j = 0}^{m - 1} {{t_{i + j}}} {p_j} = T{T_i} - 2P{T_i} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/411\/679\/341\/411679341885f686c81c90046c91198c.svg\" width=\"342\" height=\"32\"><\/p>\n<pre><code>Img = ColorConvert[Import[\"Test.png\"], \"Grayscale\"]; {W, H} = ImageDimensions[Img];     y = IntegerPart[H\/2];                                (*Pattern width and coordinates*) x = IntegerPart[W\/4];  w = IntegerPart[W\/8];              L = Part[ImageData[ImageTake[Img, {y, y}]],1];       (*Stripe Array*)  T[i_] := Table[Part[L[[i + j - 1]], 1], {j, 1, w}] ;      (*Sample data*) P[i_] := Table[Part[L[[j + x - 1]], 1], {j, 1, w}] ;      (*Pattern data*)  TT = Table[Sum[(T[i][[j]]* T[i][[j]]), {j, 1, w}], {i, 1, W - w + 1}]; PT = Table[Sum[(P[i][[j]]* T[i][[j]]), {j, 1, w}], {i, 1, W - w + 1}];  ListPlot[TT - 2 PT, Joined -&gt; True, PlotRange -&gt; All]<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bde\/72e\/4d1\/bde72e4d11ee6fdf410afc83f0e35c67.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e\" width=\"590\" height=\"360\"><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 (x=175), \u0433\u0434\u0435 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u043e\u0431\u0440\u0430\u0437\u0435\u0446, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b\u0430 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0434\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. <\/p>\n<p><strong>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p><em>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 PT<\/em><\/p>\n<pre><code>PolyT = {1, 2, 3, 4, 5};               LT = Length[PolyT]; PolyP = {1, 2, 3};                     LP = Length[PolyP]; PolyR = {};                            LR = LT + LP - 1;  eT = Table[If[i &gt; LT, 0, PolyT[[i]]], {i, 1, LR}] eP = Table[If[i &gt; LP, 0, PolyP[[i]]], {i, 1, LR}]  PolyR = InverseFourier[    Fourier[eT, FourierParameters -&gt; {1, 1}]*    Fourier[eP, FourierParameters -&gt; {1, 1}]   , FourierParameters -&gt; {1, 1}] PolyR[[LP ;; LT]]<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>{1, 2, 3, 4, 5, 0, 0} \t\t\t\t\t\t(* PolyT *) {1, 2, 3, 0, 0, 0, 0} \t\t\t\t\t\t(* PolyP *) {1., 4., 10., 16., 22., 22., 15.} (* PolyR = PolyT * PolyP *) {10., 16., 22.}                   (* PolyR starting at LP to LT*)\t<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0430\u043c\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u0438\u043d\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c n+m-1. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"\\left( {1 + 2x + 3{x^2} + 4{x^3} + 5{x^4}} \\right)\\left( {1 + 2x + 3{x^2}} \\right) = 1 + 4x + 10{x^2} + 16{x^3} + 22{x^4} + 22{x^5} + 15{x^6}\" alt=\"\\left( {1 + 2x + 3{x^2} + 4{x^3} + 5{x^4}} \\right)\\left( {1 + 2x + 3{x^2}} \\right) = 1 + 4x + 10{x^2} + 16{x^3} + 22{x^4} + 22{x^5} + 15{x^6}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/516\/044\/d18\/516044d18372e88151dd790d5c42b80f.svg\" width=\"634\" height=\"23\"><\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 m (\u0435\u0441\u043b\u0438 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u044b) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043a\u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b m:<\/p>\n<pre><code>10 = 1*3+2*2+3*1 16 = 2*3+3*2+4*1 ...<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 PT \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 P \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0412\u0441\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f n-m+1 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><em>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 TT<\/em><\/p>\n<pre><code>PolyT = {1, 2, 3, 4, 5};            LT = Length[PolyT]; PolyP = {1, 1, 1};                  LP = Length[PolyP]; PolyR = {};                         LR = LT + LP - 1;  eT = Table[If[i &gt; LT, 0, PolyT[[i]]], {i, 1, LR}] eP = Table[If[i &gt; LP, 0, PolyP[[i]]], {i, 1, LR}]  PolyR = InverseFourier[    Fourier[eT, FourierParameters -&gt; {1, 1}]*    Fourier[eP, FourierParameters -&gt; {1, 1}]   , FourierParameters -&gt; {1, 1}] PolyR[[LP ;; LT]]<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>{1, 2, 3, 4, 5, 0, 0}                 (* PolyT *) {1, 1, 1, 0, 0, 0, 0}                 (* PolyP *) {1., 3., 6., 9., 12., 9., 5.}         (* PolyR = PolyT * PolyP *) {6., 9., 12.}                         (* PolyR starting at LP to LT*)\t<\/code><\/pre>\n<pre><code>6 = 1*1+2*1+3*1 9 = 2*1+3*1+4*1 ...<\/code><\/pre>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0437\u0430\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0434\u043b\u0438\u043d\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446 &#8212; m. <\/p>\n<p><strong>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 PP \u0438 TT \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DFT:<\/p>\n<pre><code>Tt = Table[If[1 &lt;= i &lt;= W, Part[L[[i]], 1], 0], {i, 1, Wt}] ;    (*Sample data*) Ft = Fourier[Tt, FourierParameters -&gt; {1, 1}];  Ts = Table[If[1 &lt;= i &lt;= W, (Part[L[[i]], 1])^2, 0], {i, 1, Wt}]; (*Sample squared data*) Fs = Fourier[Ts, FourierParameters -&gt; {1, 1}];  Es = Table[If[1 &lt;= i &lt;= w, 1, 0], {i, 1, Wt}] ;                  (*m size unit array*) Fe = Fourier[Es, FourierParameters -&gt; {1, 1}];  Pa = Table[If[1 &lt;= i &lt;= w, Part[L[[x + w - i]], 1], 0], {i, 1, Wt}];                                                             \\ Fp = Fourier[Pa, FourierParameters -&gt; {1, 1}];                   (*Inverse pattern data*)  TTf = InverseFourier[Fs*Fe, FourierParameters -&gt; {1, 1}][[w ;; W]]; PTf = InverseFourier[Ft*Fp, FourierParameters -&gt; {1, 1}][[w ;; W]];<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code>ListPlot[{TT - 2 PT, TTf - 2 PTf, TT - 2 PT - TTf + 2 PTf}, Joined -&gt; True, PlotRange -&gt; All]<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/399\/440\/864\/399440864310ca49fd1cc31ec98cec31.png\" alt=\"\u0422\u0440\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0434\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0441\u044c\u044e.\" title=\"\u0422\u0440\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0434\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0441\u044c\u044e.\" width=\"744\" height=\"457\"><figcaption>\u0422\u0440\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0434\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0441\u044c\u044e.<\/figcaption><\/figure>\n<p><strong>\u0412\u044b\u0432\u043e\u0434\u044b<\/strong><\/p>\n<p>\u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0439, \u0435\u0433\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u044b. <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/266129\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/266129\/<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/eduardgorbunov.github.io\/assets\/files\/amc_778_seminar_08.pdf?fbclid=IwAR1Ns3Wmdx_QaZapcvdmZN7Z6QelsmK911eXjrr5CvpAaP_9tCSFfBhJ5y8\" rel=\"noopener noreferrer nofollow\">https:\/\/eduardgorbunov.github.io\/assets\/files\/amc_778_seminar_08.pdf<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/552932\/\"> https:\/\/habr.com\/ru\/post\/552932\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u043f\u043e\u0438\u0441\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438[1], \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c, \u0434\u0430 \u0438 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0433\u0434\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. <\/p>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u0437\u0430\u043d\u044f\u043b\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0431\u0438\u043b\u0438\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u0438\u0434\u0435\u0438 1974 \u0433\u043e\u0434\u0430[2], \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0434\u0430\u0436\u0435 \u043d\u0430 \u0437\u0430\u043a\u043e\u043d\u043e\u0434\u0430\u0442\u0435\u043b\u0435 \u043c\u043e\u0434\u044b \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435 \u0424\u043e\u0440\u0442\u0440\u0430\u043d\u0435 \u044f \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b. \u0412 \u0441\u0435\u043c\u0438\u043d\u0430\u0440\u0430\u0445  \u0438 \u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0434\u0430 \u0438 \u0432 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u044f\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u043b\u0438\u0441\u0442\u0430\u043b\u043e \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u043e\u0431\u0440\u0430\u0432 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043a\u0443\u0447\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0445\u043e\u0447\u0435\u0442 &#171;\u043f\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0440\u0443\u043a\u0430\u0445&#187;.<\/p>\n<p>\u0418 \u0442\u0430\u043a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u0432 \u043a\u043e\u0434 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0438\u043b\u0438 \u0431\u0430\u0439\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438. \u0422\u0430\u043a\u043e\u0432 \u0443\u0436 \u043c\u043e\u0439 \u043e\u043f\u044b\u0442, &#8212; \u0438\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043d\u043e \u0442\u043e\u0447\u043d\u043e, \u0438\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u043e \u0442\u043e \u0447\u0442\u043e \u0443\u0436\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u041f\u043e\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0433\u043e \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Wolfram Language \u0438 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0430\u043a\u0435\u0442\u0430 Mathematica V 12.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0447\u0435\u043c \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438\u0434\u0435\u0438: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (DFT) \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0442 &#171;\u043d\u0430\u0438\u0432\u043d\u043e\u0433\u043e&#187; O(n*m) \u0434\u043e O(n Log(n)), \u0433\u0434\u0435 n &#8212; \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043a\u0441\u0442\u0430 \u0430 m &#8212; \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0441 &#171;\u0414\u0436\u043e\u043a\u0435\u0440\u043e\u043c&#187;, &#8212; \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u043c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0435, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442. <\/p>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 &#171;\u043d\u0430\u0438\u0432\u043d\u043e\u0433\u043e&#187; \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 T \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c n \u0438 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 P \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c m, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0443\u043b\u044f. <\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u043f\u043e\u0434 \u0441\u0443\u043c\u043c\u043e\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u0441\u0443\u043c\u043c\u044b.  \u041c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 S \u0442\u0440\u0435\u0431\u0443\u0435\u0442 O((n-m+1)*m)  \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0438\u043b\u0438 \u043e\u0446\u0435\u043d\u043e\u0447\u043d\u043e O(n*m). <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0438\u0437 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438:<\/p>\n<figure class=\"\"><figcaption>&#171;Test.png&#187;<\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u044f\u043c\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <\/p>\n<pre><code>Img = ColorConvert[Import[\"Test.png\"], \"Grayscale\"]; {W, H} = ImageDimensions[Img];     y = IntegerPart[H\/2];                                (*Pattern width and coordinates*) x = IntegerPart[W\/4];  w = IntegerPart[W\/8];              L = Part[ImageData[ImageTake[Img, {y, y}]],1];       (*Stripe Array*)  T[i_] := Table[Part[L[[i + j - 1]], 1], {j, 1, w}] ;      (*Sample data*) P[i_] := Table[Part[L[[j + x - 1]], 1], {j, 1, w}] ;      (*Pattern data*)  TT = Table[Sum[(T[i][[j]]* T[i][[j]]), {j, 1, w}], {i, 1, W - w + 1}]; PT = Table[Sum[(P[i][[j]]* T[i][[j]]), {j, 1, w}], {i, 1, W - w + 1}];  ListPlot[TT - 2 PT, Joined -&gt; True, PlotRange -&gt; All]<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0431\u0435\u0437 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0433\u043e<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 (x=175), \u0433\u0434\u0435 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u043e\u0431\u0440\u0430\u0437\u0435\u0446, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043b\u0430 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u0434\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. <\/p>\n<p><strong>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0424\u0443\u0440\u044c\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/strong><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<p><em>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 PT<\/em><\/p>\n<pre><code>PolyT = {1, 2, 3, 4, 5};               LT = Length[PolyT]; PolyP = {1, 2, 3};                     LP = Length[PolyP]; PolyR = {};                            LR = LT + LP - 1;  eT = Table[If[i &gt; LT, 0, PolyT[[i]]], {i, 1, LR}] eP = Table[If[i &gt; LP, 0, PolyP[[i]]], {i, 1, LR}]  PolyR = InverseFourier[    Fourier[eT, FourierParameters -&gt; {1, 1}]*    Fourier[eP, FourierParameters -&gt; {1, 1}]   , FourierParameters -&gt; {1, 1}] PolyR[[LP ;; LT]]<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>{1, 2, 3, 4, 5, 0, 0} \t\t\t\t\t\t(* PolyT *) {1, 2, 3, 0, 0, 0, 0} \t\t\t\t\t\t(* PolyP *) {1., 4., 10., 16., 22., 22., 15.} (* PolyR = PolyT * PolyP *) {10., 16., 22.}                   (* PolyR starting at LP to LT*)\t<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0430\u043c\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043b\u0438\u043d\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c n+m-1. <\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 m (\u0435\u0441\u043b\u0438 \u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u044b) \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u043a\u043d\u0430 \u0434\u043b\u0438\u043d\u043d\u044b m:<\/p>\n<pre><code>10 = 1*3+2*2+3*1 16 = 2*3+3*2+4*1 ...<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 PT \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u043e\u0431\u0440\u0430\u0437\u0435\u0446 P \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0412\u0441\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f n-m+1 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p><em>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 TT<\/em><\/p>\n<pre><code>PolyT = {1, 2, 3, 4, 5};            LT = Length[PolyT]; PolyP = {1, 1, 1};                  LP = Length[PolyP]; PolyR = {};                         LR = LT + LP - 1;  eT = Table[If[i &gt; LT, 0, PolyT[[i]]], {i, 1, LR}] eP = Table[If[i &gt; LP, 0, PolyP[[i]]], {i, 1, LR}]  PolyR = InverseFourier[    Fourier[eT, FourierParameters -&gt; {1, 1}]*    Fourier[eP, FourierParameters -&gt; {1, 1}]   , FourierParameters -&gt; {1, 1}] PolyR[[LP ;; LT]]<\/code><\/pre>\n<p>\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<pre><code>{1, 2, 3, 4, 5, 0, 0}                 (* PolyT *) {1, 1, 1, 0, 0, 0, 0}                 (* PolyP *) {1., 3., 6., 9., 12., 9., 5.}         (* PolyR = PolyT * PolyP *) {6., 9., 12.}                         (* PolyR starting at LP to LT*)\t<\/code><\/pre>\n<pre><code>6 = 1*1+2*1+3*1 9 = 2*1+3*1+4*1 ...<\/code><\/pre>\n<p>\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u043a\u0441\u0442\u0430 \u0437\u0430\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0434\u043b\u0438\u043d\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0435\u0434\u0438\u043d\u0438\u0446 &#8212; m. <\/p>\n<p><strong>\u0421\u0431\u043e\u0440\u043a\u0430 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 PP \u0438 TT \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DFT:<\/p>\n<pre><code>Tt = Table[If[1 &lt;= i &lt;= W, Part[L[[i]], 1], 0], {i, 1, Wt}] ;    (*Sample data*) Ft = Fourier[Tt, FourierParameters -&gt; {1, 1}];  Ts = Table[If[1 &lt;= i &lt;= W, (Part[L[[i]], 1])^2, 0], {i, 1, Wt}]; (*Sample squared data*) Fs = Fourier[Ts, FourierParameters -&gt; {1, 1}];  Es = Table[If[1 &lt;= i &lt;= w, 1, 0], {i, 1, Wt}] ;                  (*m size unit array*) Fe = Fourier[Es, FourierParameters -&gt; {1, 1}];  Pa = Table[If[1 &lt;= i &lt;= w, Part[L[[x + w - i]], 1], 0], {i, 1, Wt}];                                                             \\ Fp = Fourier[Pa, FourierParameters -&gt; {1, 1}];                   (*Inverse pattern data*)  TTf = InverseFourier[Fs*Fe, FourierParameters -&gt; {1, 1}][[w ;; W]]; PTf = InverseFourier[Ft*Fp, FourierParameters -&gt; {1, 1}][[w ;; W]];<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code>ListPlot[{TT - 2 PT, TTf - 2 PTf, TT - 2 PT - TTf + 2 PTf}, Joined -&gt; True, PlotRange -&gt; All]<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0422\u0440\u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0434\u0432\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0445 \u0438 \u043e\u0434\u0438\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0441\u044c\u044e.<\/figcaption><\/figure>\n<p><strong>\u0412\u044b\u0432\u043e\u0434\u044b<\/strong><\/p>\n<p>\u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u0439, \u0435\u0433\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u044b. <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/266129\/\" rel=\"noopener noreferrer nofollow\">https:\/\/habr.com\/ru\/post\/266129\/<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/eduardgorbunov.github.io\/assets\/files\/amc_778_seminar_08.pdf?fbclid=IwAR1Ns3Wmdx_QaZapcvdmZN7Z6QelsmK911eXjrr5CvpAaP_9tCSFfBhJ5y8\" rel=\"noopener noreferrer nofollow\">https:\/\/eduardgorbunov.github.io\/assets\/files\/amc_778_seminar_08.pdf<\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/552932\/\"> https:\/\/habr.com\/ru\/post\/552932\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-321606","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321606","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=321606"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321606\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}