Tikz edges drawn by foreach do not scale
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.5] % problem <---
\tikzstyle{every node}=[draw,circle,fill=black,minimum size=4pt,
inner sep=0pt]
\node (a) at (0,0) {};
\node (b) at (0,1) {};
\node (c) at (0,2) {};
\node (d) at (0,3) {};
\node (e) at (1,1) {};
\node (f) at (1,2) {};
\foreach \x in {0,1,2,3}
\foreach \y in {1,2}
\draw (0, \x) -- (1, \y);
\end{tikzpicture}
\begin{tikzpicture}[scale=1.5] % problem <---
\tikzstyle{every node}=[draw,circle,fill=black,minimum size=4pt,
inner sep=0pt]
\node (a) at (0,0) {};
\node (b) at (0,1) {};
\node (c) at (0,2) {};
\node (d) at (0,3) {};
\node (e) at (1,1) {};
\node (f) at (1,2) {};
\foreach \x in {0,1,2,3}
\foreach \y in {1,2}
\draw (0, \x) -- (1, \y);
\end{tikzpicture}
\end{document}
Just shorter code and correct syntax for defining nodes style. For exercise.
\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.5]% <--- scaling is not problem
\tikzset{every node/.style = {circle, fill=black, minimum size=4pt, % <---
inner sep=0pt, outer sep=0pt}}
\foreach \i in {0,1,2,3}
\foreach \j in {1,2}
{
\draw[red] (0,\i) node {} -- (1,\j) node {};
}
\end{tikzpicture}
\end{document}
Edit: In the case, if like to have named nodes, just add names to nodes. For example:
\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=0.5]% <--- scaling is not problem
\tikzset{
every node/.style = {circle, fill=black, minimum size=4pt,
inner sep=0pt, outer sep=0pt}
}
\foreach \i in {0,1,2,3}
\foreach \j in {1,2}
{
\draw[red] (0,\i) node (a\i) {} -- (1,\j) node (b\j) {};
}
\draw[blue] (a0) -- (a1);
\end{tikzpicture}
\end{document}