0% found this document useful (0 votes)
31 views3 pages

Assignment 4 - DS - F24

Uploaded by

Wajid Qayyum
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)
31 views3 pages

Assignment 4 - DS - F24

Uploaded by

Wajid Qayyum
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

Department of Computer Science


Discrete Structures (CSC102) – BSAI (I)
Assignment-IV

Due Date: 24th Dec, 2024


Marks: 35
CLO-4: Solve real-world problems using recurrence relation and counting formalisms.

Question No. 1 (4 Marks):

1. How many ways can 12 students be divided into 3 groups with 4 students in each group so that
all the groups study Discrete Structure.

2. Hexadecimal numbers are made using the sixteen digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. A, B, C, D, E, F.


How many hexadecimal numbers begin with one of the digits 3 through B, end with one of the
digits 5 through F, and are 5 digits long?

3. An examination paper consists of 5 questions in section A and 5 questions in section B. A total


of 8 questions must be answered. In how many ways can a student select the questions if he or
she is to answer at least 4 questions from section A.

4. A password protocol for a certain network requires that all passwords use digits or lower-case
letters and consist of five to seven characters. How many passwords are possible?

Question No. 2 (10 Marks):

1. Prove given statement directly: Let a and b are integers such that 2a = b2+3. Prove that a can be
expressed as the sum of three squares.

2. Give a counter example to disprove the given statement: "The square of every real number is
positive".

3. Prove by contradiction, where p is prime number: √p is an irrational number.

4. Prove the following summation using "Principal of Mathematical Induction". 1.21+2.22 +3.23 + ... +
(n + 1)2n+1 = n. 2n+2 +2, for all integers n ≥1
2 4
5. Consider the following recursion: x1=2, xn=xn-1+3. Find ( x +a ) =∑ ∑
n
¿ ¿ ¿xi2-xj+1)
i=1 j=i +1

CLO-5:Solve real-world problems in computer science using appropriate forms of


graphs and trees.

Question No. 3 (8 Marks):

1. List the order in which the vertices of the tree given below are processed using "preorder",
"inorder", and "postorder" traversal.
2. Determine whether the graphs G1 and G2 are "isomorphic". If the graphs are isomorphic, find
functions fand g; otherwise give an invariant that both graphs do not have in common.

3. Question No. 4 (10 Marks):

Consider the graphs given, and answer the following:

1. Write the "adjacency matrix".

2. Determine whether the given graph is "bipartite" or not. If the graph is bipartite, specify the
disjoint vertex sets A and B.

3. Decide whether the graph has an "Euler cycle", (Circuit). If the graph has an Euler cycle, exhibit
one; otherwise, give an argument that shows there is no Euler cycle.
4. Determine whether or not the given graph contains a "Hamiltonian cycle". If there is a
Hamiltonian cycle, exhibit it; otherwise, give an argument that shows there is no Hamiltonian
cycle.

5. Verify that the number of vertices of odd degree in the graph is even.

Question No. 5 (3 Marks):

Consider the graph represented by the adjacency matrix A. How many paths of length 4 exist
from vertex d to vertex e. Find all these paths.

a b c d e

a 0 1 0 1 0

b 1 0 1 0 1

c 0 1 0 1 1

d 1 0 1 0 0

e 0 1 1 0 0

You might also like