title: simple algorithm for checkinf if A* is valid
body: <p>Let A be some set of strings
  Let A* be a string made of the combination of elements in A </p>
  
  <p>what is a simple algorithm to check if A* is made of element of A</p>
  
  <p>ex</p>
  
  <p>A = {a,b,c,de}</p>
  
  <p>A* = acbbde</p>
  
  <p>how to check that  A* is valid?</p>