add prim algorithm and modify graph.c.