title: minimum dominating set from a path
body: <p>I'm facing a problem described as follows :</p>
  
  <p>Example :
  Giving a path :</p>
  
  <p>[0]------<strong>[1]</strong>------[2]------<strong>[3]</strong>------[4]</p>
  
  <p>give the minimum dominatig set of this path : the solution would be <strong>[1]</strong> and <strong>[3]</strong></p>
  
  <p>The path in my program is described as an Adjacency list ,so :</p>
  
  <p>[0]--> [1]</p>
  
  <p>[1]--> [0];[2]</p>
  
  <p>[2]--> [1];3]</p>
  
  <p>[3]--> [2];4]</p>
  
  <p>[4]--> [3]</p>
  
  <p>What would be the idea to get the list of those elements from the Adjacency list?</p>