A Pakistani pedestrian walks past umbrellas during a rainy day in Islamabad on March 28, 2014. 
A Pakistani pedestrian walks past umbrellas during a rainy day in Islamabad on March 28, 2014.  - 
Listen To The Story

This week's show on algorithms beings with a story about rain.

In New York City, when it rains, something interesting happens. The commuters who are prepared pop open their umbrellas. The others, who are damp and cold, see an instant market appear in front of them.

You may have seen this happen where you live. It starts to rain, people need umbrellas, and BOOM, vendors react.

And New York shop owner Randy Thomas makes the decision to move them to the front of his store. This is a pretty straightforward market phenomenon - you increase supply to meet demand.

But it also includes the element of timing. That's when it becomes a little more sophisticated. As simple as it seems, the umbrella market is driven by an algorithm of sorts, calculated in real time. A series of decisions based on changing variables.

And some vendors ... Randy says he's not one of them .. Will even use a moment like this ... To jack up the prices.

Decisions about supply, demand, external variables, timing, and price. All made by a human. In one small store.

But that decision tree ... That's basically what a company like Amazon or Orbitz, does ... Just on a huge scale. Mountains of data, thousands of servers.

And that model helps determine what you buy, for how much, and when. Algorithms can feel like the secret sauce for online commerce ... But they were once used primarily by massive corporations.

Guru Harihan, who used to work at Amazon, now runs a company that makes algorithms accessible to lots of businesses. It's called Boomerang Commerce, and he spoke with Lizzie O'Leary to explain how it helps his clients sell products, increase their profits and compete.

Follow Marketplace Weekend Staff at @MarketplaceWknd