With waste and fraud funning at least$4 billion a year in the nation's three major welfare programs, the federal government and the states are coupling computers and hard gumshoe legwork to gun down cheating and save the public money.

Take the case ofBarbara Jean Williams, convicted of welfare fraud in Los Angeles last December. Williams, who drove to her trial in a silvertoned Cadillac, was accused of obtaining $239,587 over seven years, using multiple phony birth certificates to file for benefits in 10 different welfare offices.

Williams was initially "turned up" by the Los Angeles county computer and then nailed by Joan Manley, a hard-working investigator.

Los Angeleshas a huge welfare population of more than a half million in the basic welfare program for mothers and children. A sophisticated user of computers, it hired aerospace systems analysts to help police welfare when the space industry turned sour, and has driven its error-rate down to 3 percent, the lowest of any major urban area.

One day, according to Manley, the Los Angeles computer "kicked up" the fact that three welfare checks were going to persons with different names at the same address.

This seemed suspicious, so they decided to take a closer look and make sure the three recipients weren't all members of a single family and entitled to only one benefit.

As it turned out, there were three different families there. One was headed by a woman who called herself Lucille Woods. On checking birth certificates possessed by the woman, the investigatordiscovered that "Woods" had a daughter named Danielle Williams. But when the hospital where the child was born was questioned, the birth certificate there showed that the child's mother had a different name.

Usingthis lead, the investigator eventually discovered that a woman whose real name was Barbara Jean Williams had been applying for benefits with different birth certificates at numerous different welfare offices. Part of the detection process involved feeding the first names of children claimed by Williams into the computer and finding out how many women with children of exactly the same first names had applied for benefits.

In the end, Williams was sentenced to eight years in prison, according to a county welfare official.

Another case where the computer supplied the initial lead involved the Jack A. Braley professional association, the corporate entity under which Dr. Jack A. Braley of Arkansas City, Kan., practiced medicine. A few weeks ago, the Jack A. Braley professional association pleaded guilty to criminal charges involving claims against the medicaid program for office visits by two patients who weren't actually seen by the doctor. Braley's wife, Diana, also pleaded guilty as the person who actually sent in the bills.

Investigators first became interested in Braley when the billing and treatment patterns of doctors who participated in the Kansas medicaid program were matched by computer against a hypothetical "normal" medical-practice profile developed by the Department of Health, Education and Welfare. This screening turned up doctors whose practices differed sharply from the norm.

According to the U.S. attorney for Kansas, James P. Buchele, Braley had a practice consisting largely of Medicaid and Medicare patients and had billed these programs for $974,000 from 1974 to 1977. About two-thirds of this was disallowed for a variety of reasons, Buchele said. In addition to the criminal charges, the federal government and Kansas have filed civil claims to recover about $100,000 of the money that was approved for Braley.

In still another case, the Kansas computer turned up a pharmacist from Olathe named Claude Jinks who had two different drugstores. Investigators became suspicious when the computer showed that during long periods of time, nearly all of Jinks' Medicaid bills to Kansas for prescriptions for those on the program were billed through only one of the stores-the one entitled to the higher reimbursement rate because its costs were higher.

"He was billing all his services through the store allowed the higher rates-even though many of the services [and sales] were at the lower-rate store," said a Kansas official in a phone interview.

"This resulted in $18,000 in over-payments over three years on prescription drugs." Jinks was convicted, lost his pharmacist's license and reimbursed the state, the official said, and has since shifted to another line of work-auto repairs, reportedly.

Officials of the Department of Health, Education and Welfare estimate that the federal and state govments lose at least $4 billion aa year to cheating and to simple miscalculation and human errors.

About $850 million of the total is lost in the program of Aid to Families with Dependent Childre, which has 10.7 million beneficiaries and an error rate of 8.1 percent (down from 16.5 percent six years ago). Another $275 million or so a year is lost in the program of aid to the destitute aged, blind and disabled (error rate 4.6 percent, down from 11.5 percent four years ago). And about $3 billion at least is lost in Medicaid (estimated error rate 16 percent). Medicaid has 355 million claims a year.

"When you're dealing with these tremendous numbers," said Social Security Commissioner Stanford Ross, who administers the first two of these programs, "the way you have to find error is with the computer."

Robert Wilson, assistant to the inspector general of the Department of Health, Education and Welfare, said the most sophisticated county or state system ideally would pack all the following AFDC information into a computer system: the name of the applicant, Social Security number, number of dependents, names of recent employers, summary of bank accounts and property.

The state computer would be hooked up on a unified system so it could instantaneously inspect state tax reports, unemployment insurance rolls, vehicle registrations. In this way, it could find out whether an applicant was working, had applied at several offices, had substantial property.

It could find simple calculating errors, and pick up cases where someone should have a payment reduced because he got a part-time job. (Some officials estimate that as much as three-quarters of the AFDC loss may be errors, not fraud.)

"Ideally, the state could make agreements with others to cross-check their records as well-a neighboring state, for example," said Wilson.

HEW, on its own, is using state computer storage banks to cross-check whether federal employes are receiving welfare in any state; and to cross-check whether persons are on welfare in more than one state.

In addition, there is a quality-control program under which the states every six months must pull out 46,000 sample cash-welfare cases nationwide and give them a really hard look with computer analysis, field checks and the like. HEW follows up by re-reviewing a portion of these cases to find procedures which need tightening.

HEW is planning a "national recipient index," which means programming information on all recipients all over the country into one giant federal computer for state cross-checks on eligibility, multiple payments and the like.

In Medicaid, HEW and the states do all the same kinds of things plus a whole slew of others having to do with accuracy of bills. The computer can cross-check within the state to see if the bill is already paid. It can find calculating errors in bills. It can screen bills for "obvious improprieties"-where a doctor gives every Medicaid patient a complete physical, an EKG each time he comes in the office, excessive lab tests, suspiciously large numbers of shots, gang visits to nursing homes. ("That's where it's hello to everyone in the ward and a separate charge for each one as if it were a real doctor's visit," said one HEW official.)

U.S. Attorney for Kansas Buchele said in a phone interview, "If you have a sore throat or an ingrown toenail, once they find out you have coverage they immediately give you the Big Three-a physical, a medical history, and a complete blood workup. They may not do it on their private patients but you can count on it if the government's paying for it. And in some case, 'complete physical' means being weighed, measured and thumped on the chest, plus a prescription for penicillin for the throat-and the government gets billed for $150."

HEW Secretary Joseph A. Califano Jr., who is trying to build a reputation as a close-fisted administrator, has recently set targets for reducing both the AFDC and Medicaid error rates. Staes that don't will face cuts in federal reimbursements.

Califano is well aware that in a tight-budget era, welfare waste of $4 billion a year is simply not acceptable to Congress and the public. He is also aware that Congress is unlikely to create any national health insurance program until HEW demonstrates that it can get medical waste under control.