What can be done to deter more mindless tragedies like the one this week in Stockton, Calif., where a young man in full combat gear sprayed a school playground with a Russian assault rifle before killing himself?

Though this sad episode - in which five students were killed and 29 wounded - is only the latest in a series of mass murders and school-yard violence around the country, it would be financially impossible to protect all schools from deranged killers.But it ought to be easy to fix some of the flaws in the gun laws that led to the tragedy in Stockton.

Here was a gunman, Patrick Purdy, with an extensive criminal past that included arrests for armed robbery, selling hashish and marijuana, receiving stolen property, and possession for sale of dangerous weapons.

Yet Purdy was able to go to a store and legally buy a semi-automatic assault rifle modeled after the AK-47 used against American forces in Vietnam.

He was able to do so because the law, incredibly, makes it possible to buy semi-automatic weapons without even going through the waiting period required to purchase a hand gun while lawmen check the buyer's police and medical records.

Purdy's assault rifle was illegally modified to be fully automatic, capable of firing up to 50 bullets in under four seconds. The weapon's punch was so great that bullets fired by Purdy penetrated several layers of classroom walls. One bullet even ripped through a steel post three inches in diameter.

Even in legal semi-automatic condition, an AK-47 can fire at a rate of 400 rounds per minute. The AK-47 is easily modified to fully automatic by purchasing mail order parts advertised in gun and mercenary soldier magazines.

In recent years, an estimated 80,000 Chinese replicas of the Soviet-designed assault rifle have been imported into the United States. Yet efforts to outlaw the manufacture and sale of such assault rifles have been thwarted by opposition from the National Rifle Association, which claims that assault weapons cannot be distinguished from semiautomatic hunting and sporting shotguns and rifles.

Those claims, however, cannot withstand close scrutiny. As police agencies note, assault rifles are too powerful to be used in hunting or target practice. Instead, they have become increasingly used in street crimes and are a favorite weapon of violent youth gangs in Los Angeles.

Though the tragedy in Stockton does not justify an all-out attack on gun laws, some tightening of those laws is clearly in order. The least that should be done is to require a waiting period for the purchase of a semi-automatic weapon. Surely it should be just as hard to buy an assault rifle as it is to buy a handgun.