Summarizing static graphs and mining dynamic graphs