SAN FRANCISCO --

Samsung

is the top dog in the market for flash memory chips, but the company wears an uncomfortable leash that requires it to pay hefty fees to

SanDisk

(SNDK)

.

As the current intellectual property licensing agreement between the two firms nears its expiration date, there are signs that the South Korean chipmaker may be ready to wiggle out of its costly collar.

Last month, Samsung tried to resolve the situation by buying SanDisk, and its trove of patents, outright.

The acquisition offer was rebuffed and rescinded, though many

investors expect Samsung will eventually come back with a new bid

to buy SanDisk -- otherwise, Samsung will need to renew its costly IP license with SanDisk by August 2009.

But there's a third path that's much vaguer and potentially much riskier for each company and its shareholders. Option C entails Samsung bypassing a SanDisk license for flash memory altogether.

As the world's No.1 producer of flash memory, Samsung cannot afford to put its business at risk on a legal gambit. Given some of the changes in the flash memory business and in the legal landscape though, Samsung may have a better chance of fighting the license than in the past.

"That would clearly lead to litigation," says Cowen and Company analyst Daniel Berenbaum. "But certainly Samsung could take its chances." Cowen and Company makes a market in SanDisk shares.

According to most estimates, Samsung gives SanDisk about $400 million a year in royalty payments related to flash memory technology (the exact amount is confidential) - an annuity that bolsters SanDisk's bottom line but that Samsung would understandably like to get out of paying.

What's more, the royalty rate Samsung pays is believed to be relatively rich - as high as 4%, according to Berenbaum's calculations, vs. the 2% rate that legal experts say is more typical in semiconductor licenses.

That may be because the agreement was drafted seven years ago, before the flash business became the $14 billion market it is today.

Flash memory chips are at the heart of today's consumer electronic gadgets like cell phones, digital cameras and

Apple's

(AAPL) - Get Report

iPod. The chips' ability to retain data even when electrical power has been shut off make them an ideal means of storing digital music, video and photos in portable, handheld devices.

The question is whether Samsung can produce flash chips without infringing SanDisk's patents.

Back in 1997, the answer was a resounding no. The U.S. International Trade Commission went as far as barring Samsung from selling flash chips in the U.S. that year, a ruling that compelled Samsung to settle with SanDisk and sign a licensing deal.

But according to some analysts, the rapid-pace of semiconductor innovation means the balance of power may have changed even since 2002, the last time the two firm's settled their IP disputes.

One of Samsung's key strengths is its ability to continually improve the process by which it manufactures semiconductors in large volumes, says Bob Witkow, a consultant who has worked with all the major flash memory firms.

"If every once in a while they improve the process and file a patent on it, then later on in

litigation discovery it's something" that they can use to strengthen their hand, says Witkow.

Meanwhile, some of SanDisk's key patents that won it the injunction in 1997 are getting long in the tooth.

According to a search of U.S. Patent and Trademark Office records, one of SanDisk's fundamental patents was granted in 1992, which means it should become part of the public domain in 2009, when its 17-year exclusivity period expires. Other patents of SanDisk's may be covered by the PTO's subsequent policy extending exclusivity to a 20-year period, but those patents might still prove too old to last through the duration of the next seven-year licensing pact between the two companies.

Of course, the real value of the next licensing deal will revolve around fresher patents, involving technology for storing 3-bits of data per cell and 4-bits of data per cell on a flash memory chip.

Here, SanDisk has once again taken the lead and collected much of the relevant intellectual property. Earlier this year, SanDisk began producing 3-bit per cell flash chips, which it refers to as X3 technology.

Chips that store 3-bits of data per cell, as opposed to the 2-bits or a single-bit of data storage found in most versions of flash memory today, allow a producer to significantly lower the cost per bit of manufacturing flash memory chips - a huge advantage in a market in which having the lowest cost can mean the difference between a profitable enterprise and a money-losing operation.

SanDisk is also hard at work developing a version of flash memory that stores 4-bits per cell, through its

$1.5 billion acquisition of Israel's M-Systems in 2006

.

But Samsung has not been standing still. The company is also believed to be working on its own versions of 3-bit and 4-bit flash memory (in fact, Samsung once had a deal developing 4-bit flash memory with M-Systems, back when M-Systems was still an independent company).

And it's worth noting that there are several venture-backed start-up companies developing technology related to 3-bit and 4-bit flash memory, such as Anobit and Densbits. A couple of small acquisitions by Samsung could bolster its own arsenal of intellectual property.

"There are probably some ways you can get around

SanDisk and not use them, but it all comes down to the competiveness," says Forward Insight's Gregory Wong, an analyst who specializes in flash technology.

In other words, the legal issues are only half the challenge. SanDisk's flash technology is generally considered the best in the business, says Wong. So going with a home-cooked version might save Samsung some licensing fees, but leave it with an inferior product.

"In the end all of the vendors can do 3-bit per cell, it's just in terms of performance and cost, how do they stack up against each other?" Wong says.

If Samsung does attempt to forego a SanDisk license and take its chances in court, it can draw inspiration from some of the flash memory firms that have dealt with SanDisk in recent years.

Intel

(INTC) - Get Report

entered the NAND flash business in 2005, through a joint venture with

Micron

(MU) - Get Report

. The company is believed to have a cross license with SanDisk that does not entail royalty payments thanks to Intel's own stockpile of patents relating to a type of flash known as NOR flash memory.

ST Microelectronics

(STM) - Get Report

, which also owns a number of flash patents, has been engaged in IP litigation with SanDisk for at least four years, with neither side having completely prevailed yet.

Changes in the legal playing field may also embolden Samsung. Preliminary injunctions - court orders which bar an alleged patent infringer from selling its wares before a trial begins - are not granted as readily in federal district court as in years past, say some lawyers.

"More judges are viewing money damages

granted at the end of a trial to be sufficient to take care of any harm caused to the plaintiff," says John Ferrell, a partner at Silicon Valley law firm Carr & Ferrell.

"I think this dispute has been going on for so long, that from a preliminary injunction standpoint, the judges are wary to the argument that there's irreparable harm," Ferrell says. "After so many years of litigation between Samsung and SanDisk, the view is they'll be able to find some way to pay money damages."

With the injunction option more difficult to get, both firms undoubtedly are considering the costs of legal confrontation. That said, SanDisk won its past injunction not in federal district court, but at the ITC.

It's clear though, that many of the rules of engagement have changed dramatically since the last time the two chipmakers tangled. Whatever happens, the next fight should Samsung choose to wage it will provide plenty of fireworks, and plenty of work for lawyers.