Rearrange characters of a string into a palindrome, if possible
All that is technically required of a palindrome is that exactly one or zero of the character counts are odd and the rest are even. Then from this character count information you can reconstruct all of the palindromic words. Here is some python code to compute this method:

from collections import Counter
from itertools import permutations, repeat

def get_palindromes(word, ignore_case=True):
    if ignore_case:
        word = word.lower()
    char_counts = Counter(word)
    num_odd_counts = sum(int(c % 2 != 0) for c in char_counts.values())
    if num_odd_counts &gt; 1:
        return []
    odd_char = '' if num_odd_counts == 0 else [
        c for char, count in char_counts.items() if count % 2 == 1][0]
    even_chars = [rep_char for char, count in char_counts.items()
                  for rep_char in repeat(char, count / 2) if count % 2 == 0]
    return [perm_word + odd_char + perm_word[::-1]
            for perm_word in set(
                    ''.join(char_perm)
                    for char_perm in permutations(even_chars))]


If there are no palindromes this function will return an empty list, but you can obviously return any value you like in this case.