Cuts and connectivity in graphs and hypergraphs