0% found this document useful (0 votes)
12 views2 pages

Final 2008

Uploaded by

20208046
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Final 2008

Uploaded by

20208046
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Cairo University Final Exam

Faculty of Computers & Information Jan 2008


Dept of Computer Science Time 2 hrs
Genetic Algorithms
Answer ALL Qusetions:
1- Crossover and mutation are the main operators of a Genetic Algorithm.
a- Differentiate between single-point and multiple-point crossover, on both binary and
floating point representations.
b- Show by example- using binary strings- how can a 2-point crossover be carried out.
c- Explain the operation of the mutation operator on both binary and floating point
representations.
d- Discuss the mechanics of non-uniform mutation on floating point representation-
Apply using the following function:
t
( t , y )  y. ( 1  r( 1  T ) )
where r is a random number from [0..1].
(8 points)

2- Taking the reproductive schema growth equation of schema theory,


eta(S, t+1) = eta(S, t). eval(S, t)/ averagePopFitness(t) [1-Pc.d(S)/(m-1)-o(S).Pm]
assume that o(S).Pm = 0 and d(S) = m-1, then the equation becomes:
eta(S, t+1) = eta(S, t). eval(S, t)/ averagePopFitness(t) [1-Pc]
Discuss the mechanics of the algorithm when Pc = 0 and Pc = 1 under the following
conditions:
a- low population size
b- high population size
c- Elitism
(8 points)

3- a- Prove that any string of length m is an instance of 2 m different schemas.


b- Define the fitness f of bit string x with length m = 4, to be the integer represented
by the binary number x. (eg. f(0011)=3, f(1111)=15). What is the average fitness of
the schema 1*** under f? What is the average fitness of schema 0*** under f?
(8 points)

4- Given a population of PopSize Individuals, which are bit-strings of length L. Let


the frequency of allele 1 be 0.3 at position i, that is 30% of all individuals contains a 1
and 70% a 0. How does this allele frequency change after performing k crossover
operations with one-point crossover?
(8 points)

5- Calculate the probability that a binary chromosome with length L will not be
changed by applying the usual bit-flip mutation with Pm=1/L.
(8 points)

6- Given the following feedforward neural network with weights,


X1
+1
+1
-1
Y

-1
+1
X2
+1

and applying the following activation function,

1 x  0
f ( x)  
0 x  0

Compute the outputs Y for inputs (X1, X2) equal to the following,
(0,0), (0,1), (1,0), (1,1).
What function do you think this network emulates.
(8 points)

7- Given the following exemplars to be encoded in a BAM,


X1 = (101010) Y1 = (1100)
X2 = (111000) Y2 = (1010)
a- Compute the weights matrix M.
b- Recall the output of the BAM when presented with X = (111010). Comment on the
result.
c- Recall the output of the BAM when presented with X = (000111). Comment on the
result.
d- Why do you get a zero in the recall vector and what value [-1 or 1] do you take for
it if at the first iteration? On what basis is this taken?

8- Design a fuzzy controller with two input variables:


SPEED with range: 0 to 120 and 5 fuzzy sets: Stopped, Very Slow, Slow,
Medium Fast and Fast.
And
DISTANCE with range:0 to 2500 and 5 fuzzy sets: At, Very Near, Near,
Medium Far and Far.
The output variable is BRAKE with range: 0% to 100% and fuzzy sets: No, Very
Slight, Slight, Medium and Full.
The following fuzzy rules govern the actions of the system:
IF SPEED=Very Slow and DISTANCE=At THEN BRAKE = Full.
IF SPEED= Slow and DISTANCE=At THEN BRAKE = Full.
IF SPEED=Very Slow and DISTANCE=Very Near THEN BRAKE =
Medium.
IF SPEED= Slow and DISTANCE=Very Near THEN BRAKE = Medium.
Using a Mamdani approach, show how the output is computed.
(8 points)

9- Show how fuzzy rules that model a particular system can be evolved using genetic
algorithms. (Note: This question is bonus!)
(6 points) AMR BADR

You might also like