function r = BSC(c, p)
	
	r = c;
	
	for i = 1:numel(c)
		if rand < p
			r(i) = 1 - r(i);
		end
	end
	
end
