Financially troubled Oak Industries Inc., a cable TV programming and equipment concern, has agreed to sell its most profitable unit and a 19.3 percent interest in the company to Allied-Signal Inc. for $175 million cash. At the same time, San Diego-based Oak said it would use proceeds from the Allied-Signal sale to issue stock worth another 21 percent in the company and pay off $230 million in debt.

The transactions would increase the number of Oak shares outstanding to 51.7 million from 30.7 million.

E. E. McNeely, Oak's chairman and chief executive, said he hoped the remaining operations, which have been losing money for the past two years, could begin showing a profit by being relieved of $30 million a year in interest payments on debt.

Allied-Signal, of Morris Township, N.J., will pay $160 million for Oak's materials group, which produces material for printed circuit boards. That segment last year had an operating profit of $28.5 million on sales of $150.1 million. All of Oak's operations last year lost $122.1 million on sales of $333.2 million.

The agreement has been approved by the boards of both companies.