Final 2014
Final 2014
Final 2014
Cairo University
Final Exam
Department: Computer Science
Course Name: Genetic Algorithms Date: 11/1/2014
Course Code: CS464 Duration: 2 hours
Examiner(s): Prof. Dr. Amr Badr Total Marks: 60
Question 1 [8 marks]
Given a medical cancer information system with governing variables x1, x2 and x3. It is
required to infer the decision D. The following information is provided,
x1 range 0..100 with fuzzy sets L, M, H.
x2 range 0..100 with fuzzy sets L, M, H.
x3 range 0..100 with fuzzy sets L, M, H.
and D with decisions Malignant: M and Benign: B.
The following decision blocks apply,
DB1:
IF x1=L AND x2=L THEN y=L
IF x1=M AND x2=H THEN y=H
DB2:
IF x3=L AND y=L THEN D=B
IF x3=M AND y=H THEN D=M
Intermediate variable y is
y range 0..100 with fuzzy sets VL, L, M, H, VH
determine the decision D for x1= 30, x2=70 and x3=30.
Question 2 [6 marks]
According to the schema theorem, what happens to highly fit schemata in successive
generations? What are the effects of selection, crossover and mutation according to the
theorem? Why use crossover and mutation?
Question 3 [6 marks]
a- Prove that any string of length m is an instance of 2 m different schemas. [2 marks]
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? [4 marks]
Question 4 [6 marks]
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?
Question 5 [6 marks]
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.
1
Question 6 [7 marks]
It is known that VolksWagen TSI motors combine the benefits of small cylinder size and
high horse power output. If the parameters that affect its design are: x1, x2, …, xm then
design a genetic algorithm for the design of such a motor.
Question 7 [7 marks]
Given a datafile for a classification problem with inputs x1, x2, …, xm and an output y. It is
required to evolve an equation:
Y = f(x1, x2, …, xm)
That can carry out classification without the use of a neural network.
Question 8 [7 marks]
For a wireless network dynamical system, it is required to optimize the system given a
simulator for wireless signals and knowing that the set of parameters that affect the system
are: x1, x2, …, xm. Design an optimizer that can predict the best operation parameters.
Question 9 [7 marks]
A number of laboratory tests are done in case of cancer. Several patients have volunteered to
do these tests. A database is generated with a record per patient and a test per field. It is
required to predict the most prominent tests that correctly indicate whether malignant or
benign. Design the system.