Roll No . . . . . . . . . . . . . . . . . .
Dr. B. R. Ambedkar National Institute of Technology, Jalandhar
B. Tech 3rd Semester (Department of Computer Science and Engineering)
CSDC0211, Mathematical Foundation (for Data Science & Engg.)
End-Semester Examination, December-2024
Duration: 03 Hours
Max. Marks: 50
Date: 05 Dec 2024
Question Number
Max. Marks
CO No.
Cognitive level
Unit
1
5
2, 3
C
3
2
4
3
U
3
3
9
1,3
Ap, E
4, 5
4
6
1,3
C
3, 5
5
8
3
U
4, 5
6
10
1,3
An, E
5
7
8
2
Ap
1, 2
Note:
1. Attempt all the questions.
2. Ensure all intermediate steps are clearly shown. Marks will not be awarded for answers that do not include step-by-step
reasoning.
3. Present all parts of a question together in one place.
1. Formulate the following as LPP (Clearly mention all steps):
[2.5+2.5]
(a) The Sirpur Paper Company produces paper rolls with a standard width of 20
feet each. Special customer orders with different widths are produced by slitting
the standard rolls. Typical orders (which may vary daily) are summarized in the
following table: In practice, an order is filled by setting the knives to the desired
Order
1
2
3
Desired width (feet)
5
7
9
Desired number of rolls
150
200
300
widths. Find the minimum number of standard rolls to be slit according to the
given data. Formulate as an LPP model so as to minimize the total wastage.
(b) A manufacturing company has a contract to deliver 100, 250, 190, 140, 220, and
110 home windows over the next six months. Production cost per window varies
by period and is estimated to be Rs. 50, Rs. 45, Rs. 55, Rs. 48, Rs. 52 and Rs.
50 over next six months. To take advantage of fluctuation in manufacturing cost,
company can produce more windows than needed in a given month and hold the
extra units for delivery in later months. This will incur a storage cost at rage of Rs.
8 per window per month. Formulate the problem as a liner programming problem.
2. Give your choice of true or false. Use a short sentence to explain your choice. [4]
(a) The intersection of two convex sets is convex.
1
(b) Given two convex sets A1 , A2 ⊂ Rn , the set A3 = {[xT1 , xT2 ]T | x1 ∈ A1 , x2 ∈
A2 }inR2n is also convex.
(c) Given two convex sets A1 , A2 ⊂ Rn , the set A3 = {x1 + x2 | x1 ∈ A1 , x2 ∈ A2 } is
also convex.
(d) Function g(y) = f (x | x = Ay) where matrix A ∈ Rmn is used for an affine
transformation from y ∈ Rn to x ∈ Rm , is convex if f (x) is convex.
3. (a) Consider a genetic algorithm in which individuals are represented using a 5-bit
string of the form b1b2b3b4b5. An example of an individual is 001001 for which
b1=0, b2=0, b3=1, b4=0, b5=1.
The fitness function is defined over these individuals as follows:
f(b1b2b3b4b5) = b1 + b2 + b3 + b4 + b5 + AND(b1,b2,b3,b4,b5),
where AND(b1,b2,b3,b4,b5)=1 if b1=b2=b3=b4=b5=1; and AND(b1,b2,b3,b4,b5)=0
otherwise.
Answer the following questions. SHOW EACH STEP OF YOUR WORK.
[3]
i. Complete the following table showing the probabilities of selecting each of the
individuals below according to the standard selection method.
Individual
5
29
0
18
31
Fitness
Standard ”fitness” or quality or probability of being selected
ii. Suppose that a single crossover point will be used for crossover. This point
has been chosen as the point between the 2nd and the 3rd bits. Show the two
offspring that will result from crossing over the pairs (5, 29), (5, 18), (31, 18),
(18, 29).
iii. Explain how the standard mutation method is applied after selection and crossover
to form the ”next” generation of a population.
(b) Venkatesh is writing an evolutionary algorithm to solve the binary knapsack constraint satisfaction problem. Given the following constraint handling approaches:
i. Ignore the constraints under the motto: all is well that ends well.
ii. Upon generating an infeasible solution, immediately kill it and generate a new
solution; repeat this step until a feasible solution is generated.
iii. Employ a penalty function that reduces the fitness of infeasible solutions, preferably so that the fitness is reduced in proportion to the number of constraints
violated, or to the distance from the feasible region.
iv. Employ a repair function that takes infeasible solutions and “repairs” them by
transforming them into a related feasible solution, typically as close as possible
2
to the infeasible one.
v. Employ a closed feasible solution space which guarantees that the initial population consists of feasible solutions only and all evolutionary operations on feasible
solutions are guaranteed to result in feasible solutions. Typically a combination of custom representation, initialization, recombination, and mutation is
employed to achieve this.
vi. Employ a decoder function that maps genotype space to phenotype space such
that the phenotypes are guaranteed to be feasible even when the genotypes are
infeasible. Typically this involves mapping multiple different genotypes to the
same phenotype.
Which of these six constraint handling approaches do you recommend Venkatesh
employs? Explain your answer! (show all possible cases.)
[3]
(c) Your good friend is the groundskeeper at the mansion of mean old Mr. Lwithw. In
the backyard, there is a huge fountain with a complex network of pipes controlled
by over 100 valves. One weekend, Mr. Srinivas announces he’s going on vacation,
and when he returns he wants the fountain to spray as high as it can, but the
plans for the pipe network have been lost! Plus, since he only has the weekend,
your friend can’t possibly try all of the valve combinations to find the optimal
setting. Which local optimization search method might he want to use in real life
(since the fountain can’t be simulated on a computer) to maximize the height of
the fountain? You may assume that a valve is either on or off, and the water height
is easily measured. If you need to make any other assumptions, state them clearly.
[3]
4. A company employs a sales representative tasked with visiting several client offices
across different cities to demonstrate a new product. The representative must visit each
city exactly once, starting and ending at the company’s headquarters. Travel costs and
time are directly proportional to the distances between cities, and the goal is to determine the most efficient route that minimizes the total travel distance. [1.5+1+3.5]
(a) Formulate the above scenario as an LPP.
(b) Can the above problem be solved using Genetic Algorithms? Give reason.
(c) Write the steps in detail to solve this problem.
5. (a) What is optimization, and how can it be mathematically represented? Provide a
comprehensive discussion on the various types of optimization.
[2]
(b) Explain the concepts of global optimization and local optimization. Distinguish
between local optimization and global optimization.
[2]
(c) Define heuristic and meta-heuristic algorithms with suitable examples. Discuss one
heuristic and one meta-heuristic algorithms to solve the Knapsack problem. [4]
3
6. Consider min f (x) =
P4
2
i=1 x ; S. t. 0 ≤ xi ≤ 10, i = 1, 2, 3, 4.
[2+3+3+2]
(a) Write the pseudo code for Differential evaluation.
(b) Explain the steps to formulate the given optimization problem for Differential Evolution (DE), including the initialization, mutation, crossover, and selection phases.
(c) Assume the following parameters for DE: Np = 5 (population size), T = 4 (Termination), pc = 0.8 (crossover rate), and F = 0.85 (scaling factor). Additionally,
assume any other necessary parameters for DE. What is the fitness values after 3
iterations (show at least two iterations).
(d) Compare and contrast differential evolution with genetic algorithm.
1 0 1
7. (a) Find a singular value decomposition for A =
[4]
−1 1 0
P
(b) Given a real m × n matrix A, find an SVD A = U V T as follows: Write the SVD
Algorithm.
[3]
(c) List the numbered regions that make up the answer to each of the following: [1]
i. A − C
′
ii. B ∩ A
iii. A ∪ (B ∩ C)
′
iv. C ∩ (B ∪ A)
!!!——***——!!!
4