District of Columbia residents will be confronted by a confusing variety of ballots today as they vote in presidential primaries and a number of local contests and decide whether or not to sanction some forms of gambling here.

All 253,728 registered city voters, regardless of party, are eligible to vote on the proposal to legalize betting on jai alai, dog racing and a city-run numbers game. Democrats, Republicans and Statehood party members will be given additional ballots for their respective party races.

The city's 137 polling places will be open from 7 a.m. to 8 p.m., but persons in line at the precincts at 8 will be allowed to vote.

This primary election is one of the most complicated in recent years, according to city election officials.

For the first time, Democrats and Republicans will have contests listed on both sides of the ballot.

Democrats will receive five ballots, which they must separate and deposit in two different ballot boxes as they leave the polls.

"The ballots are confusing, but I hope the voters read the instructions carefully and ask for assistance in understanding if they need it," city elections administrator Mary Rodgers said.

The ballot maze works this way: DEMOCRATS

In each of the city's eight wards, each Democratic voter will receive a packet of five ballots. These will include three "A" ballots, one for each of the contestants in the Democratic presidential preference primary -- President Jimmy Carter, Sen. Edward M. Kennedy and Lyndon H. Larouche, Jr., former head of the U.S. Labor Party, turned Democrat.

Beneath the names of presidential candidates are the names of the men and women pledged to support a specific candidate's nomination at the Democratic national convention to be held this summer in New York City.

Under Democratic Party rules, a voter cannot cast a ballot for one presidential candidate and vote for delegates pledged to another. Therefore, only one "A" ballot will be marked.

In Wards 1, 2, 6 and 8, voters can select no more than six women and six men convention delegates. In the other four wards, Democrats can select up to seven men and seven women.

On the reverse side of all "A" ballots are the races for D.c. delegate to Congress and the Democratic national committee. All the candidates in these contests are unopposed. In these races, as in all others, voters can select from among the candidates listed, write-in candidates or decide not to cast a vote in particular races.

Ballot "B" contains the races for the at-large and ward members of the local D.C. Democratic state committee, which makes policy for the local party.

Democrats are allowed to vote for up to 12 of the 14 candidates running for the at-large seats.On the flip side of the "B" ballots are the races for the four committee representatives from each ward.

Ballot "C" is the gambling referendum.

As Democratic voters leave the polling place they will separate their five ballots. One "A" ballot and the "B" and "C" ballots will be dropped in one of the two brown cardboard ballot boxes located near the exit. The two unused "A" ballots will be deposited in the second ballot box. REPUBLICANS

GOP party members will have a slightly easier time casting their votes because they are not required to separate the four multi-colored ballots they will receive, Rodgers said. But they do have contests on both sides of some ballots.

Ballot "A" is for the Republican presidential preference contest. Republicans will select from among five names -- Illinois Rep. John B. Anderson and Philip M. Crane, both of whom have dropped out of the race, former CIA director George Bush, California businessman Benjamin Fernandez and perennial aspirant Harold Stassen.

Although Anderson has dropped out of the GOP race to become an independent, votes for him will be counted, Rodgers said.

Under the names of the presidential candidates is a write-in space for D.C. delegate since the Republicans have no formal candidate for that post.

On both sides of Ballot "B" are lists of potential delegates to the Republican national convention to be held in Detroit this summer. Although the candidates are running either uncommitted or in support of a presidential aspirant, GOP voters can select any combination of delegates up to 14.

Ballots cast for delegates supporting Anderson will not be counted, Rodgers said.

Ballot "C" lists alternate convention delegates and here again, any combination up to 14 can be selected.

Ballot "D" is the gambling question.

Republicans also will receive an oversized ballot, called a "bedsheet," containing the two opposing slates fighting for control of the local party. Here any combination of up to 70 votes can be cast.

For Statehood party members there are only two ballots. Ballot "A" is a space to write-in a candidate for congressional delegate.Ballot "B" is the last word of advice from Rodgers.