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