0% found this document useful (0 votes)
18 views

Dis02a Sol

Uploaded by

sara172425
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Dis02a Sol

Uploaded by

sara172425
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CS 70 Discrete Mathematics and Probability Theory

Summer 2023 Huang, Suzani, and Tausik DIS 2A

1 Always, Sometimes, or Never


Note 5 In each part below, you are given some information about a graph G. Using only the information
in the current part, say whether G will always be planar, always be non-planar, or could be either.
If you think it is always planar or always non-planar, prove it. If you think it could be either, give
a planar example and a non-planar example.

(a) G can be vertex-colored with 4 colors.


(b) G requires 7 colors to be vertex-colored.
(c) e ≤ 3v − 6, where e is the number of edges of G and v is the number of vertices of G.

(d) G is connected, and each vertex in G has degree at most 2.


(e) Each vertex in G has degree at most 2.

Solution:

(a) Either planar or non-planar. By the 4-color theorem, any planar graph can provide the planar
example. The easiest non-planar example is K3,3 , which can be 2-colored because it is bipartite.
(Certainly, any graph which can be colored using only 2 colors can also be colored using 4
colors.)
(b) Always non-planar. The 4-color theorem tells us that if a graph is planar, it can be colored
using only 4 colors. The contrapositive of this is that if a graph requires more than 4 colors to
vertex-color, it must be non-planar. (Using the 5- or 6-color theorem would also work.)
(c) Either planar or non-planar. From the notes, we know that every planar graph follows this
formula, so any planar graph is a valid planar example. The easiest non-planar example is
again K3,3 , which has e = 9 and v = 6, meaning our formula becomes 9 ≤ 3(6) − 6 = 12,
which is certainly true.
(d) Always planar. There are two cases to deal with here: either G is a tree, or G is not a tree and
so contains at least one cycle. In the former case, we’re immediately done, since all trees are
planar. In the latter case, consider any cycle in G. We know that every vertex in that cycle is
adjacent to the vertex to its left in the cycle and to the vertex to its right in the cycle. But we
also know that no vertex can be connected to more than two other vertices, so the cycle isn’t
connected to anything else. But G is a connected graph, so we must have that G is just a single

CS 70, Summer 2023, DIS 2A 1


large cycle. And we can certainly draw a simple cycle on a plane without crossing any edges,
so even in this case G is still planar.
Alternatively, we can use Kuratowski’s theorem; since each vertex has a degree of at most 2, it
is impossible for G to contain K5 or K3,3 . This means that G must be planar.
(e) Always planar. Each of G’s connected components is connected and has no vertex of degree
more than 2, so by the previous part, each of them must be planar. Thus, each of G’s connected
components must be planar, so G itself must be planar.
Alternatively, we can follow the same procedure as the previous alternate solution; each vertex
still has a degree of at most 2, so it is impossible for G to contain K5 or K3,3 . This means that
G must be planar.

2 Planarity
(a) Prove that K3,3 is nonplanar.
(b) Consider graphs with the property T : For every three distinct vertices v1 , v2 , v3 of graph G,
there are at least two edges among them. Use a proof by contradiction to show that if G is a
graph on ≥ 7 vertices, and G has property T , then G is nonplanar.

Solution:

(a) Assume toward contradiction that K3,3 were planar. In K3,3 , there are v = 6 vertices and e = 9
edges. If K3,3 were planar, from Euler’s formula we would have v − e + f = 2 ⇒ f = 5. On
the other hand, each region is bounded by at least four edges, so 4 f ≤ 2e, i.e., 20 ≤ 18, which
is a contradiction. Thus, K3,3 is not planar.
(b) In this problem, we use proof by contradiction. Assume G is planar. Select any five vertices
out of the seven. Consider the subgraph formed by these five vertices. They cannot form K5 ,
since G is planar. So some pair of vertices amongst these five has no edge between them. Label
these vertices v1 and v2 . The remaining five vertices of G besides v1 and v2 cannot form K5
either, so there is a second pair of vertices amongst these new five that has no edge between
them. Label these v3 and v4 . Label the remaining three vertices v5 , v6 nd v7 . Since v1 v2 is not
an edge, by property T (which states any three vertices must have at least two edges between
them)it must be that {v1 , v} and {v2 , v} are edges, where v ∈ {v3 , v4 , v5 , v6 , v7 }. Similarly for
v3 , v4 we have that {v3 , v} and {v4 , v} are edges, where v ∈ {v1 , v2 , v5 , v6 , v7 }. Now consider
the subgraph induced by {v1 , v2 , v3 , v5 , v6 , v7 }. With the three vertices {v1 , v2 , v3 } on one side
and {v5 , v6 , v7 } on the other, we observe that K3,3 is a subgraph of this induced graph. This
contradicts the fact that G is planar.
The above shows that any graph with 7 vertices and property T is non-planar. Any graph
with greater than 7 vertices and property T will also be non-planar because it will contain a
subgraph with 7 vertices and property T .

CS 70, Summer 2023, DIS 2A 2


3 Hypercubes
Note 5 The vertex set of the n-dimensional hypercube G = (V, E) is given by V = {0, 1}n (recall that
{0, 1}n denotes the set of all n-bit strings). There is an edge between two vertices x and y if and
only if x and y differ in exactly one bit position.

(a) Draw 1-, 2-, and 3-dimensional hypercubes and label the vertices using the corresponding bit
strings.
(b) Show that the edges of an n-dimensional hypercube can be colored using n colors so that no
pair of edges sharing a common vertex have the same color.
(c) Show that for any n ≥ 1, the n-dimensional hypercube is bipartite.

Solution:

(a) The three hypercubes are a line, a square, and a cube, respectively. See also note 5 for pictures.
(b) Consider each edge that changes the ith bit for some i ≤ n. Every vertex touches exactly one
of these edges, because there is exactly one way to change the ith bit in any bitstring. Coloring
each of these edges color i ensures that each vertex will then be adjacent to n differently colored
edges, since there are n different bits to change, and no two edges representing bit changes on
different bits have the same color.
An example for the three dimensional case is shown below (red is the first bit, blue is the
second bit, and green is the third bit):

000 001
101
100

011
010
110 111

Alternate solution (using induction):


In the base case of n = 1, the hypercube of only one line can be edge colored with 1 color.
Next, suppose that the n dimensional hypercube can be colored with n colors. Recall that the
n + 1 dimensional hypercube is composed of two n dimensional hypercubes; each of these
hypercubes can be colored with n colors by the inductive hypothesis.
We can connect the two n dimensional hypercubes with edges colored with a different color;
this will be our (n + 1)th color. Since these new edges will always be between distinct pairs
of vertices, one from each subcube, none of these new edges will share a vertex, giving a valid
coloring of the n + 1 dimensional hypercube with n + 1 colors.

CS 70, Summer 2023, DIS 2A 3


(c) Consider the vertices with an even number of 0 bits and the vertices with an odd number of 0
bits. Each vertex with an even number of 0 bits is adjacent only to vertices with an odd number
of 0 bits, since each edge represents a single bit change (either a 0 bit is added by flipping a
1 bit, or a 0 bit is removed by flipping a 0 bit). Let L be the set of the vertices with an even
number of 0 bits and let R be the vertices with an odd number of 0 bits, then no two adjacent
vertices will belong to the same set.
An example for the three dimensional case is shown below (L are blue vertices, and R are red
vertices):

000 001
101
100

011
010
110 111

Alternate solution (using induction and coloring):


It may be simpler to that a graph being 2-colorable is the same as being bipartite. Now, the
argument is easier to state. First the base case is a hypercube with two vertices which is clearly
two-colorable. Then notice, switching the colors in a two-coloring is still valid as if endpoints
are differently colored, switching leaves them differently colored. Now, recursively one two
colors the two subcubes the same, and then switches the colors in one subcube. The internal to
subcube edges are fine by induction. The edges across are fine as the corresponding vertices
are differently colored due to the switching.

CS 70, Summer 2023, DIS 2A 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy