I'd say all of these, with protection of further victims being the #1.
Well, the death penalty does not do a substantially better job of protecting victims than other punishments.
Several here are clearly coming from a retributive justice position of "this person should suffer, let them fry."
Life in prison is far more cruel than the death penalty.
This is only part of the reason why the death penalty does not prevent criminals from committing crimes beforehand (the larger issue is they do not believe, or do not care, that they will be caught--the act outweighs the possibility of police reaction).
If you are designing a justice system to meet all 4 of these goals at once, it is going to be less effective at each of them.
Some things to consider:
(1) Exile was one of the most effective tools of justice. The primary concern of safety is that a dangerous person will not harm others (if he has harmed someone already, he can be punished, but that will not change the harm he already did). Exile is no longer practiced, and it is a punishment I would use for many, many cases. Sometimes the crime might not even be as serious as murder, but it would be a sign that we do not want this person in our society any more (think of cases like rape, where the criminal will eventually be released back into society in a non-exile system). Why is exile not an option today?
(2) Thomas Aquinas was in favor of the death penalty, citing several Biblical versus. I Corinthians 5 "You know that a little leaven corrupts the whole lump of dough?" does not provide justification for the death penalty in my opinion. It does justify things such as the recent banning of non-Christian discussion on this forum, but one must really stretch to believe it justifies the killing of bad people.
However, he cited other versus which justify state killing basically by separating the functions of the church and the state, as I Peter states "Be subjected therefore to every human creature for God's sake: whether to be on the king as excelling, or to governors as sent by him for the punishment of evildoers and for the praise of good".
However, there is still considerable room for debate, as the church also justified killing nonbelievers which is a position no one holds today. John Paul II in Evangelium vitae argued for the sanctity of life in all areas, including the killing of criminals *except in extreme cases*.
3) How many innocent people who are killed by the state is an acceptable level, so that guilty men are also executed?
4) The nation of Australia, one that is more peaceful, cohesive, safe, and prosperous than the United States, was founded almost exclusively by prisoners and criminals, many murderers. Are we to discount the possibility of someone who has done evil to go on later in life and do something good or productive?
5) Nations without the death penalty are safer than those with (though this is a difficult comparison to make as there are relatively few nations which still execute its citizens today and this may be more of a racial or ethnic comparison than a legal one of capital punishment).
Personally, I believe that (a) America is too lenient for minor infractions (you can be a thief and in many cases the state will do nothing), and too severe on many major ones, (b) the American prison system is evil and inhumane and often creates future criminals in place of rehabilitating those it knows will eventually be released back into society, and that (c) exile is a legal tool that should be used in many cases. As for the death penalty, I am generally opposed to it, certainly in the form we currently practice it where The Innocence Project has identified over 200 innocent people who were murdered by the state (while the real criminal went free). Morally I am undecided but above anything I believe in consistency, and we must either respect life or we do not.