You are on page 1of 11

Tutorial – 1

Subject Code: CS-106


Subject: DISCRETE STRUCTURES: Graph Theory (1) Date: 2 January 2015

1. Draw all simple graphs of 1, 2, 3 and 4 vertices.


2. Draw a graph with 64 vertices representing the squares of a chessboard. Join these
vertices appropriately by edges, each representing a move of the knight. You will see
that in this graph every vertex is of degree two, three, four, six or eight. How many
vertices are of each type?
3. Prove that the maximum degree of any vertex in a simple graph with vertices is
.
4. Show that the maximum number of edges in a simple graph with vertices is
.
5. Define isolated vertex, pendant vertex and null graph.
6. Prove that a simple graph with vertices must be connected if it has more than
edges.
7. Draw a connected graph with vertices that becomes disconnected when any
edge is removed from it.
8. Prove that any two simple connected graphs with vertices, all of degree two, are
isomorphic.
9. Show that the following two graphs are isomorphic.

10. Prove that a simple graph with vertices and components can have at most
edges.
Tutorial – 2
Subject Code: CS-106
Subject: DISCRETE STRUCTURES: Graph Theory (2) Date: 9 January 2015

1. Given the set of cubes represented by the graph below, is it possible to stack all four
cubes into a column such that each side shows only one color?

2. Suppose a simple graph with vertices has more than edges.


Can it be disconnected?
3. List all the different paths between vertices and in the following graph.

4. Draw a graph in which an Euler line is also a Hamiltonian circuit. What can you say
about such a graph in general?
5. Is it possible, starting from any of the squares of the chessboard, to move a
knight such that it occupies every square exactly once and returns to the initial
position? If so, give one such tour.
6. Prove that a graph with vertices always has a Hamiltonian path if the sum of the
degrees of every pair of vertices in satisfies the condition

7. Which of the following graphs are Eulerian? unicursal?


a) the complete graph ;
b) the complete bipartite graph ;
c) the graph of the cube;
d) the graph of the octahedron;
e) the Peterson graph.
8. For which values of the complete graph is Eulerian?
9. Which complete bipartite graphs are Hamiltonian?
10. Prove that if is a bipartite graph with odd number of vertices then is non-
Hamiltonian.
Tutorial – 3
Subject Code: CS-106
Subject: DISCRETE STRUCTURES: Graph Theory (3) Date: 16 January 2015
1. Let be positive integers, with Prove that there exists a tree with
vertex degrees if and only if .
2. Prove that the distance function on pairs of vertices of graph satisfies the
triangle inequality: .
3. Using the fact proved in 2 prove that for every graph .
4. Let and be two spanning trees of a connected graph . If the edge is in but
not in , prove that there exists another edge in but not in such that the
subgraphs and are also spanning trees of .
5. Work out the Huffman coding for the following sequence of characters:

6. Prove that every tree is a bipartite graph. Which trees are complete bipartite
graphs.
7. Draw all the spanning trees of the graphs:
8.

9. The degrees of the vertices of a certain tree of order are and . If has
exactly three vertices of degree , how many pendant vertices does it have?
10. Prove that every forest of order with components has many edges.
11. Give an example of a tree of order containing six vertices of degree 1 and two
vertices of degree .
12. A tree with pendant vertices has an equal number of vertices of degree , ,
and and not vertices of degree greater than . What is the order to ?
Tutorial – 4
Subject Code: CS-106
Subject: DISCRETE STRUCTURES: Number Theory (1) Date: 5 February 2015

1. Prove that any prime of the form is of the form .

2. If are odd, prove that cannot be a perfect square.

3. If are coprime to , prove that cannot be a perfect square.

4. Prove that if is composite it has a prime divisor satisfying .

5. Apply Euclidean algorithm to find inverses of the following integers:


modulo .
modulo .

6. Let . Find the integer representations of the following


vectors:

7. Implement a polynomial version of the Euclid algorithm for finding . Assume that
the coefficients are from the field where is a prime.

8. Modify your program for the of two polynomials so it computes the inverse of a
polynomial modulo .

9. Describe all the solutions of the following congruences:


a) ;
b) ;
c) .

10. Find the smallest nonnegative solution of each of the following systems:
a)
b)
c)
Tutorial – 5
Subject Code: CS-106
Subject: DISCRETE STRUCTURES

1. If is a group in which for three consecutive integers for all ,


show that is abelian.

2. In give an example of two elements such that .

3. In show that there are four elements satisfying and three elements
satisfying .

4. are said to be left and right cancellation


laws respectively. Suppose a finite set is closed under an associative product and
both cancellation laws hold in . Prove that must be a group.

5. Let be the group of all matrices where are integers modulo


, a prime number, such that . Check that forms a group relative to
matrix multiplication. How many elements has, in other words what is the order of
?

6. If has no nontrivial subgroups, show that must be finite of prime order.

7. If is a subgroup of , and let . Show that is


a subgroup of . If is finite, then what is the order of ?

8. Write all the right cosets of in where is a cyclic group of order


generated by and is the subgroup of generated by .

9. Write all the right and left cosets of in where and .

10. Let denote the integers relatively prime to under multiplication modulo . Show
that is not a cyclic group whereas is a cyclic group.
Tutorial – 6
Subject Code: CS-106
Subject: DISCRETE STRUCTURES

1. Show that the set where


for all is a group with respect to the composition of
mappings.

2. Let where
. Prove that is a group. Is it abelian? What is the order of this
group?

3. Let . Show that is a group. What is the identity element


of this group?

4. Let . Prove that is a group with respect to usual


multiplication of matrices.

5. Let . If is a group with respect to the binary operation , then


complete the following table, given that is the identity element.

6. Prove that a ring is commutative if and only if for all


.

7. Let . Prove that is a ring under the usual


addition and multiplication of real numbers.

8. Let Compute
and under the assumption that the coefficients are from where
.
Tutorial – 7
Subject Code: CS-106
Subject: DISCRETE STRUCTURES

1. Let be the relation from to which is defined by “ is


less than ”. Write as a set of ordered pairs.
2. Prove that if is an antisymmetric relation so is .
3. Prove that if is a symmetric relation then .
4. Let be the relation in the natural numbers defined by “
,” that is, let . Find
(a) the domain and range of .
(b) .
5. Let denote the diagonal line of , i.e., the set of all ordered pairs
. Prove that the relation on is antisymmetric if .
6. Which of the following relations are functions? Define by if and only if
where are real numbers such that
(a)
(b)
(c)
(d)
7. A function is called a binary operation on the set . A binary operation
on is called commutative if for all . Which of the
following operations on the set of real numbers is commutative:
(a)
(b)
(c)
(d)
(e) .
8. A binary operation on a set is said to be associative if
for all . Which of the operations in the above exercise are associative.
Notes on Relations

Suppose is a binary relation from to . Then can be thought of as a subset


of . If then we write . We also say that is related to .
A function is a relation such that for every element in there is a unique
element in such that such that is related to .
Properties of Binary relations: Suppose is a relation on a set , that is a
relation from to . Following are some special properties for which to be
checked.
Reflexivity: is said to be reflexive if for all .
Irreflexivity: is said to be irreflexive if for all .
Symmetry: is said to be symmetric if implies for all
.
Antisymmetry: is said to be antisymmetric if and implies
for all .
Asymmetry: is said to be asymmetric if implies for all
.
Transitivity: is said to be transitive if implies
for all .
If and are two relations have the usual set theoretic meaning
and are relations.
is a relation defined and .
Tutorial – 8
Subject Code: CS-106
Subject: DISCRETE STRUCTURES

1. Let be a symmetric and transitive relation on a set . Show that if for every
there exists such that , then is an equivalence relation. Is the
conclusion true if symmetric is replaced by reflexive?
2. Define a relation on the set of all integers if and only if mod
. Show that is an equivalence relation on . Determine the number of
equivalence classes.
3. Verify that the commutative, associative and distributive laws hold for addition and
multiplication on .
4. Consider the relation on the integers defined by iff there exists an
integer such that (i.e., divides ).
(a) Prove that is a partial ordering on the set of integers .
(b) Prove that is not a lattice ordering on .
(c) What are the minimal elements of the set with respect to ?
5. Prove that if is a partial ordering on a set , then for , there cannot be a
sequence of distinct elements of such that .
6. Let . Let be the relation on with adjacency matrix

(a) Explain why is a partial order on .


(b) Draw its Hasse diagram.
7. Define relations and on by and
.
(a) Represent and as both graphs and matrices.
(b) Determine , , and and represent them clearly in any way.
8.
(a) Prove that if is a transitive relation on a set , then .
(b) Find an example of a transitive relation for which .
9. The reflexive/symmetric/transitive closure of a relation on is the smallest
reflexive/symmetric/transitive relation (respectively) containing R. Let
. Prove that:
(a) The reflexive closure of is .
(b) The symmetric closure of is .
(c) If is a set with elements, that is the cardinality of is denoted by
, then the transitive closure of is
.
10. Transitive closure is computed by using Warshall’s algorithm given below.
Warshall’s Algorithm
Step 1:
Step 2: FOR to DO
FOR to DO
FOR to DO

Step 3: Terminate with .

By using Warshall’s algorithm find the transitive closure of the following relation.

You might also like