/tutorial/backtracking/backtracking.html

http://github.com/tybor/Liberty · HTML · 144 lines · 127 code · 17 blank · 0 comment · 0 complexity · 2dd21b596ed7e16b7ab4c9dc9d69697b MD5 · raw file

  1. <html><head>
  2. <title>tutorial of lib/backtracking</title>
  3. <style>
  4. body {
  5. background-color: white;
  6. margin: 3px;
  7. }
  8. body * {
  9. /*
  10. margin: 0px 0px 5px 0px;
  11. */
  12. }
  13. h1 {
  14. background-color: #3366FF;
  15. font-size: 300%;
  16. color: white;
  17. text-align: center;
  18. font-weight: normal;
  19. padding: 10px;
  20. }
  21. h2 {
  22. background-color: #3366FF;
  23. font-size: 150%;
  24. color: white;
  25. text-align: left;
  26. font-weight: normal;
  27. padding: 5px;
  28. }
  29. .i {
  30. background-color: yellow;
  31. font-size: 110%;
  32. color: #3366FF;
  33. text-align: center;
  34. font-weight: bolder;
  35. padding: 10px 30px 10px 30px;
  36. }
  37. p {
  38. /*
  39. text-align: justify;
  40. */
  41. }
  42. pre {
  43. margin: 3px 50px 3px 50px;
  44. padding: 3px 5px 3px 5px;
  45. border: 2px dashed #3366FF;
  46. background: #eef;
  47. }
  48. .class {
  49. font-weight: bolder;
  50. color: #3366FF;
  51. }
  52. .sesign {
  53. text-align: center;
  54. font-size: small;
  55. font-style: italic;
  56. }
  57. </style>
  58. </head><body>
  59. <h1>tutorial of lib/backtracking</h1>
  60. <div class="i">
  61. <p>The cluster lib/backtracking provides a useful abstraction to implement
  62. all kinds of backtracking algorithms or and/or tree explorations.</p></div>
  63. <a name="sommaire"/><h2>Summary</h2>
  64. <div class="s"><ul class="s">
  65. <li><a href="#chap-1">The tutorial backtracking/expand_expression</a></li>
  66. <li><a href="#chap-2">The tutorial backtracking/logigram</a></li>
  67. <li><a href="#chap-3">The tutorial backtracking/tiny_parse</a></li>
  68. <li><a href="#chap-4">The tutorial backtracking/tiny_prolog</a></li>
  69. <li><a href="#chap-5">Some other examples</a></li>
  70. </ul></div>
  71. <a name="chap-1"/><h2>The tutorial backtracking/expand_expression</h2>
  72. <div class="c2">
  73. <p>The main class, <span class="class">ABSTRACT_BACKTRACKING</span>,
  74. implements the abstract algorithm that explores a virtual and/or tree.
  75. It defines the basic data used for the exploration and the way the exploration
  76. is done. The tutorial [expand_expression] shows its use.</p>
  77. <p>This tutorial expands the expressions that are entered at its input.
  78. Here is a short example.</p>
  79. <p><pre>
  80. > cd expand_expression/tree
  81. > se c -clean -o ee expand_expression
  82. > ./ee
  83. the(good+bad)(boy+girl)
  84. (1) the good boy
  85. (2) the good girl
  86. (3) the bad boy
  87. (4) the bad girl
  88. </pre></p>
  89. </div>
  90. <a name="chap-2"/><h2>The tutorial backtracking/logigram</h2>
  91. <div class="c2">
  92. <p>A tutorial that shows how to solve problems
  93. that sometimes are called logigrams. The logigrams
  94. are made of a set of items (persons, date, places, ...)
  95. grouped into categories and sets of true propositions
  96. about the items. From these propositions you must deduce
  97. how the given items are combined together.</p>
  98. <p>Here is an example: there are 3 women, Marie, Julie and Eve of
  99. the 19th century. We know that:</p>
  100. <ul class="hyphen">
  101. <li>
  102. <p>The one who has no child was born in 1804 and she is not Marie.</p>
  103. </li>
  104. <li>
  105. <p>Julie doesn't have exactly one child and has less children than Marie.</p>
  106. </li>
  107. <li>
  108. <p>The one who has 2 children is not born in 1805 and she is not Eve.</p>
  109. </li>
  110. </ul>
  111. <p>Which woman was born in 1806? How many children did she have?</p>
  112. </div>
  113. <a name="chap-3"/><h2>The tutorial backtracking/tiny_parse</h2>
  114. <div class="c2">
  115. <p><span class="class">WORK</span> <span class="class">IN</span> <span class="class">PROGRESS</span> <span class="class">NOTHING</span> <span class="class">TO</span> <span class="class">SEE</span> <span class="class">HERE</span></p>
  116. </div>
  117. <a name="chap-4"/><h2>The tutorial backtracking/tiny_prolog</h2>
  118. <div class="c2">
  119. <p><span class="class">WORK</span> <span class="class">IN</span> <span class="class">PROGRESS</span> <span class="class">NOTHING</span> <span class="class">TO</span> <span class="class">SEE</span> <span class="class">HERE</span></p>
  120. </div>
  121. <a name="chap-5"/><h2>Some other examples</h2>
  122. <div class="c2">
  123. <p>The cluster regular_expression uses the cluster bactracking.
  124. Just take a look at it.</p>
  125. <p><div class="sesign"><rule/>Copyright &copy; The SmartEiffel Team - <a href="mailto:SmartEiffel@loria.fr">&lt;SmartEiffel@loria.fr&gt;</a></div></p>
  126. </div>
  127. </body></html>