function  s_random = randomization(X_hat,G,n,s_1_p,iter_num, PAMQ)
% Let the optimum solution has the  rank-1 condition
% approximated by Gaussian randomization
%
W = chol(X_hat); %% Cholesky factorization of optimum solution
for ii=1:iter_num  % construct L random vectors 
    s_ter(:,ii)=W'*randn(n,1);
    s_tsst(:,ii)=sign(s_ter(end,ii))*s_ter(1:end-1,ii);
end
for ii=1:n-1
    for jj=1:iter_num
             [temp, index1] = min(MD(ii,:));
             s_ml(ii,1) = SET(index1(ii));

        
        if s_tsst(ii,jj)>=2
            s_oo(ii,jj)=3;
        elseif s_tsst(ii,jj)>=0 & s_tsst(ii,jj)<=2
            s_oo(ii,jj)=1;
        elseif s_tsst(ii,jj)>=-2 & s_tsst(ii,jj)<=0
            s_oo(ii,jj)=-1;
        else
            s_oo(ii,jj)=-3;
        end
    end
end
for ii=1:iter_num
    s_ran(:,ii)=[s_oo(:,ii);1];
    DDH(1,ii)=(s_ran(:,ii)'*G*s_ran(:,ii))/(s_1_p(1,1)^2+s_oo(:,ii)'*s_oo(:,ii));
end
[val1,index1]=max(DDH);
s_random = [s_1_p(1,1)s_oo(:,index1)];