Thursday, 9 July 2026

Soft Computing Lab Semester Exam Questions for B.Tech. and M.Tech. Programs




B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



1.     Write python functions to implement the following:

        (a)     Add an element in a given set.

        (b)     Update the set.

        (c)     Remove an element from the set.

        (e)     Discard an element from the set.

        (f)     Pop the element from the set.

        (g)     Clear the set.

        (h)     Distinguish between remove() and discard() functions in python.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



2.     Write python functions to generate the following parameterized fuzzy membership functions and visualize them for different parameter values in a single window:

    (a)     Triangular MF

    (b)     Trapezoidal MF

    (c)     Gaussian MF

    (d)     Generalized Bell MF



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



3.     Write a program to realize the logical AND function with a neural net model.


4.     Write a program to perform intersection and union operations of two fuzzy sets.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



5.     Write a program to realize the logical XOR operation in ANN model.


6.     Write a program to realize the fuzzy cartesian product.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




8.     Write a program to perform Max-Min composition of fuzzy sets.

9.     Write a program to realize the logical X-NOR operation in ANN model.


B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



10.     Write a program to realize the Travelling Salesperson Problem(TSP) by using genetic

algorithm (GA). Taking the number of nodes and their cost matrix as user-defined

input. You must include random.sample() and random.shuffle() python method for

implementing the task.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



11.     Write python functions to compute the symmetric difference of two crisp sets.

12.     Write python functions to compute the power set of a crisp set.

14. Write a program to perform Max-Min composition of fuzzy sets.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



15.     Write python functions to demonstrate the effect of contrast intensification on a fuzzy

membership function.

16.     Write a program to realize the logical OR function with a neural net model.




B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




17.     Given a fuzzy membership function function mf(X) representing the fact x is A and a fuzzy relation R(X,Y) representing the fuzzy implication if x is A then y is B, find the consequent membership function representing y is B. Implement this for both max- min and max-product compositions and demonstrate the process visually.


OR


Implement the fuzzy reasoning procedure for the following:


Premise 1 (fact): x is A' and y is B'

Premise 2 (rule 1): if x is A1 and y is B1 then z is C1

Premise 3 (rule 2): if x is A2 and y is B2 then z is C2

---------------------------------------------------------------------------------------------

Consequence (conclusion): z is C'

The notations have usual meaning. Demonstrate the procedure visually.


18. Write a program to demonstrate the effect of contrast intensification on a fuzzy membership

function.


B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



19.     Write a program to solve the problem of the 0/1-Knapsack Problem by using a genetic

algorithm. Taking the knapsack capacity, number of items, and weight of each item as user

input. Your task is to maximize the knapsack weight as per their capacity.


20.     Write a python function to realizing the logical AND function by a Extended Delta Learning Rule.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)


21.     Write a program to visualize the parameterized Trapezoidal fuzzy membership function, Gaussian fuzzy membership function and Sigmoidal fuzzy membership function for different parameter values in single window.


22.     Write a program to realize the fuzzy cartesian product.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



19.     Write a program to solve the problem of the 0/1-Knapsack Problem by using a genetic

algorithm. Taking the knapsack capacity, number of items, and weight of each item as user

input. Your task is to maximize the knapsack weight as per their capacity.


20.     Write a python function to realizing the logical AND function by a Extended Delta Learning Rule.


B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



10.     Write a program to realize the Travelling Salesperson Problem(TSP) by using genetic

algorithm (GA). Taking the number of nodes and their cost matrix as user-defined

input. You must include random.sample() and random.shuffle() python method for

implementing the task.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



1.     Write python functions to implement the following:

    (a)     Add an element in a given set.

    (b)     Update the set.

    (c)     Remove an element from the set.

    (e)     Discard an element from the set.

    (f)     Pop the element from the set.

    (g)     Clear the set.

    (h)     Distinguish between remove() and discard() functions in python.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



2.     Write python functions to generate the following parameterized fuzzy membership functions and visualize them for different parameter values in a single window:

    (a)     Triangular MF

    (b)     Trapezoidal MF

    (c)     Gaussian MF

    (d)     Generalized Bell MF



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



3.     Write a program to realize the logical AND function with a neural net model.

4.     Write a program to perform intersection and union operations of two fuzzy sets.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



5.     Write a program to realize the logical XOR operation in ANN model.

6.     Write a program to realize the fuzzy cartesian product.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



8.     Write a program to perform Max-Min composition of fuzzy sets.


9.     Write a program to realize the logical X-NOR operation in ANN model.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



10.     Write a program to realize the Travelling Salesperson Problem(TSP) by using genetic

algorithm (GA). Taking the number of nodes and their cost matrix as user-defined

input. You must include random.sample() and random.shuffle() python method for

implementing the task.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



11.     Write python functions to compute the symmetric difference of two crisp sets.

12.     Write python functions to compute the power set of a crisp set.

14.     Write a program to perform Max-Min composition of fuzzy sets.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



15.     Write python functions to demonstrate the effect of contrast intensification on a fuzzy

membership function.


16.     Write a program to realize the logical OR function with a neural net model.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




17.     Given a fuzzy membership function function mf(X) representing the fact x is A and a fuzzy relation R(X,Y) representing the fuzzy implication if x is A then y is B, find the consequent membership function representing y is B. Implement this for both max- min and max-product compositions and demonstrate the process visually.


OR


Implement the fuzzy reasoning procedure for the following:

Premise 1 (fact): x is A' and y is B'

Premise 2 (rule 1): if x is A1 and y is B1 then z is C1

Premise 3 (rule 2): if x is A2 and y is B2 then z is C2

---------------------------------------------------------------------------------------------

Consequence (conclusion): z is C'

The notations have usual meaning. Demonstrate the procedure visually.


18.     Write a program to demonstrate the effect of contrast intensification on a fuzzy membership function.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



19.     Write a program to solve the problem of the 0/1-Knapsack Problem by using a genetic

algorithm. Taking the knapsack capacity, number of items, and weight of each item as user

input. Your task is to maximize the knapsack weight as per their capacity.


20.     Write a python function to realizing the logical AND function by a Extended Delta Learning Rule.



B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




21.     Write a program to visualize the parameterized Trapezoidal fuzzy membership function, Gaussian fuzzy membership function and Sigmoidal fuzzy membership function for different parameter values in single window.


22.     Write a program to realize the fuzzy cartesian product.




B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




19.     Write a program to solve the problem of the 0/1-Knapsack Problem by using a genetic

algorithm. Taking the knapsack capacity, number of items, and weight of each item as user

input. Your task is to maximize the knapsack weight as per their capacity.




20.     Write a python function to realizing the logical AND function by a Extended Delta Learning Rule.




B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)



10.     Write a program to realize the Travelling Salesperson Problem(TSP) by using genetic

algorithm (GA). Taking the number of nodes and their cost matrix as user-defined input. You

must include random.sample() and random.shuffle() python method for implementing the 

task.




B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026

Subject: Soft Computing Lab (CS 692)




30.     Write a Python program to implement the backpropagation for XOR Problem.








Soft Computing Lab Semester Exam Questions for B.Tech. and M.Tech. Programs

B.Tech. Pt-III (CSE) 2 nd Semester Examination, 2026 Subject: Soft Computing Lab (CS 692) 1.      Write python functions to implement the fo...