Documente Academic
Documente Profesional
Documente Cultură
Prove the associative and the distributive property for the above
given sets
1. AU(BUC) = (AUB)UC
L.H.S AU(BUC)
(BUC) = { 0.5/1.0+0.25/1.5+0.6/2.0+0.25/2.5+1/30}
R.H.S (AUB)UC
(AUB)={1/1.0+0.65/1.5+0.6/2.0+0.35/2.5+1/30}
(AUB)UC = {1/1.0+0.65/1.5+0.6/2.0+0.35/2.5+1/3.0}
To Prove Distribute Property
L.H.S (A ∩(B ∪ C)
(B ∪ C) = {0.5/1.5+0.25/1.5+0.6/2.0+0.25/2.5+1/30 }
(A ∩(B ∪ C)= {0.5/1.0+0.25/1.5+0.4/2.0+0.25/2.5+0/3.0}
(A ∩ B) ={0/1.0+0.25/1.5+0.4/2.0+0.25/2.5+0/3.0}
(A ∩ C) ={0.5/1.0+0.25/1.5+0/2.0+0.25/2.5+0/3.0}
(A ∩ B) U (A ∩ C) =={0.5/1.0+0.25/1.5+0.4/2.0+0.25/2.5+0/3.0}
Q-2 ) X = {a, b, c, d}
Y = {1, 2, 3, 4}
: If x is A then y is B else y is C
Here, A × B = [ 1 2 3 4]
A 0 0 0 0
d 0 0 0 0
R= [1 2 3 4]
If x is A then y is B else y is C
Q-3) Consider the problem of finding the shortest route through several
cities, such that each city is visited only once and in the end return to the
starting city (the Travelling Salesman problem). Suppose that in order to
solve this problem we use a genetic algorithm, in which genes represent
links between pairs of cities. For example, a link between London and
Paris is represented by a single gene ‘LP’. Let also assume that the
direction in which we travel is not important, so that LP = P L
.a) How many genes will be used in a chromosome of each individual if
the number of cities is 10?
Answer: Each chromosome will consist of 10 genes. Each gene
representing the path between a pair of cities in the tour.
f(x1) = (4 + 5 + 1) − (3 + 2 + 6) = −1
f(x2) = (1 + 3 + 6) − (7 + 9 + 5) = −11
f(x3) = (2 + 8 + 1) − (4 + 0 + 2) = 5
f(x4) = (9 + 8 + 2) − (0 + 1 + 3) = 15
x4 = 9 0 8| 1 2 3 O1 = 9 0 8| 0 1 2
⇒
x3 = 2 4 8| 0 1 2 O2 = 2 4 8| 1 2 3
x3 = 2 4 8| 0 1 2 O3 = 2 4 5| 2 1 2
⇒
x1 = 4 3 5 |2 1 6 O4 = 4 3 8| 0 1 6
f(O1) = (9 + 8 + 1) − (0 + 0 + 2) = 16
f(O2) = (2 + 8 + 2) − (4 + 1 + 3) = 4
f(O3) = (2 + 5 + 1) − (4 + 2 + 2) = 0
f(O4) = (4 + 8 + 1) − (3 + 0 + 6) = 4
X1,W1
X2,W2
V
y = ϕ(v)
X3,W3
:ϕ(v) =1 if v≥0
0 otherwise
Pattern P1 P2 P3 P4
X1 1 0 1 1
X2 0 1 0 1
X3 0 1 1 1
0 otherwise
Calculate what will be the output valueyof the unit for each of the
following input patterns::