Graph data strucuture and its application