BS Artificial Intelligence · Semester 1 · Assignment 02 · Weeks 5–7

Discrete Mathematics for BSAI

Sets, Mappings and Relations

Dr. Hira Benish
Associate Professor & HoD, Mathematics
PMAI Lab, Mathematics Behind AI

Assignment 02 · Weeks 5–7Begin  

01 · Assignment Overview

Organize a small learning system with sets, a mapping, two kinds of relations, and a repeating arithmetic check. Complete after Week 7, before the Week 8 midterm.

Coverage
Weeks 5–7
Points
25
Estimated work
75–90 minutes

Instructions: Show the mathematical steps and explain each conclusion in one or two sentences. State any assumption you use. Hand reasoning and diagrams are required; Python or Colab may check a prediction but cannot replace the argument. Write your name and roll number on the first page.

Submission: One readable PDF of your own written or typed work, with pages in question order. Include diagrams and tables where requested. The instructor will announce the date and course-grade weight separately; the 25 points below describe only this assignment's internal rubric.

02 · Questions

Q1 · Sets and ordered pairs 5 points

The universe is U={a,b,c,d,e}; A={a,b,c} are learners who completed a practice set; B={b,d} are learners who asked for help. Compute A∩B, A∪B, A−B, U−A, and A×{0,1}. Show the six pairs in the product. (1 point each result)

Q2 · A specified mapping 6 points

Let f:{0,1,2,3}→{red,blue,green} be f(0)=red, f(1)=blue, f(2)=blue, f(3)=green. Let g map red→1, blue→0 and green→1.

  1. Draw the arrow diagram and state the domain, codomain and range of f. (2)
  2. Is f one-to-one? Onto its stated codomain? Explain each answer. (2)
  3. Find (g∘f)(2). Does f have an inverse function from {red,blue,green} to {0,1,2,3}? Explain. (2)

Q3 · Grouping learners 6 points

Four learners A,B,C,D have exactly one support category each. A,C have category 1; B,D have category 2. Define x~y if x and y have the same category.

  1. List all ordered pairs in ~, including pairs of a learner with themselves. (2)
  2. Test reflexive, symmetric and transitive; give a one-sentence reason for each. (3)
  3. Write the partition into equivalence classes. (1)

Q4 · Prerequisite order 5 points

Modules are F (Foundations), L (Logic) and G (Graphs). F is a prerequisite for both L and G; neither L nor G is a prerequisite of the other. Define X≤Y to mean X=Y or X must be completed before Y.

  1. List all pairs in ≤. (2)
  2. Draw a Hasse diagram with F below L and G. Are L and G comparable? (2)
  3. Name the three partial-order properties and give one sentence explaining why they hold here. (1)

Q5 · Number-theory check 3 points

Use the Euclidean algorithm to find gcd(84,30). Then compute the remainder of 17 on division by 5, and write the corresponding congruence. (2+1)

03 · Submission Checklist

  • State the universe for the complement and keep ordered pairs in the Cartesian product.
  • Draw the arrow and Hasse diagrams clearly.
  • Show relation properties using the stated meanings, not by name alone.
  • Show Euclidean divisions and the congruence.

Mark distribution: 5 + 6 + 6 + 5 + 3 = 25.