# HG changeset patch # User Christian Urban # Date 1526378240 -3600 # Node ID 526542d8d700e7a9b1832d7b79674c1bf8e6b7c6 # Parent 90e0b1cc460b4fc0a1c7ef0a26e42ad5ff58f4f1 updated diff -r 90e0b1cc460b -r 526542d8d700 cws/cw06.tex --- a/cws/cw06.tex Tue May 15 01:14:07 2018 +0100 +++ b/cws/cw06.tex Tue May 15 10:57:20 2018 +0100 @@ -69,14 +69,15 @@ \noindent The problem is to calculate a sequence of steps to reach the end of the list by taking only steps indicated by the integers. For the list -above, possible sequence of steps are 3 - 2 - 1 - End, but also 3 - 4 +above, possible sequences of steps are 3 - 2 - 1 - End, but also 3 - 4 - End. This is a recursive problem that can be thought of as a tree where the root is a list and the children are all the lists that are reachable by a single step. For example for the list above this gives a tree like \begin{center} -\begin{tikzpicture}[grow=right,level distance=30mm,child anchor=north] + \begin{tikzpicture} + [grow=right,level distance=30mm,child anchor=north,line width=0.5mm] \node {[3,4,2,0,1]} child {node {[0,1]}} child {node {[2,0,1]}