Question: Let's consider that we have a Newton's cradle in vacuum:

[![enter image description here](https://i.stack.imgur.com/NPea6.jpg)](https://i.stack.imgur.com/NPea6.jpg)

Considering that each ball has a mass of 100g or 0.1 kg we release the ball and at the time of contact, the ball has a final velocity of 1 m/s. So the momentum will be:

$$p = mv = 1\*0.1 = 0.1 kg m/s$$

If the momentum is conserved, the ball at the other side should also come out with a speed of **1 m/s**. Then it will come back with an equal magnitude of momentum and the first ball should again move back at 1 m/s. Note that there is another effect at play here, which is the 'pendulum effect' which reverses the direction of the momentum but perfectly conserves its magnitude. And this process should keep going. But since the collision is inelastic, the kinetic energy will not be conserved and even in a vacuum some energy will be lost in the form of heat, but not as sound because it is in a vacuum. But according to the law of conservation of momentum, the momentum should still be conserved even if the kinetic energy is not. But the problem here is that since some kinetic energy is lost, the speed of the balls should gradually decrease. At one point the balls should stop moving, and so they will have 0 velocity. And if that happens, the momentum will become 0, even though we started out with 0.1 kg m/s. Doesn't this seem to violate the law of conservation of momentum? I can't seem to make sense of it

Answer: 
Let's simplify a bit more. Suppose there are only two balls, and they are made of wet clay. One balls swings toward the other and sticks - totally inelastic.

You have probably already done the math for collisions like this. Momentum is conserved, kinetic energy is not. Both balls have the same velocity afterward. The outcome is the velocity is $0.5$ m/s. The momentum is the same as before. Half the kinetic energy has been converted to heat and half is left as kinetic energy. The final state is both balls swing back and forth together.

For the $5$ steel balls that gradually lose kinetic energy, the final state will be something like this too. All $5$ balls swinging back and forth together.

You could show this experimentally by sticking two balls in the middle together with a very small piece of gum. Normally the balls are like extremely stiff springs. They deform slightly and push on the next ball. It is such a small and quick deformation that you can't see it. But gum would deform and convert some of that energy to heat.

The situation is different if you consider air friction. Now the forces are not all between balls. Air is outside the system. The balls push air around and slow down. Air speeds up and carry away energy and momentum. We don't count the momentum outside the system. We see the momentum and kinetic energy of the system decrease. It is not conserved in the system because the system is not isolated. Eventually all the balls would stop.

Of course, you can always choose a bigger system that does count the air. You might have to work at it, but you put the whole thing in a rocket in space where there is no air outside. In that case, you would have an isolated system again. If you added up the momentum of the balls and air and other rocket parts, you would find momentum is conserved. The final state of this system is the balls are stopped, and the air stopped blowing around. All the kinetic energy is converted to heat.

Momentum is conserved in this rocket. As the balls swing back and forth, the whole rocket would move a little bit in the opposite direction. The total momentum doesn't change.
You seem to dismiss the fact that conservation of momentum means conservation of momentum **vector**. If you consider the initial state right before the first collision, on the left hand side, the initial momentum is 0.1 kg m/s in the direction horizonatl to the right. Once the last ball on the right is moving up the momentum is already changed. It will change both in magnitude, decreasing to zero and in direction, gaining a vertical component. Then there is a point where its momentum is zero and then the motion is reversed. So you have a continous change in momentum way before you see the effects of friction or other kind of dissipative effects. Why the momentum is not conserved? The condition for conservation is to have no external forces and this is not the case here. You can only expect conservation if you take the states just before collision and just after collision between two balls. Or even before the first collision and right before the last ball starts to rise. But after that the tension in the string and gravity act to change the momentum.