I have come across sums where initially some capacitors are connected to a battery. The individual capacitances and voltage are given. The battery is then removed and the capacitors are again connected. We are to find the final charges on each and the voltage through each.
What is the theory behind solving such problems?