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: 
I think that to understand your misunderstanding we have to consider the conditions for conservation of momentum: momentum is conserved so long as there is no net external force acting on the system in question. Considering the simple case in a vacuum, even friction between balls or between the strings and the post is acting. There may even be other forces that aren't listed here that you could think of. But in essence, this is why momentum is not conserved in this case: because it is not ideal. Hence, energy is being dissipated away as heat or sound (if we insert a medium), causing the balls to lose energy and therefore velocity/linear momentum.
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.