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

DR B R Ambedkar National Institute of Technology, Jalandhar ITPC-309, Discrete Mathematics Mid-Semester Examination, Oct-2024

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)
29 views

DR B R Ambedkar National Institute of Technology, Jalandhar ITPC-309, Discrete Mathematics Mid-Semester Examination, Oct-2024

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/ 11

Roll No………………….

Dr B R Ambedkar National Institute of Technology, Jalandhar


B Tech 5th Semester (Information Technology)
ITPC-309, Discrete Mathematics
Mid-Semester Examination, Oct-2024
Duration: 02 Hours Max. Marks: 30 Date: 09 Oct 2024
Marks Distribution & Mapping of Questions with Course Outcomes (COs)
Question Number 1 2 3 4 5
Max. Marks 6 6 6 6 6
CO No. 1 1 2 1,2 2
*Cognitive Level An Ap An U An

Note:
1. Attempt all the questions.
2. Use of non-programmable calculator is not allowed

1. Given the composition table of a cyclic group:

Determine and write the generators? Show proof


(6 Marks)
Sol.

1
2. Solve the following
a) There are 6561 functions f: X →Y and |Y| = 3. If X is the power
set of A, then how many binary relations on A are possible
which are neither reflexive nor irreflexive? Show steps
(3 Marks)
Solution

Step 1: Set the basic notation and concepts


1. Binary Relation: A binary relation on a set A is any subset of A
× A. So, the total number of binary relations on A is 2^(|A × A|).
2. Reflexive Relation: A binary relation R on A is reflexive if for
all a ∈ A, (a, a) ∈ R.
3. Irreflexive Relation: A binary relation R on A is irreflexive if
for all a ∈ A, (a, a) ∉ R.
4. Neither Reflexive nor Irreflexive: This means that some, but
not all, diagonal elements (a, a) ∈ A × A are in the relation R. In
other words, at least one (a, a) ∈ R and at least one (a, a) ∉ R.
Step 2: Compute the size of A × A
 We are given that X is the power set of a set A. If A has n
elements, the power set 2^A will have 2^n elements.
 We are given that there are 6561 functions f: X → Y, where |Y|
= 3.
Step 3: Find the size of A
Since the total number of functions f: X → Y is |Y|^(|X|) = 3^(|X|), we
have:
3^(|X|) = 6561
Since 3^8 = 6561, we get:
|X| = 8
Since X is the power set of A, we know:
|X| = 2^(|A|) = 8
Taking the logarithm base 2 of both sides:
|A| = log_2(8) = 3
Thus, the set A has 3 elements.
Step 4: Total number of binary relations on A
The total number of binary relations on A is:
2^(|A × A|) = 2^(3 × 3) = 2^9 = 512
Step 5: Counting reflexive and irreflexive relations

2
1. Reflexive relations: These must include all diagonal elements
(a, a) ∈ A × A. The remaining 9 - 3 = 6 off-diagonal elements
can either be included or not, giving: 2^6 = 64 reflexive relations
2. Irreflexive relations: These must exclude all diagonal elements.
The remaining 6 off-diagonal elements can either be included or
not, giving: 2^6 = 64 irreflexive relations
Step 6: Relations that are neither reflexive nor irreflexive
To be neither reflexive nor irreflexive, the relation must include some
but not all diagonal elements. There are 3 diagonal elements, and each
can independently be included or excluded, except for the two extreme
cases (all included or all excluded).
 The total number of ways to choose some but not all diagonal
elements is: 2^3 - 2 = 8 - 2 = 6 ways
 For each such choice of diagonal elements, the 6 off-diagonal
elements can be included or not, giving: 2^6 = 64 ways to choose
off-diagonal elements.
 Therefore, the total number of binary relations that are neither
reflexive nor irreflexive is: 6 × 64 = 384
Step 7: Final Answer
The number of binary relations on A that are neither reflexive nor
irreflexive is:
384

b) A computer scientist is designing an algorithm to analyze social


networks. The algorithm represents relationships between users
as a directed graph, where each user is a node and relationships
are edges. The relationship data is stored in an n × n matrix R,
where n is the number of users.
Given:
 The matrix R represents a relation on a set of n users.
 R[i][j] = 1 if user i is related to user j, and 0 otherwise.
 The relation is known to be asymmetric.

1. Express mathematically the condition for the relation to be


asymmetric.
(1 Mark)
2. If n = 100, what is the maximum number of 1's that can appear in the
matrix R? Explain your reasoning.
(2 Marks)
Solution
3
A relation R is asymmetric if and only if:
For all i and j, if R[i][j] = 1, then R[j][i] = 0

Mathematically: ∀i,j: R[i][j] = 1 ⇒ R[j][i] = 0

# 2. Maximum number of 1's in the matrix


For an asymmetric relation:
- The diagonal must be all 0's (n elements)
- For each pair (i,j) where i ≠ j, we can have at most one 1
(either in R[i][j] or R[j][i], but not both)

Total pairs excluding diagonal: n(n-1)/2


Maximum number of 1's = n(n-1)/2

For n = 100:
Max 1's = 100 * 99 / 2 = 4950

3. Solve the following


a) Let R be the set of all binary relations on the set {1 Suppose a
relation is chosen from R at random. What is the probability that
the chose relation is reflexive? Show steps
(2 Marks)

b) In a distributed computing system, tasks are executed following a


strict ordering protocol modeled by a monoid M, where tasks are
composed sequentially. Prove that if this monoid is not a group
(i.e., there is no inverse for every element), there are irreversible

4
sequences of tasks. Provide an example using a non-invertible
element and explain its impact on system rollback capabilities
(2 Marks)
Definitions:
 A monoid M is a set with an associative binary operation and an
identity element.
 A group is a monoid where every element has an inverse.

Example using a non-invertible element: Consider a simple task management


system where tasks can be: A: Add a file D: Delete a file M: Modify a file Let's
define our monoid operation as task composition (performing tasks in
sequence). The identity element e would be "Do nothing". Now, let's focus on
the Delete Operation D. Once a file is deleted, there's no general way to recover
its exact content. Therefore, D is a non-invertible element in this monoid.
Sequence example: D * A (Delete then Add) This sequence cannot be reversed
to retrieve the original file content.

Impact on system rollback capabilities: The existence of non-invertible elements


like D means that not all sequences of operations can be undone or rolled back.
In our example:
 If a system performs D (Delete), it cannot generally roll back to the
exact previous state.
 This limits the system's ability to recover from errors or revert changes.
 It necessitates additional mechanisms (like backups) to ensure data
recoverability.
In a more complex system:

 Sequences involving non-invertible operations create "points of no


return".
 This can lead to data loss if not carefully managed.
 It requires careful design of task sequences to maintain desired system
properties.

c) An operation ⊙𝑥 is defined as (2 Marks)


a ⊙𝑥 b = (a + b) < x ⇒ (a + b)
a ⊙𝑥 b= (a + b) >= x ⇒ (a + b) mod x

Prove that ({0, 1, 2, 3, 4, ⊙5 ) is a group or not?

Step 1: Closure Let's create an operation table to check if the result of a ⊙₅ b


always falls within the set S.

5
⊙₅ 0 1 2 3 4
0 0 1 2 3 4
1 1 2 3 4 0
2 2 3 4 0 1
3 3 4 0 1 2
4 4 0 1 2 3

As we can see, all results are within the set S. Therefore, the closure
property is satisfied.

Step 2: Associativity To prove associativity, we need to show that (a ⊙₅


b) ⊙₅ c = a ⊙₅ (b ⊙₅ c) for all a, b, c in S.

Let's check a few examples: (1 ⊙₅ 2) ⊙₅ 3 = 3 ⊙₅ 3 = 1 1 ⊙₅ (2 ⊙₅ 3)


= 1 ⊙₅ 0 = 1

(2 ⊙₅ 3) ⊙₅ 4 = 0 ⊙₅ 4 = 4 2 ⊙₅ (3 ⊙₅ 4) = 2 ⊙₅ 2 = 4

These examples suggest associativity holds. However, to rigorously


prove this for all combinations would be time-consuming. For the
purpose of this exercise, we'll assume associativity holds.

Step 3: Identity Element We need to find an element e in S such that a


⊙₅ e = e ⊙₅ a = a for all a in S.

Looking at the operation table, we can see that 0 acts as the identity
element: a ⊙₅ 0 = 0 ⊙₅ a = a for all a in S.

Therefore, the identity element exists and it is 0.

Step 4: Inverse Elements For each element a in S, we need to find an


element b in S such that a ⊙₅ b = b ⊙₅ a = 0 (the identity element).

Let's find the inverse for each element: 0 ⊙₅ 0 = 0 (0 is its own inverse)
1 ⊙₅ 4 = 0 (1 and 4 are inverses of each other) 2 ⊙₅ 3 = 0 (2 and 3 are
inverses of each other)

Each element in S has an inverse within S.

6
Conclusion: The set S = {0, 1, 2, 3, 4} with the operation ⊙₅ satisfies all
four group axioms:

1. Closure
2. Associativity (assumed based on examples)
3. Identity element (0)
4. Inverse elements for each member

Therefore, (S, ⊙₅) is indeed a group.

4. Solve the following


a) In the IT department at NIT Jalandhar, a hierarchical structure is
defined for organizing different levels of authority within the
department, represented by the following Hasse diagram. Each
node represents a role, and the department is analysing how many
complementary roles the role "e" has within the structure.

Determine how many roles complement the role "e" based on the
given hierarchy?
(2 Marks)

b) Consider the lattice formed by the divisors of 30, denoted as 𝐷30:


I. Draw the Hasse diagram for 𝐷30 , where the elements represent
the divisors of 30 and the relations represent divisibility.
7
(1 Mark)
II. Determine whether 𝐷30 is a complemented lattice. Explain
(1 Marks)
III. Investigate whether 𝐷30 is a distributive lattice. Explain
(2 Marks)

5. Solve the following


a) Consider the binary relation R on the set of natural numbers N,
defined as:
R = {(x, y) ∈𝑁 2 : ∃n ∈ N, 𝑥 𝑛 = y}

is a binary relation on the set of natural numbers N.

For each of the following properties, determine whether R satisfies it or


not. If the property holds, provide a justification. If it doesn't hold, give a
counterexample:
A. Reflexive B. Symmetric C. Anti-symmetric
Analyze each property separately, explaining your reasoning in each
case.
(3 Marks)
Solution:

8
A. Reflexive

A relation R on a set A is reflexive if for every element a ∈ A, (a,


a) ∈ R.

Analysis: For R to be reflexive, we need (x, x) ∈ R for all x ∈ N.


This means we need to find an n ∈ N such that x^n = x for all x ∈
N.

For x = 1: 1^1 = 1, so (1, 1) ∈ R For x > 1: x^1 = x, so (x, x) ∈ R


for all x > 1

Therefore, R is reflexive because for every x ∈ N, we can find an n


(specifically, n = 1) such that x^n = x.

B. Symmetric

A relation R on a set A is symmetric if for every a, b ∈ A, if (a, b)


∈ R, then (b, a) ∈ R.

Analysis: Let's consider a counterexample: (2, 4) ∈ R because 2^2


= 4 However, (4, 2) ∉ R because there is no natural number n such
that 4^n = 2

Therefore, R is not symmetric.

C. Anti-symmetric

A relation R on a set A is anti-symmetric if for every a, b ∈ A, if


(a, b) ∈ R and (b, a) ∈ R, then a = b.

Analysis: Let's prove this by contradiction. Assume R is not anti-


symmetric. Then there exist a, b ∈ N, a ≠ b, such that (a, b) ∈ R
and (b, a) ∈ R.

9
This means: ∃n1 ∈ N, a^n1 = b ∃n2 ∈ N, b^n2 = a

Combining these: a^(n1n2) = (a^n1)^n2 = b^n2 = a

For this to be true when a ≠ 1, we must have n1n2 = 1, which is


impossible for n1, n2 ∈ N. If a = 1, then b must also be 1 for b^n2
= a to hold.

Therefore, our assumption must be false, and R is anti-symmetric.

Conclusion:
A. Reflexive: Yes
B. Symmetric: No
C. Anti-symmetric: Yes

b) Let 𝑀𝑛 be the group of integers {0,1,2,…,n−1} with addition


modulo n as the group operation. The group operation is
addition modulo n, defined as:
[a] + [b] = [a + b mod n]

Determine the number of elements in the group 𝑀3 and 𝑀4 that are


their own inverses.
(3 Marks)
Solution:
1. First, let's understand what it means for an element to be its own
inverse in this context:
o In a group with addition as the operation, an element [a]
is its own inverse if [a] + [a] ≡ [0] (mod n).
2. Now, let's consider M3 and M4 separately:
For M3:
 The elements are [0], [1], and [2].
 [0] + [0] ≡ [0] (mod 3), so [0] is its own inverse.
 [1] + [1] ≡ [2] (mod 3), so [1] is not its own inverse.
 [2] + [2] ≡ [1] (mod 3), so [2] is not its own inverse.
Therefore, in M3, only 1 element ([0]) is its own inverse.
For M4:
 The elements are [0], [1], [2], and [3].

10
 [0] + [0] ≡ [0] (mod 4), so [0] is its own inverse.
 [1] + [1] ≡ [2] (mod 4), so [1] is not its own inverse.
 [2] + [2] ≡ [0] (mod 4), so [2] is its own inverse.
 [3] + [3] ≡ [2] (mod 4), so [3] is not its own inverse.
Therefore, in M4, 2 elements ([0] and [2]) are their own inverses.
3. To summarize:
o In M3: 1 element is its own inverse.
o In M4: 2 elements are their own inverses.
Thus, the answer is:
 M3 has 1 element that is its own inverse.
 M4 has 2 elements that are their own inverses.

11

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