cs0506090/main.tex
1: \documentclass{article}
2: \emergencystretch=2em
3: 
4: \usepackage{times}
5: \usepackage{eepic,epic}
6: \usepackage{latexsym}
7: \usepackage[latin1]{inputenc}    
8: 
9: %
10: %
11: %
12: %
13: %
14: %
15: %
16: 
17: %
18: 
19: %
20: \makeatletter%
21: \def\nottoobig#1{{\hbox{$\left#1\vcenter to1.111\ht\strutbox{}\right.\n@space$}}}
22: \makeatother%
23: 
24: %
25: %
26: %
27: %
28: %
29: %
30: \makeatother%
31: 
32: %
33: %
34: %
35: %
36: 
37: %
38: 
39: 
40: 
41: %
42: %
43: %
44: %
45: %
46: %
47: %
48: %
49: \makeatletter \@beginparpenalty=10000 \makeatother
50: %
51: %
52: %
53: %
54: %
55: %
56: %
57: %
58: %
59: %
60: %
61: %
62: %
63: %
64: %
65: %
66: %
67: %
68: 
69: 
70: %
71: %
72: 
73: \def\underl#1 {\leavevmode\let\first=\relax\underli #1 }
74: \def\underli#1 {\ifx&#1\let\next=\relax\unskip
75:                 \else\let\next=\underli\first\ulinebox{#1}\fi\let\first=\undersp\next}
76: \def\undersp{\penalty50\ulinebox{\space}\penalty50}
77: \def\ulinebox#1{\vtop{\hbox{\strut#1}\hrule}}%
78: \def\unice#1 {\underl #1 & }
79: %
80: %
81: %
82: %
83: %
84: %
85: %
86: %
87: %
88: %
89: %
90: %
91: %
92: %
93: %
94: %
95: %
96: %
97: %
98: 
99: 
100: 
101: %
102: %
103: %
104: %
105: %
106: %
107: %
108: \def\desclabel#1{\bf #1\hfil}
109: \def\desc{\list{}{%
110: \labelwidth=\leftmargin
111: \advance \labelwidth by -\labelsep
112: \let \makelabel=\desclabel}}
113: \let\enddesc=\endlist
114: 
115: 
116: 
117: 
118: %
119: 
120: \makeatletter %
121: \renewcommand{\theequation}{\thesection.\arabic{equation}}
122: %
123: %
124: %
125: \newcommand{\band}{\bigwedge}
126: \newcommand{\Band}[3]{(\bigwedge#1\!\!:\,#2\!\!:\,#3)}
127: \newcommand{\bor}{\bigvee}
128: \newcommand{\Bor}[3]{(\bigvee#1\!\!:\,#2\!\!:\,#3)}
129: \newcommand{\Forall}[3]{(\forall #1\!\!:\,#2\!\!:\,#3)}
130: \newcommand{\Exists}[3]{(\exists #1\!\!:\,#2\!\!:\,#3)}
131: \newcommand{\Union}[3]{(\bigcup #1\!\!:\,#2\!\!:\,#3)}
132: %
133: %
134: %
135: %
136: %
137: %
138: \def\union{\,\bigcup\limits\,}
139: \def\inter{\,\bigcap\limits\,}
140: \newcommand{\true}{\mbox{\it true}}
141: \newcommand{\false}{\mbox{\it false}}
142: \newcommand{\SUM}[3]{ (\sum #1 \!\! : \, #2 \!\!:\, #3) }
143: \newcommand{\IFS}{\mbox{\bf if}}
144: \newcommand{\IF}[1]{ \mbox{\bf if} \, #1 \, \rightarrow \, }
145: \newcommand{\GC}[2]{ #1 \, \rightarrow \, #2 }
146: \newlength{\filength}
147: \settowidth{\filength}{\mbox{\bf f{}i}}
148: \newsavebox{\gcbox}
149: \sbox{\gcbox}{\framebox[\filength]{\rule{0ex}{2ex}}}
150: \newcommand{\BB}[1]{\usebox{\gcbox}\; #1 \, \rightarrow \, }
151: \newcommand{\FI}{\; \mbox{\bf f{}i}}
152: \newcommand{\Skip}{ \mbox{\bf skip} }
153: \newcommand{\DOS}{\mbox{\bf do}}
154: \newcommand{\DO}[1]{\mbox{\bf do} \, #1 \, \rightarrow \,}
155: \newcommand{\OD}{\mbox{\bf od}}
156: \newcommand{\cobegin}{{\bf cobegin}\,}
157: %
158: \newcommand{\coend}{\,{\bf coend}}
159: \newcommand{\Set}[1]{ \hbox{\bf\{} #1 \hbox{\bf\}}}
160: \newcommand{\Bag}[1]{ \{\!| #1  |\!\}}
161: %
162: %
163: %
164: %
165: %
166: %
167: %
168: \newlength{\leftjustindent}
169: \newlength{\@leftjustindent}
170: \setlength{\@leftjustindent}{\leftmargin}
171: \def\leftjust{\let\\\@leftjustcr\let\end\@endleftjust
172:   \addtolength{\@leftjustindent}{\leftjustindent}
173:   \vcenter\bgroup
174:   \halign\bgroup
175:     \hbox to\displaywidth{
176:       \rule{\@leftjustindent}{0ex}$\displaystyle##$\hfill
177:       }\crcr
178: }
179: \def\endleftjust{\crcr\egroup\egroup\endgroup}
180: \def\@endleftjust#1{\crcr\egroup\egroup\@checkend{#1}\endgroup}
181: \def\@leftjustcr{\crcr}
182: 
183: \newcommand{\hoare}[3]{\{{#1}\}\:{#2}\:\{{#3}\}}
184: \renewcommand{\wp}[2]{ {\it wp}({#1},{#2})}
185: \newcommand{\assert}[1]{\!\{#1\}}
186: \newcommand{\atom}[1]{\langle\,{#1}\,\rangle}
187: \newcommand{\lbl}[1]{{#1 \!:\;\,}}
188: \newcommand{\pre}[1]{ {\it pre}({#1})}
189: \newcommand{\post}[1]{ {\it post}({#1}) }
190: \newcommand{\NI}[2]{ {\it NI}({#1},{#2}) }
191: \newcommand{\equi}[3]{ {  {\rm E}_{#1}^{#2}({#3}) }    }
192: \newcommand{\red}[3]{ {  {\rm R}_{#1}^{#2}({#3}) }    }
193: \newcommand{\sparse}{{{\rm SPARSE}}}
194: \newcommand{\tally}{{{\rm TALLY}}}
195: %
196: \newtheorem{theorem}{Theorem}%
197: \newtheorem{corollary}[theorem]{Corollary}
198: %
199: %
200: %
201: %
202: %
203: %
204: %
205: %
206: %
207: 
208: \newenvironment{proofs}{\noindent{\bf Proof.}\hspace*{1em}}{\qed\bigskip}
209: \newenvironment{proofsketch}{\noindent{\bf Proof Sketch.}\hspace*{1em}}{\qed\bigskip}
210: \newcommand{\sproofof}[1]{\noindent{\bf Proof of {#1}.}\hspace*{1em}}
211: \newcommand{\eproofof}[1]{\hfill \mbox{\qed$_{\mbox{\small {#1}}}$}\quad\medskip}
212: 
213: \newcommand{\qedblob}{\mbox{\rule[-1.5pt]{5pt}{10.5pt}}}
214: \def\literalqed{{\ \nolinebreak\hfill\mbox{\qedblob\quad}}}
215: \def\qedcareful{\literalqed}
216: \def\qed{\literalqed}
217: \def\trueloveqed{{\ \nolinebreak\hfill\mbox{\boldmath
218: \Huge$ \Box$}\nolinebreak\mbox{$\!\!\!\!\!\!
219: {}^{\normalsize\heartsuit}$}}}
220: %
221: %
222: \newtheorem{lemma}[theorem]{Lemma}
223: \newtheorem{observation}[theorem]{Observation}
224: \newtheorem{fact}[theorem]{Fact}
225: \newtheorem{proposition}[theorem]{Proposition}
226: \newcommand{\singlespacing}{\let\CS=
227: \@currsize\renewcommand{\baselinestretch}{1}\tiny\CS}
228: \newcommand{\singlespacingplus}{\let\CS=
229: \@currsize\renewcommand{\baselinestretch}{1.25}\tiny\CS}
230: \newcommand{\doublespacing}{\let\CS=
231: \@currsize\renewcommand{\baselinestretch}{1.75}\tiny\CS}
232: \newcommand{\draftspacing}{\let\CS=
233: \@currsize\renewcommand{\baselinestretch}{2.0}\tiny\CS}
234: \newcommand{\foospacing}{\let\CS=
235: \@currsize\renewcommand{\baselinestretch}{1.05}\tiny\CS}
236: \newcommand{\normalspacing}{\singlespacing}
237: \makeatother%
238: 
239: 
240: %
241: \hyphenation{theory theoretical area areas theorem theorems par-allel par-allelize par-allelized threshold Hemaspaan-dra}
242: 
243: %
244: 
245: %
246: %
247: %
248: \def\grantnumber{This work was supported, in part,
249: by NSF grant no.\ DCR-8320274 and Office of Naval
250: Research contract N00014-86-K-0092.}
251: %
252: %
253: %
254: %
255: \mathcode`\0="0030      %
256: \mathcode`\1="0031
257: \mathcode`\2="0032
258: \mathcode`\3="0033
259: \mathcode`\4="0034
260: \mathcode`\5="0035
261: \mathcode`\6="0036
262: \mathcode`\7="0037
263: \mathcode`\8="0038
264: \mathcode`\9="0039
265: %
266: %
267: %
268: %
269: %
270: %
271: 
272: 
273: \newtheorem{definition}[theorem]{Definition}
274: \newtheorem{notation}[theorem]{Notation}
275: \newtheorem{trick}[theorem]{Trick Result}
276: 
277: 
278: %
279: %
280: %
281: %
282: %
283: %
284: 
285: %
286: 
287: %
288: \flushbottom{}
289: %
290: \makeatletter
291: \clubpenalty=\@highpenalty
292: \widowpenalty=\@highpenalty
293: \makeatother
294: 
295: %
296: \let\BLS=\baselinestretch
297: 
298: %
299: %
300: \makeatletter
301: \newcommand{\niceonespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.1}\tiny\CS}\newcommand{\nicetwospacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.2}\tiny\CS}
302: \newcommand{\nicethreespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.3}\tiny\CS}
303: \newcommand{\singlespacingplusplus}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.35}\tiny\CS}
304: \newcommand{\nicefourspacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.4}\tiny\CS}
305: \newcommand{\nicefivespacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.5}\tiny\CS}
306: \newcommand{\nicesixpacing}{\let\CS=\@currsize\renewcommand{\baselinestretch}{1.6}\tiny\CS}
307: \makeatother
308: 
309: %
310: \makeatletter
311: \def\@cite#1#2{[#1\if@tempswa , #2\fi]}
312: \makeatother
313: 
314: %
315: %
316: %
317: \makeatletter
318: \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
319:   \def\@citea{}\@cite{\@for\@citeb:=#2\do
320:     {\@citea\def\@citea{,\linebreak[0]}\@ifundefined
321:        {b@\@citeb}{{\bf ?}\@warning
322:        {Citation `\@citeb' on page \thepage \space undefined}}%
323: \hbox{\csname b@\@citeb\endcsname}}}{#1}}
324: \makeatother
325: 
326: 
327: %
328: \makeatletter
329: \def\ps@thesis{\def\@oddhead{\hfil\rm\thepage\hfil}\def\@oddfoot{}\def\@evenhead{\hfil\rm\thepage\hfil}\def\@evenfoot{}\def\chaptermark##1{}\def\sectionmark##1{}}
330: \makeatother
331: 
332: \makeatletter
333: %
334: %
335: %
336: %
337: \def\foobarpt{\textfont\z@\tenrm 
338:   \scriptfont\z@\ninrm \scriptscriptfont\z@\sevrm
339: \textfont\@ne\tenmi \scriptfont\@ne\ninmi \scriptscriptfont\@ne\sevmi
340: \textfont\tw@\tensy \scriptfont\tw@\ninsy \scriptscriptfont\tw@\sevsy
341: \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
342: \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
343:           \textfont\@ne\tenmi 
344:           \textfont\tw@\tensy \textfont\lyfam\tenly
345:           \@boldfalse}\@boldfalse
346: \def\boldmath{\@ifundefined{tenmib}{\global\font\tenmib\@mbi\@magscale1\global
347:         \font\tensyb\@mbsy \@magscale1\global\font
348:          \tenlyb\@lasyb\@magscale1\relax\@addfontinfo\@xiipt
349:               {\def\boldmath{\everymath
350:                 {\mit}\everydisplay{\mit}\@prtct\@nomathbold
351:                 \textfont\@ne\tenmib \textfont\tw@\tensyb 
352:                 \textfont\lyfam\tenlyb\@prtct\@boldtrue}}}{}\@xiipt\boldmath}%
353: \def\prm{\fam\z@\tenrm}%
354: \def\pit{\fam\itfam\tenit}\textfont\itfam\tenit \scriptfont\itfam\ninit
355:    \scriptscriptfont\itfam\sevit
356: \def\psl{\fam\slfam\tensl}\textfont\slfam\tensl 
357:      \scriptfont\slfam\tensl \scriptscriptfont\slfam\tensl
358: \def\pbf{\fam\bffam\tenbf}\textfont\bffam\tenbf 
359:    \scriptfont\bffam\ninbf \scriptscriptfont\bffam\ninbf 
360: \def\ptt{\fam\ttfam\tentt}\textfont\ttfam\tentt
361:    \scriptfont\ttfam\nintt \scriptscriptfont\ttfam\nintt 
362: \def\psf{\fam\sffam\tensf}\textfont\sffam\tensf
363:     \scriptfont\sffam\tensf \scriptscriptfont\sffam\tensf
364: \def\psc{\@getfont\psc\scfam\@xiipt{\@mcsc\@magscale1}}%
365: \def\ly{\fam\lyfam\tenly}\textfont\lyfam\tenly 
366:    \scriptfont\lyfam\ninly \scriptscriptfont\lyfam\sevly
367:  \@setstrut \rm}
368: 
369: \makeatother
370: 
371: 
372: 
373: 
374: %
375: 
376: %
377: %
378: %
379: %
380: %
381: %
382: 
383: %
384: \newcommand{\DTIME}[1]{{\mbox{\rm DTIME}}(#1)}
385: \newcommand{\DSPACE}[1]{{\mbox{\rm DSPACE}}(#1)}
386: \newcommand{\NTIME}[1]{{\mbox{\rm NTIME}}(#1)}
387: \newcommand{\NSPACE}[1]{{\mbox{\rm NSPACE}}(#1)}
388: \newcommand{\ATIME}[1]{{\mbox{\rm ATIME}}(#1)}
389: \newcommand{\ASPACE}[1]{{\mbox{\rm ASPACE}}(#1)}
390: 
391: \newcommand{\sharpp}{{\rm \#P}}
392: \newcommand{\sharpsat}{{\rm \#SAT}}
393: \newcommand{\sat}{\mbox{\rm SAT}}
394: \newcommand{\qbf}{\mbox{\rm QBF}}
395: \newcommand{\parityp}{{\rm \oplus P}}
396: \newcommand{\up}{\mbox{\rm UP}}
397: \newcommand{\us}{\mbox{\rm US}}
398: \newcommand{\fewnp}{\mbox{\rm FewNP}}
399: \newcommand{\fewp}{\mbox{\rm FewP}}
400: \newcommand{\coup}{\mbox{\rm coUP}}
401: \newcommand{\e}{\mbox{\rm E}}
402: \renewcommand{\exp}{{\rm EXP}}
403: \newcommand{\NE}{\mbox{\rm NE}}
404: \renewcommand{\ne}{\mbox{\rm NE}}
405: \newcommand{\nexp}{\mbox{\rm NEXP}}
406: \newcommand{\p}{\mbox{\rm P}}
407: \newcommand{\littlep}{{\rm p}}
408: \newcommand{\NP}{\mbox{\rm NP}}
409: \newcommand{\DP}{\mbox{\rm DP}}
410: \newcommand{\np}{\mbox{\rm NP}}
411: \newcommand{\scriptnp}{\mbox{\protect\scriptsize\rm NP}}
412: \newcommand{\tinynp}{\mbox{\protect\tiny\rm NP}}
413: \newcommand{\nt}{\mbox{\rm NT}}
414: \newcommand{\nnt}{\mbox{\rm NNT}}
415: \newcommand{\parityoptp}{{\rm \oplus{}OptP}}
416: \newcommand{\optp}{{\rm OptP}}
417: \newcommand{\diffp}{{\rm D^P}}
418: \newcommand{\pp}{\mbox{\rm PP}}
419: \newcommand{\bpp}{\mbox{\rm BPP}}
420: \newcommand{\zpp}{\mbox{\rm ZPP}}
421: \newcommand{\corp}{\mbox{\rm coRP}}
422: \newcommand{\rp}{\mbox{\rm RP}}
423: \newcommand{\npc}{$\np$-com\-plete}
424: \newcommand{\conp}{\mbox{\rm coNP}}
425: \newcommand{\pspace}{\mbox{\rm PSPACE}}
426: \newcommand{\eespace}{{\rm EESPACE}}
427: \newcommand{\dspace}{{\rm DSPACE}}
428: \newcommand{\psp}{{\pspace}}
429: \newcommand{\pnexp}{{\p^\nexp}}
430: \newcommand{\npnexp}{{\np^\nexp}}
431: \newcommand{\nenp}{{\ne^\np}}
432: \newcommand{\enp}{{\e^\np}}
433: \newcommand{\pnp}{{\p^{\rm NP}}}
434: \newcommand{\npnp}{{\np^{\rm NP}}}
435: %
436: \newcommand{\pnplog}{\mbox{\rm P}^{\scriptnp[\mathcal{O}(\log)]}}
437: \newcommand{\nexpnp}{{\nexp^\np}}
438: \newcommand{\coNP}{{\rm coNP}}
439: \newcommand{\cone}{{\rm CONE}}
440: \newcommand{\sigmatwozero}{{\Sigma_2^0}}
441: \newcommand{\pitwozero}{{\Pi_2^0}}
442: \newcommand{\pithreezero}{{\Pi_3^0}}
443: \newcommand{\sigmathreezero}{{\Sigma_3^0}}
444: \newcommand{\sigmatwo}{{\Sigma_2^p}}
445: \newcommand{\sigmak}{{\Sigma_k^p}}
446: \newcommand{\pitwo}{{\Pi_2^p}}
447: \newcommand{\thetatwo}{{\Theta_2^p}}
448: \newcommand{\deltatwo}{{\Delta_2^p}}
449: \newcommand{\poly}{{\rm poly}}
450: \newcommand{\ph}{{\rm PH}}
451: \newcommand{\few}{{\rm Few}}
452: \newcommand{\fewch}{{\rm FewCH}}
453: \newcommand{\eh}{{\rm EH}}
454: \newcommand{\proof}{\noindent {\bf Proof.}\quad}
455: \def\bull{\vrule height .9ex width .8ex depth -.1ex }
456: %
457: %
458: %
459: %
460: %
461: %
462: \newcommand{\blob}{\mbox{\rule[-1.5pt]{5pt}{10.5pt}}}
463: \newcommand{\lindent}{\qquad}
464: \newcommand{\magicnum}{{ n^{\frac{1-\epsilon}{\epsilon}+\delta}}}
465: \newcommand{\fsup}{{\,f_{super}\,}}
466: \newcommand{\fred}{{\,f_{reduced}\,}}
467: \newcommand{\pne}{{\p^\ne}}
468: \newcommand{\npne}{{\np^\ne}}
469: \newcommand{\nnexarg}{{\nxx^\nexx (x) }}
470: \newcommand{\nnexx}{{\nxx^\nexx  }}
471: \newcommand{\nnex}{{\nxx^\nexx }}
472: \newcommand{\expnp}{{\exp^\np }}
473: \newcommand{\nxx}{{\rm N_{17}}}
474: \newcommand{\nexx}{{\rm NE_{21}}}
475: \newcommand{\seh}{{\rm SEH}}
476: \newcommand{\sexph}{{\rm SEXPH}}
477: \newcommand{\pstar}{{\p_\star}}
478: \newcommand{\nestar}{{\ne_{\,\star}}}
479: %
480: \newcommand{\supersetproper}{  \stackrel{\scriptscriptstyle\superset}{\scriptscriptstyle\not-}}
481: \newcommand{\subsetproper}{  \stackrel{\scriptscriptstyle\subset}{\scriptscriptstyle\not-}}
482: %
483: %
484: %
485: %
486: %
487: %
488: %
489: \newcommand{\superset}{\supset}
490: \newcommand{\superseteq}{\supseteq}
491: 
492: \def\unionfromc{\,\textstyle\bigcup_{\scriptstyle c}\,}
493: \def\unionfromk{\,\textstyle\bigcup_{\scriptstyle k}\,}
494: 
495: 
496: 
497: 
498: 
499: 
500: 
501: 
502: 
503: %
504: %
505: \newcommand{\newlozenge}{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.7pt}\framebox[6pt]{\rule{0pt}{9pt}}}
506: 
507: %
508: %
509: 
510: %
511: 
512: 
513: %
514: %
515: %
516: %
517: \def\pair#1{{{\langle\!\!~#1~\!\!\rangle}}}
518: \def\pairs#1{{{\langle\!\!~#1~\!\!\rangle}}}
519: \newcommand{\piso}{\mbox{$\littlep$-iso\-mor\-phic}}
520: \newcommand{\manyonea}{\mbox{$\,\leq_{\rm m}^{{\littlep},\,A}\,$}}
521: \newcommand{\manyone}{\mbox{$\,\leq_{\rm m}^{{\littlep}}$\,}}
522: \newcommand{\paiso}{\mbox{$\littlep^A$-iso\-mor\-phic}}
523: \newcommand{\pisoa}{\paiso}
524: \newcommand{\pisoam}{\mbox{$\littlep^A$-iso\-mor\-phism}}
525: \newcommand{\pisom}{\mbox{$\littlep$-iso\-mor\-phism}}
526: \newcommand{\pselective}{\mbox{$\p$-selec\-tive}}
527: \newcommand{\sigmastar}{\mbox{$\Sigma^\ast$}}
528: \newcommand{\pisnp}{\mbox{$\p=\np$}}
529: \newcommand{\usuba}{\mbox{$U_A$}}
530: \newcommand{\univsuba}{\mbox{$Univ_A$}}
531: \newcommand{\pisnotnp}{\mbox{$\p\neq\np$}}
532: \newcommand{\lb}{\mbox{\{}}
533: \newcommand{\rb}{\mbox{\}}}
534: \newcommand{\pa}{\mbox{$\p^A$}}
535: \newcommand{\calf}{\mbox{$\cal F$}}
536: \newcommand{\calc}{\mbox{$\cal C$}}
537: \newcommand{\dr}{{\tt DodgsonRanking}}
538: \newcommand{\dw}{{\tt DodgsonWinner}}
539: \newcommand{\kw}{{\tt KemenyWinner}}
540: \newcommand{\score}{{\mbox{\it{}Score}}}
541: \newcommand{\dsum}{{\mbox{\it{}DodgsonSum}}}
542: \newcommand{\ds}{{\tt DodgsonScore}}
543: \newcommand{\xthreec}{{\tt ExactCoverByThreeSets}}
544: \newcommand{\satisfiability}{{\tt Satisfiability}}
545: \newcommand{\clique}{{\tt Clique}}
546: \newcommand{\threedm}{{\tt ThreeDimensionalMatching}}
547: \newcommand{\merge}{\mbox{\it{}Merge}}
548: \newcommand{\mergeprime}{\mbox{{\it{}Merge}$'$}}
549: \newcommand{\ncertifiesdefeat}{{\tt CertifiesTieOrDefeat}}
550: \newcommand{\specialdpproblem}{{\tt SpecialProblem}}
551: 
552: \newcommand{\kcolor}{{{\tt \mbox{K-}Colorability}}}
553: \newcommand{\threecolor}{{{\tt 3\mbox{-}Colorability}}}
554: \newcommand{\minthreeuncolor}{{\tt Minimal}\mbox{-}3\mbox{-}{\tt Uncolorability}}
555: \newcommand{\algthreecolor}{{{\tt A\mbox{-}3\mbox{-}Colorability}}}
556: 
557: \newcommand{\ddseqthreecolor}{{{\tt DD\mbox{-}SEQ\mbox{-}3\mbox{-}Colorability}}}
558: \newcommand{\slseqthreecolor}{{{\tt SL\mbox{-}SEQ\mbox{-}3\mbox{-}Colorability}}}
559: 
560: \newcommand{\maxthreesat}{{{\tt MAX\mbox{-}3\mbox{-}SAT}}}
561: 
562: \newcommand{\cfsp}{{{\tt{}CFSP}}}
563: %
564: \def\exactcfsp#1{{\tt{}Exact}\mbox{-}{#1}\mbox{-}{\tt{}CFSP}}
565: 
566: \newcommand{\mindom}{{{\tt Minimum\mbox{-}Dominating\mbox{-}Set}}}
567: \newcommand{\threedomatic}{{{\tt 3\mbox{-}DNP}}}
568: \newcommand{\kdomatic}{{{\tt k\mbox{-}DNP}}}
569: \newcommand{\domatic}{{{\tt DNP}}}
570: \newcommand{\domaticnumber}{{{\tt Domatic} {\tt Number}}}
571: \newcommand{\domaticnumberproblem}{{{\tt Domatic} {\tt Number} {\tt Problem}}}
572: \newcommand{\dnpodd}{{\tt DNP}\mbox{-}{\tt Odd}}
573: \newcommand{\dnpcompare}{{\tt DNP}\mbox{-}{\tt Geq}}
574: \newcommand{\dnpequal}{{\tt DNP}\mbox{-}{\tt Equ}}
575: 
576: \newcommand{\scriptodd}{\mbox{\scriptsize ${\tt odd}$}}
577: \newcommand{\scripteven}{\mbox{\scriptsize ${\tt even}$}}
578: 
579: \newcommand{\conveyorflowshop}{{{\tt Conveyor} {\tt Flow} {\tt Show}}}
580: \newcommand{\conveyor}{{\tt CFSP}}
581: \def\exactdomatic#1{{\tt{}Exact}\mbox{-}{#1}\mbox{-}{\tt{}DNP}}
582: \def\exactconveyor#1{{\tt{}Exact}\mbox{-}{#1}\mbox{-}{\tt{}CFSP}}
583: 
584: 
585: \newcommand{\ddseqint}{{{\tt DD\mbox{-}SEQINT}}}
586: \newcommand{\slseqint}{{{\tt SL\mbox{-}SEQINT}}}
587: 
588: \newcommand{\threesat}{{{\tt 3\mbox{-}SAT}}}
589: 
590: \newcommand{\voter}{\pair}
591: \newcommand{\npa}{\mbox{$\np^A$}}
592: \newcommand{\conpa}{\mbox{$\conp^A$}}
593: \newcommand{\upa}{\mbox{$\up^A$}}
594: \newcommand{\sparses}{\mbox{ sparse $S\,$}}
595: \newcommand{\bigo}{\mbox{$\cal O$}}
596: \newcommand{\condition}{\,\nottoobig{|}\:}
597: \def\land{{\; \wedge \;}}
598: 
599: 
600: %
601: %
602: 
603: %
604: \newcommand{\openNeighbors}{\mbox{$\mbox{\rm{}openNeighbors}_{\mathcal{P}}$}}
605: \newcommand{\openSets}{\mbox{$\mbox{\rm{}openSets}_{\mathcal{P}}$}}
606: \newcommand{\balance}{\mbox{$\mbox{\rm{}balance}_{\mathcal{P}}$}}
607: \newcommand{\surplus}{\mbox{$\mbox{\rm{}surplus}_{\mathcal{P}}$}}
608: \newcommand{\degree}{\mbox{\it deg}}
609: \newcommand{\area}{\mbox{$\mbox{\rm{}area}_{\mathcal{P}}$}}
610: \newcommand{\gap}{\mbox{$\mbox{\rm{}gap}_{\mathcal{P},\mathcal{A}}$}}
611: \newcommand{\sumgap}{\mbox{$\mbox{\rm{}sumgap}_{\mathcal{P},\mathcal{A}}$}}
612: \newcommand{\maxgap}{\mbox{$\mbox{\rm{}maxgap}_{\mathcal{P},\mathcal{A}}$}}
613: \newcommand{\mingap}{\mbox{$\mbox{\rm{}mingap}_{\mathcal{P},\mathcal{A}}$}}
614: \newcommand{\maxdegree}{\mbox{\it max-deg}}
615: \newcommand{\mindegree}{\mbox{\it min-deg}}
616: \newcommand{\mis}{\mbox{\it mis}}
617: \newcommand{\mdg}{\mbox{\it mdg}}
618: \newcommand{\mvc}{\mbox{\it mvc}}
619: \newcommand{\minmdg}{\mbox{\it min-mdg}}
620: \newcommand{\mined}{\mbox{\it min-ed}}
621: %
622: 
623: \newcommand{\parallelnp}{\mbox{$\p_{||}^{\scriptnp}$}}
624: \newcommand{\fooparallelnp}{\mbox{$\p_{||}^{\tinynp}$}}
625: \newcommand{\pnpbf}{\mbox{\rm P}_{\mbox{\protect\scriptsize\rm{}bf}}^{\scriptnp}}
626: \newcommand{\foopnpbf}{\mbox{\rm P}_{\mbox{\protect\tiny\rm{}bf}}^{\tinynp}}
627: 
628: \newcommand{\misequals}{\mbox{\tt MIS$_{\mbox{\footnotesize\tt equal}}$}}
629: \newcommand{\sone}{\mbox{${\cal S}_1$}}
630: \newcommand{\ar}{\mbox{${\cal A}_r$}}
631: \newcommand{\sr}{\mbox{${\cal S}_r$}}
632: \newcommand{\truthtable}{\mbox{$\,\leq_{\rm tt}^{{\littlep}}$\,}}
633: \newcommand{\turing}{\mbox{$\,\leq_{\rm T}^{{\littlep}}$\,}}
634: 
635: \def\bhlevel#1{{{\mbox{\rm{}BH}_{#1}(\np)}}}
636: \newcommand{\bhnp}{{{\mbox{\rm{}BH}(\np)}}}
637: \def\exactcolor#1{{\tt{}Exact}\mbox{-}{#1}\mbox{-}{\tt{}Colorability}}
638: \newcommand{\exactfourcolor}{{\tt{}Exact}\mbox{-}{\tt{}Four}\mbox{-}{\tt{}Colorability}}
639: 
640: \newcommand\seq{\subseteq}
641: \renewcommand\.{\cdot}
642: \newcommand\<{\langle}
643: \renewcommand\>{\rangle}
644: \newcommand\la{\ \leftarrow \ }
645: \newcommand\ra{\ \rightarrow \ }
646: \newcommand\lra{\ \leftrightarrow \ }
647: \newcommand\La{\ \Leftarrow \ }
648: \newcommand\Ra{\ \Rightarrow \ }
649: \newcommand\Lra{\ \Leftrightarrow \ }
650: \newcommand\lola{\ \longleftarrow \ }
651: \newcommand\lora{\ \longrightarrow \ }
652: \newcommand\lolra{\ \longleftrightarrow \ }
653: \newcommand\Lola{\ \Longleftarrow \ }
654: \newcommand\Lora{\, \Longrightarrow \ }
655: \newcommand\Lolra{\ \Longleftrightarrow \ }
656: \newcommand\Lolradef{\ :\Longleftrightarrow \ }
657: 
658: \newcommand{\naturalnumber}{\ensuremath{{  \mathbb{N} }}}
659: \def\nats{\naturalnumber}
660: 
661: \newcommand{\bigoh}{\mathcal{O}}
662: 
663: %
664: 
665: %
666: %
667: %
668: 
669: 
670: %
671: %
672: %
673: %
674: %
675: %
676: %
677: %
678: %
679: %
680: %
681: %
682: %
683: %
684: %
685: %
686: %
687: %
688: %
689: %
690: %
691: %
692: %
693: 
694: 
695: \newenvironment{construction}{\bigbreak\begin{block}}{\end{block}
696:     \bigbreak}
697: 
698: \newenvironment{block}{\begin{list}{\hbox{}}{\leftmargin 1em
699:     \itemindent -1em \topsep 0pt \itemsep 0pt \partopsep 0pt}}{\end{list}}
700: 
701: 
702: %
703: %
704: %
705: %
706: %
707: %
708: %
709: %
710: 
711: \dimen15=0.75em
712: \dimen16=0.75em
713: 
714: \newcommand{\lblocklabel}[1]{\rlap{#1}\hss}
715: 
716: \newenvironment{lblock}{\begin{list}{}{\advance\dimen15 by \dimen16
717:     \leftmargin \dimen15
718:     \itemindent -1em
719:     \topsep 0pt
720:     \labelwidth 0pt
721:     \labelsep \leftmargin
722:     \itemsep 0pt
723:     \let\makelabel\lblocklabel
724:     \partopsep 0pt}}{\end{list}}
725: 
726: 
727: %
728: %
729: 
730: \newenvironment{lconstruction}[2]{\dimen15=#1 \dimen16=#2
731:   \bigbreak\begin{block}}{\end{block}\bigbreak}
732: 
733: 
734: \newcommand{\Comment}[1]{{\sl (\  #1\ )}}
735: 
736: 
737: %
738: %
739: %
740: 
741: %
742: 
743: \newcommand{\finishCycles}{{\mbox{\sc Finish-Cycles}}}
744: \newcommand{\dominate}{{\mbox{\sc Dominate}}}
745: \newcommand{\assign}{{\mbox{\sc Assign}}}
746: \newcommand{\recalculateGaps}{{\mbox{\sc Recalculate-Gaps}}}
747: \newcommand{\finish}{{\mbox{\sc Finish-Graph}}}
748: \newcommand{\handleCriticalVertex}{{\mbox{\sc Handle-Critical-Vertex}}}
749: 
750: 
751: \newenvironment{algorithmus}{\begin{list}
752:    {{\bf Step~\arabic{alg}}.}
753:    {\usecounter{alg}}}{\end{list}}
754: \newcounter{alg}
755: 
756: \newenvironment{algorithmusfall}{\begin{list}
757:    {{\bf Case~\arabic{alg}}:}
758:    {\usecounter{alg}}}{\end{list}}
759: 
760: 
761: 
762: %
763: %
764: %
765: \title{An Exact $2.9416^n$ Algorithm for the Three Domatic Number
766:   Problem\thanks{Work supported in part by the DFG under Grant RO~1202/9-1.}}
767: 
768: \author{
769: Tobias Riege\thanks{Email: ${\tt riege@cs.uni\mbox{-}duesseldorf.de}$.}
770: \quad and \quad
771: J\"{o}rg Rothe\thanks{Email: ${\tt rothe@cs.uni\mbox{-}duesseldorf.de}$.} \\
772: Institut f\"ur Informatik \\
773: Heinrich-Heine-Universit\"at D\"usseldorf \\
774: 40225 D\"usseldorf, Germany
775: }
776: 
777: %
778: \date{June 24, 2005}
779: 
780: 
781: %
782: %
783: %
784: %
785: 
786: 
787: %
788: %
789: %
790: \lefthyphenmin=100
791: 
792: %
793: %
794: %
795: 
796: %
797: %
798: %
799: %
800: %
801: 
802: %
803: %
804: %
805: %
806: %
807: %
808: 
809: %
810: %
811: %
812: %
813: %
814: %
815: %
816: %
817: %
818: %
819: %
820: %
821: 
822: 
823: 
824: %
825: %
826: %
827: %
828: %
829: %
830: %
831: %
832: 
833: %
834: %
835: %
836: %
837: %
838: %
839: %
840: %
841: %
842: \makeatletter
843: \def\@listI{\leftmargin\leftmargini \parsep 4.5pt plus 1pt minus 1pt\topsep
844: 6pt plus 2pt minus 2pt \itemsep  2pt plus 2pt minus 1pt}
845: 
846: \let\@listi\@listI
847: \@listi
848: \makeatother
849: 
850: %
851: 
852: \newcommand{\anvec}[2]{\mbox{$#1_1, \ldots, #1_{#2}$}}
853: \newcommand{\anvecplus}[2]{\mbox{$#1_1, #1_2, \ldots, #1_{#2}$}}
854: 
855: \newcommand{\mujp}{\mbox{$\mu_{j,p}$}}
856: \newcommand{\tjp}{\mbox{$T_{(j,p)}$}}
857: 
858: \newcommand{\naesat}{{{\tt NAE\mbox{-}3\mbox{-}SAT}}}
859: \newcommand{\onethreesat}{{{\tt 1\mbox{-}3\mbox{-}SAT}}}
860: 
861: \newcommand{\Pos}{\mathbb{N^+}}
862: 
863: \newcommand{\eksp}{{\tt Exact}\mbox{-$(k, \sigma, \rho)$-}{\tt Partition}}
864: \newcommand{\ekspargs}[3]{{\tt Exact}\mbox{-$({#1}, {#2}, {#3})$-}{\tt Partition}}
865: \newcommand{\kspset}{\mbox{$(\sigma, \rho)$}}
866: \newcommand{\ksparg}[1]{\mbox{$({#1}, \sigma, \rho)$}}
867: \newcommand{\kspargpartition}[1]{\mbox{$({#1}, \sigma, \rho)$-}{\tt Partition}}
868: \newcommand{\kspargs}[3]{\mbox{$({#1}, {#2}, {#3})$}}
869: \newcommand{\kspargspartition}[3]{\mbox{$({#1}, {#2}, {#3})$-}{\tt Partition}}
870: \newcommand{\kspargszwei}[2]{\mbox{$({#1}, {#2})$}}
871: 
872: 
873: \begin{document}
874: 
875: %
876: %
877: %
878: %
879: %
880: \typeout{WARNING:  BADNESS used to suppress reporting!  Beware!!}
881: \hbadness=3000%
882: \vbadness=10000 %
883: 
884: 
885: 
886: 
887: 
888: 
889: %
890: %
891: %
892: 
893: %
894: %
895: %
896: %
897: %
898: %
899: %
900: %
901: %
902: %
903: \setcounter{page}{1}
904: 
905: 
906: %
907: 
908: \sloppy
909: 
910: %
911: %
912: \setcounter{footnote}{0}
913: %
914: 
915: \maketitle
916: 
917: %
918: %
919: %
920: 
921: %
922: %
923: \begin{abstract}
924: \noindent
925: The three domatic number problem asks whether a given undirected graph
926: can be partitioned into at least three dominating sets, i.e., sets
927: whose closed neighborhood equals the vertex set of the graph.  Since
928: this problem is NP-complete, no polynomial-time algorithm is known for
929: it.  The naive deterministic algorithm for this problem runs in
930: time~$3^n$, up to polynomial factors.  In this paper, we design an
931: exact deterministic algorithm for this problem running in
932: time~$2.9416^n$.  Thus, our algorithm can handle problem instances of
933: larger size than the naive algorithm in the same amount of time.  We
934: also present another deterministic and a randomized algorithm for this
935: problem that both have an even better performance for graphs with
936: small maximum degree.
937: 
938: \vspace*{.5cm}
939: \noindent
940: \begin{tabular}{ll}
941: {\bf Key words:}
942:  & Exact algorithms, domatic number problem 
943: \end{tabular}
944: \end{abstract}
945: 
946: %
947: 
948: %
949: %
950: %
951: %
952: %
953: %
954: \setcounter{page}{1}
955: %
956: %
957: \pagestyle{plain}
958: %
959: \sloppy
960: 
961: %
962: 
963: \setcounter{page}{1}
964: 
965: \section{Introduction}
966: 
967: In this paper, we design a deterministic algorithm for the three
968: domatic number problem, which is one of the standard $\np$-complete
969: problems, see Garey and Johnson~\cite{gar-joh:b:int}.  This problem
970: asks, given an undirected graph~$G$, whether or not the vertex set of
971: $G$ can be partitioned into three dominating sets.  A dominating set
972: is a subset of the vertex set that ``dominates'' the graph in that its
973: closed neighborhood covers the entire graph.  Motivated by the tasks
974: of distributing resources in a computer network and of locating
975: facilities in a communication network, this problem and the related
976: problem of finding a minimum dominating set in a given graph have been
977: thoroughly studied, see, e.g.,
978: \cite{coc-hed:j:towards-theory-of-domination,far:j:domatic-number-strongly-chordal-graphs,bon:j:domatic-number-circular-arc-graphs,kap-sha:j:domatic-number,heg-tel:j:generalized-dominating-sets,fei-hal-kor:c:approximating-domatic-number,rie-rot:j:exact-dnp}.
979: 
980: The exact (i.e., deterministic) algorithm designed in this paper runs
981: in exponential time.  However, its running time is better than that of
982: the naive exact algorithm for this problem.  That is, we improve the
983: trivial $\tilde{\mathcal{O}}(3^n)$ time bound to a time bound
984: of~$\tilde{\mathcal{O}}(2.9416^n)$, where the $\tilde{\mathcal{O}}$
985: notation neglects polynomial factors as is common for exponential-time
986: algorithms.  The point of such an improvement is that a
987: $\tilde{\mathcal{O}}(c^n)$ algorithm, where $c < 3$ is a constant, can
988: deal with larger instances than the trivial $\tilde{\mathcal{O}}(3^n)$
989: algorithm in the same amount of time before the exponential growth
990: rate eventually hits and the running time becomes infeasible.  For
991: example, if $c = \sqrt{3} \approx 1.732$ then we have
992: $\tilde{\bigoh}\left(\sqrt{3}^{\, 2n}\right) = \tilde{\bigoh}(3^n)$,
993: so one can deal with inputs twice as large as before.  Doubling the
994: size of inputs that can be handled by some algorithm can make quite a
995: difference in practice.
996: 
997: Exact exponential-time algorithms with improved running times have
998: been designed for various other important $\np$-complete problems.
999: For example, Dantsin et al.~\cite{dan-etal:j:det-alg-for-ksat} pushed
1000: the trivial $\tilde{\bigoh}(2^n)$ bound for the three satisfiability
1001: problem down to~$\tilde{\bigoh}(1.481^n)$, which was further improved
1002: to $\tilde{\bigoh}(1.473^n)$ by Brueggemann and
1003: Kern~\cite{bru-ker:t:local-search-threesat}.
1004: Schöning~\cite{sch:j:constraint-satisfaction}, Hofmeister et
1005: al.~\cite{hof-sch-sch-wat:c:probabilistic-threesat-alg-further-improved}
1006: and Paturi et al.~\cite{pat-pud-sak-zan:c:exptime-algorithm-for-ksat}
1007: proposed even better randomized algorithms for the satisfiability
1008: problem.  Combining their ideas, the currently best randomized
1009: algorithm for this problem is due to Iwama and
1010: Tamaki~\cite{iwa-tak:t:improved-upper-bound-threesat}, who achieve a
1011: time bound of~$\tilde{\bigoh}(1.324^n)$.
1012: 
1013: The currently best exact time bound of $\tilde{\bigoh}(1.211^n)$ for
1014: the independent set problem is due to
1015: Robson~\cite{rob:j:exact-alg-for-independent-set}.
1016: Eppstein~\cite{epp:c:algs-for-three-sat-threecolor,epp:c:exact-alg-for-graph-coloring}
1017: achieved a $\tilde{\bigoh}(2.415^n)$ time bound for graph coloring and
1018: a $\tilde{\bigoh}(1.3289^n)$ for the special case of graph three
1019: colorability.  Fomin, Kratsch, and
1020: Woeginger~\cite{fom-kra-woe:c:exact-algorithm-for-dominating-set}
1021: improved the trivial $\tilde{\bigoh}(2^n)$ bound for the dominating
1022: set problem to~$\tilde{\bigoh}(1.93782^n)$.  Comprehensive surveys on
1023: this subject have been written by
1024: Woeginger~\cite{woe:b:exact-algorithms-for-np-hard-problems} and
1025: Schöning~\cite{sch:c:algorithmics-in-exponential-time}.
1026: 
1027: 
1028: In designing domatic number algorithms, it might be tempting to exploit known
1029: results (such as Eppstein's $\tilde{\bigoh}(1.3289^n)$ bound) for the
1030: graph three colorability problem, which resembles the three domatic
1031: number problem in that both are partitioning problems.  However, as
1032: Cockayne and Hedetniemi~\cite{coc-hed:j:towards-theory-of-domination}
1033: point out, the theory of domination is dual to the theory of
1034: coloring in the following sense.  Coloring is based on the hereditary
1035: property of independence.  A graph property
1036: is {\em hereditary\/} if whenever some set of vertices has the
1037: property then so does every subset of it.  In contrast, domination is
1038: an {\em expanding\/} property in that every superset of a dominating
1039: set also is a dominating set of the graph.  Further, graph colorability is a
1040: minimum problem, whereas the domatic 
1041: number problem is a maximum problem.  Independence (and thus
1042: colorability) can be seen as a {\em local\/} property, since it
1043: suffices to check the immediate neighborhood of a set of vertices to
1044: determine whether or not it is independent.  In contrast, dominance is
1045: a {\em global\/} property, since in order to check it one has to
1046: consider the relation between the given set of vertices and the entire
1047: graph.  In this sense, determining the domatic number of a graph
1048: intuitively appears to be harder than computing its chromatic number,
1049: notwithstanding that both problems are $\np$-complete.  More to the
1050: point, the algorithms developed for graph coloring seem to be of no
1051: help in designing algorithms for dominating set or domatic number
1052: problems.
1053: 
1054: After introducing some definitions and notation in
1055: Section~\ref{sec:prelims}, we describe and analyze our algorithm in
1056: Section~\ref{sec:algo}; the actual pseudo-code is shifted to the
1057: appendix.  In Section~\ref{sec:bounded-max-degree}, we give another
1058: deterministic and a randomized algorithm, which have an even better
1059: running time for graphs with small maximum degree. Finally, we
1060: summarize and discuss our results in Section~\ref{sec:conclusion}.
1061: 
1062: \section{Preliminaries and Simple Observations}
1063: \label{sec:prelims}
1064: 
1065: We start by introducing some graph-theoretical notation.  We only
1066: consider simple, undirected graphs without loops in this paper.  Let
1067: $G = (V,E)$ be a graph.  Unless stated otherwise, $n$ denotes the
1068: number of vertices in~$G$. The {\em neighborhood of a vertex~$v$ in
1069: $V$\/} is defined by $N(v) = \{ u \in V \condition \{u,v\} \in E \}$,
1070: and the {\em closed neighborhood of~$v$\/} is defined by $N[v] = N(v)
1071: \cup \{ v \}$.  For any subset $S \seq V$ of the vertices of~$G$,
1072: define $N[S] = \bigcup_{v \in S} N[v]$ and $N(S) = N[S] - S$.  The
1073: {\em degree of a vertex $v$ in $G$\/} is the number of vertices
1074: adjacent to~$v$, i.e., $\degree_G(v) = ||N(v)||$.  If the graph $G$ is
1075: clear from the context, we omit the subscript~$G$.  Define the {\em
1076: minimum degree in $G$\/} by $\mindegree(G) = \min_{v \in V}
1077: \degree(v)$, and the {\em maximum degree in $G$\/} by $\maxdegree(G) =
1078: \max_{v \in V} \degree(v)$.  
1079: A path $P_k = u_1 u_2 \cdots u_k$ of length 
1080: $k$ is a sequence of $k$ vertices, where each vertex is adjacent to
1081: its successor, i.e., $\{u_i, u_{i+1} \} \in E$ for $1 \leq i \leq k-1$. 
1082: If, in addition, $\{ u_k, u_1 \} \in E$, then path $P_k$ is said
1083: to be a {\em cycle}, and we write $C_k$ instead of $P_k$.
1084: 
1085: %
1086: %
1087: %
1088: 
1089: \begin{definition}  
1090: Let $G = (V,E)$ be a graph.  A subset $D \seq V$ is a {\em dominating
1091: set of~$G$\/} if and only if $N[D] = V$, i.e., if and only if every
1092: vertex in $G$ either belongs to~$D$ or has some neighbor in~$D$.  The
1093: {\em domination number of~$G$}, denoted~$\gamma(G)$, is the minimum
1094: size of a dominating set of~$G$. The {\em domatic number of~$G$},
1095: denoted~$\delta(G)$, is the maximum number of disjoint dominating sets
1096: of~$G$, i.e., $\delta(G)$ is the maximum $k$ such that $V = V_1 \cup
1097: V_2 \cup \ldots \cup V_k$, where $V_i \cap V_j = \emptyset$ for $1
1098: \leq i < j \leq k$, and each $V_i$ is a dominating set of~$G$.
1099: %
1100: %
1101: %
1102: The {\em dominating set problem\/} asks, given a graph $G$ and a
1103: positive integer~$k$, whether or not $\gamma(G) \leq k$.
1104: %
1105: %
1106: The {\em domatic number problem\/} asks, given a graph $G$ and a
1107: positive integer~$k$, whether or not $\delta(G) \geq k$.
1108: \end{definition}
1109: 
1110: For fixed $k \geq 3$, both the dominating set problem and the domatic
1111: number problem are known to be $\np$-complete, see Garey and
1112: Johnson~\cite{gar-joh:b:int}.  Thus, they are not solvable in
1113: deterministic polynomial time unless $\p = \np$, and all we can hope
1114: for is to design an exponential-time algorithm having a better running
1115: time than the trivial exponential time bound.
1116: %
1117: For exponential-time algorithms, it is common to drop polynomial factors,
1118: as indicated by the $\tilde{\bigoh}$ notation: For functions $f$
1119: and~$g$, we write $f \in \tilde{\bigoh}(g)$ if and only if $f \in
1120: \bigoh(p \cdot g)$ for some polynomial~$p$.
1121: The naive deterministic
1122: algorithm for the dominating set problem runs in time
1123: $\tilde{\bigoh}(2^n)$.  Fomin, Kratsch, and
1124: Woeginger~\cite{fom-kra-woe:c:exact-algorithm-for-dominating-set}
1125: improved this trivial upper bound to~$\tilde{\bigoh}(1.93782^n)$.  For
1126: various restricted graph classes, they achieve even better bounds.
1127: 
1128: The naive deterministic algorithm for the domatic number problem works
1129: as follows: Given a graph~$G$ and an integer~$k$, it sequentially
1130: checks every potential solution (i.e., every possible partition of the
1131: vertex set of $G$ into $k$ sets $D_1, D_2, \ldots, D_k$), and accepts
1132: if and only if a correct solution is found (i.e., if and only if each
1133: $D_i$ is a dominating set).  How many potential solutions are there?
1134: The number of ways of partitioning a set with $n$ elements into $k$
1135: nonempty, disjoint subsets
1136: %
1137: %
1138: %
1139: %
1140: %
1141: %
1142: can be calculated by the Stirling number of the second kind:
1143: $S_2(n,k) = \frac{1}{k!} \sum_{i=0}^{k-1} (-1)^i {k \choose i} (k-i)^n$,
1144: which yields a running time of~$\tilde{\bigoh}(k^n)$.
1145: A better result can be achieved via the dynamic programming across the subsets
1146: technique, which was introduced by Lawler~\cite{law:j:complexity-chromatic} to
1147: compute the chromatic number of a graph by exploiting the fact that every
1148: minimum chromatic partition contains at least one maximum independent set.  By
1149: suitably modifying this technique, one can compute the domatic number of a
1150: graph in time~$\tilde{\bigoh}(3^n)$. This is done by generating all
1151: dominating sets of the graph with increasing cardinality, which takes time
1152: \[
1153: \sum_{k = 0}^n {n \choose k} 2^k = (1 + 2)^n = 3^n.
1154: \]
1155: The difference to Lawler's algorithm lies in the fact that all
1156: dominating sets need to be checked, whereas only maximum independent
1157: sets are relevant to compute the chromatic number.
1158: 
1159: \begin{proposition}
1160: \label{prop:lawler-domatic}
1161: Let $G = (V,E)$ be a graph. Then, the domatic number $\delta(G)$ can
1162: be computed in time~$\tilde{\bigoh}(3^n)$.
1163: \end{proposition}
1164: 
1165: %
1166: One tempting way of designing an improved algorithm for the domatic number
1167: problem might be to exploit the result for the dominating set problem
1168: mentioned above.  However, we observe that no such useful connection between
1169: the two problems exists in general.
1170: %
1171: The first part of Proposition~\ref{prop:mds-dnp} shows that an
1172: arbitrary given minimum dominating set is not necessarily part of a
1173: partition into a maximum number of dominating sets.  The second part
1174: of Proposition~\ref{prop:mds-dnp} shows that, given an arbitrary
1175: partition into a maximum number of dominating sets, it is not
1176: necessarily the case that one set of the partition indeed is a minimum
1177: dominating set.  Thus, for solving the domatic number problem, one
1178: cannot use in any obvious way the exact $\tilde{\bigoh}(1.93782^n)$
1179: algorithm for the dominating set problem by Fomin et
1180: al.~\cite{fom-kra-woe:c:exact-algorithm-for-dominating-set}.
1181: %
1182: %
1183: Proposition~\ref{prop:mds-dnp} is stated for graphs with domatic number~$3$;
1184: it can easily be generalized to graphs with domatic number $k \geq 3$.
1185: The proof of Proposition~\ref{prop:mds-dnp} can be found in the appendix.
1186: 
1187: \begin{proposition}
1188: \label{prop:mds-dnp}
1189: \begin{enumerate}
1190: \item There exists some graph $G$ with $\delta(G) = 3$ such that some minimum
1191:   dominating set $D$ of $G$ is not part of any partition into three dominating
1192:   sets of~$G$.
1193:   
1194: \item There exists some graph $H = (V,E)$ with $\delta(H) = 3$ such
1195:   that for each partition $V = D_1 \cup D_2 \cup D_3$ into three
1196:   dominating sets of $H$ and for each~$i$, $||D_i|| > \gamma(H)$.
1197: %
1198: %
1199: %
1200: \end{enumerate}
1201: \end{proposition}
1202: 
1203: For the three domatic number problem, no algorithm with a running
1204: time better than~$\tilde{\bigoh}(3^n)$ is known.
1205: %
1206: We improve this trivial upper bound to~$\tilde{\bigoh}(2.9416^n)$.
1207: 
1208: We now define some technical notions suitable to measure how
1209: ``useful'' a vertex is to achieve domination of the graph~$G = (V,E)$.
1210: Intuitively, the vertex degree is a good (local) measure, since the
1211: larger the neighborhood of a vertex is, the more vertices are
1212: potentially dominated by the set to which it belongs.  The technical
1213: notions introduced in Definition~\ref{def:notions-for-algorithm} will
1214: be used later on to describe our algorithm.
1215: 
1216: \begin{definition}
1217: \label{def:notions-for-algorithm}
1218:   Let $G = (V,E)$ be a graph with $n$ vertices, and let $\mathcal{P} =
1219:   (D_1, D_2, D_3, R)$ be a partition of $V$ into four sets, $D_1$,
1220:   $D_2$, $D_3$, and~$R$.  The subsets $D_i$ of $V$ will eventually
1221:   yield a partition of $V$ into the three dominating sets (if they
1222:   exist) to be constructed, and the subset $R \seq V$ collects the
1223:   remaining vertices not yet assigned at the current point in the
1224:   computation of the algorithm.  Let $r = || R ||$ be the number of
1225:   these remaining vertices, and let $d = n-r$
1226: %
1227: be the number of vertices already assigned to some set~$D_i$. The {\em
1228:   area of $G$ covered by $\mathcal{P}$} is defined as
1229:   $\area(G) = \sum_{i=1}^3 || N[D_i] ||$.
1230: Note that $\area(G) = 3n$ if and only if $D_1$, $D_2$, and $D_3$ are
1231: dominating sets of~$G$. For a partition~$\mathcal{P}$, we also define
1232: the {\em surplus of graph $G$} as
1233: $\surplus(G) = \area(G) - 3d$.
1234:  
1235: Some of the vertices in $R$ may be assigned to three, not necessarily
1236: disjoint, auxiliary sets~$A_1$, $A_2$, and~$A_3$ arbitrarily.  Let
1237: $\mathcal{A} = (A_1, A_2, A_3)$.  For each vertex $v \in R$ and for
1238: each $i$ with $1 \leq i \leq 3$, define the {\em gap of vertex $v$
1239: with respect to set $D_i$\/} by
1240: \[
1241: \gap(v,i) = \left\{
1242: \begin{array}{ll}
1243:  || N[v] ||
1244:  - || \{ u \in N[v] \condition (\exists w \in N[u]) [ w \in D_i] \} || 
1245:  & \mbox{if $v \notin A_i$} \\
1246:  \bot & \mbox{otherwise,}
1247: \end{array} 
1248: \right.
1249: \]
1250: where $\bot$ is a special symbol that indicates that $\gap(v,i)$ is
1251: undefined for this $v$ and~$i$.  (Our algorithm will make sure
1252: to properly handle the cases of undefined gaps.)
1253: 
1254: Additionally, given $\mathcal{P}$ and~$\mathcal{A}$, define
1255: %
1256: %
1257: for all vertices $v \in R$:
1258: \begin{eqnarray*}
1259: \maxgap(v)
1260:  & = & \max \{ \gap(v,i) \condition 1 \leq i \leq 3 \}, \\
1261: \mingap(v)
1262:  & = & \min \{ \gap(v,i) \condition 1 \leq i \leq 3 \}, \\
1263: \sumgap(v)
1264:  & = & \sum_{i=1}^{3} \gap(v,i).
1265: \end{eqnarray*}
1266: 
1267: Given $G$, $\mathcal{P}$, and~$\mathcal{A}$, define the {\em maximum
1268: gap of $G$\/} and the {\em minimum gap of $G$\/} by taking the maximum
1269: and minimum gaps over all vertices in~$G$ not yet assigned:
1270: \begin{eqnarray*}
1271: \maxgap(G)
1272:  & = & \max \{ \maxgap(v) \condition v \in R \}, \\
1273: \mingap(G)
1274:  & = & \min \{ \mingap(v) \condition v \in R \}.
1275: \end{eqnarray*}
1276: 
1277: Let $\mathcal{P}$ be given. A vertex $u \in V$ is called an
1278: {\em open neighbor of $v \in V$\/} if 
1279: %
1280: $u \in N[v]$ and $u$ has not been assigned
1281: to any set $D_1$, $D_2$, or $D_3$ yet.  A potential dominating set
1282: $D_i$, $1 \leq i \leq 3$, is called an {\em open set of $v \in V$\/}
1283: if its closed neighborhood does not include~$v$, i.e., $v$ is not
1284: dominated by $D_i$. The {\em balance of $v \in V$} is defined as
1285: the difference between the number of open vertices and the number
1286: of open sets.  Formally, define
1287: \begin{eqnarray*}
1288: \openNeighbors(v) & = & \{ u \in N[v] \condition u \in R \}, \\
1289: \openSets(v) & = & \{ i \in \{1,2,3 \} \condition
1290:  v \notin N[D_i] \}, \\
1291: \balance(v) & = & || \openNeighbors(v) || - || \openSets(v) ||.
1292: \end{eqnarray*}
1293: We call a vertex $v \in V$ {\em critical\/} if and only if
1294: $\balance(v) \leq 0$ and $|| \openSets(v) || > 0$.
1295: \end{definition}
1296: 
1297: The proof of the next proposition is straightforward. Once
1298: $\balance(v) = 0$, no two vertices remaining in $N[v] \cap R$ can
1299: be assigned to the same dominating set $D_i$, $1 \leq i \leq 3$,
1300: since $\balance(v)$ would then be negative.
1301: 
1302: \begin{proposition}
1303: \label{prop:critical}
1304: Let $\mathcal{P} = (D_1, D_2, D_3, R)$ be given as in
1305: Definition \ref{def:notions-for-algorithm} , and $v \in V$ be
1306: a critical vertex for this partition. The only way to modify
1307: $\mathcal{P}$ so as to contain three dominating sets is to assign
1308: all vertices $u \in N[v] \cap R$ to distinct dominating sets~$D_i$.
1309: \end{proposition}
1310: 
1311: 
1312: \section{The Algorithm}
1313: \label{sec:algo}
1314: 
1315: Our strategy is to recursively assign the vertices $v \in V$ to obtain
1316: a correct potential solution consisting of a partition into three
1317: dominating sets, $D_1$, $D_2$, and~$D_3$.  Once a previous assignment
1318: of $v$ to some set $D_i$ turns out to be wrong, we remember this by
1319: adding this vertex to~$A_i$.  More precisely, the basic idea
1320: %
1321: is to first pick those vertices with the highest
1322: maximum gap.  While the algorithm is progressing, it dynamically
1323: updates the gaps for every vertex in each step.
1324: %
1325: %
1326: %
1327: %
1328: We now state our main result.
1329: 
1330: \begin{theorem}
1331: \label{the:detalgo}
1332:   The three domatic number problem can be solved by a deterministic algorithm
1333:   running in time~$\tilde{\bigoh}(2.9416^n)$.
1334: \end{theorem}
1335: 
1336: \begin{proofs}
1337: Let $G = (V,E)$ be the given graph.  The algorithm seeks to find a
1338: partition of $V$ into three disjoint dominating sets.
1339: %
1340: Note that every vertex $v \in V$ is contained in one of these sets and is
1341: dominated by the remaining two sets, i.e., it is adjacent to at least one of
1342: their elements. The algorithm is described in pseudo-code in the appendix,
1343: see Figures~\ref{fig:dnp}, \ref{fig:domatic}, \ref{fig:domatic},
1344: \ref{fig:assign}, \ref{fig:recalc}, and~\ref{fig:handle}. Since
1345: $\delta(G) \leq \mindegree(G) + 1$, we may assume that $\mindegree(G)
1346: \geq 2$.
1347: 
1348: The algorithm starts by initializing the potential dominating sets
1349: $D_1, D_2$, and $D_3$ and the auxiliary sets~$A_1$, $A_2$, and~$A_3$,
1350: setting each to the empty set.
1351: The initial partition thus is $\mathcal{P} =
1352: (\emptyset, \emptyset, \emptyset, V)$ and the initial triple of
1353: auxiliary sets is $\mathcal{A} = (\emptyset, \emptyset, \emptyset)$.
1354: 
1355: %
1356: %
1357: %
1358: %
1359: %
1360: %
1361: %
1362: %
1363: %
1364: 
1365: %
1366: %
1367: %
1368: %
1369: %
1370: %
1371: %
1372: %
1373: %
1374: %
1375: %
1376: %
1377: %
1378: %
1379: %
1380: %
1381: %
1382: %
1383: %
1384: %
1385: %
1386: %
1387: %
1388: %
1389: %
1390: 
1391: 
1392: Then, the recursive function $\dominate$ is called for the first time.
1393: It is always invoked with graph $G$, a partition $\mathcal{P} = (D_1,
1394: D_2, D_3, R)$, and a triple $\mathcal{A} = (A_1, A_2, A_3)$ of not
1395: necessarily disjoint auxiliary sets. $\mathcal{P}$ and $\mathcal{A}$
1396: represent a situation in which the vertices in $V - R$ have been
1397: assigned to 
1398: %
1399: $D_1$, $D_2$, and~$D_3$, and $v \in A_i$ means that in some previous
1400: recursive call to function $\dominate$ the vertex $v$ has been
1401: assigned to~$D_i$ without successfully changing $\mathcal{P}$ to
1402: contain three dominating sets.
1403: 
1404: Function $\dominate$ starts by calling $\recalculateGaps$, which
1405: calculates all gaps with respect to $\mathcal{P}$ and~$\mathcal{A}$.
1406: Additionally, $\openNeighbors(v)$, $\openSets(v)$, and $\balance(v)$
1407: are determined for every vertex $v \in V$. 
1408: %
1409: Four trivial cases can occur.
1410: 
1411: \begin{construction}
1412:   \item {\bf Case 1:} The sets $D_1$, $D_2$, and $D_3$ are dominating
1413:   sets of graph $G$. In this case, we are done and may add the
1414:   remaining vertices $v \in R$ to any set~$D_i$, say to~$D_1$.
1415: 
1416:   \item {\bf Case 2:} For some vertex $v \in V$, we have $\balance(v)
1417:         < 0$. That is, there are less vertices in $R \cap N[v]$ than
1418:         dominating sets with $v \notin N[D_i]$. Thus, no matter how the
1419:         vertices in $R \cap N[v]$ are assigned, $\mathcal{P}$ won't
1420:         contain three dominating sets.  We have run into a dead-end and
1421:         return to the previous level of the recursion.
1422: 
1423: %
1424: %
1425: %
1426: %
1427: %
1428: %
1429: 
1430:   \item {\bf Case 3:} There exists a vertex $v \in R$ that is also a
1431:         member of two of the auxiliary sets $A_1$, $A_2$, and
1432:         $A_3$. Hence, vertex $v$ was previously assigned to two
1433:         distinct sets $D_i$ and~$D_j$, $1 \leq i < j \leq 3$, but the
1434:         recursion returned without success. We assign $v$ to the only
1435:         possible set $D_k$ left, with $i \neq k \neq j$.
1436: %
1437: 
1438:   \item {\bf Case 4:} For some vertex $v \in V$, we have $\balance(v)
1439:         = 0$ and $|| \openSets(v) || > 0$.  That is, $v$ is a critical
1440:         vertex, since it is not dominated by all three sets~$D_1$, $D_2$,
1441:         and $D_3$ contained in the current~$\mathcal{P}$, and there are
1442:         as many open neighbors as open sets left for it. Note that this
1443:         is the case for each vertex $v$ with $\degree(v) = 2$ and
1444:         $N[v] \cap R \not= \emptyset$, as $v$ and its two neighbors
1445:         have to be assigned to three different dominating sets. We
1446:         select one of the at most three vertices left in $N[v] \cap
1447:         R$, say~$u$, and call function $\assign(G, \mathcal{P},
1448:         \mathcal{A}, u, i)$ for all $i$ with $u \notin A_i$.
1449: \end{construction}
1450: 
1451: Function $\handleCriticalVertex$ deals with the latter three of these
1452: trivial cases.  After they have been ruled out, one of the remaining
1453: vertices $v \in R$ is selected and assigned to one of the three
1454: sets~$D_i$, under the constraint that a vertex $v \in R$ cannot be
1455: added to $D_i$ if it is already a member of~$A_i$.  This case occurs
1456: whenever the recursion returns
1457: %
1458: because no three dominating sets could be found with this
1459: combination.  The recursion continues by calling $\assign(G,
1460: \mathcal{P}, \mathcal{A}, v, i)$, which adds $v$ to~$D_i$, and then
1461: calls $\dominate(G, \mathcal{P}, \mathcal{A})$.
1462: %
1463: %
1464: If no three dominating sets are found by this choice, we remember this
1465: by adding $v$ to the set~$A_i$. A final call to $\dominate$ is made
1466: without assigning a vertex to one potential dominating set~$D_i$.  If
1467: this call fails, the recursion returns to the previous level.  This
1468: completes the description of the algorithm.  We now argue that it is
1469: correct and estimate its running time.
1470: 
1471: To see that the algorithm works correctly, note that it outputs three
1472: sets~$D_1$, $D_2$, and~$D_3$ only if they each are dominating sets
1473: of~$G$.  It remains to prove that these sets are definitely found in
1474: the recursion tree.  All drop-backs within the recursion occur when,
1475: for the current $\mathcal{P} = (D_1, D_2, D_3, R)$, we have
1476: $\balance(v) < 0$ for some vertex $v \in V$.  Thus,
1477: %
1478: %
1479: $\mathcal{P}$ cannot be modified so as to contain a correct partition
1480: into three dominating sets on this branch of the recursion tree.
1481: Since the algorithm checks every possible partition of $G$ into three
1482: sets, unless it is stopped by such a drop-back, a partition into three
1483: dominating sets will be found, if it exists.  If the algorithm does
1484: not find three dominating sets, it eventually terminates when
1485: returning from the first recursive call of function $\dominate$. It
1486: reports the failure, and thus always yields the correct output.
1487: 
1488: To estimate the running time of the algorithm, an important
1489: observation is that the recalculation of the gaps takes no more than
1490: quadratic time in~$n$, the number of vertices of the graph $G$. Thus,
1491: in terms of the $\tilde{\bigoh}$-notation, the running time of the
1492: algorithm depends solely on the number of recursive calls.  Let $T(m)$
1493: be the number of steps of the algorithm, where $m$ is the number of
1494: potential dominating sets left for all vertices that have not been
1495: selected as yet. Initially, every vertex may be a member of any of the
1496: three dominating sets to be constructed (if they exist), hence $m =
1497: 3n$.
1498: 
1499: There are two scenarios where the algorithm calls function $\dominate$
1500: recursively. If $\handleCriticalVertex$ detects a vertex $v \in V$ as
1501: being critical, it selects a vertex $u \in N[v] \cap R$ and calls
1502: function $\assign$ (and thus $\dominate$) for each $i$ with $u \notin
1503: A_i$. Since every critical vertex $v \in V$ remains critical as long
1504: as $N[v] \cap R \not= \emptyset$, function $\handleCriticalVertex$
1505: will be called until all vertices in $N[v] \cap R$ have been assigned
1506: to any of~$D_1$, $D_2$, and~$D_3$.  Since $|| \openSets(v) || \leq 3$,
1507: at most three vertices in the closed neighborhood of $v$ have not been
1508: assigned when $v$ turns critical.  By Proposition~\ref{prop:critical},
1509: all vertices in $N[v] \cap R$ have to be assigned to different
1510: dominating sets.  If $|| \openNeighbors(v) || = 3$, we have at most
1511: six combinations; if we have two open neighbors for a critical vertex,
1512: there are at most two combinations left; and finally, for one open
1513: neighbor $u \in N[v] \cap R$, there remains only one possible choice
1514: to assign $u$ to one of the sets~$D_1$, $D_2$, and~$D_3$. Thus, in the
1515: worst case, we have $T(m) \leq 6 T(m-6)$, as we will handle three
1516: vertices for which at least two choices for dominating sets are left.
1517: With $m = 3n$, it follows that $T(m) \leq 6^{m/6} = 6^{n/2}$, i.e.,
1518: $T(m) = \tilde{\bigoh}(2.4495^n)$.
1519: 
1520: The only other branching into two different recursive calls happens in
1521: the main body of function $\dominate$, when selecting a vertex $v$
1522: with the currently highest maximum gap with respect to $\mathcal{P}$
1523: and~$\mathcal{A}$.  Two cases might occur.  On the one hand, we might
1524: have considered a correct dominating set $D_i$ for~$v$. If $v$ had not
1525: been looked at so far, i.e., if $v$ is not contained in any set $A_j$,
1526: $1 \leq j \leq 3$, $j \neq i$, we have eliminated all three possible
1527: sets for $v$ to belong to.  Thus, in this case, $T(m) = T(m -3)$. On
1528: the other hand, if the algorithm returns from the recursion and thus
1529: did not make the right choice for~$v$, we have $T(m) = T(m - 1)$,
1530: since $v$ is added to~$A_i$, and function $\dominate$ is called
1531: without assigning any vertex.  Summing up, we have $T(m) \leq T(m-1) +
1532: T(m-3)$.  In the second case, we have already visited vertex $v$ in a
1533: previous stage of the algorithm and unsuccessfully tried to assign it
1534: to some set~$D_j$, with $1 \leq j \leq 3$. There are only two
1535: dominating sets for $v$ left. Either way, if we put~$v$ into the
1536: correct dominating set right away or fail the first time, we have
1537: $T(m) = T(m-2)$. Summing up both cases, we have $T(m) \leq 2
1538: T(m-2)$. Suppose that the first and the second case occur equally
1539: often,
1540: %
1541: i.e., the algorithm considers every vertex twice.  It then follows that
1542: \[
1543: T(m) \leq \frac{1}{2} (T(m-1) + T(m-3)) + \frac{1}{2} (2T(m-2))
1544: \]
1545: with $m = 3n$. Thus, we have $T(m) = \tilde{\bigoh}(3^n)$, and the
1546: trivial time bound cannot be beaten. To improve this running time, we
1547: have to make sure that the recursion tree will not reach its full
1548: depth, i.e., not all vertices are considered by the algorithm or
1549: function $\handleCriticalVertex$ will be called for a sufficiently
1550: large portion of the vertices.
1551: %
1552: %
1553: %
1554: %
1555: %
1556: %
1557: %
1558: %
1559: %
1560: %
1561: %
1562: %
1563: %
1564: %
1565: %
1566: %
1567: %
1568: %
1569: It is clear that the algorithm has found three dominating sets once
1570: $\area(G) = 3n$ (recall the notions from
1571: Definition~\ref{def:notions-for-algorithm}). By selecting the maximum
1572: gap possible for a partition $\mathcal{P}$, we try to reach this goal
1573: as fast as possible. For every vertex $v \in R$ that we assign to one
1574: of the potential dominating sets $D_i$, $1 \leq i \leq 3$, we increase
1575: $\area(G)$ by $\gap(v,i)$, and additionally we add $(\gap(v,i) - 3)$
1576: to $\surplus(G)$.
1577: 
1578: Since the vertices of degree two are critical, they and their
1579: neighbors can be handled in time $\tilde{\bigoh}(2.4495^n)$, as
1580: argued above.  So assume that $\mindegree(G) \geq 3$.  Then, we have
1581: $\maxgap(G) > 3$ at the start of the algorithm. If this condition
1582: remains to hold for at least $3n/4$ steps, we have reached $\area(G) =
1583: 3n$, and the algorithm terminates successfully.  To make use of more
1584: than $3n/4$ vertices, $\maxgap(G)$ has to drop below four at one point
1585: of the computation.  We exploit the fact that up to this point, the
1586: surplus has grown sufficiently large with respect to~$n$.  Decreasing
1587: it will force $\maxgap(G)$ to drop below three, and 
1588: %
1589: this condition can hold only for a certain portion of the remaining
1590: vertices until the algorithm terminates.  To see this, we now analyze
1591: the remaining steps of the algorithm after the given graph $G$ has
1592: reached a certain maximum gap with respect to the current
1593: $\mathcal{P}$ and~$\mathcal{A}$.
1594: %
1595: %
1596: 
1597: If $\maxgap(G) = 0$, the recursion stops immediately. Either we have
1598: already found three disjoint dominating sets (in which case we put the
1599: remaining vertices $v \in R$ into set $D_1$ and halt), or one vertex
1600: has not been dominated by one set $D_i$ in $\mathcal{P}$ yet. Since no
1601: positive gaps exist for the vertices $v \in R$, $\mathcal{P}$ cannot
1602: be modified to a valid partition into three dominating sets.  Function
1603: $\handleCriticalVertex$ returns true immediately after detecting
1604: $\balance(v) < 0$ for some vertex $v \in V$, and function $\dominate$
1605: drops back one recursion level. The question is how many vertices are
1606: left in $R$ when we reach $\maxgap(G) = 0$.
1607: 
1608: \begin{lemma}
1609: \label{lem:mainproof}
1610: Let $G = (V,E)$ be a graph and $\mathcal{P} = (D_1, D_2, D_3, R)$ be
1611: a partition of $V$ as in Definition~\ref{def:notions-for-algorithm}.
1612: Let $r = || R ||$ and $\maxgap(G) = 3$. Then, for at least $r/64$
1613: vertices in~$R$, the algorithm will not recursively call function
1614: $\dominate$.
1615: \end{lemma}
1616: 
1617: \sproofof{Lemma~\ref{lem:mainproof}}
1618: Let $\maxgap(G) = k$ with $k > 0$.  Since $\gap(v,i) \leq k$ for each
1619: $v \in R$ and for each~$i$, $1 \leq i \leq 3$, we have $\sum_{v \in R}
1620: \sumgap(v) \leq 3kr$.  Every vertex $v$ that is selected for a set
1621: $D_i$ with $\gap(v,i) = k$ decreases at least $k$ gaps of the vertices
1622: in $R - \{ v \}$ by one. Otherwise, $\handleCriticalVertex$ would
1623: have found a critical vertex $u \in N[v]$ with $N[u] \cap R = \{ v
1624: \}$.  Then, either $|| \openSets(u) || > 1$ (which implies
1625: $\balance(u) < 0$ and we abort), or $|| \openSets(u) || = 1$, in which
1626: case $v$ is added to the appropriate set $D_i$ without further
1627: branching of function $\dominate$.  Thus, if no critical vertex is
1628: detected, selecting a vertex $v \in R$ for some set $D_i$ decreases at
1629: least $k$ gaps, and since $v$ does not belong to $R$ anymore,
1630: additionally all gaps previously defined for $v$ are now undefined. So
1631: the lowest possible rate at which the gaps are decreased is related to
1632: the maximum gap of~$G$.
1633: 
1634: Now suppose that $\maxgap(G) = 3$ and $\sumgap(v) = 9$ for all
1635: vertices $v \in R$. We always select a vertex $v$ with the highest
1636: summation gap of all vertices $u \in R$ with $\maxgap(u) = 3$.  As
1637: long as there exists a vertex $v \in R$ with $\gap(v,i) = 3$ for
1638: all~$i$, it will be selected by the algorithm.  After calling function
1639: $\recalculateGaps$, the number of gaps equal to three will be
1640: decreased at least by six. If exactly three other gaps of vertices in
1641: $R - \{v\}$ decrease by one in every step, it takes at least $r/4$
1642: vertices until $\sumgap(v) < 9$ for all $v \in R$.  Another $1/4$ of
1643: the $3r/4$ vertices remaining have to be selected until $\sumgap(v) <
1644: 8$. Adding $1/4$ of the $9r/16$ vertices left in~$R$, we have reached
1645: $\maxgap(G) = 2$ with $\sumgap(v) = 6$ for all vertices $v \in R$.
1646: This implies that every defined gap is equal to two. Summing up, we
1647: have selected
1648: \[
1649: \frac{1}{4} \cdot r + \frac{1}{4} \cdot \frac{3}{4} r +
1650:  \frac{1}{4} \cdot \frac{9}{16} r = \frac{37}{64} r
1651: \]
1652: vertices until $\maxgap(G) = 2$, under the constraint that a minimum
1653: number of gaps is reduced in each step, while simultaneously trying to
1654: reduce the maximum summation gap in the fastest possible way.  This
1655: way we reach level $\maxgap(G) = 0$ with as few vertices left in $R$
1656: as possible, which describes the worst case that might happen.
1657: 
1658: Analogously, we can show that $\maxgap(G)$ drops from $2$ to~$1$ after
1659: selecting another $19r/64$ vertices.  And once we have $\maxgap(G) =
1660: 1$, it takes $7r/64$ vertices to get to $\maxgap(G) = 0$.  Now, there
1661: are $r/64$ vertices remaining in~$R$, which do not have to be
1662: processed recursively.
1663: \eproofof{Lemma~\ref{lem:mainproof}}
1664: 
1665: %
1666: %
1667: %
1668: %
1669: %
1670: %
1671: %
1672: %
1673: %
1674: %
1675: %
1676: %
1677: %
1678: %
1679: %
1680: %
1681: %
1682: %
1683: %
1684: %
1685: %
1686: %
1687: %
1688: %
1689: %
1690: %
1691: %
1692: %
1693: %
1694: %
1695: 
1696: Continuing the proof of Theorem~\ref{the:detalgo}, note that
1697: we assumed $\mindegree(G) \geq 3$, so when the gaps are initialized
1698: for graph~$G$, we have $\mingap(v) \geq 4$ for each
1699: vertex $v \in V$.  Thus, more than three vertices
1700: are dominated by the selected set $D_i$ for vertex~$v$.
1701: As long as $\maxgap(G) > 3$ is true, $\surplus(G)$ is
1702: increasing. The only way to lower the surplus is by adding vertices
1703: $v$ to a set $D_i$ with $\gap(v,i) < 3$.  The surplus decreases by one
1704: when $\gap(v,i) = 2$, and it decreases by two when $\gap(v,i)~=~1$.
1705: 
1706: %
1707: %
1708: %
1709: %
1710: %
1711: %
1712: %
1713: Let $S = \surplus(G)$ be the surplus
1714: collected for a partition $\mathcal{P}$ until we reach a point where
1715: $\maxgap(G) = 3$. To make use of the most recursive calls and to even
1716: out the surplus completely, there have to be at least $r = || R ||$
1717: vertices remaining with
1718: \[
1719: 0 \cdot \frac{37r}{64} + 1 \cdot \frac{19r}{64}
1720:  + 2 \cdot \frac{7r}{64} = S,
1721: \]
1722: so $r \geq 64S/33$. A fraction of $1/64$ of these vertices will be
1723: handled by the algorithm without branching into more than one
1724: recursive call, which is at least~$S/33$.
1725: %
1726: %
1727: %
1728: %
1729: %
1730: %
1731: %
1732: %
1733: %
1734: %
1735: %
1736: %
1737: %
1738: %
1739: %
1740: %
1741: %
1742: %
1743: %
1744: %
1745: The question is how big the surplus $S$ might grow and how many vertices
1746: are left in $R$ before $\maxgap(G) = 3$ is reached. The lowest surplus
1747: with as few vertices in $R$ as possible occurs if $\mindegree(G) =
1748: \maxdegree(G) = 3$. Surplus $S$ is increased by one in each step
1749: %
1750: until we arrive at $\maxgap(G) = 3$.  When selecting a vertex $v$ of
1751: degree~$3$ for a set~$D_i$, the gap of its neighbors $u \in N(v)$
1752: and the gaps of the neighbors of every $u$ might be decreased. Summing
1753: up, at most $1 + 3 + 3 \cdot 2 = 10$ vertices can have decreased their
1754: gaps for some~$i$.  After selecting at least $n/10$ vertices for each~$i$,
1755: we have $\mingap(G) = 3$ (in the worst case). From this point on,
1756: we cannot be sure if the next vertex selected for some $D_i$ satisfies
1757: $\gap(v,i) > 3$. But so far we have already collected a surplus of
1758: $S = 3n/10$, and applying this we obtain $64n/110 \leq r \leq 7n/10$.
1759: Thus, for at least $n/110$ vertices we never branch into two different
1760: recursive calls.  Setting $m = 3 (109n/110)$, we obtain a running time
1761: of~$\tilde{\bigoh}(2.9416^n)$.
1762: %
1763: %
1764: %
1765: %
1766: %
1767: %
1768: %
1769: %
1770: %
1771: %
1772: %
1773: %
1774: %
1775: %
1776: %
1777: %
1778: %
1779: %
1780: %
1781: %
1782: %
1783: %
1784: %
1785: %
1786: %
1787: %
1788: %
1789: %
1790: %
1791: %
1792: %
1793: %
1794: %
1795: %
1796: %
1797: %
1798: %
1799: %
1800: %
1801: %
1802: %
1803: %
1804: %
1805: %
1806: %
1807: %
1808: %
1809: %
1810: %
1811: %
1812: %
1813: %
1814: %
1815: %
1816: %
1817: %
1818: %
1819: %
1820: %
1821: %
1822: %
1823: %
1824: %
1825: %
1826: %
1827: %
1828: %
1829: %
1830: %
1831: %
1832: %
1833: %
1834: %
1835: %
1836: %
1837: %
1838: %
1839: %
1840: %
1841: %
1842: %
1843: %
1844: %
1845: %
1846: %
1847: %
1848: %
1849: %
1850: %
1851: %
1852: %
1853: %
1854: %
1855: %
1856: %
1857: %
1858: %
1859: %
1860: %
1861: %
1862: %
1863: %
1864: %
1865: %
1866: %
1867: \end{proofs}
1868: 
1869: %
1870: 
1871: %
1872: 
1873: \section{Graphs with Bounded Maximum Degree}
1874: \label{sec:bounded-max-degree}
1875: 
1876: As seen in the last section, the running time of the algorithm
1877: crucially depends on the degrees of the vertices of~$G$.  If we
1878: restrict ourselves to graphs $G$ with bounded maximum degree (say
1879: $\Delta = \maxdegree(G)$), we can optimize our strategy in finding
1880: three disjoint dominating sets.  In this section, we present a simple
1881: deterministic algorithm, which has a better running time than the
1882: algorithm from Theorem \ref{the:detalgo}, provided that $\Delta$ is low.
1883: By using randomization, we can further improve the running time for
1884: graphs $G$ with low maximum degree.
1885: 
1886: Before stating the two results, note that graphs with maximum degree
1887: two can trivially be partitioned into three dominating sets, if such a
1888: partition exists.  Every component of such a graph is either an
1889: isolated vertex, a path, or a cycle, and each such property can be
1890: recognized in polynomial time.
1891: 
1892: \begin{proposition}
1893: Let $G = (V, E)$ be a given graph with $\maxdegree(G) = 2$. There
1894: exists a partition of the vertices of $G$ into three dominating sets
1895: if and only if every component of $G$ is a cycle of length~$k$ such
1896: that $3$ divides~$k$.
1897: \end{proposition}
1898: 
1899: We use the terms from Definition~\ref{def:notions-for-algorithm} in
1900: Section~\ref{sec:algo} to describe a snapshot within the algorithm.
1901: For any partition $\mathcal{P} = (D_1, D_2, D_3, R)$, some vertices of
1902: $V$ have already been assigned to the potential dominating sets $D_1$,
1903: $D_2$, and~$D_3$, while all the remaining vertices are in~$R$. The
1904: auxiliary sets $\mathcal{A} = (A_1, A_2, A_3)$ will not be needed in
1905: this section.  Only connected graphs are considered, as it is possible
1906: to treat every connected component separately, producing the desired
1907: output within the same time bounds.
1908: 
1909: Table~\ref{tab:results} lists the running times of both the
1910: deterministic and the random algorithm, where the maximum degree of
1911: the input graph is bounded by~$\Delta$, $3 \leq \Delta \leq 8$. Note
1912: that the exact deterministic algorithm from Theorem~\ref{the:detalgo}
1913: in Section~\ref{sec:algo} beats the deterministic algorithm from
1914: Theorem~\ref{the:det-bounded} whenever $\Delta \geq 7$.
1915: 
1916: \begin{table}[!th]
1917: \centering
1918: \begin{tabular}{|c|c|c|c|c|c|c|}
1919: \hline
1920: $\Delta$ & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline
1921: deterministic & $2.2894^n$ & $2.6591^n$ & $2.8252^n$ &
1922:  $2.9058^n$ & $2.9473^n$ & $2.9697^n$ \\ \hline
1923: randomized & $2^n$ & $2.3570^n$ & $2.5820^n$ &
1924:  $2.7262^n$ & $2.8197^n$ & $2.8808^n$ \\ \hline
1925: \end{tabular}
1926: \caption[Summary]{\label{tab:results} Results for
1927:  $\maxdegree(G) = k$, where $3 \leq k \leq 8$}
1928: \end{table}
1929: 
1930: \begin{theorem}
1931: \label{the:det-bounded}
1932: Let $G = (V, E)$ be a graph with $\maxdegree(G) = \Delta$, where
1933: $\Delta \geq 3$.  There exists a deterministic algorithm solving the
1934: three domatic number problem in time
1935: $\tilde{\bigoh}(d^{\frac{n}{\Delta}})$, where
1936: \begin{equation}
1937: \label{equ:d}
1938: d = \sum\limits_{a=0}^{\Delta-2} \left[ {\Delta \choose a}
1939:   \sum\limits_{b=1}^{\Delta-a-1} {\Delta-a \choose b} \right] .
1940: \end{equation}
1941: \end{theorem}
1942: 
1943: \begin{proofs}
1944: The algorithm works as follows. We start with an arbitrary vertex $v
1945: \in V$ and assign it to the first set~$D_1$. In each step, we first
1946: check whether we found a partition $\mathcal{P} = (D_1, D_2, D_3, R)$
1947: into dominating sets $D_1$, $D_2$, and $D_3$. If not, one vertex
1948: $v \in V$ is selected that is not dominated by all three sets $D_1$,
1949: $D_2$, and $D_3$, and additionally has a vertex $u \in N[v]$ in its
1950: closed neighborhood that has already been added to some set~$D_i$, $1
1951: \leq i \leq 3$. It follows that $1 \leq || \openSets(v) || \leq 2$.
1952: 
1953: If $\balance(v) < 0$, we return within the recursion. Otherwise, we
1954: try all combinations to partition the vertices in $N[v] \cap R$,
1955: so that after this step vertex $v$ is dominated by all three
1956: potential dominating sets.  If no such combination leads to a valid
1957: partition, we again return within the recursion.
1958: 
1959: Suppose now that $\balance(v) \geq 0$, $|| \openSets(v) || = 2$,
1960: and $N[v] \cap D_1 \not= \emptyset$. To obtain three disjoint
1961: dominating sets, at least one vertex in $N[v]$ has to be assigned
1962: to~$D_2$, and at least one vertex in $N[v]$ has to be added
1963: to~$D_3$. This limits our choices, especially if the degree of $v$ is
1964: bounded by some constant~$\Delta$.
1965: 
1966: To measure the running time of the algorithm, we consider the worst
1967: case with the most possible combinations that might yield a partition
1968: into three dominating sets.  This occurs when only one vertex $u \in
1969: N[v]$ has already been added to one set, i.e., $|| N[v] \cap (D_1 \cup
1970: D_2 \cup D_3) || = 1$.  If $N[v] \cap D_1 \not = \emptyset$, then any
1971: number between $0$ and $\Delta-2$ of vertices in $N[v] \cap R$ may be
1972: assigned to the same set~$D_1$.  Let this number be~$a$. It follows
1973: that from one to $\Delta-a-1$ vertices remaining in $N[v] \cap R$ are
1974: allowed to be in the next potential dominating set~$D_2$.  This is how
1975: Equation~\ref{equ:d} for $d$ is derived.  After assigning the last
1976: vertices in $N[v] \cap R$ to the dominating set~$D_3$, exactly $\Delta$
1977: vertices have been removed from~$R$.  Thus, we have a worst case
1978: running time of $\tilde{\bigoh}(d^{\frac{n}{\Delta}})$.
1979: Table~\ref{tab:results} lists the running time for graphs with maximum
1980: degree from three to nine.
1981: \end{proofs}
1982: 
1983: In the next theorem, randomization is used to speed up this
1984: procedure. Instead of assigning all vertices in the closed
1985: neighborhood of some vertex $v \in V$ in one step, only one
1986: or two vertices in $N[v] \cap R$ are added to the potential
1987: dominating sets $D_1$, $D_2$, and $D_3$. The goal is to dominate
1988: one vertex by all three sets in one step. We will select the one
1989: or two vertices that are missing for this goal at random.
1990: 
1991: \begin{theorem}
1992: \label{the:rand-bounded}
1993: Let $G = (V, E)$ be a graph with $\maxdegree(G) = \Delta$, where
1994: $\Delta \geq 3$, and let $d$ be defined as in Equation~(\ref{equ:d})
1995: in Theorem~\ref{the:det-bounded}.  For each constant $c > 0$, there
1996: exists a randomized algorithm solving the three domatic number problem
1997: with error probability at most $e^{-c}$ in time
1998: $\tilde{\bigoh}(r^{\frac{n}{2}})$, where
1999: \begin{equation}
2000: \label{equ:r}
2001: r = \frac{d}{3^{\Delta-2}}.
2002: \end{equation} 
2003: \end{theorem}
2004: 
2005: \begin{proofs}
2006: Let graph $G = (V,E)$ be given with $\maxdegree(G) = k$.
2007: As in the deterministic algorithm, we start by adding a random
2008: vertex to the set $D_1$. In every following step, a vertex
2009: $v \in V$ is selected with $0 < || \openSets(v) || < 3$, so it
2010: is $N[v] \cap (D_1 \cup D_2 \cup D_3) \not= \emptyset$.
2011: If $|| \openSets(v) || = 1$, we have $N[v] \cap D_i = \emptyset$ for
2012: one $i$ with $1 \leq i \leq 3$. We randomly choose a vertex
2013: $u \in N[v] \cap R$ and assign it to set $D_i$, in order that
2014: $v$ is dominated by all three sets afterwards. If $|| \openSets(v) ||
2015:  = 2$, we randomly select two vertices $u_1, u_2 \in R$ in the
2016: closed neighborhood of $v$. Another random choice is made when
2017: deciding how to distribute these two vertices among the two
2018: potential dominating sets that have not dominated $v$ up to now.
2019: 
2020: Suppose $G$ indeed has a partition into three dominating
2021: sets. We have to measure the error rate when making our random
2022: choices to estimate the success probability of the algorithm.
2023: In every step, a vertex $v \in V$ is selected with at least
2024: one vertex $u \in N[v]$ in its closed neighborhood that has
2025: already been added to one of the sets $D_1$, $D_2$, or $D_3$.
2026: The highest error occurs when exactly one vertex in $N[v]$ is
2027: not included in $R$, so we restrict our analysis to this case.
2028: To obtain a valid partition into three dominating sets, there
2029: are at most $d$ choices left to partition the vertices
2030: remaining in $N[v] \cap R$. Here, $d$ is the number from
2031: Equation \ref{equ:d}. Once we selected and assigned two
2032: vertices from $N[v] \cap R$ at random, there are
2033: $3^{k-2}$ possibilities left to partition the vertices
2034: in the closed neighborhood of $v$ that are still left in $R$.
2035: Our success rate when selecting the two vertices is
2036: therefore $3^{k-2}/d$.
2037: 
2038: To achieve an error probability of below $e^{-c}$, the
2039: algorithm needs to be executed more than once. The repetition
2040: number of the algorithm equals the reciprocal of
2041: the success rate, which explains Equation \ref{equ:r}.
2042: Since two vertices are processed in every step, the overall
2043: running time is $\tilde{\bigoh}(r^{\frac{n}{2}})$.
2044: \end{proofs}
2045: 
2046: \section{Conclusion}
2047: \label{sec:conclusion}
2048: We have shown that the three domatic number problem can be solved
2049: by a deterministic algorithm in time~$\tilde{\bigoh}(2.9416^n)$.
2050: Furthermore, we presented two algorithms solving the three domatic
2051: number problem for graphs with bounded maximum degree, improving
2052: the above time bound for graphs with small maximum degree. Although
2053: our running times seem to be not too big of an improvement of the
2054: trivial~$\tilde{\bigoh}(3^n)$ bound, they are to our knowledge the
2055: first such algorithms breaking this barrier. For $k > 3$, the decision
2056: problem of whether $\delta(G) \geq k$ can be solved in
2057: time~$\tilde{\bigoh}(3^n)$ by Lawler's dynamic programming
2058: algorithm for the chromatic number, appropriately modified for the domatic
2059: number problem.  Therefore, it would not be reasonable to use our gap
2060: approach of Section~\ref{sec:algo} to decide if $\delta(G) \geq k$
2061: for a graph $G$ and $k > 3$.
2062: 
2063: \medskip
2064: 
2065: \noindent
2066: {\bf Acknowledgement.} We thank Dieter Kratsch for pointing us to
2067: Lawler's algorithm.
2068: %
2069: 
2070: \bibliographystyle{alpha}
2071: 
2072: \bibliography{/home/rothe/BIGBIB/joergbib}
2073: %
2074: %
2075: %
2076: 
2077: 
2078: \clearpage
2079: 
2080: \appendix
2081: 
2082: \section{Proof of Proposition~\ref{prop:mds-dnp}}
2083: 
2084: \begin{proofs}
2085:   Figure~\ref{fig:ex1} shows the graphs $G$ and $H$ whose existence is
2086:   claimed.  In this figure, the numbers $i|j$ within a vertex have the
2087:   following meaning: $i$ indicates which dominating set~$D_i$ this vertex
2088:   belongs to in a fixed partition into three dominating sets, and $j$
2089:   indicates a specific choice of a minimum dominating set $S$ of the graph by
2090:   setting $j = 1$ if and only if this vertex belongs to~$S$.
2091: 
2092: \begin{figure}[!th]
2093: \begin{center}
2094: \input{example1.eepic}
2095: \end{center}
2096: \caption[Counterexamples]{\label{fig:ex1} Graphs $G$ and $H$ for
2097:   Proposition~\ref{prop:mds-dnp}}.
2098: \end{figure}
2099: For the first assertion, look at the graph~$G$ shown on the left-hand side of
2100: Figure~\ref{fig:ex1}.
2101: %
2102: %
2103: %
2104: %
2105: %
2106: %
2107: Note that $\gamma(G) = 2$. In particular, $D = \{u_3, u_5\}$ is a minimum
2108: dominating set of~$G$.  Note further that $\delta(G) = 3$.  In particular, a
2109: partition into three dominating sets of $G$ is given by
2110: $D_1 = \{u_1, u_4, u_7\}$,
2111: $D_2 = \{u_2,u_5\}$, and
2112: $D_3 = \{u_3,u_6\}$.
2113: However, $D$ cannot be part of any partition into three dominating sets, since
2114: the only neighbors of~$u_4$, namely $u_3$ and~$u_5$, belong to~$D$.
2115: 
2116: Note that the minimum dominating set $D_2 = \{u_2,u_5\}$ of $G$ defined above
2117: indeed is part of a partition into three dominating sets.  The second part of
2118: the proposition, however, shows that this is not always the case.  Consider
2119: the graph $H = (V,E)$ shown on the right-hand side of Figure~\ref{fig:ex1}.
2120: %
2121: %
2122: %
2123: %
2124: %
2125: %
2126: %
2127: %
2128: We have $\gamma(H) = 2$ by choosing the minimum dominating set $D = \{ v_1,
2129: v_2 \}$, which is unique in this case.  Again, $\delta(H) = 3$. The only way,
2130: up to isomorphism, to partition the vertex set of $H$ into three dominating
2131: sets is given by
2132: $D_1 = \{v_1, v_7, v_8\}$,
2133: $D_2 = \{v_2, v_6, v_9\}$, and
2134: $D_3 = \{v_3, v_4, v_5\}$. 
2135: Thus, $\min \{||D_1||, ||D_2||, ||D_3||\} > \gamma(H)$ for each partition into
2136: three dominating sets.
2137: \end{proofs}
2138: 
2139: \section{Pseudo-Code of the Algorithm from Theorem~\ref{the:detalgo}}
2140: 
2141: Figures~\ref{fig:dnp}, \ref{fig:domatic}, \ref{fig:assign},
2142: \ref{fig:recalc}, and~\ref{fig:handle} describe the algorithm from
2143: Theorem~\ref{the:detalgo} in pseudo-code.
2144: 
2145: \begin{figure}[!ht]
2146: \begin{construction}
2147: \item {\bf Algorithm for the Three Domatic Number Problem}
2148: \begin{block}
2149:   \item {\bf Input:} Graph $G = (V,E)$ with vertex set $V = \{v_1, v_2, \ldots,
2150:     v_n \}$  and edge set $E$
2151:   \item {\bf Output:} Partition of $V$ into three dominating sets
2152:    $D_1, D_2, D_3 \seq V$ or ``failure''
2153: \end{block}
2154: \begin{block}
2155: %
2156: %
2157:     \item Set each of $D_1$, $D_2$, $D_3$, $A_1$, $A_2$,
2158:       and $A_3$ to the empty set; 
2159:     \item Set $R = V$;
2160:                 \item Set $\mathcal{P} = (D_1, D_2, D_3, R)$;
2161:                 \item Set $\mathcal{A} = (A_1, A_2, A_3)$;
2162:     \item $\dominate(G,\mathcal{P}, \mathcal{A})$;
2163:           \hfill $\slash \slash$  Start recursion
2164:     \item {\bf output} ``failure'' and {\bf halt};
2165: \end{block}
2166: \end{construction}
2167: 
2168: \caption[Algorithm]{\label{fig:dnp} Algorithm for the Three Domatic
2169: Number Problem}
2170: \end{figure}
2171: 
2172: \begin{figure}[!ht]
2173: \begin{construction}
2174: \item {\bf Function} $\dominate(G,\mathcal{P},\mathcal{A})\, \{$ 
2175:       \hfill $\slash \slash$ $\mathcal{P}$ is a partition of graph $G$, 
2176: \item \hfill $\slash \slash$ $\mathcal{A}$ is a triple of auxiliary sets
2177: \begin{block}
2178:   \item $\recalculateGaps(G, \mathcal{P}, \mathcal{A})$;
2179:   \item {\bf if} $($each $D_i$ is a dominating set$)\, \{$
2180:   \begin{block}
2181:     \item $D_1 = D_1 \cup R$;
2182:     \item {\bf output} $D_1, D_2, D_3$;
2183:   \end{block}
2184:   \item $\}$
2185:         \item {\bf if} $(~\mbox{not}~
2186:                \handleCriticalVertex(G, \mathcal{P}, \mathcal{A}))\, \{$
2187:   \begin{block}
2188:                 \item select vertex $v \in R$ with
2189:                 \begin{block}
2190: %
2191:       \item $\maxgap(v) = \maxgap(G)$ and
2192:                         \item $\sumgap(v) = \max \{ \sumgap(u) \condition
2193:                         u \in R \wedge \maxgap(u) = \maxgap(G)\}$;
2194:     \end{block}
2195:                 \item find $i$ with $\gap(v,i) = \maxgap(v)$;
2196:     \item $\assign(G, \mathcal{P}, \mathcal{A}, v, i)$;
2197:                                 \hfill $\slash \slash$ First recursive call
2198:     \item $A_i = A_i \cup \{ v \}$;
2199:               \hfill $\slash \slash$ If recursion fails, put $v$ in 
2200:                                      $A_i$ and try again 
2201:     \item $\dominate(G, \mathcal{P}, \mathcal{A})$;
2202:                         \hfill $\slash \slash$ Second recursive call
2203:   \end{block}
2204:   \item $\}$
2205:   \item {\bf return};
2206: \end{block}
2207: \item $\}$
2208: \end{construction}
2209: 
2210: \caption[Algorithm]{\label{fig:domatic} Recursive function to
2211: dominate graph $G$}
2212: \end{figure}
2213: 
2214: \begin{figure}[!ht]
2215: \begin{construction}
2216: \item {\bf Function} $\assign(G, \mathcal{P}, \mathcal{A}, v, i)\, \{$ 
2217: \begin{block}
2218:   \item $D_i = D_i \cup \{ v \}$;
2219:   \item $R = R - \{ v \}$;
2220:   \item $\dominate(G, \mathcal{P}, \mathcal{A})$;
2221: \end{block}
2222: \item $\}$
2223: \end{construction}
2224: 
2225: \caption{\label{fig:assign} Function to assign vertex $v$ to set $D_i$} 
2226: \end{figure}
2227: 
2228: \begin{figure}[!ht]
2229: \begin{construction}
2230: \item {\bf Function} $\recalculateGaps(G, \mathcal{P}, \mathcal{A})\, \{$ 
2231:       \hfill $\slash \slash$ $\mathcal{P}$ is a partition of graph $G$, 
2232: \item \hfill $\slash \slash$ $\mathcal{A}$ is a triple of auxiliary sets
2233: \begin{block}
2234:   \item {\bf for all} $($vertices $v \in V)\, \{$
2235:         \begin{block}
2236:     \item {\bf if} $($vertex $v \in R)\, \{$
2237:     \begin{block}
2238:       \item {\bf for all} $(i = 1, 2, 3)\, \{$
2239:       \begin{block}
2240:         \item {\bf if} $(v \notin A_i)\, \{$
2241:        $\gap(v,i) = || N[v] || - || \{ u \in N[v] \condition
2242:               (\exists w \in N[u])\, [w \in D_i] \} ||$; $\}$
2243:         \item {\bf else} $\gap(v,i) = \bot$ ;
2244:          \hfill $\slash \slash$ $\bot$ indicates that $\gap(v,i)$ is undefined
2245:       \end{block}
2246:       \item $\}$
2247:       \item $\maxgap(v) = \max_{i \in \{1,2,3\}} \{ \gap(v,i) \}$;
2248:       \item $\mingap(v) = \min_{i \in \{1,2,3\}} \{ \gap(v,i) \}$;
2249:       \item $\sumgap(v) = \sum_{i \in \{1,2,3\}} \gap(v,i)$;
2250:     \end{block}
2251:                 \item $\}$
2252:                 \item $\openNeighbors(v) = \{ u \in  N[v] \condition u \in R \}$;
2253:                 \item $\openSets(v) = \{ i \in \{ 1,2,3 \} \condition
2254:                   v \notin N[D_i] \} $;
2255:     \item $\balance(v) = || \openNeighbors(v) || - || \openSets(v) ||$;
2256:         \end{block}
2257:   \item $\}$
2258:   \item $\maxgap(G) = \max_{v \in R} \{ \maxgap(v) \}$;
2259:   \item $\mingap(G) = \min_{v \in R} \{ \mingap(v) \}$;
2260: \end{block}
2261: \item $\}$
2262: \end{construction}
2263: 
2264: \caption{\label{fig:recalc} Function to recalculate gaps
2265:   after partition has changed} 
2266: \end{figure}
2267: 
2268: \begin{figure}[!ht]
2269: \begin{construction}
2270: \item {\bf Function} boolean 
2271:     $\handleCriticalVertex(G, \mathcal{P}, \mathcal{A})\, \{$
2272: \begin{block}
2273:   \item {\bf for all} $($vertices $v \in V)\, \{$
2274:   \begin{block}
2275:     \item {\bf if} $( \balance(v) < 0 )$ \{ \hfill $\slash \slash$
2276:          impossible to three dominate $v$ with $\mathcal{P}$
2277:                 \begin{block}
2278:       \item {\bf return} true;
2279:     \end{block}
2280:                 \item \} {\bf else if}
2281:                   $(|| \{ i \in \{ 1,2,3 \} \condition v \in A_i \} || == 2)$ \{
2282:         \hfill $\slash \slash$ one choice for $v$ remaining
2283:                 \begin{block}
2284:                   \item select $i$ with $v \notin A_i$;
2285:                   \item $\assign(G, \mathcal{P}, \mathcal{A}, v, i)$;
2286:       \item {\bf return} true;
2287:                 \end{block}
2288:                 \item \} {\bf else if}
2289:                     $(\balance(v) == 0 ~\mbox{and}~ || \openSets(v) || > 0)$ \{
2290:         \hfill $\slash \slash$ $v$ is critical
2291:                 \begin{block}
2292:                   \item select $u \in N[v] \cap R$;
2293:                         \item {\bf for all} $(i$ with $u \notin A_i$ and
2294:                             $v$ not dominated by $D_i)$
2295:                         \begin{block}
2296:                           \item $\assign(G, \mathcal{P}, \mathcal{A}, u, i)$;
2297:                         \end{block}
2298:       \item {\bf return} true;
2299:                 \end{block}
2300:                 \item \}
2301:   \end{block}
2302:   \item $\}$
2303:         \item {\bf return} false;
2304:         \hfill $\slash \slash$ no critical vertices were found
2305: \end{block}
2306: \item $\}$
2307: \end{construction}
2308: 
2309: \caption{\label{fig:handle} Function to handle the critical vertices}
2310: \end{figure}
2311: 
2312: %
2313: %
2314: %
2315: %
2316: %
2317: %
2318: %
2319: %
2320: %
2321: %
2322: %
2323: %
2324: %
2325: %
2326: %
2327: %
2328: %
2329: %
2330: 
2331: \end{document}
2332: 
2333: 
2334: