A-BASE algorithm with a sample graph