<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">infoschool</journal-id><journal-title-group><journal-title xml:lang="ru">Информатика в школе</journal-title><trans-title-group xml:lang="en"><trans-title>Informatics in school</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2221-1993</issn><publisher><publisher-name>Publishing House Education and Informatics</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.32517/2221-1993-2022-21-6-55-67</article-id><article-id custom-type="elpub" pub-id-type="custom">infoschool-680</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>ЗАДАЧИ</subject></subj-group></article-categories><title-group><article-title>Ускорение рекурсивных решений при помощи мемоизации</article-title><trans-title-group xml:lang="en"><trans-title>Speeding up recursive solutions using memoization</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Долинский</surname><given-names>М. С.</given-names></name><name name-style="western" xml:lang="en"><surname>Dolinsky</surname><given-names>M. S.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Долинский Михаил Семенович, кандидат технических наук, доцент, доцент кафедры математических проблем управления и информатики</p><p>246000, г.  Гомель, ул. Советская, д. 104</p></bio><bio xml:lang="en"><p>Gomel</p></bio><email xlink:type="simple">dolinsky@gsu.by</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Гомельский государственный университет имени Франциска Скорины</institution><country>Беларусь</country></aff><aff xml:lang="en"><institution>Francisk Skorina Gomel State University</institution><country>Belarus</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2022</year></pub-date><pub-date pub-type="epub"><day>18</day><month>12</month><year>2022</year></pub-date><volume>0</volume><issue>6</issue><fpage>55</fpage><lpage>67</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Долинский М.С., 2022</copyright-statement><copyright-year>2022</copyright-year><copyright-holder xml:lang="ru">Долинский М.С.</copyright-holder><copyright-holder xml:lang="en">Dolinsky M.S.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://school.infojournal.ru/jour/article/view/680">https://school.infojournal.ru/jour/article/view/680</self-uri><abstract><p>В статье на примере решения двух задач проиллюстрирована методика изучения темы «Ускорение рекурсивных решений при помощи мемоизации» при подготовке школьников к олимпиадам по информатике. Изучение основано на последовательном решении усложняющихся задач. Для каждой задачи приводятся следующие материалы: условие задачи, идея решения с предложением придумать самостоятельно реализацию, решение на языке программирования Pascal. Серьезной технической основой является разработанная под управлением автора инструментальная система дистанционного обучения (http://dl.gsu.by), которая позволяет: предложить ученику условие задачи; отправить решение на проверку; получить от системы вердикт — правильное или неправильное решение; для неправильных решений указывается номер теста, на котором решение не прошло. Ученик может взять тест (входные и выходные данные), на котором не прошло его решение, разобраться, в чем ошибка в его программе, исправить и послать решение повторно. Кроме того, для каждой задачи есть ссылка по ней на тему в форуме, где можно задать вопрос по решению этой задачи и/или почитать ответ, если вопросы уже задавались ранее.</p></abstract><trans-abstract xml:lang="en"><p>In the article, using the example of solving two problems, the methodology for studying the theme "Speeding up recursive solutions using memoization" is illustrated in preparing schoolchildren for Olympiads in informatics. The study is based on the sequential solution of increasingly complex problems. For each problem the following materials are given: the formulation of the problem, the idea of a solution with a proposal to come up with an implementation on their own, the solution in the Pascal programming language. Distance learning system (http://dl.gsu.by) is the effective technical base for teaching. The system allows to offer for a student a formulation of the problem; to submit the solution for review; to get a verdict from the system — a correct or incorrect solution; for incorrect solution, the number of the test on which the solution did not pass is indicated. A student can take a test (input and output data), on which his solution did not pass, figure out what the error is in his program, correct and send the solution again. In addition, for each problem there is a link on it to the topic in the forum at site, where you can ask a question onsolving this problem and  / or read the answer if the questions have already been asked before.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>рекурсия</kwd><kwd>мемоизация</kwd><kwd>олимпиады по информатике</kwd><kwd>инструментальная система дистанционного обучения</kwd></kwd-group><kwd-group xml:lang="en"><kwd>recursion</kwd><kwd>memoization</kwd><kwd>programming training</kwd><kwd>Olympiads in informatics</kwd><kwd>distance learning tools</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Баррон Д. Рекурсивные методы в программировании. М.: Мир,1974. 79 с.</mixed-citation><mixed-citation xml:lang="en">Баррон Д. Рекурсивные методы в программировании. М.: Мир,1974. 79 с.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Бердж В. Методы рекурсивного программирования. М.: Машиностроение, 1983. 256 с.</mixed-citation><mixed-citation xml:lang="en">Бердж В. Методы рекурсивного программирования. М.: Машиностроение, 1983. 256 с.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Головешкин В. А., Ульянов В. В. Теория рекурсии для программистов. М.: Физматлит, 2006. 296 с.</mixed-citation><mixed-citation xml:lang="en">Головешкин В. А., Ульянов В. В. Теория рекурсии для программистов. М.: Физматлит, 2006. 296 с.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Дасгупта С., Пападимитриу Х., Вазирани У. Алгоритмы. М.: МЦНМО, 2019. 320 с.</mixed-citation><mixed-citation xml:lang="en">Дасгупта С., Пападимитриу Х., Вазирани У. Алгоритмы. М.: МЦНМО, 2019. 320 с.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Введение в решение задач с помощью рекурсивных процедур и функций // Информатика в школе. 2016. № 9. С. 49–56. EDN: XEQEZR.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Введение в решение задач с помощью рекурсивных процедур и функций // Информатика в школе. 2016. № 9. С. 49–56. EDN: XEQEZR.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Генерация комбинаторных объектов с помощью рекурсивных процедур и функций // Информатика в школе. 2019. № 4. С. 59–63. DOI: 10.32517/2221-1993-2019-18-4-59-63. EDN: TCJKQY.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Генерация комбинаторных объектов с помощью рекурсивных процедур и функций // Информатика в школе. 2019. № 4. С. 59–63. DOI: 10.32517/2221-1993-2019-18-4-59-63. EDN: TCJKQY.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Рекурсивное решение задач с помощью метода «разделяй и властвуй» // Информатика в школе. 2022. № 2. С. 58–64. DOI: 10.32517/2221-1993-2022-21-2-58-64. EDN: JOEVGG.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Рекурсивное решение задач с помощью метода «разделяй и властвуй» // Информатика в школе. 2022. № 2. С. 58–64. DOI: 10.32517/2221-1993-2022-21-2-58-64. EDN: JOEVGG.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Решение задач рекурсивной генерацией чисел // Информатика в школе. 2021. № 1. С. 46–51. DOI: 10.32517/2221-1993-2021-20-1-46-51. EDN: OIHIZJ.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Решение задач рекурсивной генерацией чисел // Информатика в школе. 2021. № 1. С. 46–51. DOI: 10.32517/2221-1993-2021-20-1-46-51. EDN: OIHIZJ.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Решение игровых задач с помощью рекурсии // Информатика в школе. 2021. № 9. С. 43–50. DOI: 10.32517/2221-1993-2021-20-9-43-50. EDN: XQIAMP.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Решение игровых задач с помощью рекурсии // Информатика в школе. 2021. № 9. С. 43–50. DOI: 10.32517/2221-1993-2021-20-9-43-50. EDN: XQIAMP.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Долинский М. С. Решение рекурсивных задач по определению // Информатика в школе. 2020. № 2. С. 60–66. DOI: 10.32517/2221-1993-2020-19-2-60-66. EDN: EAYQZS.</mixed-citation><mixed-citation xml:lang="en">Долинский М. С. Решение рекурсивных задач по определению // Информатика в школе. 2020. № 2. С. 60–66. DOI: 10.32517/2221-1993-2020-19-2-60-66. EDN: EAYQZS.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Златопольский Д. М. 1400 задач по программированию. М.: ДМК Пресс, 2019. 192 с.</mixed-citation><mixed-citation xml:lang="en">Златопольский Д. М. 1400 задач по программированию. М.: ДМК Пресс, 2019. 192 с.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Луридас П. Алгоритмы для начинающих. Теория и практика для разработчика. М.: ЭКСМО, 2018. 608 с.</mixed-citation><mixed-citation xml:lang="en">Луридас П. Алгоритмы для начинающих. Теория и практика для разработчика. М.: ЭКСМО, 2018. 608 с.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Паронджанов В. Д. Дружелюбные алгоритмы, понятные каждому. М.: ДМК Пресс, 2014. 464 с.</mixed-citation><mixed-citation xml:lang="en">Паронджанов В. Д. Дружелюбные алгоритмы, понятные каждому. М.: ДМК Пресс, 2014. 464 с.</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">Потопахин В. В. Искусство алгоритмизации. М.: ДМК Пресс, 2013. 320 с.</mixed-citation><mixed-citation xml:lang="en">Потопахин В. В. Искусство алгоритмизации. М.: ДМК Пресс, 2013. 320 с.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Рафгарден Т. Совершенный алгоритм. Графовые алгоритмы и структуры данных. СПб.: Питер, 2020. 256 с.</mixed-citation><mixed-citation xml:lang="en">Рафгарден Т. Совершенный алгоритм. Графовые алгоритмы и структуры данных. СПб.: Питер, 2020. 256 с.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Рафгарден Т. Совершенный алгоритм. Жадные алгоритмы идинамическое программирование. СПб.: Питер, 2020. 256с.</mixed-citation><mixed-citation xml:lang="en">Рафгарден Т. Совершенный алгоритм. Жадные алгоритмы идинамическое программирование. СПб.: Питер, 2020. 256с.</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Рафгарден Т. Совершенный алгоритм. Основы. СПб.: Питер, 2019. 256 с.</mixed-citation><mixed-citation xml:lang="en">Рафгарден Т. Совершенный алгоритм. Основы. СПб.: Питер, 2019. 256 с.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">Рубио-Санчес М. Введение в рекурсивное программирование. М.: ДМК Пресс, 2019. 436 с.</mixed-citation><mixed-citation xml:lang="en">Рубио-Санчес М. Введение в рекурсивное программирование. М.: ДМК Пресс, 2019. 436 с.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">Скиена С. Алгоритмы. Руководство по разработке. СПб.: BHV, 2011. 720 c.</mixed-citation><mixed-citation xml:lang="en">Скиена С. Алгоритмы. Руководство по разработке. СПб.: BHV, 2011. 720 c.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">Солтис М. Введение в анализ алгоритмов. М.: ДМК Пресс, 2019. 278 с.</mixed-citation><mixed-citation xml:lang="en">Солтис М. Введение в анализ алгоритмов. М.: ДМК Пресс, 2019. 278 с.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">Стивенс Р. Алгоритмы. Теория и практическое применение. М.: ЭКСМО, 2016. 544 с.</mixed-citation><mixed-citation xml:lang="en">Стивенс Р. Алгоритмы. Теория и практическое применение. М.: ЭКСМО, 2016. 544 с.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">Шень А. Программирование: теоремы и задачи. М.: МЦНМО, 2017. 320 с.</mixed-citation><mixed-citation xml:lang="en">Шень А. Программирование: теоремы и задачи. М.: МЦНМО, 2017. 320 с.</mixed-citation></citation-alternatives></ref><ref id="cit23"><label>23</label><citation-alternatives><mixed-citation xml:lang="ru">Castro R., Lehmann N., Pérez J., Subercaseaux B. Wavelet trees for competitive programming // Olympiad in Informatics. 2016. Vol. 10. P. 19–37.</mixed-citation><mixed-citation xml:lang="en">Castro R., Lehmann N., Pérez J., Subercaseaux B. Wavelet trees for competitive programming // Olympiad in Informatics. 2016. Vol. 10. P. 19–37.</mixed-citation></citation-alternatives></ref><ref id="cit24"><label>24</label><citation-alternatives><mixed-citation xml:lang="ru">Do P. T., Pham B. T., Than V. C. Latest algorithms on particular graph classes // Olympiad in Informatics. 2020. Vol. 14. P. 21–35.</mixed-citation><mixed-citation xml:lang="en">Do P. T., Pham B. T., Than V. C. Latest algorithms on particular graph classes // Olympiad in Informatics. 2020. Vol. 14. P. 21–35.</mixed-citation></citation-alternatives></ref><ref id="cit25"><label>25</label><citation-alternatives><mixed-citation xml:lang="ru">Erdősné Németh A. Teaching graphs for contestants in lower-secondary-school-age // Olympiad in Informatics. 2017. Vol. 11. P. 41–53.</mixed-citation><mixed-citation xml:lang="en">Erdősné Németh A. Teaching graphs for contestants in lower-secondary-school-age // Olympiad in Informatics. 2017. Vol. 11. P. 41–53.</mixed-citation></citation-alternatives></ref><ref id="cit26"><label>26</label><citation-alternatives><mixed-citation xml:lang="ru">Erdősné Németh A., Zsakó L. The place of the dynamic programming concept in the progression of contestants’ thinking // Olympiad in Informatics. 2016. Vol. 10. P. 61–72.</mixed-citation><mixed-citation xml:lang="en">Erdősné Németh A., Zsakó L. The place of the dynamic programming concept in the progression of contestants’ thinking // Olympiad in Informatics. 2016. Vol. 10. P. 61–72.</mixed-citation></citation-alternatives></ref><ref id="cit27"><label>27</label><citation-alternatives><mixed-citation xml:lang="ru">Forisek M. Towards a better way to teach dynamic programming // Olympiad in Informatics. 2015. Vol. 9. P. 45–55.</mixed-citation><mixed-citation xml:lang="en">Forisek M. Towards a better way to teach dynamic programming // Olympiad in Informatics. 2015. Vol. 9. P. 45–55.</mixed-citation></citation-alternatives></ref><ref id="cit28"><label>28</label><citation-alternatives><mixed-citation xml:lang="ru">Manev K. Tasks on graphs // Olympiad in Informatics. 2008. Vol. 2. P. 90–104.</mixed-citation><mixed-citation xml:lang="en">Manev K. Tasks on graphs // Olympiad in Informatics. 2008. Vol. 2. P. 90–104.</mixed-citation></citation-alternatives></ref><ref id="cit29"><label>29</label><citation-alternatives><mixed-citation xml:lang="ru">Manev K., Nikolov N., Markov M. Reconstruction of trees using metric properties // Olympiad in Informatics. 2011. Vol. 5. P. 82–91.</mixed-citation><mixed-citation xml:lang="en">Manev K., Nikolov N., Markov M. Reconstruction of trees using metric properties // Olympiad in Informatics. 2011. Vol. 5. P. 82–91.</mixed-citation></citation-alternatives></ref><ref id="cit30"><label>30</label><citation-alternatives><mixed-citation xml:lang="ru">Pachocki J., Radoszewskij J. Where to use and how not to use polynomial string hashing // Olympiad in Informatics. 2013. Vol. 7. P. 90–100.</mixed-citation><mixed-citation xml:lang="en">Pachocki J., Radoszewskij J. Where to use and how not to use polynomial string hashing // Olympiad in Informatics. 2013. Vol. 7. P. 90–100.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
