The cause was a heart attack, according to an announcement from Stanford University, where he taught for many years. His death was announced last month but was not widely reported.

During World War II, mathematicians descended from the ivory tower to mold esoteric theory into practical solutions that helped win the war. Dr. Karlin accelerated this trend after the war by contributing to deeper understandings in fields as diverse as game theory, demographics and inventory management.

Not that he neglected pure mathematics. Dr. Karlin's contributions to the understanding of how random variables are governed by the laws of probability were highly influential. He also added to the study of how mathematical elements are arranged into sets.

In 1973, the National Academy of Sciences honored Dr. Karlin for his lifetime achievements, and, in 1989, he was awarded the National Medal of Science.

The breadth of Dr. Karlin's intellect was apparent in his vow to change his major line of research every seven years to stay fresh and learn new topics. At the age of 65, he helped write what may have been the most important of his 450 scientific papers.

He and Stephen F. Altschul proposed a method for estimating similarities between the known DNA sequence of one organism with that of another. Dr. Altschul and other scientists then used this as the statistical underpinning for a widely used computer program called Blast, which almost instantly makes such comparisons. Blast, which stands for basic local alignment search tool, has been called the Google of biological research.

Dr. Russ Altman, a professor of bioengineering at Stanford, said that Dr. Karlin's most important contribution was helping come up with a way to rank the DNA matches in statistical significance. Thus, when a DNA sequence of a fruit fly and a human match, which they can, it is possible to say that the chances of this being simply a random match are zero, Dr. Altman said.

This method thus becomes a way of studying evolution. At some point, the fruit fly and the human had to have had a common ancestor, Dr. Altman said.

Samuel Karlin was born in Poland on June 8, 1924, and moved with his family to Chicago at the age of 2 months. At 9 or 10, he started working in a store to help with the family's finances, and, at 15, he taught Hebrew.

His father wanted him to become a religious scholar, but Dr. Karlin won a scholarship to the Illinois Institute of Technology, then earned a doctorate in mathematics from Princeton in 1947. After a stint at the California Institute of Technology, he arrived at Stanford as a mathematics and statistics professor in 1956.

At Princeton, he studied with John von Neumann, a father of game theory, the branch of applied mathematics designed to capture behavior in strategic situations. Working for the RAND Corporation while also teaching at Stanford in the 1950s, Dr. Karlin applied game theory to the analysis of games of pursuit and evasion like a dogfight between warplanes. The 10 books he wrote or helped write included one on game theory in 1959.

Dr. Karlin did pioneering work in an area mathematicians call total positivity, in which he delved into the probabilities of an adjacent pair of particles in random motion not hitting each other. This had applications to voting behavior, among other things.

In his later years, Dr. Karlin was more apt to call himself a biologist than a mathematician, although all his biological work was mathematical. He relished poring through genetic data looking for anomalies. Sometimes he found mistakes, as in 2001, when he publicly pointed out that Celera, the biotechnology company, and the University of California, Berkeley, had made many mistakes in spelling out the "genetic letters" of the fruit fly genome.

Other times he found something new and intriguing in data. He often contacted the scientist who had assembled the data and ended up working on a paper with him. One such scientist was his son Kenneth, a chemistry professor at Johns Hopkins University in Baltimore, who cooperated with his father in studying heavy metals in genetic material.

In addition to Kenneth, Dr. Karlin is survived by his wife, Dorit Carmelli; his son Manuel of Portland, Ore.; and his daughter, Anna, of Seattle.

Dr. Karlin guided more than 70 students, regarded as a high number, to their doctorates. He was known for the emotional force, not to mention volume, with which he argued scientific points.

"I would not say he was intellectually gentle," Dr. Altman said.

By DOUGLAS MARTIN

Published: February 21, 2008 © New York Times