J. Ben Rosen, a pioneer in the area of mathematical programming who helped establish computer science departments at the University of Wisconsin-Madison and the University of Minnesota, died of a heart ailment April 28 at an assisted living facility in San Diego, where he had been living for the past few years. He was 86.

Rosen was born in Philadelphia and earned a bachelor's degree in electrical engineering in 1943 from Johns Hopkins University in Baltimore. During World War II, his first job was working on the Manhattan Project, which developed the first atomic bomb.

"He was quite proud of that," said Barbara Olson of Plymouth, his longtime companion.

Rosen earned a Ph.D. in applied mathematics from Columbia University in 1952 and was a postdoctoral fellow at the Institute for Advanced Study in Princeton, N.J., for three years in the 1950s. As a professor, he worked on the earliest models of the computer called the Johnniac, which was named after renowned mathematician John von Neumann. From 1955 to 1962, he served as head of the Applied Mathematics Department of the Shell Development Co., the research facility of the Shell Oil Co., in Emeryville, Calif. His groundbreaking work on optimization programs focusing on producing the optimum product for the least cost led him to be recognized as one of the leaders in the field of mathematical programming, Olson said.

Rosen served as a visiting professor at Stanford University in Palo Alto, Calif., before he went to Madison and helped found the school's computer science department, said Prof. Olvi Mangasarian.

Rosen arrived at the University of Minnesota in 1971 when the school's computer science department was in its infancy. He headed the department from 1971 to 1981 and was a professor until he retired in 1992. While at the university, he made contributions in large-scale optimization methods using supercomputers built by the Cray Corp., Olson said.

Rosen developed fundamental techniques in areas such as modeling the three-dimensional structure of a protein molecule and eliminating noise from data signals, said Dan Boley, a computer science professor at the University of Minnesota.

Rosen was the originator of the gradient projection method for solving difficult nonlinear programming and was well-known for his work in optimization methods, which are fundamental in many problems in engineering, biology, economics and other sciences, Boley said.

"He was a valuable colleague," Boley added. "He developed a nationally known group in computational science, and many of the 21 doctoral students he supervised went on to distinguished careers."

Rosen, who finished his teaching career as an adjunct professor at the University of California-San Diego, was a budding photographer as a teenager.

At 13, he met Albert Einstein and took a picture of the famous physicist. Rosen kept the picture and a letter he received from Einstein, who was one of his inspirations, Olson said.

Rosen was a Fulbright Scholar in 1968 and spent a year teaching and studying in Israel, said his daughter Lia Lynn Rosen of Albuquerque, N.M.

Rosen liked to travel, attend Minnesota Orchestra concerts and skipper his sailboat on Lake Calhoun. In later years, he enjoyed walks on the beach in California, Lia said.

In addition to Olson and his daughter Lia, Rosen is survived by his ex-wife of 30 years, Harriet, of Olympia, Wash.; another daughter, Susan Rosen of Olympia, Wash.; two sisters, Miriam Geri Rosen of Washington, D.C., and Joy Wolf of San Diego.

A private memorial service will be held May 31 in San Diego.