Results 1 to 6 of 6
 03042010, 06:08 PM #1Member
 Join Date
 Mar 2010
 Posts
 3
 Rep Power
 0
I need help solving this problem.
The following table is provided by a laboratory, consisting of a serial of samples recorded during the
biochemical refining process
x f(x)
0 0
15 0.221456693
30 0.415231299
45 0.581323819
60 0.719734252
75 0.830462598
90 0.913508858
105 0.968873031
120 0.996555118
128 1
135 0.996555118
150 0.968873031
165 0.913508858
180 0.830462598
195 0.719734252
210 0.581323819
225 0.415231299
240 0.221456693
255 0
We will use this table to model a polynomial that interpolates f(x) at the given point
================================================== ========
This polynomial will be used to calculate the fitness of the individual that we will randomly determine.
Write a java program that:
1. Calculates the interpolation polynomial that we will denote P(x).
The values from the table above are provided by Polynomial.txt file that your Java program
will open and read through a dialog box.
2. Initializes the population by using a random number generator (maximum of 16 individuals).
This initialization should be done by using the binary string (Don’t use native binary, use
rather Gray representation) of maximum 8 digits
3. Transforms the gray representation of each individual into the decimal coding
4. Calculates the fitness of each individual
a. Calculate the frequency of each individual
b. Normalize the frequency of each individual
c. Calculate the cumulative frequency of each individual
d. Generate 16 random numbers to determine the destiny of each individual
5. Reproduces new population and pairs up the individuals based on their sequence of
apparition in 4.d (to be selected).
6. Applies crossover as follow:
a. For each pair, a random Boolean will determine if the pair is subject to crossover or
not (all the pairs should be affected).
b. If yes, two random numbers between 0 to 7 will be generated to each individual to
determine the range where crossover will be applied (First number = start, second
number = end).
7. Applies randomly one mutation on each individual (jth bit where j = number of bits to “1” in
this individual. E.g. for 10011000, bit 3 should be muted)
8. Produce the result of the first generation
9. Runs recursively until produce the result of the 5th generations
10. Provide your conclusion
Bonus : Modify your program and run it until you get all the individual with fitness greater than
0.95. How many generations were needed to get this output?
 03042010, 06:20 PM #2
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,408
 Blog Entries
 7
 Rep Power
 25
Great, and what is your question?
kind regards,
Jos
 03042010, 07:34 PM #3Member
 Join Date
 Mar 2010
 Posts
 3
 Rep Power
 0
Java problem
my question is if you can provide me with the code to achieve numb 1 through to number 4d. Thanks
 03042010, 07:49 PM #4
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,408
 Blog Entries
 7
 Rep Power
 25
 03042010, 08:29 PM #5Member
 Join Date
 Mar 2010
 Posts
 3
 Rep Power
 0
This is what I need actually
Can you help me with the opening Java statement. I do not want you to do my homework for me. But I just need a lead how to start cos I have no clue what the opening statement is. With that I can do the rest.
 03042010, 09:40 PM #6Member
 Join Date
 Oct 2009
 Posts
 26
 Rep Power
 0
Similar Threads

Pls help me in solving this java question
By dunnoGUy in forum New To JavaReplies: 1Last Post: 02282010, 08:10 AM 
plz help me solving this small but annoying problem!! plz.. i need help urgently.
By Y. Progammer in forum New To JavaReplies: 13Last Post: 02202010, 08:56 PM 
Solving this equations problem in Java
By matt_well in forum New To JavaReplies: 17Last Post: 08302008, 09:05 PM 
Suggestions required for solving a Java problem
By bilal_ali_java in forum Advanced JavaReplies: 3Last Post: 08162008, 01:11 AM 
I need a help in solving this method using vectors
By java_fun2007 in forum New To JavaReplies: 2Last Post: 11262007, 08:51 PM
Bookmarks