File:QmcSearchGraph3.pdf

Summary

Description
English: Search graph of the Quine-McCluskey algorithm for 3 variables.
Date
Source Own work
Author Jochen Burghardt
Other versions File:QmcSearchGraph3.pdf * File:QmcSearchGraph3_svg.svg * File:QmcSearchGraph3_Ab+c.pdf * File:QmcSearchGraph3_Ab+c_svg.svg
LaTeX source code
% To obtain the version without highlighting,
% change the color definitions of cLinF to agree with cLine, 
% that of cCirF and cCirG to agree with cCirc, 
% and remove the \thicklines commands.
\documentclass[12pt]{article}

\setlength{\unitlength}{1mm}

\usepackage[pdftex]{color}
\usepackage[paperwidth=130mm,paperheight=80mm]{geometry}

\setlength{\topmargin}{-36mm}
\setlength{\textwidth}{130mm}
\setlength{\textheight}{80mm}
\setlength{\oddsidemargin}{-23mm}
\setlength{\parindent}{0cm}

\pagestyle{empty}

% normal colors
\definecolor{cText}     {rgb}{0.00,0.00,0.00}
\definecolor{cLine}     {rgb}{0.50,0.50,0.99}
\definecolor{cCirc}     {rgb}{0.40,0.40,0.99}
\definecolor{cDigi}     {rgb}{0.70,0.00,0.00}

% highlighting colors
\definecolor{cCirG}     {rgb}{0.40,0.99,0.40}   % given
\definecolor{cCirF}     {rgb}{0.00,0.60,0.00}   % found by algorithm
\definecolor{cLinF}     {rgb}{0.50,0.99,0.50}

\begin{document}

\newcommand{\node}[5]{%
        \textcolor{#1}{\put(#2,#3){\circle*{2}}}%
        \textcolor{cText}{\put(#2,#3){\put(1,1.6){\makebox(0,0)[l]{$#4$}}}}%
        \textcolor{cDigi}{\put(#2,#3){\put(1,-1.6){\makebox(0,0)[l]{\scriptsize\texttt{#5}}}}}%
}

\color{cLine}
\begin{picture}(125,70)%
% 0-variable conjuncts
\put(60,65){\line(-3,-1){30}}%...
 \put(30,55){\line(-5,-2){25}}% true - a
\put(60,65){\line(-5,-3){33}}%  true - A
\put(60,65){\line(-3,-5){6}}%...
 \put(54,55){\line(-1,-2){5}}%  true - b
\put(60,65){\line(1,-2){5}}%...
 \put(65,55){\line(3,-5){6}}%   true - B
\put(60,65){\line(5,-3){33}}%   true - c
\put(60,65){\line(5,-2){25}}%...
 \put(85,55){\line(3,-1){30}}%  true - C
\node{cCirc}{ 60}{65}{\it true}{---}%                           true
% 1-variable conjuncts
\put(5,45){\line(0,-1){20}}%    a - ab
\put(5,45){\line(1,-2){10}}%    a - aB
\put(5,45){\line(1,-1){20}}%    a - ac
\put(5,45){\line(3,-2){30}}%    a - aC
\put(27,45){\line(5,-6){10}}%...
 \put(37,33){\line(1,-1){8}}%   A - Ab
\put(27,45){\line(4,-3){16}}%...
 \put(43,33){\line(3,-2){12}}%  A - AB
\put(27,45){\line(5,-3){10}}%...
 \put(37,39){\line(2,-1){28}}%  A - Ac
\put(27,45){\line(2,-1){8}}%...
 \put(35,41){\line(5,-2){40}}%  A - AC
\put(49,45){\line(-5,-2){20}}%...
 \put(29,37){\line(-2,-1){24}}% b - ab
\put(49,45){\line(-1,-5){4}}%   b - Ab
\put(49,45){\line(5,-3){20}}%...
 \put(69,33){\line(2,-1){16}}%  b - bc
\put(49,45){\line(2,-1){16}}%...
 \put(65,37){\line(5,-2){30}}%  b - bC
\put(71,45){\line(-3,-1){36}}%...
 \put(35,33){\line(-5,-2){20}}% B - aB
\put(71,45){\line(-4,-5){16}}%  B - AB
\put(71,45){\line(5,-3){30}}%...
 \put(101,27){\line(2,-1){4}}%  B - Bc
\put(71,45){\line(2,-1){24}}%...
 \put(95,33){\line(5,-2){20}}%  B - BC
\thicklines
\textcolor{cLinF}{\put(93,45){\line(-4,-1){32}}}%...
 \textcolor{cLinF}{\put(61,37){\line(-3,-1){36}}}%      c - ac
\textcolor{cLinF}{\put(93,45){\line(-3,-2){12}}}%...
 \textcolor{cLinF}{\put(81,37){\line(-4,-3){16}}}%      c - Ac
\textcolor{cLinF}{\put(93,45){\line(-2,-5){8}}}%        c - bc
\textcolor{cLinF}{\put(93,45){\line(3,-5){12}}}%        c - Bc
\thinlines
\put(115,45){\line(-4,-1){80}}% C - aC
\put(115,45){\line(-2,-1){40}}% C - AC
\put(115,45){\line(-1,-1){20}}% C - bC
\put(115,45){\line(0,-1){20}}%  C - BC
\node{cCirc}{  5}{45}{a}{1--}%                                  a
\node{cCirc}{ 27}{45}{\overline{a}}{0--}%                       A
\node{cCirc}{ 49}{45}{b}{-1-}%                                  b
\node{cCirc}{ 71}{45}{\overline{b}}{-0-}%                       B
\node{cCirF}{ 93}{45}{c}{--1}%                                  c
\node{cCirc}{115}{45}{\overline{c}}{--0}%                       C
% 2-variable conjuncts
\put(5,25){\line(0,-1){20}}%    ab - abc
\put(5,25){\line(3,-4){15}}%    ab - abC
\put(15,25){\line(1,-1){20}}%   aB - aBc
\put(15,25){\line(5,-3){25}}%...
 \put(40,10){\line(2,-1){10}}%  aB - aBC
\put(35,25){\line(-3,-4){15}}%  aC - abC
\put(35,25){\line(3,-4){15}}%   aC - aBC
\put(55,25){\line(2,-1){40}}%   AB - ABc
\put(55,25){\line(5,-2){25}}%...
 \put(80,15){\line(3,-1){30}}%  AB - ABC
\put(75,25){\line(1,-4){5}}%    AC - AbC
\put(75,25){\line(5,-3){25}}%...
 \put(100,10){\line(2,-1){10}}% AC - ABC
\put(95,25){\line(-4,-1){60}}%...
 \put(35,10){\line(-3,-1){15}}% bC - abC
\put(95,25){\line(-3,-4){15}}%  bC - AbC
\put(115,25){\line(-4,-1){20}}%...
 \put(95,20){\line(-3,-1){45}}% BC - aBC
\put(115,25){\line(-1,-4){5}}%  BC - ABC
\thicklines
\textcolor{cLinF}{\put(25,25){\line(-1,-1){20}}}%       ac - abc
\textcolor{cLinF}{\put(25,25){\line(1,-2){10}}}%        ac - aBc
\textcolor{cLinF}{\put(45,25){\line(1,-1){20}}}%        Ab - Abc
\textcolor{cLinF}{\put(45,25){\line(5,-3){25}}}%...
 \textcolor{cLinF}{\put(70,10){\line(2,-1){10}}}%       Ab - AbC
\textcolor{cLinF}{\put(65,25){\line(0,-1){20}}}%        Ac - Abc
\textcolor{cLinF}{\put(65,25){\line(3,-2){30}}}%        Ac - ABc
\textcolor{cLinF}{\put(85,25){\line(-4,-1){80}}}%       bc - abc
\textcolor{cLinF}{\put(85,25){\line(-1,-1){20}}}%       bc - Abc
\textcolor{cLinF}{\put(105,25){\line(-4,-1){40}}}%...
 \textcolor{cLinF}{\put(65,15){\line(-3,-1){30}}}%      Bc - aBc
\textcolor{cLinF}{\put(105,25){\line(-1,-2){10}}}%      Bc - ABc
\thinlines
\node{cCirc}{  5}{25}{ab}{11-}%                                 ab
\node{cCirc}{ 15}{25}{a\overline{b}}{10-}%                      aB
\node{cCirc}{ 25}{25}{ac}{1-1}%                                 ac
\node{cCirc}{ 35}{25}{a\overline{c}}{1-0}%                      aC
\node{cCirF}{ 45}{25}{\overline{a}b}{01-}%                      Ab
\node{cCirc}{ 55}{25}{\overline{a}\overline{b}}{00-}%           AB
\node{cCirc}{ 65}{25}{\overline{a}c}{0-1}%                      Ac
\node{cCirc}{ 75}{25}{\overline{a}\overline{c}}{0-0}%           AC
\node{cCirc}{ 85}{25}{bc}{-11}%                                 bc
\node{cCirc}{ 95}{25}{b\overline{c}}{-10}%                      bC
\node{cCirc}{105}{25}{\overline{b}c}{-01}%                      Bc
\node{cCirc}{115}{25}{\overline{b}\overline{c}}{-00}%           BC
% 3-variable conjuncts
\node{cCirG}{  5}{ 5}{abc}{111}%                                abc
\node{cCirc}{ 20}{ 5}{ab\overline{c}}{110}%                     abC
\node{cCirG}{ 35}{ 5}{a\overline{b}c}{101}%                     aBc
\node{cCirc}{ 50}{ 5}{a\overline{b}\overline{c}}{100}%          aBC
\node{cCirG}{ 65}{ 5}{\overline{a}bc}{011}%                     Abc
\node{cCirG}{ 80}{ 5}{\overline{a}b\overline{c}}{010}%          AbC
\node{cCirG}{ 95}{ 5}{\overline{a}\overline{b}c}{001}%          ABc
\node{cCirc}{110}{ 5}{\overline{a}\overline{b}\overline{c}}{000}%       ABC
\end{picture}
\end{document}

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#QmcSearchGraph3.pdf
Category:Self-published work Category:Boolean algebra Category:Images with LaTeX source code Category:Files by User:Jochen Burghardt Category:Hasse diagrams
Category:Boolean algebra Category:CC-BY-SA-4.0 Category:Files by User:Jochen Burghardt Category:Hasse diagrams Category:Images with LaTeX source code Category:Self-published work