Cherry 2000

In the year 2017, the United States has fragmented into postapocalyptic wastelands and limited civilized areas. One of the effects of the economic crisis is a decline in manufacturing, and heavy emphasis on recycling aging 20th-century mechanical equipment. Society has become increasingly bureaucratic and hypersexualized, with the declining number of human sexual encounters requiring contracts drawn up by lawyers prior to sexual activity. At the same time, robotic technology has made tremendous developments, and female androids (or "gynoids") are used as substitutes for wives.
Business executive Sam Treadwell owns a "Cherry 2000" gynoid named Cherry. After Cherry short-circuits during sex, Sam is told by a repairman that she is irreparable. A gynoid dealer tells Sam that "Cherry 2000" gynoids were manufactured in a defunct factory in "Zone 7", a particularly dangerous, lawless area. With Cherry's memory disk, Treadwell hires Edith "E" Johnson, a tough tracker, to guide him to the factory.
As they enter Zone 7, they encounter Lester, a wasteland overlord with deranged subordinates. Edith and Sam enter an underground reservoir occupied by Six-Fingered Jake, an elderly tracker who was Edith's mentor. When Lester's men attack, the three attempt to escape, but Sam is knocked unconscious and taken to a 1950s-styled motel/village run by Lester. He is greeted by his ex-girlfriend, Elaine, who now calls herself Ginger and works for Lester. Ginger tells Sam that he was the only one spared by Lester's men. Lester decides to induct Sam into the group, and Sam goes along. When he witnesses the group sadistically murdering a tracker, he decides to escape. As he escapes Lester's group, Sam runs into Edith and Jake. Jake stays behind to create some distractions, and gives Cherry's memory disk to Edith, though he had earlier led Sam to believe the chip had been lost.
Edith, realizing Sam is a veteran of earlier wars, begins to see him in a new light and have feelings for him. Sam realizes he is attracted to Edith, but feels guilty when he is reminded of Cherry. After fighting off Lester's goons, they continue on to the factory. Edith goes to a brothel/gas station owned by Snappy, a friend of Jake, to borrow his light plane. Snappy betrays them to Lester. Jake is killed, but Edith and Sam escape in the plane.
Sam suggests that they turn around, but Edith is determined to find a Cherry 2000 model so Jake's death will not be meaningless. As they land, Zone 7 is revealed to be actually the ruins of Las Vegas, now a ghost town. The gynoid "factory" is actually a casino called "Pharaoh's Casino". Sam finds a functional Cherry 2000, and activates her with the memory disk.
When Lester's gang finds them, Edith and Sam manage to evade and kill many of his henchmen. Escaping to the plane, the three find that their combined weight prevents takeoff. Edith jumps out, despite Sam rejecting the idea. Sam turns the plane around to help the now-trapped Edith. Sam sends Cherry to get him a Pepsi, then has Edith get aboard. Lester is killed trying to stop them from escaping. Edith and Sam then kiss as they fly away.

Question: How is related Elaine to Sam in the movie?
Answer: Ex-girlfriend