hw5 - HW 5 Solutions 2010 Points possible 20 1 A 5-bit...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
HW 5 Solutions 2010 Points possible: 20 1. A 5-bit binary GA with a population size of 4 is used to solve a maximization problem. At generation zero the following information is available to you: Member String Fitness 1 10001 20 2 11001 10 3 00101 5 4 01101 15 The following GA algorithm parameters hold: Probability of crossover = 1 In each crossover operation a one-point crossover strategy with 2 parents will be employed to produce exactly one child. The first part of the genes of the child (bits 1 to the crossover point) will come from the first parent, and the second part (from the crossover point to the end of the string) from the second parent. If roulette wheel selection is employed and if there is no mutation, (a) (2 points) What is the chance that a member in generation 1 will be of the form 1xxxx? What is the chance that a member in generation 1 will be of the form 0xxxx? Total fitness of all parents = 20+10+5+15 = 50 Let X denote the event that a parent with form 1xxx is chosen as the first parent. P[X] = P[choose member 1 or 2] = P[choose 1] + P[choose 2] = 20/50+10/50 = 3/5 Let Y denote the event that a parent with form 0xxx is chosen as the first parent. P[Y] = P[choose member 3 or 4] = P[choose 3]+P[Choose 4] = 5/50+15/50 = 2/5 Note that P[Y] = 1 P[X] Students should not perform combinations because each member does not have an equal probability of being chosen. Now assume bit-wise mutation probability, pMutation = 0.01 (b) . (2 points) What is the chance now that a member in generation 1 will be of the form 1xxxx? Two things can happen now. Either (1) member 1 or member 2 is chosen and there is no mutation on the first bit, or (2) member 3 or member 4 is chosen and there is mutation on the first bit.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
HW 5 Solutions 2010 P[X] = P[(choose member 1 or 2) and (no mutation on the first bit)] + P[(choose member 3 or 4) and (mutation on the first bit)] =3/5*(1-0.01) + 2/5(0.01) = 0.598 What is the chance that a member in generation 1 will be of the form 0xxxx? A similar operation can be applied for this question. One can also obtain the answer by noting that a member in generation 1 will be of the form 0xxx is the same as saying that a member in generation 1 will not be of the form 1xxx: P[Y] = 1 P[X] = 0.402 2. Real-valued optimization Bump function . You will code a real-value GA and apply it to maximize the function outlined below. Your real-value GA will look very similar to your binary GA coding (i.e. assuming your binary GA works OK, modify your binary GA so that it works as a real-value GA).
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern