WHEN Yahoo banned its employees from working from home in February, the reasons it gave had less to do with productivity than serendipity. “Some of the best decisions and insights come from hallway and cafeteria discussions, meeting new people, and impromptu team meetings,” explained the accompanying memo. The message was clear: doing your best work solo can’t compete with lingering around the coffee machine waiting for inspiration — in the form of a colleague — to strike.

That same day, Google provided details of its new campus in Mountain View, Calif., to Vanity Fair. Buildings resembling bent rectangles were designed, in the words of the search giant’s real estate chief, to maximize “casual collisions of the work force.” Rooftop cafes will offer additional opportunities for close encounters, and no employees in the complex will be more than a two-and-a-half-minute walk away from one another. “You can’t schedule innovation,” he said, as Google knows well, attributing the genesis of such projects as Gmail, Google News and Street View to engineers having fortuitous conversations at lunch.

Silicon Valley is obsessed with serendipity, the reigning buzzword at last month’s South by Southwest Interactive Festival. The term, coined by the British aristocrat Horace Walpole in a 1754 letter, long referred to a fortunate accidental discovery. Today serendipity is regarded as close kin to creativity — the mysterious means by which new ideas enter the world. But are hallway collisions really the best way to stoke innovation?

As Yahoo and Google see it, serendipity is largely a byproduct of social networks. Close-knit teams do well at tackling the challenges in front of them, but lack the connections to spot complementary ideas elsewhere in the company. The University of Chicago sociologist Ronald S. Burt calls these organizational gaps “structural holes.” In a 2004 study of 673 managers at the defense contractor Raytheon, Mr. Burt found that managers who serendipitously bridged such gaps were more likely to generate good ideas (and advance professionally as a result). “This is not creativity born of genius,” he wrote. “It is creativity as an import-export business.” In such cases, serendipity is the spontaneous plugging of these holes, over which good ideas flow.