A GRAPH THEORETIC APPROACH TO CAD FOR THE ANALYSIS OF PLANAR MECHANISMS