summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex')
-rw-r--r--macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex
new file mode 100644
index 0000000000..f13cca73bc
--- /dev/null
+++ b/macros/latex/contrib/tkz/tkz-berge/NamedGraphs/doc/latex/NamedGraphs-Hypercube.tex
@@ -0,0 +1,41 @@
+\newpage\section{Hypercube}
+%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+%<–––––––––––––––––––– Hypercube –––––––––––––––––––––––––––––––>
+%<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––>
+From Wikipedia :\url{http://en.wikipedia.org/wiki/Hypercube_graph}
+
+In the mathematical field of graph theory, the hypercube graph $Q_n$ is a special regular graph with $2n$ vertices, which correspond to the subsets of a set with $n$ elements. Two vertices labelled by subsets S and T are joined by an edge if and only if S can be obtained from T by adding or removing a single element. Each vertex of $Q_n$ is incident to exactly $n$ edges (that is, $Q_n$ is $n$-regular), so the total number of edges is $2^{n-1}n$.
+The name comes from the fact that the hypercube graph is the one-dimensional skeleton of the geometric hypercube.
+Hypercube graphs should not be confused with cubic graphs, which are graphs that are 3-regular. The only hypercube that is a cubic graph is $Q_3$.
+
+\tikzstyle{VertexStyle} = [shape = circle,%
+ fill = red,%
+ inner sep = 3pt,%
+ outer sep = 0pt,%
+ draw]
+\SetVertexNoLabel
+
+\subsection{\tkzname{The hypercube graph $Q_4$} }
+
+The code is on the next page.
+
+\begin{center}
+\begin{tkzexample}[vbox]
+\begin{tikzpicture}[scale=.75]
+ \grCycle[RA=8]{8}
+ \pgfmathparse{8*(1-4*sin(22.5)*sin(22.5))}
+ \let\tkzbradius\pgfmathresult
+ \grCirculant[prefix=b,RA=\tkzbradius]{8}{3}
+ \makeatletter
+ \foreach \vx in {0,...,7}{%
+ \pgfmathsetcounter{tkz@gr@n}{mod(\vx+1,8)}
+ \pgfmathsetcounter{tkz@gr@a}{mod(\vx+7,8)}
+ \pgfmathsetcounter{tkz@gr@b}{mod(\thetkz@gr@n+1,8)}
+ \Edge(a\thetkz@gr@n)(b\thetkz@gr@b)
+ \Edge(b\thetkz@gr@a)(a\vx)
+ }
+ \makeatother
+\end{tikzpicture}
+\end{tkzexample}
+\end{center}
+\endinput \ No newline at end of file