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

Assignment 4 Question

This document outlines Assignment No. 4 for the CSC102 course at COMSATS University, focusing on combinatorics and graph theory. It includes various questions related to counting relations, functions, permutations, combinations, and graph properties, with a total of 10 marks available. The assignment is due on May 23, 2025, and emphasizes the importance of individual work and understanding of concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Assignment 4 Question

This document outlines Assignment No. 4 for the CSC102 course at COMSATS University, focusing on combinatorics and graph theory. It includes various questions related to counting relations, functions, permutations, combinations, and graph properties, with a total of 10 marks available. The assignment is due on May 23, 2025, and emphasizes the importance of individual work and understanding of concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

COMSATS University, Islamabad

Islamabad Campus
Department of Computer Science

Assignment No. 4: Combinatorics and Graph


Course code and Title: CSC102, DISCRETE STRUCTURES
Instructor: Dr.Quratulain Alam
Assigned Date: 20-5-2025 Due Date: 23-5-2025
Total Marks: 10
CLO-5: Solve real-world problems in computer science using
appropriate forms of graphs and trees

Instructions:
1. Try to get the concepts, consolidate your concepts and ideas from these questions
2. You should concern recommended books for clarify your concepts as handouts are not
sufficient.
3. Try to make solution by yourself and protect your work from other students. If I found
the solution files of some students are same then I will reward zero marks to all those
students.
4. Deadline for this assignment is 23-5-2025. This deadline will not be extended.

Question # 1 (Counting Various Relation using combinatorics) 2 marks


i. Let X be a set of n elements. How many different relations on X are there?
ii. How many of these relations are reflexive?
iii. How many of these relations are symmetric?
iv. How many of these relations are anti-symmetric?
v. How many of these relations are reflexive and symmetric?
vi. How many of these relations are reflexive and anti-symmetric?
vii. How many symmetric and antisymmetric relations are there on an n-element set?
viii. How many reflexive, symmetric, and antisymmetric relations are there on an n-element set?
Question # 2 (Counting functions using combinatorics) 2marks
i. How many functions are there from a set with m elements to a set with n elements?
ii. How many different functions are there from a set with 10 elements to sets with the following numbers of elements?
a) 2 b) 3 c) 4 d) 5
iii. How many one-to-one functions are there from a set with m elements to one with n elements?
iv. How many one-to-one functions are there from a set with five elements to sets with the following number of elements?
a) 4 b) 5 c) 6 d) 7
v. How many functions are there from the set {1, 2, . . . , n}, where n is a positive integer, to the set {0, 1}?
vi. How many functions are there from the set {1, 2, . . . , n}, where n is a positive integer, to the set {0, 1}
a) that are one-to-one?
b) that assign 0 to both 1 and n?
c) that assign 1 to exactly one of the positive integers less than n?
vii. How many partial functions (see Section 2.3) are therefrom a set with five elements to sets with each of these number of

FALL 2024 Page 1


elements?
a) 1 b) 2 c) 5 d) 9
viii. How many subsets of a set with 100 elements have more than one element?
Question # 3 (Permutation and Combination) 2marks
i. If P(n,3) = 12P(n/2, 3) , find n
ii. Find n if P(2n+1, n-1) : P(2n-1,n) = 3:5
iii. If C(18,r) = C(18,r+2) , findC(r,5)
iv. Find n and r, if P(n,r) = P(n,r+1) and C(n,r) = nC(n, r-1)
v. A department in a University consists of 4 professors and 8 students. A study tour is to be arranged. In how
many ways can a party of four be chosen so as to include at least on professor?
vi. In how many ways can the letters of the word “ARRANGE” be arranged so that
a. The two R’s are never together?
b. The two A’s are together but not two R’s?
c. Neither the A’s nor the two R’s are together?
vii. How many positive whole numbers can be formed with the digits 3,4,5,6,5,4,3 so that the even digits occupy the
even places?
Question # 4 (CLO-5) Graph 2marks
i. Let us try to find different Equivalence Relations which can be defined on a given set S={a,b,c,d}.
a. Draw graphs of all such distinct equivalence relations.
b. Out of all graphs that you have drawn in the first part list (and draw) only those, which are not
isomorphic to any one of them.
ii. Determine whether the following graph has an Euler circuit or Euler path.

iii. Determine whether the following graph is planar.

Question #5 2marks
1)Design a binary search tree for the following elements: 20, 10, 30, 5, 15, 25, 35. Perform an in-order
traversal.
2)Write the pre-order, in-order, and post-order traversals of the following tree

FALL 2024 Page 2


3)Convert the following general tree into a binary tree. Explain the steps.

4)Given a tree with the following adjacency list, determine if it is a binary tree.

5)If a binary tree has 15 nodes, what is the minimum and maximum possible height of the tree?
6)Given a tree with degree constraints, how many distinct trees can you form with nnn nodes?
7)Prove that a tree is a connected graph with no cycles.
8)Can a tree contain a cycle? Why or why not?
9)What is the significance of leaf nodes in different types of trees (e.g., binary trees, spanning trees)?

FALL 2024 Page 3

You might also like