# Given a list mis of subsets of X of the same cardinality, determine # if there is a partition of X into blocks, each of which appear in mis. # If so, assign the partition to args[3]. tight:=proc(mis,X) local i,j,l,new,c,m; if X=mis[1] then assign(args[3],[X]); RETURN(true) fi; m:=nops(mis[1]); for i to nops(mis) do if nops(X)=k0*m then lprint(i,time()) fi; new:=subs({seq(j=NULL,j=mis[i])},[op(i+1..nops(mis),mis)]); new:=map(proc(x,y) if nops(x)=y then x fi end,new,m); if nops({op(map(op,new))})+m=nops(X) and procname(new,X minus mis[i],'c') then assign(args[3],[mis[i],op(c)]); RETURN(true) fi; od; false end: