MATH 387 Problem Set #12 solutions 5.3.2. Give an example of a ...
MATH 387 Problem Set #12 solutions 5.3.2. Give an example of a ...
MATH 387 Problem Set #12 solutions 5.3.2. Give an example of a ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>MATH</strong> <strong>387</strong><br />
<strong>Problem</strong> <strong>Set</strong> <strong>#12</strong> <strong>solutions</strong><br />
5.3.22. Consider the n-cube Q n , which has one vertex for every binary sequence <strong>of</strong> length<br />
n, two binary sequences being adjacent if <strong>an</strong>d only if they differ in exactly one digit.<br />
(a) Show that Q n has a Hamiltoni<strong>an</strong> cycle for every n ≥ 2.<br />
We c<strong>an</strong> actually do this recursively: we take a Hamiltoni<strong>an</strong> path in Q n−1 , add <strong>an</strong><br />
unch<strong>an</strong>ging binary digit to it, <strong>an</strong>d then ch<strong>an</strong>ge the unch<strong>an</strong>ged digit <strong>an</strong>d reverse the<br />
Hamiltoni<strong>an</strong> path. This is possible by <strong>an</strong>d large because Q n c<strong>an</strong> be represented<br />
as a pair <strong>of</strong> Q n−1 s with identical vertices attached to each other, so a Hamiltoni<strong>an</strong><br />
traversal <strong>of</strong> a Q n is a matter <strong>of</strong> cleverly grafting together two Hamiltoni<strong>an</strong><br />
traversals <strong>of</strong> Q n−1 .<br />
By way <strong>of</strong> illustration, start with a simple Hamiltoni<strong>an</strong> path on Q 2 : the path<br />
00 ∼ 01 ∼ 11 ∼ 10. Now, to build a Hamiltoni<strong>an</strong> cycle in Q 3 , we would augment<br />
those by the bit “0” as such: 000 ∼ 010 ∼ 110 ∼ 100, traverse the edge 100 ∼ 101,<br />
<strong>an</strong>d then reverse the given Q 2 Hamiltoni<strong>an</strong> path, augmented with the bit “1”:<br />
101 ∼ 111 ∼ 011 ∼ 001, <strong>an</strong>d finally, return to the start position, so our Hamiltonia<br />
cycle is:<br />
000 ∼ 010 ∼ 110 ∼ 100 ∼ 101 ∼ 111 ∼ 011 ∼ 001 ∼ 000<br />
Without the final step this is a Hamiltoni<strong>an</strong> path, suitable for constructing a cycle<br />
on Q 4 by the above algorithm <strong>of</strong> duplication, augmentation, <strong>an</strong>d reversal.<br />
Hamiltoni<strong>an</strong> paths on Q n are generally known as Gray codes, <strong>an</strong>d are used in<br />
designing test sequences for electromech<strong>an</strong>ical switches <strong>an</strong>d data buses.<br />
(b) For which values <strong>of</strong> n is Q n Euleri<strong>an</strong>?<br />
It is clear that every vertex <strong>of</strong> Q n has degree n, since <strong>an</strong> n−digit bit sequence<br />
differs by one bit from n different sequences: one resulting from toggling the first<br />
bit, one resulting from toggling the second, one resulting from toggling the third,<br />
etc. Since the criterion for a graph to be Euleri<strong>an</strong> is that its degree at every vertex<br />
is even, Q n is Euleri<strong>an</strong> if <strong>an</strong>d only if n is even.<br />
Page 4 <strong>of</strong> 4 April 17, 2008