B-Splines In Emd And Graph Theory In Pattern Recognition