1. A method for operating a memory, comprising: receiving an m unit data pattern to be stored in a group of N memory cells, each memory cell of the group being programmable to L program states, wherein L is a number of program states used to store m/N units of data per memory cell; assigning a particular one of a number of program state combinations of the group of N memory cells of the group of N memory cells to a corresponding m unit data pattern according to a cost-based mapping; wherein the cost-based mapping includes an associated cell frame having a length N and wherein the cost-based mapping comprises: an index corresponding to each one of the respective number of program state combinations; and a total cost corresponding to each one of the respective number of program state combinations, and wherein the total cost is a sum of costs corresponding to the respective program states of the respective number of program state combinations, with each of the L program states having a different cost corresponding thereto; wherein, for those of the number of program state combinations having a same total cost, the index corresponding to the respective program state combinations is based on a cost comparison between program states associated with a first portion of the cell frame and program states associated with a second portion of the cell frame.