Let G be a non-abelian group and Z(G) be the center of G. Associate a graph \Gamma_G
(called noncommuting graph of G) with G as follows: Take G\Z(G) as the vertices
of\Gamma_G, and join two distinct vertices x and y, whenever xy is not equal to yx. Here, we prove that
“the commutativity pattern of a finite non-abelian p-group determine its order among
the class of groups"; this means that if P is a finite non-abelian p-group such that
|\Gamma_P is isomorphic to \Gamma_H for some group H, then |P| = |H.