%% to be compiled with pdflatex

%% edited from halfcircles.tex

\documentclass{amsart}

\usepackage{tikz}

\begin{document}
\thispagestyle{empty}

\centerline{%
  \tikzpicture[outer sep=0pt]

  \path[fill=black!10]
  (0,0) coordinate (P0) arc (180:0:2.5)
  node[midway,above] {$0$} ;

  \path
  foreach \i in {1,...,5} {
    (\i,0) coordinate (P\i)
    +(-1/2,0) coordinate (Q\i)
    node[below] {$\i$} } ;

  \def\HALFCIRCLES{
    % 0/5/{Q1,R15},
    0/5/{R15}, % Q1: bend
    1/5/{R13,R35},
    1/3/{Q2,Q3},
    3/5/{Q4,Q5}}

  \draw[thick]
  (P0) -- (P5)
  foreach \i/\j in \HALFCIRCLES {
    (P\i) arc (180:0:{(\j-\i)/2})
    coordinate[midway] (R\i\j) } ;

  \fill[radius=1pt]
  foreach \i in {0,1,...,5} { (P\i) circle[] } ;

  \draw[blue]
  (0,-1/4) coordinate (SHIFT)
  %% ad hoc bend value
  (R05) +(SHIFT) edge[bend right=40] (Q1)
  foreach \i/\j/\L in \HALFCIRCLES {
    (R\i\j) -- +(SHIFT)
    foreach \E in \L { edge (\E) } } ;

  \fill[blue,radius=1.5pt]
  (R05) circle[]
  foreach \i in {1,...,5} { (Q\i) circle[] } ;

  \node[below=1em/3] at (current bounding box.south) {$(1((23)(45)))$} ;

  \endtikzpicture
} % \centerline
\end{document}

%%%%%%%%

%% png creation (normal size, transparent)

%%% pdflatex halfcircles-2.tex
%%% pdftocairo -png -singlefile -transp halfcircles-2.pdf tmp
%%% magick -define png:exclude-chunk=date,time tmp.png -trim +repage halfcircles-2.png
%%% optipng halfcircles-2.png

%%%% Default resolution of pdftocairo is 150 ppi.

%%%% magick adds white (fallback) background to the transparent image
%%%% and has the convenient option -trim.

%%%% Image size is 301x231.

%% program versions

%%% This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
%%% Document Class: amsart 2017/10/31 v2.20.4
%%% Package: tikz 2020/01/08 v3.1.5b (3.1.5b)

%%% pdftocairo version 0.86.1
%%% ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org
%%% OptiPNG version 0.7.7

%%%%%%%%

%%%% First version:
%%% 2025-11-26

%%%% Latest change:
%%% 2026-03-01 % outer sep=0pt

%%%%%%%%
