A semidefinite programming method for graph realization and low rank matrix completion problem