A modified Stern-Gerlach apparatus devised by Feynman for a thought experiment I was revising the chapter Spin One in Feynman's lectures. There he considers a somewhat modified apparatus of the Stern-Gerlach type for convenience in explanation in the later parts of the lecture.

For the rest of our discussion, it will be more convenient if we consider a somewhat modified apparatus of the Stern-Gerlach type. The apparatus looks more complicated at first, but it will make all the arguments simpler. Anyway, since they are only “thought experiments,” it doesn’t cost anything to complicate the equipment. (Incidentally, no one has ever done all of the experiments we will describe in just this way, but we know what would happen from the laws of quantum mechanics, which are, of course, based on other similar experiments. These other experiments are harder to understand at the beginning, so we want to describe some idealized—but possible—experiments.)



The first one (on the left) is just the usual Stern-Gerlach magnet and splits the incoming beam of spin-one particles into three separate beams. The second magnet has the same cross section as the first, but is twice as long and the polarity of its magnetic field is opposite the field in magnet 1. The second magnet pushes in the opposite direction on the atomic magnets and bends their paths back toward the axis, as shown in the trajectories drawn in the lower part of the figure. The third magnet is just like the first, and brings the three beams back together again, so that leaves the exit hole along the axis.

See the first magnet $N\to S$ from the bottom divides the beam into three parts :$+, 0,\;\&\;-$. The second magnet has opposite polarity & thus tries to combine the three beams into the single one. But what about the third? It has the same polarity as the first one but still combines the three beams into a single which is contrary to that of the first magnet despite having the same polarity. The first magnet splits the beam while the third magnet 'brings the three beams back together again' although 'the third magnet is just like the first'. 
Can anyone explain why despite having the same polarity as the first magnet, the third magnet in spite of splitting combines the three back together again?
 A: Don't think of magnets and electrons, just think simpler.
Let's play some ice hockey. To simplify this game, it's just one player, who I'll call "us", with a puck, in a really big rink. There isn't even a proper enemy player, just a big wall in the middle of the rink, trying to stop us. We can only go through a "gap" in the wall. Let's say the puck is moving forward, straight from our goal to the target goal, and we're travelling with it.
We tap it once, say to the left, so that it can go with us towards the gap in the wall. 
Then when it's in line with the gap, we tap it once to the right, so that it goes straight. We thereby pass through the opening in the wall with the puck.
Now we tap it again to the right, so that it comes to the center line again. When it's in line with the center line, we tap it again to the left to stop it. That's what this last magnet is doing, it's giving this last tap to stop the things.
The pattern of taps is L, R, R, L. If we are really precise with our taps, or the "wall" is not very big, we can condense the two R taps into one bigger tap 2R, which does both of them. Instead of going straight through the gap it now goes diagonally through the gap, possibly turning right as it goes through, depending on when we tap it. 
Let's say the Y direction measures progress towards the other net, with the X direction perpendicular. The puck's horizontal momentum $p_y$ is some constant because there is no friction. Its horizontal momentum $p_x$ however changes as we tap it: it starts at $0$, then goes to $p_1$, then goes to some $-p_2$, then goes to $0$ again. This requires at least three impulses: one of magnitude $p_1$ to take it from $0$ to $p_1$, one of magnitude $-p_1 - p_2$, to take it from $p_1$ to $-p_2$, and one of magnitude $+p_2$, to take it back to $0$. 
A: First of all, I'd like to quickly explain the physics. There is no charge involved here. So, the Lorentz force is zero. The reason why the particles are accelerated is because it's a spin with a corresponding magnetic moment exposed to an inhomogeneous magnetic field. If you look at the solenoids, you see that they are not flat, but there is a "V" shape in the upper solenoid which creates the inhomogeneity.
The first magnet effectively changes the direction of the particle by some angle $\theta$. So, the particle will be displaced in $z$ after some travelling in $y$. To revert the displacement and the direction you need two more magnets. The central one inverts the direction such that the particle travels towards $z=0$ again, but then you need to change the direction with the third magnet for the particle to stay at $z=0$.
A: The magnetic forces of magnet 1 and magnet 3 are almost counterbalanced by magnet 2. (the polarity of its magnetic field is opposite the field in magnet 1 and magnet 3) So magnet 1 and magnet 3 are almost no more magnets. The splitting and combining done by magnet 2 mainly.
As you know there is no real spin. Atom is not little magnet. The space-time between N and S distorted. It looks like bone of cuttlefish.(b) Atom moves along the distorted space-time by magnet 2, just like earth moves along the distorted space-time by sun.
A: A charged particle moving across a uniform magnetic field will curve at a fixed radius related to its charge, its mass, its velocity, and the strength of the magnetic field. Change the direction of the magnetic field, and the particle will curve in the other direction.
Let's talk about the positively-charged particles. The first magnetic field curves the particle's path to the left, say $10\unicode{xb0}$. The second field curves it in the opposite direction, but for twice as long, so you get twice the total curvature ($20\unicode{xb0}$). The third field again curves the particle to the left by $10\unicode{xb0}$.
It's clear that the total curvature is $10 - 20 + 10 = 0\unicode{xb0}$. By symmetry, the left half of the curve should look just like the right half, so you end up with the particle traveling along the path it would have taken had there been no magnets at all.
The same argument applies to the negatively-charged particles, and the neutral particles are even simpler.
Edit: This argument works when the curve is small enough that the magnetic fields are still uniform, and the distance travelled through the three magnets is in the radio of $1:2:1$. As a counterexample, if the first field curved the particle through $90\unicode{xb0}$, then the particle wouldn't even make it to the second magnet.
