# Please do not post # Daniela Elizondo # Assignment 23 # April 17, 2022 ##### Problem 2 ##### # WikiCent(n): inputs a positive integer n and returns the generalized 2n-stage Centipede game WikiCent := proc(n) local i: [seq({i+1, 2*n+i+1}, i=1..2*n), {}$(2*n+1)], {[2*n+1, [2*n-1+0.1, 2*n-1+0.1]], seq([2*n+i+1, [i, max(0, i-2)]], i=1..2*n-1), [4*n+1, [2*n-2, 2*n]]}: end: ##### Problem 3 ##### # My family tree (which is as complete as I could make it): G := [{3}, {3}, {4}, {5,6,7,8,9,10,11,12}, {15,16,17,18}, {}$7, {14,15,16,17,18}, {}, {19,20,21,22}, {23,24,25,26}, {27,28,29,30}, {31}, {32,33}, {34,35,36}, {}$16, {39,40,41,42,43,44,45,46,47}$2, {48,49,50,51,52}, {23,24,25,26}, {53,54,55,56}, {57}, {}, {58,59,60,61,62}, {63,64}, {65,66}, {67,68,69,70,71}, {}$18, {72,73}, {74}, {75}, {76,77}, {}, {78,79}, {}$8]: # The following is the second compononent, i.e., the list of names corresponding to the above tree Names := [Trifon, Victoria, Tomasa, Pablo, Antonio, Frances, Sabina, John, Aurora, Mary, Frank, Miguel, Eloisa, Olivia, Mary, Frances, Paul, Phillip, Christina, Jennifer, Stephen, Alexandra, Laurel, Meagan, Marissa, Daniela, Marc, Jacqueline, Paula, Joanna, Victoria, Lauren, Ethan, Joshua, Jonathan, James, Francisco, Dolores, Gloria, Joe, John, Cathy, Susan, Carole, Steve, Michelle, Francine, Michelle, Christoper, Tavis, Eli, Simone, Christy, Frank, Melissa, Zach, Amber, Calvin, Jackie, Dominique, Jasmin, Quinn, Stephanie, Spring, Tim, Sioban, Andrew, Darren, Greg, Darius, Sierra, Madison, Maverick, Bailey, Desilu, Johnny, Camila, Hayzz, Ariya]: # Running GenS(G) outputs [{6, 7, 8, 9, 10, 11, 12, 14, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 43, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 70, 72, 73, 74, 75, 76, 77, 78, 79}, {16, 17, 18, 19, 20, 39, 40, 41, 42, 44, 45, 66, 67, 68, 69, 71}, {15, 46, 47}, {5, 13, 37, 38}, {4}, {3}, {1, 2}] # Running LaGn(G) outputs [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] # So, the most ancient generation wins the game! ##### Problem 4 ##### # Assuming that every person's family tree is indeed a tree, then going back n generations, everyone is the direct descendent of 2^n people. # So, going back 40 generations, everyone must be the direct descendent of 2^40 ~ 1.01 * 10^12 people. But, only about 107 billion (1.07 * 10^11) people have ever lived, according to the BBC in 2012 (https://www.bbc.com/news/magazine-16870579). This is a slightly outdated source, but more recent one didn't seem too credible. # So, it is impossible for anyone's family tree to be a tree; we're all related!