Self loops in max flow problem
for the max flow problem you should remove the self loops and solve it. self loops don't effect on final solution because when there exists a loop on a vertex, it means a flow from the vertex (with an arbitrary capacity) goes on pipe that connect to itself, it means the flow doesn't waste, it just return to the vertex. it's like you connect a water hose from a tank to itself. you don't limit the input flow to the tank or output flow from it. so you can ignore self loops and solve the problem.