Learning directed acyclic graphs by determination of candidate causes for discrete variables