Contentsفهرست
- Greedy dominating setاحاطهگر حریصانه
- Greedy total dominating setاحاطهگر کل حریصانه
- Connected dominating set (greedy growth)احاطهگر همبند (رشد حریصانه)
- Paired dominating set (greedy pairs)احاطهگر جفتی (جفتهای حریصانه)
- 2-dominating set (greedy)۲-احاطهگر (حریصانه)
- Roman domination from a greedy dominating setاحاطه رومی از روی احاطهگر حریصانه
- Vertex cover: 2-approximation by a maximal matchingپوشش رأسی: تقریب ۲ با تطابق ماکسیمال
- Greedy maximal independent set (smallest degree first)مجموعه مستقل ماکسیمال حریصانه (کمترین درجه اول)
- Greedy independent dominating set (largest degree first)احاطهگر مستقل حریصانه (بیشترین درجه اول)
- Exact answers (bit masks, up to 20 vertices)جواب دقیق (ماسک بیتی، تا ۲۰ رأس)
- Domatic partitionافراز دامنهای
- Checking your selectionبررسی انتخاب شما
- Unit disk graphsگراف دیسک واحد
- Reading Ipe filesخواندن فایلهای Ipe
Printable versions of this page, typeset with LaTeX: PDF (English), PDF (Persian), and the sources .tex (English), .tex (Persian, XeLaTeX with xepersian).نسخههای قابل چاپ این صفحه که با LaTeX صفحهآرایی شدهاند: PDF (فارسی) و PDF (انگلیسی)، و فایلهای مبدأ .tex (فارسی، XeLaTeX با xepersian) و .tex (انگلیسی).
Notationنمادگذاری
Throughout, \(G=(V,E)\) is a simple undirected graph with \(n=|V|\) vertices and \(m=|E|\) edges. \(N(v)\) is the set of neighbors of \(v\), \(N[v]=N(v)\cup\{v\}\), and for a set \(X\) we write \(N[X]=\bigcup_{v\in X}N[v]\). \(\Delta\) and \(\delta\) are the maximum and minimum degree, and \(H(k)=\sum_{i=1}^{k}1/i\le \ln k+1\) is the harmonic number. The parameters computed by the lab are \(\gamma\) (domination), \(\gamma_t\) (total), \(\gamma_c\) (connected), \(i\) (independent domination), \(\gamma_{pr}\) (paired), \(\gamma_{\times 2}\) (\(2\)-domination), \(\gamma_p\) (perfect), \(\alpha\) (independence), \(\beta\) (vertex cover), \(\gamma_R\) (Roman) and \(d\) (domatic number); see [11]. These problems are NP-hard on general graphs (for the classical ones see [8]), which is why the lab uses heuristics for large graphs and exhaustive search for small ones.
در سراسر این صفحه \(G=(V,E)\) یک گراف ساده و بدون جهت با \(n=|V|\) رأس و \(m=|E|\) یال است. \(N(v)\) مجموعهی همسایههای \(v\) و \(N[v]=N(v)\cup\{v\}\) است و برای مجموعهی \(X\) مینویسیم \(N[X]=\bigcup_{v\in X}N[v]\). \(\Delta\) و \(\delta\) بیشینه و کمینهی درجهاند و \(H(k)=\sum_{i=1}^{k}1/i\le \ln k+1\) عدد هارمونیک است. پارامترهایی که صفحه محاسبه میکند عبارتاند از \(\gamma\) (احاطهگری)، \(\gamma_t\) (کل)، \(\gamma_c\) (همبند)، \(i\) (احاطهگری مستقل)، \(\gamma_{pr}\) (جفتی)، \(\gamma_{\times 2}\) (۲-احاطهگری)، \(\gamma_p\) (کامل)، \(\alpha\) (استقلال)، \(\beta\) (پوشش رأسی)، \(\gamma_R\) (رومی) و \(d\) (عدد دامنهای)؛ تعریفها در [11] آمده است. این مسئلهها در گرافهای کلی NP-سختاند (برای مسئلههای کلاسیک نگاه کنید به [8])؛ برای همین صفحه روی گرافهای بزرگ از روشهای ابتکاری و روی گرافهای کوچک از جستوجوی کامل استفاده میکند.
1. Greedy dominating setاحاطهگر حریصانه
A vertex \(v\) covers the set \(N[v]\), so finding a dominating set is a set cover problem on the universe \(V\). The greedy rule repeatedly takes the vertex that covers the largest number of vertices that are not covered yet.
هر رأس \(v\) مجموعهی \(N[v]\) را پوشش میدهد؛ پس پیدا کردن مجموعهی احاطهگر همان مسئلهی پوشش مجموعهای روی مجموعهی \(V\) است. قاعدهی حریصانه هر بار رأسی را برمیدارد که بیشترین تعداد رأسِ هنوز پوششنیافته را پوشش بدهد.
Input: graph \(G=(V,E)\) Output: a dominating set \(S\)
ورودی: گراف \(G=(V,E)\) خروجی: یک مجموعهی احاطهگر \(S\)
Algorithmالگوریتم 1 Greedy-Dominating-Set
- \(S\gets\emptyset\); \(C\gets\emptyset\) ▷ \(C\) = covered vertices
- while \(C\neq V\) do
- pick \(v\) maximizing \(|N[v]\setminus C|\)
- \(S\gets S\cup\{v\}\); \(C\gets C\cup N[v]\)
- return \(S\)
Analysisتحلیل
- Correctness. While some vertex is uncovered, that vertex itself has gain at least \(1\), so every round covers a new vertex and the loop ends with \(C=V\), i.e. \(S\) is dominating.درستی. تا وقتی رأسی پوششنیافته باشد، خودِ همان رأس دستکم ۱ سود دارد؛ پس هر دور رأس تازهای پوشش میدهد و حلقه با \(C=V\) تمام میشود، یعنی \(S\) احاطهگر است.
- Time. At most \(n\) rounds, each scanning all vertices and their neighbors: \(O(n(n+m))\).زمان. حداکثر \(n\) دور و در هر دور بررسی همهی رأسها و همسایههایشان: \(O(n(n+m))\).
- Guarantee. This is the greedy algorithm for set cover with sets \(N[v]\) of size at most \(\Delta+1\), hence \(|S|\le H(\Delta+1)\,\gamma(G)\le(\ln(\Delta+1)+1)\gamma(G)\) [14, 15, 1].تضمین. این همان الگوریتم حریصانهی پوشش مجموعهای با مجموعههایی \(N[v]\) به اندازهی حداکثر \(\Delta+1\) است؛ پس \(|S|\le H(\Delta+1)\,\gamma(G)\le(\ln(\Delta+1)+1)\gamma(G)\) [14, 15, 1].
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-Dominating-Set}\label{alg:a0}
\begin{algorithmic}[1]
\Require graph $G=(V,E)$
\Ensure a dominating set $S$
\State $S\gets\emptyset$;\ $C\gets\emptyset$ \Comment{$C$ = covered vertices}
\While{$C\neq V$}
\State pick $v$ maximizing $|N[v]\setminus C|$
\State $S\gets S\cup\{v\}$;\ $C\gets C\cup N[v]$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}2. Greedy total dominating setاحاطهگر کل حریصانه
In a total dominating set every vertex, including those in \(S\), needs a neighbor in \(S\). A vertex therefore covers only its open neighborhood \(N(v)\), and the greedy idea is again set cover. If some vertex has no neighbor, no total dominating set exists [13].
در احاطهگر کل هر رأس، حتی رأسهای خود \(S\)، باید همسایهای در \(S\) داشته باشد؛ پس هر رأس فقط همسایگی باز \(N(v)\) را پوشش میدهد و ایدهی حریصانه باز هم پوشش مجموعهای است. اگر رأسی همسایه نداشته باشد، احاطهگر کل وجود ندارد [13].
Input: graph \(G\) Output: a total dominating set, or a message that none exists
ورودی: گراف \(G\) خروجی: یک احاطهگر کل، یا پیامی که چنین مجموعهای نیست
Algorithmالگوریتم 2 Greedy-Total-Dominating-Set
- \(S\gets\emptyset\); \(C\gets\emptyset\)
- while \(C\neq V\) do
- pick \(v\) maximizing \(|N(v)\setminus C|\)
- if \(|N(v)\setminus C|=0\) then ▷ some vertex has no neighbor
- return “no total dominating set”
- \(S\gets S\cup\{v\}\); \(C\gets C\cup N(v)\)
- return \(S\)
Analysisتحلیل
- Correctness. A vertex \(u\) is covered by \(v\) exactly when \(u\in N(v)\), so \(C=V\) means that every vertex has a neighbor in \(S\).درستی. رأس \(u\) دقیقاً وقتی با \(v\) پوشش مییابد که \(u\in N(v)\) باشد؛ پس \(C=V\) یعنی هر رأس همسایهای در \(S\) دارد.
- Time. \(O(n(n+m))\).زمان. \(O(n(n+m))\).
- Guarantee. Set cover with sets of size at most \(\Delta\), so \(|S|\le H(\Delta)\,\gamma_t(G)\le(\ln\Delta+1)\gamma_t(G)\) [1].تضمین. پوشش مجموعهای با مجموعههایی به اندازهی حداکثر \(\Delta\)؛ پس \(|S|\le H(\Delta)\,\gamma_t(G)\le(\ln\Delta+1)\gamma_t(G)\) [1].
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-Total-Dominating-Set}\label{alg:a1}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure a total dominating set, or a message that none exists
\State $S\gets\emptyset$;\ $C\gets\emptyset$
\While{$C\neq V$}
\State pick $v$ maximizing $|N(v)\setminus C|$
\If{$|N(v)\setminus C|=0$} \Comment{some vertex has no neighbor}
\State \Return \textrm{``no total dominating set''}
\EndIf
\State $S\gets S\cup\{v\}$;\ $C\gets C\cup N(v)$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}3. Connected dominating set (greedy growth)احاطهگر همبند (رشد حریصانه)
Start from a vertex of maximum degree. At each step add a vertex that is already dominated, i.e. adjacent to \(S\), and that dominates the most new vertices. Because every new vertex touches \(S\), the induced subgraph \(G[S]\) stays connected. If no such vertex exists before everything is dominated, \(G\) is disconnected. Guha and Khuller [9] analyse this kind of greedy growth: they show that the naive rule can perform badly, and that a variant which also looks at pairs of vertices (a dominated vertex together with a white neighbor) achieves \(2(1+H(\Delta))\). The lab runs the simple rule, so no approximation ratio is claimed for it.
از رأسی با بیشترین درجه شروع میکنیم. در هر گام رأسی را اضافه میکنیم که از قبل احاطه شده باشد (یعنی به \(S\) وصل است) و بیشترین رأس تازه را احاطه کند. چون هر رأس تازه به \(S\) وصل است، زیرگراف القایی \(G[S]\) همبند میماند. اگر پیش از احاطهشدن همهی رأسها چنین رأسی پیدا نشود، \(G\) ناهمبند است. گوها و خولر [9] این نوع رشد حریصانه را بررسی کردهاند: آنها نشان میدهند قاعدهی ساده میتواند بد عمل کند، و گونهای که جفت رأسها را هم در نظر میگیرد (یک رأس احاطهشده همراه با یک همسایهی سفید) ضریب \(2(1+H(\Delta))\) میدهد. صفحه همان قاعدهی ساده را اجرا میکند، پس برایش ضریب تقریبی ادعا نمیشود.
Input: connected graph \(G\) Output: a connected dominating set \(S\)
ورودی: گراف همبند \(G\) خروجی: یک مجموعهی احاطهگر همبند \(S\)
Algorithmالگوریتم 3 Greedy-CDS
- \(v\gets\) vertex of maximum degree; \(S\gets\{v\}\); \(C\gets N[v]\)
- while \(C\neq V\) do
- pick \(u\in C\setminus S\) maximizing \(|N(u)\setminus C|\)
- if \(|N(u)\setminus C|=0\) then ▷ \(G\) is disconnected
- return “disconnected”
- \(S\gets S\cup\{u\}\); \(C\gets C\cup N[u]\)
- return \(S\)
Analysisتحلیل
- Correctness. \(u\in C\setminus S\) is adjacent to a vertex of \(S\), so \(G[S\cup\{u\}]\) is connected whenever \(G[S]\) is; the final set is dominating because \(C=V\).درستی. رأس \(u\in C\setminus S\) به رأسی از \(S\) وصل است؛ پس اگر \(G[S]\) همبند باشد، \(G[S\cup\{u\}]\) هم همبند است. مجموعهی نهایی احاطهگر است چون \(C=V\).
- Time. \(O(n(n+m))\).زمان. \(O(n(n+m))\).
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-CDS}\label{alg:a2}
\begin{algorithmic}[1]
\Require connected graph $G$
\Ensure a connected dominating set $S$
\State $v\gets$ vertex of maximum degree;\ $S\gets\{v\}$;\ $C\gets N[v]$
\While{$C\neq V$}
\State pick $u\in C\setminus S$ maximizing $|N(u)\setminus C|$
\If{$|N(u)\setminus C|=0$} \Comment{$G$ is disconnected}
\State \Return \textrm{``disconnected''}
\EndIf
\State $S\gets S\cup\{u\}$;\ $C\gets C\cup N[u]$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}4. Paired dominating set (greedy pairs)احاطهگر جفتی (جفتهای حریصانه)
A paired dominating set is a dominating set whose induced subgraph has a perfect matching [12]. Take a vertex \(u\) that is not dominated yet, pair it with the neighbor \(w\) that covers the most new vertices, and add both. Each pair is an edge, so the chosen pairs form a perfect matching of \(G[S]\) by construction. A vertex without neighbors makes the problem unsolvable.
احاطهگر جفتی یک مجموعهی احاطهگر است که زیرگراف القاییاش تطابق کامل دارد [12]. رأس \(u\) را که هنوز احاطه نشده برمیداریم، آن را با همسایهی \(w\) جفت میکنیم که بیشترین رأس تازه را پوشش میدهد و هر دو را اضافه میکنیم. هر جفت یک یال است؛ پس جفتهای انتخابشده بهطور ساختاری یک تطابق کامل برای \(G[S]\) میسازند. رأس بدون همسایه مسئله را بیجواب میکند.
Input: graph \(G\) Output: a paired dominating set, or a message that none exists
ورودی: گراف \(G\) خروجی: یک احاطهگر جفتی، یا پیامی که چنین مجموعهای نیست
Algorithmالگوریتم 4 Greedy-Paired-Dominating-Set
- \(S\gets\emptyset\); \(C\gets\emptyset\)
- while \(C\neq V\) do
- \(u\gets\) any vertex of \(V\setminus C\)
- if \(N(u)=\emptyset\) then
- return “no paired dominating set”
- \(w\gets\) neighbor of \(u\) maximizing \(|N[w]\setminus C|\)
- \(S\gets S\cup\{u,w\}\); \(C\gets C\cup N[u]\cup N[w]\)
- return \(S\) ▷ the edges \(uw\) form a perfect matching of \(G[S]\)
Analysisتحلیل
- Correctness. \(C=V\) at the end, so \(S\) dominates, and \(G[S]\) contains the disjoint edges \(uw\) that cover \(S\).درستی. در پایان \(C=V\) است؛ پس \(S\) احاطهگر است و \(G[S]\) شامل یالهای مجزای \(uw\) است که همهی \(S\) را میپوشانند.
- Time. \(O(n(n+m))\). The result is always valid; no approximation ratio is claimed for this heuristic. For graphs without isolated vertices \(\gamma\le\gamma_{pr}\le2\gamma\) [12].زمان. \(O(n(n+m))\). جواب همیشه معتبر است؛ برای این روش ابتکاری ضریب تقریبی ادعا نمیشود. برای گرافهای بدون رأس منزوی \(\gamma\le\gamma_{pr}\le2\gamma\) [12].
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-Paired-Dominating-Set}\label{alg:a3}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure a paired dominating set, or a message that none exists
\State $S\gets\emptyset$;\ $C\gets\emptyset$
\While{$C\neq V$}
\State $u\gets$ any vertex of $V\setminus C$
\If{$N(u)=\emptyset$}
\State \Return \textrm{``no paired dominating set''}
\EndIf
\State $w\gets$ neighbor of $u$ maximizing $|N[w]\setminus C|$
\State $S\gets S\cup\{u,w\}$;\ $C\gets C\cup N[u]\cup N[w]$
\EndWhile
\State \Return $S$ \Comment{the edges $uw$ form a perfect matching of $G[S]$}
\end{algorithmic}
\end{algorithm}5. 2-dominating set (greedy)۲-احاطهگر (حریصانه)
In a \(2\)-dominating set every vertex outside \(S\) has at least two neighbors in \(S\) [6]. For each vertex we count how many neighbors it is still missing, and at each step we add the vertex that removes the most missing neighbors: its own need disappears, and every neighbor outside \(S\) that still needs help gets one step closer.
در یک ۲-احاطهگر هر رأس بیرون \(S\) دستکم دو همسایه در \(S\) دارد [6]. برای هر رأس «کمبود» را میشماریم و در هر گام رأسی را اضافه میکنیم که بیشترین کمبود را برطرف کند: کمبود خودش صفر میشود و هر همسایهی نیازمندِ بیرون \(S\) یک واحد کمتر کمبود دارد.
Input: graph \(G\) Output: a \(2\)-dominating set \(S\)
ورودی: گراف \(G\) خروجی: یک ۲-احاطهگر \(S\)
Algorithmالگوریتم 5 Greedy-2-Dominating-Set
- \(S\gets\emptyset\) ▷ \(\mathrm{def}(v)=0\) if \(v\in S\), else \(\max\{0,\,2-|N(v)\cap S|\}\)
- while \(\sum_{v}\mathrm{def}(v)>0\) do
- pick \(x\notin S\) maximizing \(\mathrm{def}(x)+|\{u\in N(x)\setminus S:\mathrm{def}(u)>0\}|\)
- \(S\gets S\cup\{x\}\)
- return \(S\)
Analysisتحلیل
- Correctness. The loop stops only when every vertex has \(\mathrm{def}=0\), which is exactly the definition. It terminates because adding any vertex with positive gain lowers \(\sum\mathrm{def}\) by at least \(1\).درستی. حلقه فقط وقتی تمام میشود که کمبود هر رأس صفر شده باشد، و این دقیقاً همان تعریف است. حلقه تمام میشود چون افزودن هر رأسِ با سود مثبت \(\sum\mathrm{def}\) را دستکم ۱ کم میکند.
- Time. Polynomial: at most \(n\) rounds, each looking at every vertex and its neighbors. No approximation ratio is claimed.زمان. چندجملهای: حداکثر \(n\) دور و در هر دور بررسی همهی رأسها و همسایههایشان. ضریب تقریبی ادعا نمیشود.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-2-Dominating-Set}\label{alg:a4}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure a $2$-dominating set $S$
\State $S\gets\emptyset$ \Comment{$\mathrm{def}(v)=0$ if $v\in S$, else $\max\{0,\,2-|N(v)\cap S|\}$}
\While{$\sum_{v}\mathrm{def}(v)>0$}
\State pick $x\notin S$ maximizing $\mathrm{def}(x)+|\{u\in N(x)\setminus S:\mathrm{def}(u)>0\}|$
\State $S\gets S\cup\{x\}$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}6. Roman domination from a greedy dominating setاحاطه رومی از روی احاطهگر حریصانه
A Roman dominating function is a labeling \(f:V\to\{0,1,2\}\) such that every vertex with \(f(v)=0\) has a neighbor \(u\) with \(f(u)=2\); its weight is \(\sum_v f(v)\) and \(\gamma_R\) is the minimum weight [3, 16]. Labeling a dominating set \(S\) with \(2\) and everything else with \(0\) gives weight \(2|S|\). The improvement step lowers a \(2\) to a \(1\) when this is safe.
تابع رومی یک برچسبگذاری \(f:V\to\{0,1,2\}\) است که هر رأس با \(f(v)=0\) همسایهای مانند \(u\) با \(f(u)=2\) دارد؛ وزن آن \(\sum_v f(v)\) و \(\gamma_R\) کمینهی وزن است [3, 16]. اگر مجموعهی احاطهگر \(S\) را ۲ و بقیه را ۰ برچسب بزنیم، وزن \(2|S|\) میشود. مرحلهی بهبود، هر ۲ را در صورت امکان به ۱ کاهش میدهد.
Input: graph \(G\) Output: a Roman dominating function \(f\)
ورودی: گراف \(G\) خروجی: یک تابع رومی \(f\)
Algorithmالگوریتم 6 Roman-From-Greedy-DS
- \(S\gets\) Greedy-Dominating-Set\((G)\)
- \(f(v)\gets2\) for \(v\in S\); \(f(v)\gets0\) otherwise
- for \(v\in S\) do ▷ improvement step
- if every \(u\in N(v)\) with \(f(u)=0\) has some \(w\in N(u)\setminus\{v\}\) with \(f(w)=2\) then
- \(f(v)\gets1\)
- return \(f\)
Analysisتحلیل
- Correctness. Initially \(f\) is valid because \(S\) is dominating. Lowering \(f(v)\) from \(2\) to \(1\) is safe: \(v\) itself needs no neighbor labeled \(2\), and each neighbor labeled \(0\) still has another neighbor labeled \(2\).درستی. در آغاز \(f\) معتبر است چون \(S\) احاطهگر است. کاهش \(f(v)\) از ۲ به ۱ بیخطر است: خودِ \(v\) به همسایهی ۲ نیاز ندارد و هر همسایهی ۰ هنوز همسایهی دیگری با برچسب ۲ دارد.
- Time. \(O(n(n+m))\). The weight is at most \(2|S|\), which is why \(\gamma\le\gamma_R\le2\gamma\) in general [3]. For this heuristic, weight \(\le 2H(\Delta+1)\,\gamma_R\), since \(|S|\le H(\Delta+1)\gamma\le H(\Delta+1)\gamma_R\).زمان. \(O(n(n+m))\). وزن حداکثر \(2|S|\) است و برای همین بهطور کلی \(\gamma\le\gamma_R\le2\gamma\) [3]. برای این روش، وزن \(\le 2H(\Delta+1)\,\gamma_R\) است، چون \(|S|\le H(\Delta+1)\gamma\le H(\Delta+1)\gamma_R\).
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Roman-From-Greedy-DS}\label{alg:a5}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure a Roman dominating function $f$
\State $S\gets$ Greedy-Dominating-Set$(G)$
\State $f(v)\gets2$ for $v\in S$;\ $f(v)\gets0$ otherwise
\For{$v\in S$} \Comment{improvement step}
\If{every $u\in N(v)$ with $f(u)=0$ has some $w\in N(u)\setminus\{v\}$ with $f(w)=2$}
\State $f(v)\gets1$
\EndIf
\EndFor
\State \Return $f$
\end{algorithmic}
\end{algorithm}7. Vertex cover: 2-approximation by a maximal matchingپوشش رأسی: تقریب ۲ با تطابق ماکسیمال
Scan the edges. Whenever an edge has no endpoint in the cover yet, put both endpoints in. The edges that triggered this are pairwise disjoint, so they form a maximal matching \(M\) [5].
یالها را یکییکی میبینیم و هر وقت یالی هنوز هیچ سری در پوشش نداشت، هر دو سرش را اضافه میکنیم. یالهایی که این کار را کردهاند دوبهدو از هم جدا هستند و یک تطابق ماکسیمال \(M\) میسازند [5].
Input: graph \(G=(V,E)\) Output: a vertex cover \(C\)
ورودی: گراف \(G=(V,E)\) خروجی: یک پوشش رأسی \(C\)
Algorithmالگوریتم 7 Matching-Vertex-Cover
- \(C\gets\emptyset\)
- for each edge \(uv\in E\) (in input order) do
- if \(u\notin C\) and \(v\notin C\) then
- \(C\gets C\cup\{u,v\}\)
- return \(C\)
Analysisتحلیل
- Correctness. Every edge is either already covered when examined or gets both endpoints added.درستی. هر یال یا هنگام بررسی از قبل پوشیده است یا هر دو سرش اضافه میشود.
- Guarantee. The chosen edges are disjoint, and any vertex cover must contain an endpoint of each of them, so \(\beta(G)\ge|M|\) while \(|C|=2|M|\); hence \(|C|\le2\beta(G)\). Time \(O(m)\). Also \(\alpha+\beta=n\) [7].تضمین. یالهای انتخابشده مجزا هستند و هر پوشش رأسی باید از هر کدام یک سر داشته باشد؛ پس \(\beta(G)\ge|M|\) ولی \(|C|=2|M|\) و در نتیجه \(|C|\le2\beta(G)\). زمان \(O(m)\). همچنین \(\alpha+\beta=n\) [7].
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Matching-Vertex-Cover}\label{alg:a6}
\begin{algorithmic}[1]
\Require graph $G=(V,E)$
\Ensure a vertex cover $C$
\State $C\gets\emptyset$
\For{each edge $uv\in E$ (in input order)}
\If{$u\notin C$ and $v\notin C$}
\State $C\gets C\cup\{u,v\}$
\EndIf
\EndFor
\State \Return $C$
\end{algorithmic}
\end{algorithm}8. Greedy maximal independent set (smallest degree first)مجموعه مستقل ماکسیمال حریصانه (کمترین درجه اول)
Repeatedly take a vertex of smallest degree in what is left of the graph, add it to \(S\), and delete it together with its neighbors. Taking low-degree vertices first deletes few vertices per step, which usually leaves room for a larger set.
هر بار رأسی با کمترین درجه در گراف باقیمانده را برمیداریم، به \(S\) اضافه میکنیم و آن را با همسایههایش حذف میکنیم. برداشتن رأسهای کمدرجه در هر گام رأسهای کمی را حذف میکند و معمولاً جا برای مجموعهی بزرگتری باقی میگذارد.
Input: graph \(G\) Output: a maximal independent set \(S\)
ورودی: گراف \(G\) خروجی: یک مجموعهی مستقل ماکسیمال \(S\)
Algorithmالگوریتم 8 Greedy-Independent-Set
- \(S\gets\emptyset\); \(H\gets G\)
- while \(V(H)\neq\emptyset\) do
- \(v\gets\) vertex of minimum degree in \(H\)
- \(S\gets S\cup\{v\}\); \(H\gets H-N_H[v]\)
- return \(S\)
Analysisتحلیل
- Correctness. Vertices are removed only together with a neighbor in \(S\) or when chosen, so \(S\) is independent and no vertex can be added: \(S\) is maximal.درستی. رأسها فقط همراه با همسایهای در \(S\) یا هنگام انتخاب شدن حذف میشوند؛ پس \(S\) مستقل است و رأسی به آن اضافه نمیشود: \(S\) ماکسیمال است.
- Guarantee. Every maximal independent set has at least \(n/(\Delta+1)\) vertices. For this minimum-degree rule Halldórsson and Radhakrishnan prove the better ratio \((\Delta+2)/3\) on graphs of maximum degree \(\Delta\): \(\alpha(G)\le\frac{\Delta+2}{3}|S|\) [10]. Time \(O(n(n+m))\).تضمین. هر مجموعهی مستقل ماکسیمال دستکم \(n/(\Delta+1)\) رأس دارد. برای همین قاعدهی کمترین درجه، هالدورسون و رادهاکریشنان ضریب بهتر \((\Delta+2)/3\) را روی گرافهایی با بیشینه درجهی \(\Delta\) ثابت کردهاند: \(\alpha(G)\le\frac{\Delta+2}{3}|S|\) [10]. زمان \(O(n(n+m))\).
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-Independent-Set}\label{alg:a7}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure a maximal independent set $S$
\State $S\gets\emptyset$;\ $H\gets G$
\While{$V(H)\neq\emptyset$}
\State $v\gets$ vertex of minimum degree in $H$
\State $S\gets S\cup\{v\}$;\ $H\gets H-N_H[v]$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}9. Greedy independent dominating set (largest degree first)احاطهگر مستقل حریصانه (بیشترین درجه اول)
An independent dominating set is exactly a maximal independent set [4]: a maximal independent set is dominating (otherwise another vertex could be added), and a dominating independent set is maximal. To keep the set small, this variant takes a vertex of largest degree first, so that each step deletes as many vertices as possible.
یک احاطهگر مستقل دقیقاً همان مجموعهی مستقل ماکسیمال است [4]: مجموعهی مستقل ماکسیمال احاطهگر است (وگرنه میشد رأس دیگری به آن افزود) و هر مجموعهی مستقل احاطهگر ماکسیمال است. برای اینکه مجموعه کوچک بماند، این گونه رأسی با بیشترین درجه را اول برمیدارد تا هر گام تا میشود رأس بیشتری حذف شود.
Input: graph \(G\) Output: an independent dominating set \(S\)
ورودی: گراف \(G\) خروجی: یک احاطهگر مستقل \(S\)
Algorithmالگوریتم 9 Greedy-Independent-Dominating-Set
- \(S\gets\emptyset\); \(H\gets G\)
- while \(V(H)\neq\emptyset\) do
- \(v\gets\) vertex of maximum degree in \(H\)
- \(S\gets S\cup\{v\}\); \(H\gets H-N_H[v]\)
- return \(S\)
Analysisتحلیل
- Correctness. As for the previous algorithm, \(S\) is a maximal independent set and hence independent and dominating.درستی. مانند الگوریتم قبلی، \(S\) مجموعهی مستقل ماکسیمال است و پس هم مستقل است و هم احاطهگر.
- Time \(O(n(n+m))\). \(|S|\) is an upper bound for \(i(G)\), and \(\gamma\le i\le\alpha\) [4]. No approximation ratio is claimed.زمان \(O(n(n+m))\). اندازهی \(S\) کران بالایی برای \(i(G)\) است و \(\gamma\le i\le\alpha\) [4]. ضریب تقریبی ادعا نمیشود.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Greedy-Independent-Dominating-Set}\label{alg:a8}
\begin{algorithmic}[1]
\Require graph $G$
\Ensure an independent dominating set $S$
\State $S\gets\emptyset$;\ $H\gets G$
\While{$V(H)\neq\emptyset$}
\State $v\gets$ vertex of maximum degree in $H$
\State $S\gets S\cup\{v\}$;\ $H\gets H-N_H[v]$
\EndWhile
\State \Return $S$
\end{algorithmic}
\end{algorithm}10. Exact answers (bit masks, up to 20 vertices)جواب دقیق (ماسک بیتی، تا ۲۰ رأس)
Because these problems are NP-hard [8], exact answers take exponential time. For \(n\le 20\) the lab looks at every subset \(X\subseteq V\), written as a bit mask. Two tables are filled once by dynamic programming over the masks: the closed neighborhood \(N[X]\) of each subset, and whether \(X\) is independent. Afterwards each problem is a quick test on a subset, and subsets that cannot beat the best answer found so far are skipped.
چون این مسئلهها NP-سختاند [8]، جواب دقیق زمان نمایی میخواهد. برای \(n\le 20\) صفحه همهی زیرمجموعههای \(X\subseteq V\) را، به شکل ماسک بیتی، بررسی میکند. دو جدول یکبار با برنامهریزی پویا روی ماسکها پر میشود: همسایگی بستهی \(N[X]\) هر زیرمجموعه، و اینکه \(X\) مستقل است یا نه. بعد هر مسئله فقط یک آزمون سریع روی هر زیرمجموعه است و زیرمجموعههایی که از بهترین جواب فعلی بهتر نمیشوند کنار گذاشته میشوند.
Input: graph \(G\) with \(n\le20\), a problem \(P\) Output: an optimal set for \(P\), if one exists
ورودی: گراف \(G\) با \(n\le20\) و یک مسئلهی \(P\) خروجی: یک مجموعهی بهینه برای \(P\)، اگر وجود داشته باشد
Algorithmالگوریتم 10 Exact-Search
- for \(X=1,\dots,2^n-1\), with \(x\) the lowest vertex of \(X\) do
- \(\mathrm{cl}[X]\gets\mathrm{cl}[X\setminus\{x\}]\cup N[x]\)
- \(\mathrm{ind}[X]\gets\mathrm{ind}[X\setminus\{x\}]\wedge(N(x)\cap X=\emptyset)\)
- \(\mathit{best}\gets\text{none}\)
- for \(X\subseteq V\) do
- if \(|X|\) cannot improve \(|\mathit{best}|\) then
- continue
- if \(\mathrm{Test}_P(X)\) then
- \(\mathit{best}\gets X\)
- return \(\mathit{best}\)
Analysisتحلیل
- Tests. Dominating: \(\mathrm{cl}[X]=V\). Total: \(\bigcup_{v\in X}N(v)=V\). Connected: dominating and \(G[X]\) connected. Independent dominating: \(\mathrm{ind}[X]\) and \(\mathrm{cl}[X]=V\). Paired: dominating and \(G[X]\) has a perfect matching. \(2\)-dominating / perfect: every \(v\notin X\) has at least \(2\) / exactly \(1\) neighbor in \(X\). Independent set: \(\mathrm{ind}[X]\). Vertex cover: \(\mathrm{ind}[V\setminus X]\).آزمونها. احاطهگر: \(\mathrm{cl}[X]=V\). کل: \(\bigcup_{v\in X}N(v)=V\). همبند: احاطهگر و \(G[X]\) همبند. احاطهگر مستقل: \(\mathrm{ind}[X]\) و \(\mathrm{cl}[X]=V\). جفتی: احاطهگر و \(G[X]\) دارای تطابق کامل. ۲-احاطهگر / کامل: هر \(v\notin X\) دستکم ۲ / دقیقاً ۱ همسایه در \(X\) دارد. مجموعهی مستقل: \(\mathrm{ind}[X]\). پوشش رأسی: \(\mathrm{ind}[V\setminus X]\).
- Roman domination. Let \(X\) be the set of vertices labeled \(2\). Every vertex outside \(N[X]\) must get label \(1\), all others \(0\), so the best weight for this \(X\) is \(2|X|+|V\setminus N[X]|\), and we minimize it over all \(X\).احاطه رومی. فرض کنید \(X\) مجموعهی رأسهای با برچسب ۲ باشد. هر رأس بیرون \(N[X]\) باید برچسب ۱ بگیرد و بقیه ۰؛ پس بهترین وزن برای این \(X\) برابر \(2|X|+|V\setminus N[X]|\) است و آن را روی همهی \(X\) ها کمینه میکنیم.
- Time \(O(2^n\cdot n)\) in the worst case and memory \(O(2^n)\).زمان در بدترین حالت \(O(2^n\cdot n)\) و حافظه \(O(2^n)\).
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Exact-Search}\label{alg:exact}
\begin{algorithmic}[1]
\Require graph $G$ with $n\le20$, a problem $P$
\Ensure an optimal set for $P$, if one exists
\For{$X=1,\dots,2^n-1$, with $x$ the lowest vertex of $X$}
\State $\mathrm{cl}[X]\gets\mathrm{cl}[X\setminus\{x\}]\cup N[x]$
\State $\mathrm{ind}[X]\gets\mathrm{ind}[X\setminus\{x\}]\wedge(N(x)\cap X=\emptyset)$
\EndFor
\State $\mathit{best}\gets\text{none}$
\For{$X\subseteq V$}
\If{$|X|$ cannot improve $|\mathit{best}|$}
\State continue
\EndIf
\If{$\mathrm{Test}_P(X)$}
\State $\mathit{best}\gets X$
\EndIf
\EndFor
\State \Return $\mathit{best}$
\end{algorithmic}
\end{algorithm}11. Domatic partitionافراز دامنهای
The domatic number \(d(G)\) is the largest number of pairwise disjoint dominating sets; it satisfies \(d(G)\le\delta+1\) [4]. Every dominating set contains a minimal dominating set, so it is enough to find all minimal dominating sets and to search, by backtracking, for the largest family of pairwise disjoint ones.
عدد دامنهای \(d(G)\) بیشترین تعداد مجموعهی احاطهگر دوبهدو مجزاست و \(d(G)\le\delta+1\) برقرار است [4]. هر مجموعهی احاطهگر یک زیرمجموعهی احاطهگر مینیمال دارد؛ پس کافی است همهی احاطهگرهای مینیمال را پیدا کنیم و بزرگترین خانوادهی دوبهدو مجزا از آنها را با جستوجوی بازگشتی بیابیم.
Input: graph \(G\) with \(n\le20\) Output: disjoint dominating sets \(D_1,\dots,D_k\)
ورودی: گراف \(G\) با \(n\le20\) خروجی: مجموعههای احاطهگر مجزای \(D_1,\dots,D_k\)
Algorithmالگوریتم 11 Domatic-Partition
- \(\mathcal M\gets\) all minimal dominating sets of \(G\); \(\mathit{best}\gets\emptyset\)
- Search\((s,\ U,\ \mathcal F)\) ▷ backtracking over \(\mathcal M\)
- if \(|\mathcal F|>|\mathit{best}|\) then
- \(\mathit{best}\gets\mathcal F\)
- if \(|\mathit{best}|=\delta+1\) or the step limit is reached then
- return stop
- for \(D\in\mathcal M\) from index \(s\) with \(D\cap U=\emptyset\) do
- Search\((\text{next},\ U\cup D,\ \mathcal F+[D])\)
- add vertices that are in no set to \(D_1\)
- return \(\mathit{best}\)
Analysisتحلیل
- Correctness. Replacing each set of an optimal family by a minimal dominating set contained in it keeps the sets disjoint, so searching only \(\mathcal M\) loses nothing; adding leftover vertices to a set keeps it dominating.درستی. اگر هر مجموعهی یک خانوادهی بهینه را با یک احاطهگر مینیمالِ درون آن جایگزین کنیم، مجموعهها مجزا میمانند؛ پس جستوجو فقط در \(\mathcal M\) چیزی از دست نمیدهد. افزودن رأسهای باقیمانده به یک مجموعه، احاطهگر بودنش را حفظ میکند.
- Time. Exponential. The search stops after \(2\cdot10^{6}\) steps; the lab then reports only a lower bound \(d(G)\ge k\).زمان. نمایی. جستوجو پس از \(2\cdot10^{6}\) گام قطع میشود و آنوقت صفحه فقط کران پایین \(d(G)\ge k\) را گزارش میکند.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Domatic-Partition}\label{alg:domatic}
\begin{algorithmic}[1]
\Require graph $G$ with $n\le20$
\Ensure disjoint dominating sets $D_1,\dots,D_k$
\State $\mathcal M\gets$ all minimal dominating sets of $G$;\ $\mathit{best}\gets\emptyset$
\State Search$(s,\ U,\ \mathcal F)$ \Comment{backtracking over $\mathcal M$}
\If{$|\mathcal F|>|\mathit{best}|$}
\State $\mathit{best}\gets\mathcal F$
\EndIf
\If{$|\mathit{best}|=\delta+1$ or the step limit is reached}
\State \Return stop
\EndIf
\For{$D\in\mathcal M$ from index $s$ with $D\cap U=\emptyset$}
\State Search$(\text{next},\ U\cup D,\ \mathcal F+[D])$
\EndFor
\State add vertices that are in no set to $D_1$
\State \Return $\mathit{best}$
\end{algorithmic}
\end{algorithm}12. Checking your selectionبررسی انتخاب شما
Whatever you select, the lab counts for every vertex how many of its neighbors are in \(S\) (and, for Roman domination, how many have label \(2\)) and compares this with the definition. Connectivity of \(G[S]\) is tested with a graph search; the perfect matching of paired domination with a short backtracking search (up to \(|S|=24\)).
هر انتخابی که بکنید، صفحه برای هر رأس میشمارد چند همسایهاش در \(S\) هستند (و در احاطه رومی چند همسایه برچسب ۲ دارند) و با تعریف مقایسه میکند. همبندی \(G[S]\) با جستوجو در گراف و تطابق کامل در احاطهگر جفتی با یک جستوجوی بازگشتی کوتاه (تا \(|S|=24\)) بررسی میشود.
Input: graph \(G\), a selection \(S\) (or labels \(f\)), a problem \(P\) Output: the vertices and edges that violate the definition
ورودی: گراف \(G\)، یک انتخاب \(S\) (یا برچسبهای \(f\)) و یک مسئلهی \(P\) خروجی: رأسها و یالهایی که تعریف را نقض میکنند
Algorithmالگوریتم 12 Check-Selection
- for \(v\in V\) do
- \(k(v)\gets|N(v)\cap S|\)
- for \(v\in V\) do
- compare \(k(v)\) with the definition of \(P\) ▷ e.g. \(v\in S\) or \(k(v)\ge1\)
- for \(uv\in E\) do
- check independence / cover conditions on \(u,v\)
- test connectivity or a perfect matching of \(G[S]\) if \(P\) requires it
Analysisتحلیل
- Time \(O(n+m)\) for most problems.زمان \(O(n+m)\) برای بیشتر مسئلهها.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Check-Selection}\label{alg:check}
\begin{algorithmic}[1]
\Require graph $G$, a selection $S$ (or labels $f$), a problem $P$
\Ensure the vertices and edges that violate the definition
\For{$v\in V$}
\State $k(v)\gets|N(v)\cap S|$
\EndFor
\For{$v\in V$}
\State compare $k(v)$ with the definition of $P$ \Comment{e.g. $v\in S$ or $k(v)\ge1$}
\EndFor
\For{$uv\in E$}
\State check independence / cover conditions on $u,v$
\EndFor
\State test connectivity or a perfect matching of $G[S]$ if $P$ requires it
\end{algorithmic}
\end{algorithm}13. Unit disk graphsگراف دیسک واحد
In unit disk mode the lab rebuilds the edges every time a vertex moves: two vertices are adjacent when their Euclidean distance is at most the radius \(r\) [2].
در حالت دیسک واحد، هر بار رأسی جابهجا شود یالها از نو ساخته میشوند: دو رأس مجاورند اگر فاصلهی اقلیدسیشان از شعاع \(r\) بیشتر نباشد [2].
Input: points \(p_1,\dots,p_n\) in the plane, radius \(r\) Output: the graph \(G=(V,E)\)
ورودی: نقطههای \(p_1,\dots,p_n\) در صفحه و شعاع \(r\) خروجی: گراف \(G=(V,E)\)
Algorithmالگوریتم 13 Unit-Disk-Graph
- \(E\gets\emptyset\)
- for all pairs \(i<j\) do
- if \(\lVert p_i-p_j\rVert\le r\) then
- add the edge \(ij\) to \(E\)
- return \((V,E)\)
Analysisتحلیل
- Time \(O(n^2)\) per update.زمان \(O(n^2)\) در هر بهروزرسانی.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Unit-Disk-Graph}\label{alg:udg}
\begin{algorithmic}[1]
\Require points $p_1,\dots,p_n$ in the plane, radius $r$
\Ensure the graph $G=(V,E)$
\State $E\gets\emptyset$
\For{all pairs $i<j$}
\If{$\lVert p_i-p_j\rVert\le r$}
\State add the edge $ij$ to $E$
\EndIf
\EndFor
\State \Return $(V,E)$
\end{algorithmic}
\end{algorithm}14. Reading Ipe filesخواندن فایلهای Ipe
Ipe [17] stores a drawing as XML. The lab turns marks and small circles into vertices, and every segment of a polyline or polygon into an edge between the vertices nearest to its two endpoints (within a small tolerance). An endpoint with no vertex nearby becomes a new vertex. Transformations of groups are applied, and the result is scaled to fit the canvas.
Ipe [17] نقاشی را بهصورت XML ذخیره میکند. صفحه نشانهها (mark) و دایرههای کوچک را رأس میکند، و هر پارهخطِ یک خطشکسته یا چندضلعی را به یالی بین نزدیکترین رأسها به دو سرش تبدیل میکند (با تلورانس کوچک). سری که رأسی نزدیکش نباشد رأس تازه میشود. تبدیلهای گروهها اعمال میشود و نتیجه به اندازهی بوم درمیآید.
Input: an Ipe XML file Output: a graph \(G\)
ورودی: یک فایل XML از Ipe خروجی: یک گراف \(G\)
Algorithmالگوریتم 14 Read-Ipe
- \(V\gets\) all marks and small circles (after group transformations)
- for each polyline or polygon and each consecutive pair of points \(p,q\) do
- \(a\gets\) vertex nearest to \(p\) within tolerance, else a new vertex at \(p\)
- \(b\gets\) the same for \(q\)
- if \(a\neq b\) then
- add the edge \(ab\) (once)
- scale and center everything to fit the canvas
Analysisتحلیل
- Time \(O(n\cdot k)\) in the worst case, where \(k\) is the number of segments.زمان \(O(n\cdot k)\) در بدترین حالت، که \(k\) تعداد پارهخطهاست.
LaTeX source (algpseudocode)کد LaTeX (algpseudocode)
\begin{algorithm}[t]
\caption{Read-Ipe}\label{alg:ipe}
\begin{algorithmic}[1]
\Require an Ipe XML file
\Ensure a graph $G$
\State $V\gets$ all marks and small circles (after group transformations)
\For{each polyline or polygon and each consecutive pair of points $p,q$}
\State $a\gets$ vertex nearest to $p$ within tolerance, else a new vertex at $p$
\State $b\gets$ the same for $q$
\If{$a\neq b$}
\State add the edge $ab$ (once)
\EndIf
\EndFor
\State scale and center everything to fit the canvas
\end{algorithmic}
\end{algorithm}Referencesمرجعها
- Chvátal, V.: A greedy heuristic for the set-covering problem. Mathematics of Operations Research 4(3), 233–235 (1979)
- Clark, B.N., Colbourn, C.J., Johnson, D.S.: Unit disk graphs. Discrete Mathematics 86(1–3), 165–177 (1990)
- Cockayne, E.J., Dreyer Jr., P.A., Hedetniemi, S.M., Hedetniemi, S.T.: Roman domination in graphs. Discrete Mathematics 278(1–3), 11–22 (2004)
- Cockayne, E.J., Hedetniemi, S.T.: Towards a theory of domination in graphs. Networks 7(3), 247–261 (1977)
- Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 4th edn. MIT Press (2022)
- Fink, J.F., Jacobson, M.S.: \(n\)-domination in graphs. In: Graph Theory with Applications to Algorithms and Computer Science, pp. 283–300. Wiley, New York (1985)
- Gallai, T.: Über extreme Punkt- und Kantenmengen. Annales Universitatis Scientiarum Budapestinensis, Sectio Mathematica 2, 133–138 (1959)
- Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, San Francisco (1979)
- Guha, S., Khuller, S.: Approximation algorithms for connected dominating sets. Algorithmica 20(4), 374–387 (1998) doi:10.1007/PL00009201
- Halldórsson, M.M., Radhakrishnan, J.: Greed is good: approximating independent sets in sparse and bounded-degree graphs. Algorithmica 18(1), 145–163 (1997) doi:10.1007/BF02523693
- Haynes, T.W., Hedetniemi, S.T., Slater, P.J.: Fundamentals of Domination in Graphs. Marcel Dekker, New York (1998)
- Haynes, T.W., Slater, P.J.: Paired-domination in graphs. Networks 32(3), 199–206 (1998)
- Henning, M.A., Yeo, A.: Total Domination in Graphs. Springer Monographs in Mathematics, Springer (2013)
- Johnson, D.S.: Approximation algorithms for combinatorial problems. Journal of Computer and System Sciences 9(3), 256–278 (1974)
- Lovász, L.: On the ratio of optimal integral and fractional covers. Discrete Mathematics 13(4), 383–390 (1975)
- Stewart, I.: Defend the Roman Empire! Scientific American 281(6), 136–139 (1999)
- Cheong, O.: Ipe, the extensible drawing editor. https://ipe.otfried.org