About a third of the nation's cities will hold mayoral elections on Tuesday, and the questions posed by some of the major contests might have come right out of the soap operas.

Will tough Philadelphia trade in its ex-cop mayor for an ex-prosecutor? Will trendy San Franciso finally elect a woman to the top job? Will battered Cleveland dump the boymayor who presided over its bankruptcy? Is there really a nasty rumor campaign in Salt Lake City, and if so, will it make a difference?

Whatever the ansewers turn out to be, it seems clear that the municipal elections will teach anew an old political lession: If you want to win, it helps to be an incumbent (unless you live in Cleveland).

Exhibit A is San Franciso.

The clear leader in a ten-candidate field is Dianne Feinstein, who was appointed mayor by the board of supervisors last winter after the murder of Mayor George Moscone.

The 46-year-old Feinstein has run for mayor twice before and lost soundly -- partly, some San Franciscans think, because of her sex. This year, though, as the incumbent by appointment, she seems to have won respect for her ability to govern, and holds big leads in all opinion surveys.

Feinstein's strongest challenger is Quentin Kopp, a tough-talking city supervisor (councilman) who appeals mainly to the conservative portion of the electorate.

kopp's best hope is to hold Feinstein below a majority in Tuesday's balloting, thus forcing a Dec. 11 run-off between the two top finishers -- most likely Feinstein and Kopp. This could happen if a third candidate, David Scott, a favorite of the gay community, draws enough liberal votes from Feinstein.

Another incumbent who sems to be sitting pretty is Houston Mayor Jim McConn. He has raised twice as much campaign money as any of his nine challengers and stands far above the rest in opinion polls.

Among those likely to end up in the also-ran column in Houston is leonel J. Castillo, who left a top job in the Carter administration -- he was director of the Immigration and Naturalization Service -- to go home and race. Castillo's campaign has simply failed to catch fire, either with contributors or voters.

Incombency counts in Boston, too, where Mayor Kevin White seems almost sure to win a fourth term, making him the nation's senior big-city mayor. White's victim this time is, once again, State Sen. Joseph Timelty, who challenged White unsuccessfully twice before.

Timilty was an early supporter of long-shot presidential candidate Jimmy Carter in 1976, and had hoped that the Carter connection might help him win this year. But the White House tie has turned out be a neutral factor at best.

Other incumbent mayors who look like safe bets for reelection Tuesday include Democrat William Donald Scaefer in Baltimore, Republican Margaret Hance in Phoenix, Republican William Hudnut in Indianapolis, and Republican Lewis Murphy in Tucson.

In Miami, Democrate Mayor Maurice Ferre, a Puetro Rican who appeals to both Latin and Anglo voters, seems sure to be reelected, thought he may be forced into a runoff if one challenger, Rose Gordon, runs well among Anglos and another, Rudolfo Nodal-tarafa, a Cuban veteran of the Bay of Pigs brigade, drains a lot of Latin votes. If there is a runoff, Ferre will be heavily favored against either opponent.

Incumbency is not such a blessing, however , in Cleveland. Dennis Kucinich, a 33-year-old Democrat who outsed incumbent Ralph Perk two years ago, now seems likely to be outsted himself by Republican George Voinovich, Ohio's lieutenant governor.

Tuesday's races suggest another rule for mayoral success: If you can't be an incumbent, be an ex-congressman.

In Philadelphia, former Democratic representative Bill Green appears far ahead of his mayor challenger, Republican David Marston. Marston, the former U.S. attorney who became famous last year when one of his prosecutorial targets, former Democratic representative Joshua Eilberg, allegedly tried to get him fired, has had little success in cutting Green's lead, in a city where Republican candidates almost never have much success.

A striking thing about the Philadelphia race has been the silence of the outgoing mayor, Frank Rizzo, the raucous former police chief who dominated city politics for the eight years he ran City Hall. Rizzo lost an effort last fall to change the city charter so that he could run again this year, and has had almost nothing to say about the Green-Marston clash.

In Minneapolis, another former Democratic congressman, Don Fraser, who lost a bitter primary race last fall when the tried to move up the Senate, seems fairly certain to move back into the winners' colum. Polls and politicians alike agree that Fraser is ahead of four challengers. Their chief issue in a dull campaign seems to be the complaint that Fraser is probably using the mayoralty as a stepping stone to get back to Congress.

Salt Lake City, in contrast, has a humdinger, an ostensibly "non-partisan" race in which the Republican National Committee has become involved and one candidate has accused the other of spreading malicious rumors.

The GOP decided that incumbent mayor Ted Wilson, a Democrat, could be beaten, and so the party's national orginization poured in money, campaign workers, and polling experts to help Republican challenger Doug Bowers.

But then the media reported that Bowers, the Republican, was being investigated for underpayin his income tas, and Bowers shot back with the charge that these stories were planted by supporters of Wilson, the Democrat.

Whether this tempest will have anything to do with the outcome is considerably less than clear.