Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Assignment: Introduction, Sets, Relations, and Functions

Question 1: Define a set and provide three examples: one finite set, one infinite set, and one uncountable infinite set.

Question 2: Given the set A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, find the union and intersection of sets A and B.

Question 3: Prove the statement using mathematical induction: "For all positive integers n, 1 + 2 + 3 + ... + n = n(n +
1)/2."

Question 4: Apply the principle of inclusion and exclusion to find the number of elements in the union of three sets
A, B, and C, where |A| = 5, |B| = 4, |C| = 6, |A ∩ B| = 2, |B ∩ C| = 3, |A ∩ C| = 4, and |A ∩ B ∩ C| = 1.

Question 5: Define multi-sets and provide an example with at least three elements, indicating multiplicities.

Question 6: Consider a relational model for a database with tables "Students" and "Courses." Create a sample schema
for these tables, including attributes and primary keys.

Question 7: Given the set X = {1, 2, 3} and Y = {2, 3, 4}, determine whether the relation R = {(x, y) | x ∈ X, y ∈ Y} is
reflexive, symmetric, and transitive.

Question 8: Define equivalence relations and partitions. Provide an example of an equivalence relation and the
corresponding partition.

Question 9: Suppose you have a partial ordering relation on a set of tasks for a project. Draw the corresponding
Hasse diagram illustrating the partial ordering.

Question 10: Solve the job scheduling problem: You have four tasks (A, B, C, D) with respective durations (in hours) of
5, 3, 8, and 2. Find the optimal order to minimize the total completion time.

Certainly! Here are the answers to the questions in the assignment:

Question 1:

 A finite set: A = {1, 2, 3}


 An infinite set: B = {1, 2, 3, ...}
 An uncountable infinite set: The set of real numbers between 0 and 1

Question 2:

 Union of sets A and B: A ∪ B = {1, 2, 3, 4, 5, 6}


 Intersection of sets A and B: A ∩ B = {3, 4}
Question 3:

 Base case: For n = 1, 1 = (1 × (1 + 1))/2 is true.


 Inductive step: Assume true for n = k, then prove for n = k + 1. 1+2+…+�+(�+1)=(�+1)⋅(�+2)21+2+…+k+
(k+1)=2(k+1)⋅(k+2)

Question 4:
∣�∪�∪�∣=∣�∣+∣�∣+∣�∣−∣�∩�∣−∣�∩�∣−∣�∩�∣+∣�∩�∩�∣∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣B
∩C∣−∣A∩C∣+∣A∩B∩C∣ =5+4+6−2−3−4+1=7=5+4+6−2−3−4+1=7

Question 5:
A multi-set example: �={1,2,2,3,3,3}A={1,2,2,3,3,3}

Question 6:
Sample schema:

 Students table: (StudentID, Name, Age)


 Courses table: (CourseID, CourseName, Instructor)

Question 7:
�={(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)R={(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)

 Reflexive: No, as (1, 1), (2, 2), and (3, 3) are missing.
 Symmetric: No, as (1, 2) is present, but (2, 1) is not.
 Transitive: Yes, it satisfies the transitive property.

Question 8:
An equivalence relation example: �={(1,1),(2,2),(3,3)}R={(1,1),(2,2),(3,3)} with the corresponding partition:
{{1},{2},{3}}{{1},{2},{3}}

Question 9:
Partial ordering Hasse diagram: (Assuming A comes before B, B before C, and D has no dependencies)

cssCopy code
AD\/B\C

Question 10:
Optimal order for minimizing completion time:

1. D (2 hours)
2. B (3 hours)
3. A (5 hours)
4. C (8 hours)

This order minimizes the total completion time.

You might also like