function [y_map pos] = map_y_to_edge(G_vector,num_graph,y)
y_map = zeros(num_graph,4);
pos = zeros(num_graph,1);
for i = 1:num_graph
    y_edge = y(G_vector(i,:));
    pos_temp = 2*y_edge(1) + y_edge(2) + 1; 
    pos(i) = (i-1)*4+pos_temp;
    y_map(i,pos_temp) = 1; 
end
