function  [A,b,C]=input_ex1(n,alpha,flag);
% input:  n ... problem size, (m=n+1 constraints)
%	  flag=1 means that the elements in C integers
% output  A ... A contains A_i i=1,...,m rowwise
%	  b ... right hand side
%         C ... symmetric random matrix of order n
% solves: generates input data
%	  We consider a special SDP-problem in standard form, where
%	  A_i=e_i*e_i' i=1,...,m-1 and A_m=ones(n)=:J
%	  b(i)=1 i=1,...,m-1 and b(m)=alpha
%
% call:   [A,b,C]=input_ex1(n,alpha,flag);


       m=n+1; % number of constraints

       % right hand side b

       b=ones(m,1);
       b(m)=alpha;
	
       % matrix A containing the A_i´s

       A=zeros(m,n^2);

       for i=1:m-1;
         A(i,(i-1)*n+i)=1;
       end;
       A(m,:)=ones(1,n^2);

       
       % matrix C
       
       C=rand(n);
       C=C+C';
       C=5*C;

       if flag==1;
         C=round(C)-3*ones(n);
       end;
       