DEPARTMENT OF INFORMATION
TECHNOLOGY INSTITUTE VISION AND
MISSION
Vision
To be a reputed Institution that fosters excellence in education, research and
innovation while upholding the highest standards of ethics and social responsibility.
Mission
M1. To provide a comprehensive education that prepares students for successful
careers.
M2. To foster a culture of research and innovation that drives progress.
M3. To collaborate with industry partners to provide practical experience for students.
M4. To promote ethical behavior and social responsibility among our community.
M5. To empower strong communication and leadership skills through open
collaboration.
DEPARTMENT OF INFORMATION
TECHNOLOGY DEPARTMENT VISION
AND MISSION
Vision
To be a school of excellence by providing holistic education and fostering research in
IT to produce technically competent, socially, and ethically responsible students.
Mission
M1. To provide a solid foundation in computational engineering for a successful
career in Information Technology.
M2. To provide technical support and facilities to enrich research and development
in the field of Information Technology.
M3. To collaborate in interdisciplinary projects with academia and industry through
emerging technologies.
M4. To inculcate professional behavior, lifelong learning with ethical values.
M5. To empower engineers with excellent communication, teamwork, and
interpersonal skills.
DEPARTMENT OF INFORMATION
TECHNOLOGY PROGRAM
OUTCOMES
1. Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering
problems.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
3. Design/development of solutions: Design solutions for complex engineering problems and
design system components or processes that meet the specified needs with appropriate
consideration for the public health and safety, and the cultural, societal, and environmental
considerations.
4. Conduct investigations of complex problems: Use research-based knowledge and research
methods including design of experiments, analysis and interpretation of data, and synthesis of
the information to provide valid conclusions.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering activities
with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader in
diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society such as, being able to comprehend and write effective
reports and design documentation, make effective presentations, and give and receive clear
instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
DEPARTMENT OF INFORMATION TECHNOLOGY
Program Educational Objectives (PEOs)
PEO 1: To be a skilled professional in providing technically feasible solutions in data
driven technology and security principles for industry and society.
PEO 2: To emerge as a developer & researcher by engaging in lifelong learning and
adapting to challenging environments.
PEO 3: To exhibit entrepreneurship skills, leadership qualities and professional ethics
to start new ventures.
PEO 4: To be prepared for their career in the software industry or pursue higher
studies to enhance their professional knowledge.
Program Specific Outcomes (PSOs)
PSO 1: To apply basic science, programming, algorithms, and data
management for developing software solutions.
PSO 2: To apply data driven technology and information security principles
for developing reliable information systems.
Course Code And Name CCS364-SOFT COMPUTING
Course Handing Faculty P.SUGANYA
COURSE OUTCOME
At the nd of the course, the student should be able to:
e
Course
Outcome Course Outcomes RBT-Level
s No.
Demonstrate proficiency in implementing Soft K3-Apply
CO506.1 computing Constituents
Perform the implementation of Soft K3-Apply
CO506.2 computing Constituents with accurate coding
skills and techniques.
Draw accurate inferences from the Soft K4-Analyze
CO506.3 computing
technique implementation results.
Present the implementation of Soft computing techniques K4-Analyze
CO506.4
results in a systematic way.
Communicate the underlying implementation of K2-Understand
CO506.5 Soft
computing Constituents with clarity.
Complete the implementation of Soft computing K2-Understand
CO506.6 Constituents within the stipulated time frame and follow
the coding standards and guidelines.
CO – PO MAPPING
Program
Specific
CO Program Outcomes
Outcome
(PO)
s (PSO)
PO1 PO PO PO PO PO PO PO PO PO1 PO1 PO1 PSO PSO
2 3 4 5 6 7 8 9 0 1 2 1 2
CO1 3 - - - - - - - 3 3 - - 3 3
CO2 3 - - - 3 - - 2 3 - 2 - 3 3
CO3 3 2 - 2 - 2 - - - 3 - - - -
CO4 3 - - - - - - - - 3 - - 3 3
CO5 3 - - - - - - - - 3 - 2 2 2
CO6 - - - - - 2 - 2 3 3 - 2 2 2
Correlation
Strong – S / 3 Medium – M / 2 Weak – W / 1
CERTIFICATE
This is to certify that the bonafide record of this work is done by
Selvan/Selvi:…………………………………. Reg..No…………………………. Of III-
Year V- semester in Information Technology For CCS364- SOFT COMPUTING
LABORATORY during the academic Year-2024-2025
Faculty in Charge HoD
Sumbitted for the University Pracitical Examination held on………………..
INTERNAL EXAMINER EXTERNAL EXAMINER
EXP NO: 01 DATE: ………………..
IMPLEMENTATION OF FUZZY CONTROL/INFERENCE SYSTEM
AIM:
ALGORITHM:
PROGRAM:
def triangular_mf(x, a, b, c):
return max(min((x - a) / (b - a), (c - x) / (c - b)),
0) def fuzzy_rule(temperature):
cold = triangular_mf(temperature, 0, 20, 40)
moderate = triangular_mf(temperature, 20, 40, 60)
hot = triangular_mf(temperature, 40, 60, 80)
low_speed = max(cold, 1 - hot)
medium_speed = moderate
high_speed = max(moderate, hot)
return low_speed, medium_speed,
high_speed def defuzzification(weights):
numerator = sum(idx * weight for idx, weight in
enumerate(weights)) denominator = sum(weights)
return numerator / denominator
def fuzzy_control_system(temperature):
low_speed, medium_speed, high_speed =
fuzzy_rule(temperature) weights = [low_speed, medium_speed,
high_speed]
fan_speed = defuzzification(weights)
return fan_speed
# Example usage
if _name_ == "_main_":
temperature_input = 55
fan_speed_output = fuzzy_control_system(temperature_input)
print("Temperature:", temperature_input)
print("Fan Speed:", fan_speed_output)
Output:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of results Answerin e l
Procedure for g the from the g Viva reflected
Experiment Experimen questions
theexperiment in doing
/ t experimen
/exercise
exercise / t
(3) exercise (3) (5 /exercise
(8) ) (25)
(3) (3)
Result:
EXP NO: 02 DATE: …………………….
PROGRAMMING EXERCISE ON CLASSIFICATION WITH A
DISCRETE PERCEPTRON
AIM:
ALGORITHM:
PROGRAM:
import numpy as np
class DiscretePerceptron:
def init (self, num_features):
self.weights = np.random.rand(num_features)
self.bias = np.random.rand()
def predict(self, x):
net_input = np.dot(x, self.weights) +
self.bias return 1 if net_input >= 0 else 0
def train(self, X_train, y_train, epochs=100,
learning_rate=0.1): for epoch in range(epochs):
errors = 0
for x, y_true in zip(X_train,
y_train): y_pred = self.predict(x)
error = y_true - y_pred
errors += int(error !=
0)
self.weights += learning_rate * error *
x self.bias += learning_rate * error
if errors == 0:
print(f"Converged after {epoch + 1}
epochs.") return
def evaluate(self, X_test,
y_test): num_correct = 0
for x, y_true in zip(X_test,
y_test): y_pred = self.predict(x)
if y_pred == y_true:
num_correct += 1
accuracy = num_correct /
len(X_test) return accuracy
# Example usage
if name == " main ":
# Sample dataset with two features (X1 and X2) and corresponding labels (0 or 1)
X_train = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
y_train = np.array([0, 0, 0, 1])
perceptron = DiscretePerceptron(num_features=2)
perceptron.train(X_train, y_train)
X_test = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
y_test = np.array([0, 0, 0, 1])
accuracy = perceptron.evaluate(X_test,
y_test) print("Accuracy:", accuracy)
OUTPUT:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of Answerin e l
Procedure for g the from the results g Viva reflected
Experiment Experimen questions
theexperimen in doing
/ t experimen
t
/exercise exercise / t
exercise (5 /exercise
(3) (8) (3) (3) ) (25)
(3)
Result:
EXP NO: 03 DATE: ………………….
IMPLEMENTATION OF XOR WITH BACKPROPAGATION ALGORITHM
AIM:
ALGORITHM:
PROGRAM:
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-
x)) def
sigmoid_derivative(x):
return x * (1 - x)
class XORNeuralNetwork:
def _init_(self, input_dim, hidden_dim,
output_dim): self.input_dim = input_dim
self.hidden_dim = hidden_dim
self.output_dim = output_dim
self.hidden_weights = np.random.rand(self.input_dim, self.hidden_dim)
self.hidden_bias = np.random.rand(self.hidden_dim)
self.output_weights = np.random.rand(self.hidden_dim, self.output_dim)
self.output_bias = np.random.rand(self.output_dim)
def forward_pass(self, X):
hidden_layer_output = sigmoid(np.dot(X, self.hidden_weights) + self.hidden_bias)
output_layer_output = sigmoid(np.dot(hidden_layer_output, self.output_weights)
+
self.output_bias)
return hidden_layer_output,
output_layer_output def backpropagation(self, X,
y, learning_rate):
hidden_output, output =
self.forward_pass(X) output_error = y - output
output_delta = output_error * sigmoid_derivative(output)
hidden_error = output_delta.dot(self.output_weights.T)
hidden_delta = hidden_error *
sigmoid_derivative(hidden_output)
self.output_weights += hidden_output.T.dot(output_delta) *
learning_rate self.output_bias += np.sum(output_delta) * learning_rate
self.hidden_weights += X.T.dot(hidden_delta) * learning_rate
self.hidden_bias += np.sum(hidden_delta) * learning_rate
def train(self, X_train, y_train, epochs=1000,
learning_rate=0.1): for epoch in range(epochs):
for X, y in zip(X_train, y_train):
X = np.array(X).reshape(1, -
1) y = np.array(y).reshape(1, -
1)
self.backpropagation(X, y,
learning_rate) def predict(self, X):
hidden_output, output =
self.forward_pass(X) return np.round(output)
# Example usage
if _name_ == "_main_":
X_train = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
y_train = np.array([[0], [1], [1], [0]])
xor_nn = XORNeuralNetwork(input_dim=2, hidden_dim=2,
output_dim=1) xor_nn.train(X_train, y_train)
X_test = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
predictions = xor_nn.predict(X_test)
print("Predictions for XOR:")
print(predictions)
Output:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of results Answerin e l
Procedure for g the from the g Viva reflected
Experiment Experimen questions
theexperimen in doing
/ t experimen
t
/exercise exercise / t
exercise (3) (5 /exercise
(3) (8) ) (25)
(3) (3)
Result:
EXP NO:04 DATE: ……………………….
IMPLEMENTATION OF SELF ORGANIZING MAPS OF A SPECIFIC APPLICATION
AIM:
ALGORITHM:
PROGRAM:
import numpy as np
from minisom import MiniSom
import matplotlib.pyplot as plt
# Generate sample data
np.random.seed(0)
data = np.random.rand(100, 2)
# Initialize and train the Self-Organizing Map
map_size = (10, 10) # Size of the SOM grid
input_len = 2 # Number of features in the dataset
learning_rate = 0.5 # Learning rate
sigma = 2.0 # Initial neighborhood radius
num_epochs = 100 # Number of training
epochs
som = MiniSom(map_size[0], map_size[1], input_len,
sigma=sigma, learning_rate=learning_rate)
som.random_weights_init(data)
som.train_random(data, num_epochs)
# Visualize the clustered data
plt.figure(figsize=(8, 8))
plt.scatter(data[:, 0], data[:, 1], color='gray',
alpha=0.6) for i in range(len(data)):
winner = som.winner(data[i])
plt.plot(winner[0] + 0.5, winner[1] + 0.5, 'ro', markersize=8, markerfacecolor='None',
markeredgewidth=2)
plt.title('Self-Organizing Map
Clustering') plt.grid(True)
plt.show()
OUTPUT:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of results Answerin e l
Procedure for g the from the g Viva reflected
Experiment Experimen questions
theexperiment in doing
/ t experimen
/exercise
exercise / t
(3) exercise (3) (5 /exercise
(8) ) (25)
(3) (3)
Result:
EXP NO: 05 DATE:…………………..
PROGRAMMING EXERCISES ON MAXIMIZING A FUNCTION USING GENETIC
ALGORITHM
AIM:
ALGORITHM:
PROGRAM:
from numpy.random import
randint from numpy.random
import rand def onemax(x):
return -sum(x)
def selection(pop, scores, k=3):
selection_ix = randint(len(pop))
for ix in randint(0, len(pop), k-
1):
if scores[ix] <
scores[selection_ix]:
selection_ix = ix
return pop[selection_ix]
def crossover(p1, p2, r_cross):
c1, c2 = p1.copy(),
p2.copy() if rand() <
r_cross:
pt = randint(1, len(p1)-2)
c1 = p1[:pt] + p2[pt:]
c2 = p2[:pt] +
p1[pt:] return [c1, c2]
def mutation(bitstring, r_mut):
for i in
range(len(bitstring)):
if rand() < r_mut:
bitstring[i] = 1 - bitstring[i]
def genetic_algorithm(objective, n_bits, n_iter, n_pop, r_cross,
r_mut): pop = [randint(0, 2, n_bits).tolist() for _ in range(n_pop)]
best, best_eval = 0,
objective(pop[0]) for gen in
range(n_iter):
scores = [objective(c) for c in
pop] for i in range(n_pop):
if scores[i] < best_eval:
best, best_eval = pop[i], scores[i]
print(">%d, new best f(%s) = %.3f" % (gen, pop[i], scores[i]))
selected = [selection(pop, scores) for _ in range(n_pop)]
children = list()
for i in range(0, n_pop, 2):
p1, p2 = selected[i],
selected[i+1] for c in crossover(p1,
p2, r_cross):
mutation(c, r_mut)
children.append(c)
pop = children
return [best,
best_eval] n_iter = 100
n_bits = 20
n_pop = 100
r_cross = 0.9
r_mut = 1.0 / float(n_bits)
best, score = genetic_algorithm(onemax, n_bits, n_iter, n_pop, r_cross,
r_mut) print('Done!')
print('f(%s) = %f' % (best, score))
Output:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of results Answerin e l
Procedure for g the from the g Viva reflected
Experiment Experimen questions
theexperimen in doing
/ t experimen
t
/exercise exercise / t
exercise (3) (5 /exercise
(3) (8) ) (25)
(3) (3)
Result:
EXP NO:06 DATE: ……………………
IMPLEMENTATION OF TWO INPUT SINE FUNCTION
AIM:
ALGORITHM:
PROGRAM:
import math
def two_input_sine(x1, x2):
return math.sin(x1) + math.sin(x2)
# Example usage
if name == " main ":
x1 = 0.5
x2 = 1.2
result = two_input_sine(x1, x2)
print(f"The result of the two-input sine function with x1={x1} and x2={x2} is: {result}")
Output:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Tota
of the inperformin drawn n of results Answerin e l
Procedure for g the from the g Viva reflected
Experiment Experimen questions
theexperiment in doing
/ t experimen
/exercise
exercise / t
(3) exercise (3) (5 /exercise
(8) ) (25)
(3) (3)
Result:
EXP NO:07 DATE: …………………..
IMPLEMENTATION OF THREE INPUT NON LINEAR FUNCTION
AIM:
ALGORITHM:
PROGRAM:
import math
def three_input_nonlinear_function(x1, x2, x3):
return (x1 ** 2) + (x2 ** 3) + math.sin(x3)
# Example usage
if name == " main ":
x1 = 2
x2 = 3
x3 = 0.5
result = three_input_nonlinear_function(x1, x2, x3)
print(f"The result of the three-input nonlinear function with x1={x1}, x2={x2}, and
x3={x3} is: {result}")
Output:
Marks Obtained:
Correctness Skills level Inferences Presentatio Clarity in Attitud Total
inperformin drawn n Answerin e
of the g the from the of results g Viva reflected
Procedure for Experiment Experimen questions
in doing
theexperiment / t experimen
/exercise exercise / t
exercise (5 /exercise
(3) (8) (3) ) (25)
(3) (3)
Result: