title: Dictionary of Lists
body: <p>I'm trying to build a dictionary of lists, but i'm reading in a string and need to make the lists name the string and add them to the dictionary as a key.</p>
  
  <p>IE read in "hello"</p>
  
  <p>Create the list with what was read in </p>
  
  <pre><code>List&lt;string&gt; (insert read string here ) = new List&lt;string&gt;();
  </code></pre>
  
  <p>Then add that lists name as the key to a dictionary.</p>
  
  <pre><code>Dictionary.Add(readstring, thatlist);
  </code></pre>
  
  <hr>
  
  <p>All I can find is a hard code implementation of this.</p>
  
  <pre><code>Turing.Add("S", S);
  </code></pre>
  
  <p>My goal: create a Universal Turing Machine, so I read in an input from a text file that is the next step that looks like this, (q0 a) -> q1 X R.</p>
  
  <p>Then use the all the steps that I read in to end in a final state with this on the virtual tape "tape = XXYYZZBB"</p>
  
  <p>I have the the pseudo code written for this but I just cant get the dictionary to work.</p>
  
  <p>EDIT:
  Adding some more info for less confusion.
  Im given the start and the end state for the first 2 lines of the text file. Then im given the transitions.</p>
  
  <p>q0 //start state
  q5 //end state
  q0 a q1 X R //transitions</p>
  
  <p>Ive stripped the first two lines of input to give me 0 and 5 then have created a for loop to create a lists of each state.</p>
  
  <pre><code>for (int i = 0; i &lt;= endState; i++)
  {
  List&lt;string&gt; i = new List&lt;string&gt;();
  }
  </code></pre>
  
  <p>I then want to add each lists name as a key to the dictionary of lists I am creating.</p>
  
  <pre><code>Dictionary.Add(listname, thatlist);
  </code></pre>
  
  <p>I need help on implementing the code for the above as its giving errors.</p>