min cut for palindrom partitioning