Basic Mathematics (BM)
Basic Mathematics (BM)
With effective
Syllabus for Master of Computer Applications, 1st Semester from academic
Subject Name: Basic Mathematics (BM) year 2020-21
Subject Code: 619403
1. Objective
• The objective of this course is to present the foundations of many basic
mathematical topics used in Computer Science including RDBMS, Data
Structures, Analysis of Algorithms, Theory of Computation, Cryptography,
Artificial Intelligence, Statistics and others.
• This course will enhance the student’s ability to think logically and
mathematically.
3. Contents:
Page no. 1 of 5
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 1st Semester from academic
Subject Name: Basic Mathematics (BM) year 2020-21
Subject Code: 619403
4. Text Book:
1. J. P. Tremblay and R.Manohar, “Discrete Mathematical Structures with Applications
to Computer Science”, Tata McGraw-Hill (2010) – only for Unit-5 (Graphs & Trees).
2. Bernard Kolmann & others, “Discrete Mathematical Structure”, Pearson Education,
Sixth Edition
5. Reference Books:
1. K. H. Rosen, “Discrete Mathematics and its applications”, Tata McGraw-Hill, 6th
edition,
2. D. S. Malik & M. K. Sen, “Discrete Mathematics”, Cengage Learning (2004)
3. Edgar G. Goodaire, Michael M. Parmenter. “Discrete Mathematics with Graph
Theory”, PHI
4. Ralph P Grimaldi & B V Ramana, “Discreet and Combinatorial mathematics: An
Applied Introduction”, Pearson Education, 5th Edition (2018)
5. J. P. Tremblay and W. K. Grassman. “Logic and Discrete Mathematics”, Pearson
Education
Page no. 2 of 5
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 1st Semester from academic
Subject Name: Basic Mathematics (BM) year 2020-21
Subject Code: 619403
9. Laboratory Exercises
Write programs in C language for the following tasks.
Set Theory:
Set Theory
(a) Start with a NULL set and add elements one-by-one: Use different ways of
implementing sets and understand the pros and cons of each of these methods
(b) Given an element value, check whether it is a member of the set or not
(c) Find out the number of elements of a given set.
(d) Complement of a set; Union, Intersection
(e) Test whether a given set X is a subset of the set A or not.
(f) Test whether two given sets are equal or not
(g) Difference and Symmetric Difference of two sets
Create a set. Make sure that addition of elements does not accept any duplicate
element. Assume that all elements of the set will be a non-negative integer <
64[0, 63].
Hint: Create an array of size 64. Store the element x in index x.
Create 2 set A and B of size n1 and n2 . Print sets A and B.
Find ~A, ~B, A ∪ B, A ∩ B, A – B, B – A, and print the size of each
derived set.
Find whether an element x ε A; x ε B; Find whether A ⊆ B; B ⊆ A; etc.
Page no. 3 of 5
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 1st Semester from academic
Subject Name: Basic Mathematics (BM) year 2020-21
Subject Code: 619403
Desirable
Assume that all elements of the set will be an uppercase letter [‘A’, ‘Z’].
Hint: Create an array of size 26. Store the element x in index x – ‘A’. (Note:
Try also with lowercase letters as elements of the set.)
i. Create 2 set A and B of size n1 and n2 . Print sets A and B.
ii. Find ~A, ~B, A ∪ B, A ∩ B, A – B, B – A, and print the size of each
derived set.
iii. Find whether an element x ε A; x ε B; Find whether A ⊆ B; B ⊆ A; etc.
Propositional Logic:
1. Consider 2 symbols: a and b. Represent various propositions using symbols a
and b, such as ~a; ~b; (a ^ b); (a v b); (a => b); (b => a); (a <=> b). Determine
the Truth value for each of these propositions for the following options:
i. a is True and b is True
ii. a is True and b is False
iii. a is False and b is True
iv. a is False and b is False
2. Verify DeMorgan’s Laws: Hint: Find the Truth value of the LHS and RHS for
4 cases as mentioned above and compare.
i. ~(a ^ b) = ~a v ~b
ii. ~(a v b) = ~a ^ ~b
Matrices:
1. Write a function to Create a Matrix of size m x n, and another function to Print a
Matrix of size m x n.
2. Create 2 matrices A and B of size (m x n). Find (A + B) and (A – B).
3. Find Transpose of matrix A and of matrix B. Find (AT + BT ) and (AT – BT ).
Check whether (AT + BT ) = (A + B)T and (AT – BT ) = (A – B)T .
4. Add matrix A and null matrix. Subtract null matrix from matrix A.
5. Create a unit matrix of size (n x n) and a unit matrix of size (n x n). Multiply
matrix A with a unit matrix.
6. Create matrix A of size (m x n) and matrix B of size (n x p). Multiply matrix A and
matrix B to get matrix C of size (m x p).
7. Create a symmetric matrix A. Find matrix AT . Check whether A = AT ?
8. Evaluate Scalar Product of a Matrix A: For example, k A, where k is a constant
(number)
9. Take as input two matrices, A & B and print (A * B) and (B * A). First check
which ones out of (A * B) and (A * B) are possible to compute.
Integers:
• Given a positive integer, find its divisors. Example: Divisors of 36 are 2, 3, 4, 6, 9,
12, 18.
• Given a positive integer n, represent n as product of its divisors. Example: 36 = 2
x 2 x 3 x 3.
• Given a positive integer, find whether it is a prime number or a composite
number. Write an efficient algorithm.
• Given two positive integers, m and n, find whether they are relative prime
numbers or not.
• Given two positive integers, a and b, find Least Common Multiples (LCM) of a
and b.
• Given two positive integers a and b, find GCD (Greatest Common Divisor) of a
and b.
Page no. 4 of 5
GUJARAT TECHNOLOGICAL UNIVERSITY
With effective
Syllabus for Master of Computer Applications, 1st Semester from academic
Subject Name: Basic Mathematics (BM) year 2020-21
Subject Code: 619403
Relations:
1. Input: Two sets A and B and a set of ordered pairs (a, b) such that a ε A, and b
ε B. Output: Matrix representation of the Relation.
2. Input: Matrix representation of a relation.
Output: Whether the relation is (a) Reflexive, (b) Symmetric, (c) Transitive,
(d) Anti-symmetric.
3. Input: An Equivalence Relation.
Output: Equivalence Classes
Functions:
1. Examples of Inverse Function:
a. Given a positive integer, determine whether it is factorial of some integer or
not?
b. Given a positive integer, find out whether it belongs to Fibonacci sequence
or not?
2. Input: Two matrices: Matrix ‘a’ of size (m x n) and Matrix ‘b’ of size (n x m).
1. Output: Find out whether Matrix ‘a’ is inverse of Matrix ‘b’ or not?
3. Write functions floor1(), ceiling1() and round1() and test them.
Page no. 5 of 5