The Fatal Error Challenge
PHP, score = 289 (17×(7+10))

PHP's built-in functions make it quite easy to do this badly. The following code just shuffles the string until a valid result is obtained:

function f($s){
while(preg_match(
'/(..).*?\1/',$s)
+preg_match('/(.'
.')\1\1/',$s))$s=
str_shuffle(
$s);return $s;}




Benchmarks

Average and maximum execution times calculated using the following code:

$s = 'Mississippi';
$t_total = 0;
$t_max = 0;
for ($i=0; $i&lt;10; $i++) {
  $t0 = microtime(true);
  echo f($s);
  $t = microtime(true) - $t0;
  printf("  %10.7f\n",$t);
  $t_total += $t;
  if ($t &gt; $t_max) $t_max = $t;
}
printf("Avg: %10.7f secs; Max: %10.7f secs\n",$t_total/$i, $t_max);


Results:


Mississippi: Avg:  0.0002460 secs; Max:  0.0005491 secs
Anticonstitutionnellement: Avg:  0.0001470 secs; Max:  0.0002971 secs
Pneumonoultramicroscopicsilicovolcanoconiosis: Avg:  0.0587177 secs; Max:  0.1668079 secs
Donaudampfschiffahrtselektrizitatenhauptbetriebswerkbauunterbeamtengesellschaft*: Avg:  9.5642390 secs; Max: 34.9904099 secs
baaacadaeafbbcbdbebfccdcecfdde†: Avg:  5.0858626 secs; Max:  9.8927171 secs


* I changed ä to a to avoid multi-byte issues
† This was the hardest 30-character string I could come up with. It's actually the first 30 characters of the De Bruijn sequence for k='abcdef' and n=2, with the first 'b' moved to avoid an instant match.