function saveAdjacencyMatrix(A, n, p, decimals, randomSeed)

filename = sprintf('erdos-renyi__n%g_p%0*g__s%04g.txt', n, decimals, p*10^decimals, randomSeed);
fid = fopen(filename, 'wt');
fprintf(fid, '%g\n\n', n);
for i = 1:n
    fprintf(fid, '%s\n', num2str(A(i,:), '%2g') );
end
fclose(fid);
disp(filename);

end