Professional Documents
Culture Documents
Labs
Labs
Labs
SET THEORY
1. Suppose that A is the set of sophomores at your school and B is the set of
students in discrete mathematics at your school. Express each of these sets in
terms of A and B.
a) A ∪ B. c) A − B.
b) A ∩ B. d) B − A.
LAB 2
FUNCTIONS
1. Does there exist
a) f : R → R, f (x) = −3x + 6.
√
b) f : [−3, +∞) → [0, +∞), f (x) = x + 3.
3. Is g = f −1 ?
√
a) Assume f (x) = x3 − 4 and g(x) = 3
x + 4.
x
b) Suppose f (x) = x3 and g(x) = .
3
4. Let f, g : R → R be defined as
3x + 1 if x < 0
f (x) = and g(x) = 5x − 7.
x2
+5 if x ≥ 0
Find g ◦ f .
5. Let h(x) = (f ◦ g)(x)
LAB 3
GRAPHS
1. Do there exist simple graphs with 5 vertices of degrees:
a) 1, 7.
b) 1, 2, 3, 3, 4.
c) 2, 3, 3, 3, 3.
a b a b
a b
c d
c d c d
a b
e d
4
LAB 4
GRAPHS (Continue)
1. Find the length of a shortest path between a and z in the given weighted
graph.
5 5
b d f
4 7
a 2 3 1 2 z
3 4
c e g
6 5
g 8
d
8
4 5 4
10 z
3 7
a b e
6
9 1 4 5
c f
6
2. Find a route with the least total airfare that visits each of the cities in
this graph, where the weight on an edge is the least price available for a flight
between the two cities.
Detroit
$329 $18
9
$359
29
49 $2 $279 New York
$179 $3
San Francisco
Denver
9
$69 $20 $379
Los Angeles
5
Determine a schedule for the workshops while adhering to the given constraints.
Assign each workshop to a time slot (1, 2, or 3) based on the constraints.
6
LAB 5
TREES
1. Consider the following questions.
a) How many edges does a tree with 10, 000 vertices have?
b) How many edges does a full binary tree with 1000 internal vertices have?
c) How many leaves does a full 3-ary tree with 100 vertices have?
d) How many vertices does a full 5-ary tree with 100 internal vertices have?
2. Either draw a full m-ary tree with 84 leaves and height 3, where m is a
positive integer, or show that no such tree exists.
3. Use depth-first search to produce a spanning tree for the given simple graph.
Choose a as the root of this spanning tree and assume that the vertices are
ordered alphabetically.
a e h i
c d
b f g j
4. Use backtracking to find a subset, if it exists, of the set {5, 10, 15, 20, 25, 30}
with a sum of 45.
5. Use Kruskal’s algorithm to find a minimum spanning tree for the following
weighted graph.
a 5 b 4 c
2 3 5 6 3
7 e 1
d f
6 3 4
8 4
g 4 h 2 i
7
LAB 6
BOOLEAN ALGEBRA
1. Use a table to express the values of the given Boolean function
F (x, y, z) = x(yz + ȳz̄).
5. Show that
x + y = (x ↓ y) ↓ (x ↓ y).
(a)
(b)
7. Show how the sum of two five-bit integers can be found using full and half
adders.
8
LAB 7
BOOLEAN ALGEBRA (Continue)
1. Find the sum-of-products expansions represented by each of these K-maps.
2. Draw a K-map for a function in three variables. Put a 1 in the cell that
represents x̄yz̄. Which minterms are represented by cells adjacent to this cell?
3. Construct a K-map for
Use this K-map to find the implicants, prime implicants, and essential prime
implicants of F (x, y, z).
4. Draw a K-map for a function in four variables. Put a 1 in the cell that
represents w̄xyz̄. Which minterms are represented by cells adjacent to this
cell?
5. Use the Quine-McCluskey method to simplify the following sum-of-products
expansions
x̄yz + x̄ȳz.
9
LAB 8
ABSTRACT ALGEBRA
1. Describe the distinguishing characteristics of different binary operations that
are performed on the same set. Provide examples to illustrate how these op-
erations impact the set and discuss any unique properties that emerge in each
case.
2. Check whether the operations applied to the appropriate sets qualify as
binary operations.
+: N×N→N
(x, y) 7→ x + y.
·: Z×Z→Z
(x, y) 7→ x · y.
Create the operation tables for these binary operations on the set {1, 2, 3}.
4. Let G be the additive group of integers modulo 8, denoted as Z8 , and let H
be the subgroup generated by the element 2. Find
5. Let V be an n-dimensional vector space over R, let GL(V ) denote the set
of all bijective linear transformations of V . Prove that GL(V ) is a group under
composition.
10
LAB 9
ABSTRACT ALGEBRA (Continue)
1. Let G and H be groups, and let ϕ : G → H be a group homomorphism.
Which of the following statements is always true?
2. Let (Z, +) be the additive group of integers and 3Z its subgroup. Consider
the function f defined by
f : Z → 3Z
a 7→ f (a) = 3a.
3. Determine whether the following set together with the binary operation is a
semigroup, a monoid or neither. If it is a monoid, specify the identity. If it is a
semigroup or a monoid determine whether it is commutative.
4. Encrypt the message SECRET using the RSA cryptosystem with the public
key (8693, 29).