Particle A moves on a horizontal table and is joined to a particle B of equal mass, by a light inextensible string passing over a frictionless pulley on the edge of the table. Find the accelerations of A and B:
(i) assuming that the table top is frictionless, and
(ii) assuming it has a coefficient of friction u.