> #Attendence quiz 13 ; > #THE NUMBER OF ATTENDANCE QUESTIONS WERE: 6 ; > ; > #Q1 ; > #Describe the problem that Euler solved regarding 7 bridges. ; > ; > #The puzzle is called The Seven Bridges of Königsberg. It¡¯s based on an actual city, then in Prussia, now Kaliningrad in Russia. The city is divided by a river with two islands in between and, further downstream, the river splits the city again.The problem is deceptively simple: there are (or were, in Euler¡¯s time) seven bridges to connect the two islands and the downstream parts of the town. Euler wondered if a person could walk across each of the seven bridges once and only once to touch every part of the town. Starting and ending at the same spot was not a requirement. ; > ; > #Q2 ; > #Draw it on a piece of paper with a line segment representing every edge. G = [{2,3},{1,3,4},{1,2,4},{2,3}] ; > ; > # 1---2---4 ; > # | | | ; > # \ 3 / ; > ; > #Q3 ; > #If you toss a fair coin 2000 times, what is the probability you get exactly 1000 heads? ; > #P(1000H) = (2000 choose 1000) * (0.5)^1000 * (0.5)^1000 = .1783901115e-1 ; > ; > #Q4 ; > #If you toss a dice 6000 times, what is the probability of that each of posssible outccomes {1,2,3,4,5,6} ; > #p = (1/6)^1000 ; > ; > #Q5 ; > #pick 5 random facebook friends, for each of them pick 3 friends, for each of the friends of friends pick 3 friends. Label the people picked 1,2,...n. Write the graph in our data structure. ; > #Vince - James - Cody ; > # - Lujia > # - Barry > # - Dylan - Jerry > # - Liang > # - Weichen > # - Xu - Haocheng > # - Shawn > # - Hanxi > #Siyuan - Mingyu - Boba > # - Tanbo > # - Zhijian > # - Muda - Hengyu > # - Lynn > # - Kaidi > # - Yinghao - Du > # - Zhiyi > # - Lixin > #Albert - Shiv - Nupoor > # - Krupal > # - Urvi > # - Ximin - Liza > # - Umit > # - Ralph > # - Sebas - Zack > # - Cynthia > # - Claudia > #Yue - Yanchang - Hongyi > # - Jiayun > # - Chang > # - Alvin - Robert > # - Jazmin > # - Cesiah > # - Josue - Zabli > # - Phoebe > # - Teresita > #Carter - Yuhe - Dave > # - Mingzhao > # - Spencer > # - Rongqian - Ziyu > # - Tianyi > # - Stella ; > # - Amos - Abdoul > # - Mariao > # - Marilia > ; > G := [{6,7,8},{9,10,11},{12,13,14},{15,16,17},{18,19,20},{1,21,22,23},{1,24,25,26},{1,27,28,29},{2,30,31,32},{2,33,34,35},{2,36,37,38},{3,39,40,41},{3,42,43,44},{3,45,46,47}, {4,48,49,50}, {4,51,52,53}, {4,54,55,56}, {5,57,58,59}, {5,60,61,62}, {5,63,64,65}, {6}, {6}, {6}, {7}, {7}, {7}, {8}, {8}, {8}, {9}, {9}, {9},{10}, {10}, {10}, {11}, {11}, {11}, {12}, {12}, {12}, {13}, {13}, {13}, {14}, {14}, {14}, {15}, {15}, {15}, {16}, {16}, {16}, {17}, {17}, {17},{18}, {18}, {18}, {19}, {19}, {19}, {20}, {20}, {20}, {1,2,3,4,5}] G := [{6, 7, 8}, {9, 10, 11}, {12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {1, 21, 22, 23}, {1, 24, 25, 26}, {1, 27, 28, 29}, {2, 30, 31, 32}, {2, 33, 34, 35}, {2, 36, 37, 38}, {3, 39, 40, 41}, {3, 42, 43, 44}, {3, 45, 46, 47}, {4, 48, 49, 50}, {4, 51, 52, 53}, {4, 54, 55, 56}, {5, 57, 58, 59}, {5, 60, 61, 62}, {5, 63, 64, 65}, {6}, {6}, {6}, {7}, {7}, {7}, {8}, {8}, {8}, {9}, {9}, {9}, {10}, {10}, {10}, {11}, {11}, {11}, {12}, {12}, {12}, {13}, {13}, {13}, {14}, {14}, {14}, {15}, {15}, {15}, {16}, {16}, {16}, {17}, {17}, {17}, {18}, {18}, {18}, {19}, {19}, {19}, {20}, {20}, {20}, {1, 2, 3, 4, 5}] ; > ; > #Q6 ; > #Look at the cities that border Piscataway, and for each of them those that border them, > #and again until you get to princton > #(i) construct the graph > #(ii) Find the path from piscataway to princiton > #(a) find the actual path using Paths( and list them) > #(b) by using NuPathro > #(c) by using GFt ; > ; > ;