#OK to post homework #Natalya Ter-Saakov, April 17, Assignment 23 read "C23.txt": #Problem 2 WikiCent:=proc(n) local i: [seq({i+1,2*n+1+i}, i=1..2*n), {}$(2*n+1)],{[2*n+1,[2*n-1+0.1,2*n-1+0.1]],[2*n+2,[1,0]],seq([i,[i,i-2]],i=2..2*n)}: end: #Problem 3 N:=[{},{},{},{},{}, {},{},{1,2,3},{1,2,3},{4,5,6,7}, {4,5,6,7},{8,11},{8,11},{9},{9}, {12},{12},{13},{14,21,22},{14,21,22}, {23},{},{},{19,26},{19,26}, {27,28},{},{},{24},{25}, {32},{20,35,36,37,38,40,41},{34},{20,35,36,37,38,40,41},{}, {},{},{39},{},{}, {},{15},{42,45,48},{42,45,48},{46,47}, {},{},{},{15},{49,53}, {49,53},{51},{54,55,56,57},{},{}, {},{}]: NLabels:=[Natasha, Dimitri, Ashot, Anna, Anthony, Elizabeth, Eric, Suren, Tatiana, Alina, George, Sergei, Liubov, Vladimir, Revekka, Ashot, Alla, Boris, Ilya, Nadezhda, Lena, Yuriy, Gleb, Abraham, Anna, Inna, Boris, Yakov, Yakov, Leontiy, Minov, Sava, Danil, Ephroiniya, Vasiliy, Anthony, Aleksandr, Raya, Gera, Liubov, Olga, Yakov, Boris, Revekka, Arkadiy, Boris, Belka, Solomon, Dasya, Aleksandr, Sophia, Mark, Naum, Frida, Anna, Aleksandr, Eugenia]: GenS(N); #[{1, 2, 3, 4, 5, 6, 7, 22, 23, 27, 28, 35, 36, 37, 39, 40, 41, 46, 47, 48, 54, 55, 56, 57}, {8, 9, 10, 11, 21, 26, 38, 45, 53}, {12, 13, 14, 15}, {16, 17, 18, 19, 20, 42, 49}, {24, 25, 32, 34, 43, 44, 50, 51}, {29, 30, 31, 33, 52}] LaGn(N); #[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0] #The oldest generation included are winners. #Problem 4 #The number of people in n generations of a single person's family tree is 2^n-1. So in 30 generations (under 1000 years), there would be more than a billion people in my family tree alone (not including any siblings). Most estimates for the number of people ever alive are on the order of 100 million people.