Sobolev Inequalities on Graphs and on Manifolds