#OK to post homework #Natalya Ter-Saakov, March 13, Assignment 14 read "C14.txt": #Problem 1 #1999 general election (in the order given on Wikipedia) L1999:= [26,19,17,10,6,6,6,5,5,5,4,3,4,2,2, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]: #SSVc(L1999,61); #lprint(%); #[29657/120120, 7409/45045, 51823/360360, 28363/360360, 2081/45045, 2081/45045, # 2081/45045, 2753/72072, 2753/72072, 2753/72072, 1363/45045, 31/1365, 1363/45045, 535/36036, 535/36036, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] #1973 general election (in alphabetical order) L1973:= [51, 1, 0, 0,0,0,4,0, 39,0,1,0, 10,0, 2,4,3,5, 0,0,0]: #SSVc(L1973,61); #lprint(%); #[67/140, 13/1260, 0, 0, 0, 0, 23/504, 0, 31/210, 0, 13/1260, 0, 31/210, 0, 3/ # 140, 23/504, 19/630, 79/1260, 0, 0, 0] #1965 general election (in Wikipedia order) L1965:= [45,26,11,10,8,5,4,3,2,2,2,1,1,0,0,0,0]: #SSVc(L1965,61); #lprint(%); #[33977/72072, 16493/120120, 3319/36036, 3671/45045, 10823/180180, 617/15015, # 1961/60060, 939/40040, 5461/360360, 5461/360360, 5461/360360, 673/90090, 673/ # 90090, 0, 0, 0, 0] #Problem 2 for n from 1 to 20 do SSVc([seq(i,i=1..2*n)], floor(n*(2*n+1)/2)+1); od;