Late in the evening nine days ago, after hours of poring over documents and a series of tense meetings with lawyers about the fate of Community Savings & Loan Inc. and its Equity Programs Investment Corp. real estate empire, Montgomery County Judge Irma S. Raker still had a fundamental question about the companies' ownership:

"Who is the parent and who is the child?" the judge asked the assembled lawyers.

The judge is not the only one to ask the question. Creditors, insurers, government officials and stockholders are wrestling in five courts in three states over EPIC. Meanwhile, thousands of Community S&L depositors wonder when they will see their money again, because the state has taken control of the institution and frozen its deposits.

EPIC -- or at least one part of it -- was in the business of acquiring single-family houses through partnerships with investors seeking tax shelters. There are 20,000 such houses, and mortgages totaling $1.5 billion on them. For the past month, EPIC has not met the mortgage obligations on some of those houses, and two weeks ago the company sought bankruptcy protection for 341 of its partnerships.

While courts may be untangling aspects of the EPIC structure for months, and perhaps years, it so far has emerged as a highly complex, multilayered thatch of dozens of companies -- with interlocking ownership and officers changing titles. Assets sometimes moved among them so fast that even some former EPIC officials said they could not always follow them.

The complex structure has caused regulators and creditors difficulty in determining what EPIC's assets are, and who owns them.

The companies have names like EPIC Holdings, EPIC Securities Inc., EPIC Services Corp., Epicenter Consolidated Ltd., and even Prune Leasing Corp. Sometimes a company name was dropped, only to reemerge years later attached to another business.

A small group of EPIC insiders has owned almost all of the companies, which have been involved in everything from mortgage banking to hot-air balloons. There was a securities marketing company, a property management company, a property sales company, several leasing companies and countless others. Some had assets, while others were shells. Some were parents, some were children, and sometimes they swapped roles.

"It was mind-boggling. At a moment's notice, they'd form five corporations," said one former EPIC official. At meetings where executives were examining organizational charts from a single set of transactions, "There would be 50 boxes, with dotted lines, straight lines. The idea was, 'When in doubt, put it in a corporation.' "

Under the EPIC approach, "You didn't advance by moving up," said another former EPIC employe. "You advanced by having people added under you . . . . Twenty-seven-year-old kids who had been there a couple of years would have half a dozen people working for them."

Money sloshed back and forth among the various EPIC entities. "It was like an old woman with a whole bunch of checking accounts," said one former official. "We used to just sit and laugh . . . . It was so easy to get money transferred" simply by asking another executive.

This former official added that there were occasions -- especially during the latter part of each year when many investors turned to EPIC for tax benefits -- when EPIC entities would find themselves without the cash necessary for a deal. Former officials tell of hurried telephone calls canvassing EPIC offices, sometimes in search of millions of dollars.

Current EPIC officials were unwilling to comment last week. However, a source familiar with the organization said that within EPIC, a high premium was placed on decentralization to give midlevel executives a chance to exercise authority. Even so, "There's no question, maybe we went off the deep end" in setting up so many companies, he said. A lot of the companies "don't do anything."

Another source knowledgable about EPIC and its executives said that what may have seemed to create the impression among some employes of confusion and disorganization was actually the management's way of keeping control of the repidly growing business.

The "organization chart had box after box after box," but it was not designed to confuse, this source said. It allowed managers to keep tabs on the performance of each line of the business, he said.

"If it is broken into discrete component parts, it doesn't let you hide mistakes," he said. Separation allows better cost control and better understanding of each part's activities and results, he added, and "the audit trails are much clearer."

In addition, the complex arrangement of holding companies allowed EPIC's owners to gain certain tax benefits by offsetting the expenses generated by some of the businesses against the income of others, he said. Billman Ran the Show

At the pinnacle was EPIC's founder and, until recently, its top executive and chief stockholder, Tom J. Billman. Former EPIC officials describe him as the only man who completely understood the company in all of its manifestations.

"From beginning to end, it was a one-man show," said one of these officials. "Everything always began and ended with Billman."

Billman conceived of EPIC 10 years ago, and under his direction it grew rapidly -- from approximately 20 employes in 1978, when it was operating out of a town house in Alexandria, to more than 1,100 employes last year.

EPIC was hiring employes as fast as it was buying houses and setting up partnerships. The disaster that struck this summer was, in fact, the climax of a four-year property-buying spree that some former EPIC officials say could not be stopped.

EPIC's growth could be compared to an airplane in flight -- it had to keep moving forward or it would fall. And when the Maryland savings and loan crisis struck, forcing it to stop bringing new investors into its real estate partnerships, it did fall.

Toward the end, EPIC was ravenous in its appetite, commonly swallowing huge chunks of suburban subdivisions that would then be parceled out to independent partnerships in a complex tax-shelter program. In 1984 alone, EPIC set up more than 90 tax-shelter partnerships -- four or five times the volume of even large real estate syndicators -- and acquired $500 million worth of single-family houses for those partnerships.

EPIC's problem was that many of the 20,000 houses it acquired and rented out did not produce sufficient cash.

"It had to keep buying houses to generate fees" to fuel EPIC operations, said one former EPIC official. "It was like Pac-Man."

"There was so much velocity to it, having to raise new money," said another former EPIC employe, who held a high-ranking position in the company. "It had to keep growing indefinitely."

EPIC's atmosphere and overall approach did not suit some of the people who worked there, and many quit or were fired. This has left a reservoir of ex-officials willing to talk about the company if their names are not used. A Single Idea

The immensely complicated EPIC empire sprang from a simple idea conceived 10 years ago by Billman, then a Northern Virginia builder: a way for developers to raise money from their model houses.

Model houses are marketing devices. Builders put them up to show prospective buyers -- who may find it difficult visualizing a finished house from plans -- what they will be getting. Models are often a development's most attractive houses, and they may sell for a top price -- but not until the subdivision is complete.

So the builder puts money into the model at the beginning of the project and does not get it back until the end.

Billman's plan solved that problem.

EPIC put together groups of limited partners to buy the models and lease them back to the builders. The builders got their money back and were willing to pay a premium rent in exchange. The partnerships' investors got a good property and a ready-made tenant, as well as tax benefits -- depreciation, interest and other deductions -- plus potential profits when the house was sold.

"It was a good idea. It worked, and I think it would work still," said another former EPIC employe. But "they tried to push it too far. That's when things started to go sour."

Changes in the tax code during the early 1980s dramatically enlarged the market for the type of tax shelter that EPIC was creating, and EPIC expanded from buying model houses to buying ordinary new houses as well. An EPIC property management arm rented out these houses to tenants for the partnerships.

The tax code has propelled real estate syndication from an obscure and specialized investment into a multibillion-dollar business marketed to middle-class and professional people who want to cut their tax burden. EPIC acted as syndi- cator and general partner in these ventures, and it recruited limited partners as investors.

But while most real estate syndications involve commercial property -- office buildings, shopping centers and the like -- EPIC focused on single-family houses.

Real estate specialists agree that it generally is difficult to make money renting single-family houses because rents usually do not cover mortgage payments and other costs. So most large syndicators stay away from single-family houses.

Billman and his associates, however, thought they had a way to make such syndications work. They did this by buying houses in blocks, and at substantial discounts. They obtained large mortgages on the houses, and these loans, plus money contributed by the limited partners, allowed each partnership to begin with a cash surplus.

Each limited partner put in a total of $25,000 to $40,000, usually paid in quarterly installments over a period of years.

The system would work if the property was not held too long -- the partnerships envisioned a little more than four years -- and if the house increased quickly in value. That would allow the profits from an eventual sale to cover operating deficits and give the investors their money back. Discount Was Key Factor

An example: EPIC might acquire a house that would be worth $100,000 on the open market, but because the developer was eager to sell, the developer gave EPIC a discount of about $20,000. Then EPIC would take out a mortgage for 95 percent of the appraised value, or $95,000.

If the partnership was to sell the house in four to five years for $125,000, say, it could turn a profit. But an ex-EPIC official pointed out that this would be a real appreciation rate of only about 6 to 7 percent a year from the original $100,000 value. "That was do-able," said the former official.

EPIC's mortgage banking company issued the mortgages, and EPIC was able to obtain mortgage insurance for them. This allowed the mortgage banking company, EPIC Mortgage Inc., to sell the mortgages, usually to investors such as savings and loan associations, either outright or as mortgage-backed securities.

EPIC commonly told investors they could expect $2 in tax deductions for every $1 invested, plus the potential for profit in the eventual sale of the houses. The investment proved to be popular with investors.

But, according to former EPIC officials, the investments often did not work out according to plan. In thriving real estate markets, builders did not want to give the large discounts EPIC needed, and in bad markets it was difficult to find tenants or to charge high rents.

So partnerships began to run heavily in the red, and, according to these former officials, the operation could be sustained only through cash generated from new partnerships. In addition, EPIC's houses were not appreciating in value as quickly as EPIC had expected. In some cases, houses decreased in value.

A central failing of EPIC was that it was "built upon the false economic assumption that the houses would appreciate by a significant amount every year," said Douglas Watson, an analyst with Moody's Investors Service. "Economically, it just wasn't adding up."

While most industry observers agreed with the ex-EPIC official who called 6 to 7 percent appreciation in house prices "do-able," EPIC often assumed that the houses would increase in value 10 percent a year, according to an internal company study. Though10 percent price rises were common during much of the 1970s, they have been rare in the 1980s. A source familiar with EPIC said the company did not always project a10 percent appreciation, but instead used a range of projections.

But there has been little or no appreciation in house values in many Texas markets, which are badly overbuilt and where more than 25 percent of EPIC's 20,000 houses are located. Problems Bred Expansion

As the EPIC machine encountered more problems, the wheels had to spin faster. In 1982, 1983 and 1984, EPIC bought more houses and set up more partnerships. Paradoxically, as EPIC's long-term prospects were becoming cloudier, its revenues were climbing, because EPIC-related companies derived various fees from each transaction.

Indeed, 1984 was the biggest year in EPIC's history. It acquired more than $500 million worth of single-family houses on behalf of its partnerships last year, increasing its portfolio by 50 percent.

But despite all the growth, former officials say, the central dilemma remained unresolved: rents on EPIC's houses did not provide enough cash.

The first rumblings of possible collapse occurred last year when the tax reform movement gathered steam. The possibility that tax shelters would become less valuable made the tax shelter plans of EPIC -- like those of many other syndicators -- harder to sell.

EPIC devised what it called "expandable partnerships." In these, EPIC, as the general partner, was entitled to write off 1 percent of the losses on its taxes, and the first set of investors -- the Class A investors -- were entitled to write off 99 percent of the losses for six or nine months. These partnerships were marketed, with considerable success, to people who had encountered an unexpected tax problem and needed a short-term tax shelter.

After the six- or nine-month period had run, a new group, Class B, would buy in for 98 percent of the losses. In theory, this could go on for years.

But this meant that "they would have to round up new investors much more often" than with the four-year arrangements, said one former EPIC employe. It also came at a time when the partnerships from 1980 -- EPIC's first big year -- were maturing and the partners were asking for their money. EPIC had to sell or resyndicate these properties at the time it was rolling over the "expandable partnerships." "So the marketing got much tougher," said the former official. Houses Hard to Sell------

The expectation had been that they would sell the houses owned by the maturing four-year partnerships. But that proved difficult, former officials recall, because the prices that many of these properties could command would not be enough to cover the debt. Some EPIC houses were sold, yielding little or nothing to the investors.

Faced with a virtual sea of unsold houses, EPIC formed EPIC Residential Network Inc. last year to try to market them. Headed by Joel H. Bernstein, a close associate of Billman and a securities expert, ERNI quickly opened dozens of offices across the country.

One of its main marketing efforts focused on seminars designed for potential investors, rather than selling houses to people who would live in them, the more conventional market for single-family houses.

Former EPIC officials remember ERNI as a desperation move -- as one put it, "a last-ditch effort."

Another former employe said that as of February, after millions of dollars in expenses, ERNI had managed to sell only a tiny fraction of the houses. A former ERNI insider said that marketing for EPIC was done through ERNI and not through regular real estate brokerages around the country.

Former officials said ERNI rarely used the local multiple-listing services, the computerized listings that most real estate brokerages tie into in order to offer properties for sale and to find out what is on the market.

Last week, ERNI was shut down in an apparent cost-cutting move by EPIC. Robert L. Sirianni, head of ERNI's regional office in Pittsburgh, called the closing ironic because in the previous six to eight months sales had improved substantially.

The value of the unsold EPIC houses has become crucial in recent days as the company, its creditors and insurers struggle to work out a rescue plan for the EPIC partnerships. If the value of the houses is found to be less than the mortgages on them, there is less chance that an outsider would be interested in trying to save EPIC.

Watson, of Moody's, said last week: "We still don't know the value of the houses. It's safe to say there's a shortfall."

Two former EPIC officials said recently that they could see as early as 1983 that the company was going to have to change its approach if it was to save itself. A subsequent internal EPIC study concluded that the partnerships could be put on a sound economic footing if new partnerships were structured so that investors put up more capital and the projected losses were lowered, which would result in a less than 2-to-1 tax write-off, they said. Lower Write-Offs Rejected

This conclusion was unacceptable to the top management, they said. Management "felt that they couldn't market the partnerships with anything less" than 2 to 1, said one former official.

Events started catching up with EPIC in March, when a crisis swept through Ohio's savings and loan industry. Because many of Maryland's S&Ls, like Ohio's, were state insured -- and because of EPIC's problems -- a top EPIC official at the time recalls feeling that it was inevitable that the problem would reach Community. "We knew it was only a matter of time," the official said.

In May, Maryland's thrift crisis struck, and the state ordered Community, as well as other Maryland S&Ls, to get federal insurance backing or face liquidation. During that process, federal insurance officials took the first long regulatory look at the maze of entities around EPIC, and they saw something they did not like.

On Aug. 8, federal officials told Community's management that they had found "major problems" and that the thrift would have to sever its connection with EPIC before it could get that insurance protection.

The next day, EPIC's board of directors adopted a resolution authorizing company officials to file bankruptcy petitions at some point on behalf of EPIC's partnerships.

On Sept. 5, the night Judge Raker asked her question -- and later ordered Community into state conservatorship -- EPIC lawyers filed for bankruptcy for 341 partnerships.

It is ironic that Billman was not around for this act of the EPIC opera. He had left the company seven months before.

Accounts of his reasons vary, but former and current EPIC employes agree that Billman had decided to "cash out." Sources said that in February, through a series of stock transfers and asset swaps with other top EPIC officials, he removed numerous companies from the EPIC fold and set them up under a holding company of his own called called Crysopt.

Another source familiar with EPIC said Billman still has an interest in the viability of EPIC.

According to a current official at EPIC, Billman retains partial ownership in EPIC Realty Services Inc., the firm that manages the 20,000 houses and collects the rents on behalf of the partnerships. On Tuesday, a federal bankruptcy judge gave Maryland officials control of that rental income, which amounts to millions of dollars and is one of the few money streams still flowing in the EPIC companies.

As of today, Billman, one source said, is again "on his entrepreneurial way."