<?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">mais</journal-id><journal-title-group><journal-title xml:lang="ru">Моделирование и анализ информационных систем</journal-title><trans-title-group xml:lang="en"><trans-title>Modeling and Analysis of Information Systems</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">1818-1015</issn><issn pub-type="epub">2313-5417</issn><publisher><publisher-name>Yaroslavl State University</publisher-name></publisher></journal-meta><article-meta><article-id custom-type="elpub" pub-id-type="custom">mais-1107</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><subj-group subj-group-type="section-heading" xml:lang="en"><subject>Articles</subject></subj-group></article-categories><title-group><article-title>Верификация шаблонов алгоритмов для метода отката и метода ветвей и границ</article-title><trans-title-group xml:lang="en"><trans-title>Verification of Backtracking
and Branch and Bound Design Templates</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>Shilov</surname><given-names>N. V.</given-names></name></name-alternatives><email xlink:type="simple">shilov@iis.nsk.su</email><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff xml:lang="ru" id="aff-1"><institution>Институт систем информатики им. А.П. Ершова СО РАН,
Новосибирский государственный университет и Новосибирский государственный технический университет</institution><country>Russian Federation</country></aff><pub-date pub-type="collection"><year>2011</year></pub-date><pub-date pub-type="epub"><day>20</day><month>12</month><year>2011</year></pub-date><volume>18</volume><issue>4</issue><fpage>168</fpage><lpage>180</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Шилов Н.В., 2011</copyright-statement><copyright-year>2011</copyright-year><copyright-holder xml:lang="ru">Шилов Н.В.</copyright-holder><copyright-holder xml:lang="en">Shilov N.V.</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://www.mais-journal.ru/jour/article/view/1107">https://www.mais-journal.ru/jour/article/view/1107</self-uri><abstract><p>Курс проектирования и анализа алгоритмов является обязательной составляющей учебных программ по информатике всех уровней. В университетах этот курс обязательно включает изучение структур данных, методы проектирования алгоритмов, теорию сложности и т.д. Этот курс знакомит с такими методами проектирования алгоритмов, как жадные алгоритмы, динамическое программирование, метод разделяй и властвуй, метод отката, метод ветвей и границ. Обычно знакомство с этими методами происходит на примерах. Но (как показано в данной статье) они могут быть (полу)формализованы в виде "паттернов", специфицированы условиями частичной и/или тотальной корректности и обоснованы (доказаны) методом Флойда верификации алгоритмов. Такой формализованный подход может привести к новому, более глубокому пониманию этих методов. В статье демонстрируется перспективность такого подхода на примере метода отката и метода ветвей и границ. В частности, мы доказываем, что разработанные шаблоны корректны, если граничное условие - монотонная функция, а решающее условие - антимонотонная функция от множества уже проверенных вершин.</p></abstract><trans-abstract xml:lang="en"><p>The Design and Analysis of Computer Algorithms is a must of Computer Curricula. It covers many topics that group around several core themes. These themes range from data structures to the complexity theory, but one very special theme is algorithmic design patterns, including greedy method, divide-and-conquer, dynamic programming, backtracking and branch-and-bound. Naturally, all the listed design patterns are taught, learned and comprehended by examples. But they can be semi-formalized as design templates, semi-specified by correctness conditions, and semi-formally verified by means of Floyd method. Moreover, this approach can lead to new insights and better comprehension of the design patterns, specification and verification methods. In this paper we demonstrate an utility of the approach by study of backtracking and branch-and-bound design patterns. In particular, we prove correctness of the suggested templates when the boundary condition is monotone, but the decision condition is anti-monotone on sets of "visited" vertices.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>метод отката</kwd><kwd>метод ветвей и границ</kwd><kwd>абстрактные типы данных</kwd><kwd>частичная корректность</kwd><kwd>тотальная корректность</kwd><kwd>метод верификации Флойда</kwd><kwd>задача о расстанове ферзей</kwd><kwd>дискретная задача о ранце</kwd></kwd-group><kwd-group xml:lang="en"><kwd>backtracking</kwd><kwd>branch-and-bound</kwd><kwd>abstract data type</kwd><kwd>partial correctness</kwd><kwd>total correctness</kwd><kwd>Floyd proof method</kwd><kwd>n-queen puzzle</kwd><kwd>knapsack problem</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">Ахо А., Хопкрофт Дж., Ульман Дж. Построение и анализ вычислительных алгоритмов. М.: Мир, 1979.</mixed-citation><mixed-citation xml:lang="en">Ахо А., Хопкрофт Дж., Ульман Дж. Построение и анализ вычислительных алгоритмов. М.: Мир, 1979.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Грис Д. Наука программирования. М.: Мир, 1984.</mixed-citation><mixed-citation xml:lang="en">Грис Д. Наука программирования. М.: Мир, 1984.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Дейкстра В.Э. Дисциплина программирования. М.: Мир, 1978.</mixed-citation><mixed-citation xml:lang="en">Дейкстра В.Э. Дисциплина программирования. М.: Мир, 1978.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Корнмэн Т, Лейзерсон Ч, Ривест Р. Алгоритмы: построение и анализ. М.: МЦНМО, 2000.</mixed-citation><mixed-citation xml:lang="en">Корнмэн Т, Лейзерсон Ч, Ривест Р. Алгоритмы: построение и анализ. М.: МЦНМО, 2000.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Непомнящий В.А. Верификация финитных итераций над наборами изменяемых структур данных. Кибернетика и системный анализ. Киев. 2007. №3. С.33-46.</mixed-citation><mixed-citation xml:lang="en">Непомнящий В.А. Верификация финитных итераций над наборами изменяемых структур данных. Кибернетика и системный анализ. Киев. 2007. №3. С.33-46.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Шилов Н.В. Основы синтаксиса, семантики, трансляции и верификации программ. Новосибирск: Новосибирский государственный университет, 2011.</mixed-citation><mixed-citation xml:lang="en">Шилов Н.В. Основы синтаксиса, семантики, трансляции и верификации программ. Новосибирск: Новосибирский государственный университет, 2011.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Apt K.R., de Boer F.S., Olderog E.-R. Verification of Sequential and Concurrent Programs. Third edition. Springer, 2009.</mixed-citation><mixed-citation xml:lang="en">Apt K.R., de Boer F.S., Olderog E.-R. Verification of Sequential and Concurrent Programs. Third edition. Springer, 2009.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Floyd R.W. Assigning meanings to programs. Proc. of a Symposium in Applied Mathematics. Mathematical Aspects of Computer Science // American Math. Society, Providence, R. I. 1967. Vol. 19. P. 19-32.</mixed-citation><mixed-citation xml:lang="en">Floyd R.W. Assigning meanings to programs. Proc. of a Symposium in Applied Mathematics. Mathematical Aspects of Computer Science // American Math. Society, Providence, R. I. 1967. Vol. 19. P. 19-32.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Golomb S.W. and Baumert L.D. Backtrack Programming // Journal of ACM. 1965. 12(4). P. 516-524.</mixed-citation><mixed-citation xml:lang="en">Golomb S.W. and Baumert L.D. Backtrack Programming // Journal of ACM. 1965. 12(4). P. 516-524.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Land A. H. and Doig A. G. An automatic method of solving discrete programming problems // Econometrica. 1960. 28(3). P. 497-520.</mixed-citation><mixed-citation xml:lang="en">Land A. H. and Doig A. G. An automatic method of solving discrete programming problems // Econometrica. 1960. 28(3). P. 497-520.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Kant E. Understanding and Automating Algorthm Design // IEEE Transactions on Software Engineering. 1985. SE-11(11). P. 1361-1374.</mixed-citation><mixed-citation xml:lang="en">Kant E. Understanding and Automating Algorthm Design // IEEE Transactions on Software Engineering. 1985. SE-11(11). P. 1361-1374.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Smith D. R. Automating the design of algorithms // Formal Program Development. 1993. Lecture Notes in Computer Science. 755. P. 324-354.</mixed-citation><mixed-citation xml:lang="en">Smith D. R. Automating the design of algorithms // Formal Program Development. 1993. Lecture Notes in Computer Science. 755. P. 324-354.</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>
