The following code
\begin{tikzpicture}[auto,node distance=2cm,>=latex]
% Posizionamento manuale dei vertici
\node[circle,draw] (A) at (1,2) {A};
\node[circle,draw] (B) at (3,2) {B};
\node[circle,draw] (C) at (5,2) {C};
\node[circle,draw] (D) at (4,0) {D};
\node[circle,draw] (E) at (0,-1) {E};
\node[circle,draw] (F) at (2,0) {F};
\node[circle,draw] (S) at (-0.5,1) {S};
% Disegno degli archi con pesi
\draw (A) -- node {$2$} (B);
\draw (A) -- node {$2$} (S);
\draw (S) to[out=90,in=120] node[above] {$3$} (B);
\draw (S) -- node {$1$} (F);
\draw (S) -- node {$4$} (E);
\draw (E) -- node {$5$} (F);
\draw (E) to[out=0,in=220] node[above] {$2$} (D);
\draw (F) -- node {$3$} (D);
\draw (C) -- node {$3$} (D);
\draw (C) -- node {$3$} (B);
\draw (B) -- node {$6$} (D);
\draw (B) to[out=90,in=120] node[above] {$1$} (E);
\end{tikzpicture}
produces the following graph:
Upon closer inspection, it is apparent that the edge from B to E overlaps with other edges and the node A. I am seeking guidance on how to reroute this particular edge to the left of nodes S and A, preventing overlap with other edges and nodes. Any assistance on achieving this would be greatly appreciated.


