<?php
$finalres = Array();
function permut($arr,$result=array()){
	global  $finalres;
	if(empty($arr)){
		$finalres[] = implode(,$result);
	}else{
		foreach($arr as $key => $val){
			$newArr = $arr;
			$newres = $result;
			$newres[] = $val;
			unset($newArr[$key]);
			permut($newArr,$newres);		
		}
	}
}
$givenPerms = Array(,,,,,,,,,,,,,,,,,,,,,,);
$given = Array(,,,);
permut($given);
print_r(array_diff($finalres,$givenPerms));