For years, Maryland elections officials sent the D.C. Board of Elections and Ethics thousands of notices identifying former Washington residents who had recently registered to vote in Maryland so the city could strike them from its voter rolls.

It is a courtesy practiced increasingly by election boards across the nation. However, in this instance city elections workers, lacking guidelines on what to do, sent the notices back to Maryland. D.C. elections officials finally caught the error last August, retrieved 5,000 of the mailed-back notices from Maryland, and struck the names from the rolls.

The episode was indicative of administrative shortcomings that, through years of neglect and a lack of professional management, have given the nation's capital a voter registration and elections system fraught with the potential for disasters.

In the city's Sept. 14 primary, about 20,000 properly registered voters had to cast challenged ballots after their names could not be found on the voter rolls.

When D.C. voters cast their ballots in Tuesday's general election, they will do so in a confused atmosphere of attempted band-aid solutions to massive problems. These solutions came under legal attack last week, but the D.C. Court of Appeals ruled Saturday that the elections board can use them. This means that persons who are not listed on the voter rolls and have no proof of registration may cast regular, unchallenged ballots.

No matter what happens Tuesday, officials say that it will take up to 18 months to correct the voter rolls and get the city's elections office functioning smoothly, and that if immediate action isn't taken to install a strong, professional manager and institute modern management techniques, the process could take longer.

At the heart of the problem, according to national elections experts and key D.C. officials, is a lack of consistent, systematic management that results in failure by the elections office to follow simple, proven methods used successfully by elections boards across the nation.

Interviews with national elections experts and officials who operate efficient elections offices in several jurisdictions, including cities of comparable size to Washington, pinpointed several common methods that District officials concede are not in use here.

The names of dead people are not purged automatically. Registration records are not checked for completeness. Registration applications are not checked against a master card file to avoid duplication. In fact, city officials concede, the master card file is out of date and at least 50,000 cards are inexplicably missing.

The office does not have up-to-date duplicate files alphabetized by precinct and street. Clerks do not consistently double-check information entered in the computer for accuracy. There are no periodic mailings of non-forwardable letters to purge the names of people who move.

Elections officials here also have failed in even the most basic custodial tasks of keeping needed records on hand: for example, the elections office has lost its batches of "voter voted" computer cards for the 1981 election, and therefore has no record of who voted -- a record it is required by law to keep.

"You don't have accountability or integrity in the election system in D.C. , it's a total mess," said Ted Filosofos, who managed the D.C. elections system for a brief time this year.

City officials say that basic data management methods, such as those cited above, have not been used because the city elections office has lacked clear, systematic direction by a professional in the elections field.

The board left the post of executive director of the elections office vacant for more than two years after Marion Barry took office as mayor in January 1979 with a promise to clean up the city's election machinery. Filosofos, a professional, was brought here last spring from Buffalo, but he quit in disgust after five months.

Mayoral troubleshooter David Splitt, who was assigned to take charge of the D.C. elections process four weeks ago in a desperate effort to avoid a repeat of the Sept. 14 primary, says he is implementing only stopgap measures.

"I was asked to come here on short notice," Splitt said. ". . . I'm not going to be able to make recommendations on the broader issues." He said the long-term management problem must be addressed by his successor, as yet unnamed.

The chairman of the city's three-member elections board, Albert J. Beveridge III, appointed by the mayor and confirmed by the City Council in 1979, concedes his elections office is such a mess that the only way out is to void all current registrations and reregister the entire city -- a move the mayor and City Council have resisted because, some elections officials say, they fear that to do so would be to give the appearance of failure.

Some city officials counter that it would do no good to reregister the city without first putting into place an efficient system.

Government officials on all levels disclaim responsibility for the mess. Barry refused five interview requests for this article. His press secretary, Annette Samuels, said the mayor expects the elections board to handle the problem.

But Beveridge's approach has been to set broad policy and let the staff handle details. He is seldom among the first to know when a problem arises. Beveridge says he and other board members did not know how widespread the administrative problems were until the 1981 election -- when thousands of would-be voters were mistakenly dropped from the rolls -- because the board kept out of the day-to-day operations of its own elections office.

When the problems became clear after that election, he said, the board hired Filosofos. Beveridge said the board will seek to hire a new executive director after the Nov. 2 election.

He said that the board has been unable to clear up the mess thus far because "some of these problems are longstanding and it's going to take years to correct them."

Virginia Moye, another board member, says that the basic problem has been that the board has spent much of its time "trying to put out the little fires, trying to take care of things that need to be done right away," a situation she said has largely prevented the board from working on long-term solutions to basic problems.

Meanwhile, the city is going into Tuesday's election on a wing and a prayer with tens of thousands of dead, moved or duplicated names on the 370,000-name voter roll. Filosofos says he thinks the number of such incorrect listings numbers about 125,000; Splitt says he thinks it is around 70,000.

Further, nobody knows the number of legitimate voters whose names will not appear on the official list this time, though Splitt conceded last week that it will number in the thousands.

To avoid an outcry, Splitt, with the approval of the board, has rushed through emergency rules allowing people to vote regular, unchallenged ballots even if their names aren't on the rolls, providing they show some identification and sign an affidavit that they are registered.

On Friday the D.C. Court of Appeals tentatively struck down the emergency rules, but the court reversed itself Saturday after Splitt argued in an affidavit to the court that the rules were necessary for Tuesday's election to run smoothly, and defended their hasty implementation on grounds there was not enough time to schedule public hearings on the matter.

But in a strong dissent Saturday, Judge John W. Kern III said that "this last-minute board action only complicates a long-standing sitution of confusion and errant administration. I would agree . . . that the integrity of the election requires a stay of this last-minute monkeying with the machinery."

Filosofos, asked about the procedure, said, "It takes the integrity out of the election. You might as well open it up to anybody who walks in . . . . It's totally ridiculous."

This controversial move is, in Splitt's words, a "presumption in favor of the voter" and is necessary because the board's records are so bad they can't be trusted. While it may help get the city though Tuesday's election, Splitt concedes it does nothing to solve the deeper management problems in the office.

"You have to use common sense, a management approach, a systems approach," he said.

When Splitt leaves after the election for his old job as the city's curator of documents, the office's 30 workers will once again be without an executive director. While their numbers and budget match cities of comparable size, officials say they are demoralized.

In fairness to city officials, Matthew S. Watson, a former city auditor who studied problems in the elections office and issued a report last spring, noted that the District, because of its special federal status, is unlike most states and cities and does not have a long history of holding elections. The city's first election was in 1956.

Watson noted the city has no "established party organizations and we don't have politicians of experience. Their election is generally the first office they've run for."

The city's general lack of electoral and political experience, according to Watson, has been reflected in a decade-long succession of top elections officials "who knew nothing about elections." Filosofos, schooled in Buffalo's bitterly contested ward politics, was the first professional.

Watson said the elections board here has been "constituted wrong. You don't want your grand theorists. You want people whose hands are dirty, who are intrigued by the numbers."

According to William C. Kimberling of the National Clearinghouse on Election Administration, a federal agency that helps local governments conduct correct and smooth elections, doing the job right is "like launching a rocket . . . . It requires a systems approach and things have to be done at a certain time in a certain way."

Kimberling's office publishes studies and guidebooks and holds seminars that give detailed explanations of how to conduct each step in preparing for a correct, trouble-free election. One guidebook on "Managing Elections" says:

"Election directors, like many other public and private administrators, often fall into a pattern of management by crisis. They find themselves running from crash project to crash project in order to put out whatever fire crops up next. While this style of management makes for an exciting life . . . it can also abbreviate a good life . . . organizations managed by crisis are doomed to ultimate failure."

While District elections workers have attended such seminars, federal elections officials say they seldom see the same person twice and have no sense that the information is properly used. They say they cannot understand why the city elections office continues in a shambles when help is nearby. One offical called the city system's multiple failures "breathtaking."

Montgomery County, while it is not a city with a city's problems, has an election office considered one of the best in the country. Elections administrator Douglas Gernigan said information entered into the computer is checked several times for accuracy -- checks that usually are not made in the D.C. office.

"We have a lot of checks and balances for the simple reason that you don't want duplications on file, or errors," Gernigan said. "These procedures take a lot of time, but it saves you a lot of bad publicity later on."

Baltimore regularly purges names from its voter rolls to keep them current, while systematically adding new registrants after carefully checking to avoid duplicates. Gene Raynor, the city's elections administrator, said if he ran the D.C. elections office, "The first thing I would do is have total reregistration of all residents."

In San Jose, Calif., the precincts are much smaller than they are in the District, making it easier for voters to cast ballots and for election officials to control the process. Often polling places are located in private homes.

"Every election is going to have problems," said George Mann, registrar of voters for Santa Clara County, where San Jose is located. " . . . People get very upset if they think something is interfering with their right to vote. But in an election you are always working under pressure. You need a system that will allow you to run a fairly smooth operation.