Skip to content

Math for Computer Science

CSE · Midterm · Spring 23

Batch 59

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Computer Science and Engineering Faculty of Science & Information Technology Midterm Examination, Fall-2022 - SPRING 2023 Course Code: CSE 236, Course Title: Math for Computer Science Level: 3 Term: 1 Batch: 59 Time: 1.5 Hrs Marks: 25 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. a) Translate these two sentences into a logical expression. | [4] | CO1 i) You can access the Internet from campus only if you are a computer science major or you are not a freshman. ii) You cannot ride the swing of if you are under 4 feet tall unless you are older than 16 years old. b) Determine whether (p -> q) <-> (~q -> ~r) and (p <-> q) (+) (~p -> ~r) are equivalent or not? | [3] | CO1 c) Express the following statements with predicates and quantifiers. | [3] | CO1 i) Every Computer Science student must take a discrete mathematics course. ii) To take discrete mathematics, you must have taken calculus or a course in computer science. iii) Express the statement, "there exists a real solution to ax^2 + bx + c = 0 and find the truth values for this equation. 2. a) Let A = {Last 4 digits of Student ID} and B = {Last 3 digits of your Phone Number}. Considering universal set is the set of all integers. Find out the following operations- i) A U B ii) A n B iii) What is the power set of set A? iv) Consider the two sets in terms of function. Illustrate all types of function considering set A as domain and set B as codomain | [4] | CO2 b) Outline which of the following relations on {diu, csc, swe, nfe,} are equivalence relations? And explain the properties of an equivalence relation that the others lack. i) (diu, csc), (diu, diu), (cse, cse), (swe, swe), (nfe, diu), (nfe), (cse, diu), (diu, nfe) ii) (diu, csc), (diu, diu), (cse, nfe), (swe, swe), (nfe, diu), (nfe), (cse, diu), (cse, diu), (nfe), (cse, swe), (swe, cse) | [2] | CO2 3. a) Let the output of two functions f and g are- f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, f(4) = 3 and g(0) = 0, g(1) = 1, g(2) = 4, g(3) = 9 What is the composition of function f and g? What is the Composition of function g and f? | [3] | CO2 b) For the following graph the bold edges form a Minimum Spanning Tree. What can you tell about the range of values for x? [Figure: A connected graph with vertices A, B, C, D, E, F and weighted edges: A-B=1, A-C=10, A-F=6, B-C=5, B-E=3, C-D=9, D-E=x, D-F=20, E-F=7] | [3] | CO3 (C) Construct the Minimum Spanning Tree using Kruskal's algorithm from the following graph and calculate the minimum weight from that tree. [Figure: A complex connected graph with vertices A, B, C, D, E, F, G, H, I, J and various weighted edges connecting them] | [3] | CO3