Question 1: Short answer
hardAI-checkedGenetic AlgorithmsThis one-point crossover is adapted from aima-python:
import random
def recombine(x, y):
n = len(x)
c = random.randrange(0, n) # c is one of 0, 1, ..., n - 1
return x[:c] + y[c:]
For x = [1, 0, 1, 1, 0, 1] and y = [0, 0, 1, 0, 1, 1], how many distinct children can
recombine(x, y) return?