Approximate Graph Matching Algorithm