#OK to post #Sam Minkin, 11/08, Assignment 17 QUESTION #1: The number of ways a King can travel on a 3 by 50 chessboard by visiting each square exactly once is given by: coeff(taylor(KingToursGF(3, 100, t),t=0,60),t,50) = 3145849036836987795351683029577878807030. QUESTION #2: The number of ways of walking from [0,0] to [3000,3000] using, as atomic steps, {[1,0],[0,1],[1,1],[1,2],[2,1]} while staying in x >= y is given by: First, we can run ope:=Findrec(SeqGW({[0, 1], [1, 0], [1, 1], [1, 2], [2, 1]}, 100), n, N, 3001), which gives us: -2*(2*n + 3)/(n + 5) - (11*n + 23)*N/(n + 5) - (13*n + 41)*N^2/(n + 5) - 5*(n + 3)*N^3/(n + 5) + N^4 Then, we can run SeqFromRec(ope,n,N,[2, 8, 37, 187],3001)[3000]; which outputs: 95169091361304497661016734197678134770349822930308569276916914467565347871540683291808752282824707570651985872820372363152563131551499362536825304711559361666563103386330829999710178259606336618359856705840905896307823039694186915923739801088785552537207794661641719063082723104319582945468736368770654686751378287041101572685985713084393957598627298986861938927166053927103431921104126027579703091359302890708953724730599070838409654723308763002613165079306548111632722909218562889533100675786353470112016022196477554880490589499289089162582632715079250461763612854611196880347954440249628671174622179674903282050871247325146410790010719334253540172397663997792921830518354359522669329363082614972729965686428855219511297199827548476675004412199720715365099792501311123143368483881397876775712439421054798831717981977936622337062303624546576898187959341646575490702549296915200857634048143923818701102393144599106994024665053648913638391157955194662231996921003344586526221812096107389514125990119451880185515845934698037055104486896573666844857573880742852639391722910231692794433520126339340352663869698430014805776170895308465157999383126154136534892638175457579256315002808693778321645459807540062485196275478961352224073937381392596094278147716000344452101216213718218846995422403246683326563202994807095282839244324106363086847480478463730345215985413064515655006280716371594297868314185041474747026816679035293127055797403755491278529530018110422188400807126145601136460544996907253108026710738133221241693706980842171873604900269856459541793234702167937163679886476596787643003424261664266808615823066346661804622908642236679528725542671747404314012249795021732170691008575336656050986306648593100164229972842611760785390415331373519508784472911981975537222743422312589751576257948909815276363791495173342977855094118355700016556226919615428250897733703209967582718607928464069524222159738340806195626241390924709235357374015016254839959209084054394569432471432576684522506998779788376200443126782132255047582891261666245361634285199523372050333572627938881441014457739772722775254541205569963083330946306737155223437987340685548656285567503838100825537658312256841838804244651258118811651131924827871017999511708744102921789247462817980894438730298698541980861879749020341945718568693083738317799328488585909649259726166330681988951268751122991503360075439622584181083778123619416313964846558075294830227299727374990124401764015434769152111199549890678059731046462531157554362228562028418125254044367001279506736510680059995930940034 QUESTION #3: The number of ways of walking from [0,0,0] to [3000,3000,3000] using, as atomic steps, {[1,0,0],[0,1,0],[0,0,1],[1,1,1]}, while staying in the region x >= y >= z can be given by, First run ope:=Findrec(SeqGW({[1,0,0],[0,1,0],[0,0,1],[1,1,1]},100),n,N,3001); which outputs the operator: -(n - 1)*(n - 3)*(3*n + 8)/((3*n + 5)*(n + 5)*(n + 4)) + (n + 3)*(9*n^2 - 3*n - 16)*N/((3*n + 5)*(n + 5)*(n + 4)) - 2*(3*n + 7)*(15*n^2 + 65*n + 62)*N^2/((3*n + 5)*(n + 5)*(n + 4)) + N^3 Then, run SeqFromRec(ope,n,N,[2, 10, 88],3001)[3000]; which gives: 1055961597172638192205714533827955182069330710185887123715638338751912356623868934358954829265893265497184019516455497946501358614406592180916562995571435822638011864699948413518735379729837425167828197932773091617214603560704076763403058008870590210530506834889187670236069663000563403909291518139471141193933668569097230791592378327765453206880338367141465884774689273332974613327790670133864770839786907616252716172612810392322684357026318977543761631185892041752872792707472523339315464878092600122776510487117547611700101814824458512731561188677556925181977017823995965449343853533549328389007002003812727585993220294254740294866113923151479672429490481644088528411109634826771309376893827003349243068183476873533935594331988585675337762038394870883132602159173883922347999944078821728163370937052619155590568391069063317592509955598788483466418234408407388202299036233322379192615075021698393212868787733569268229184628289565589549741584574327892919908881010751517221722381012834556556824848577221227684137830816101020327876526681725444453682864636555747673248741474708131366459673977930419195224272687150280798146593067544755578201466060570093254935347120068461604351415848203621522648676607169207523056123186434484713066312780810175397901692245443312244602960976968454897460424230265560584944905249327347768975517831568652679595607920084575082584347314212810007985240690964634053969181170611215275387792197501045392327155456594027530404389193373166529959026406585893677752993907919001817631111686530612365744087948657981705511840245825626621270255357615436919191022104201504251202188647227781935143967146969540653262038857149021960306229530963054026491708200678862903006329234012195611754127295080517138419193838585920213543419469950079348946755215094694137847178186210286204470627994554250221170678469119109643939053546724329890548255475005106738694859949241621137720195040487766275618591781040165985869235563695957345264145252201054929162788252799455694036338904769031986390960043941243280986491172713827805499916660157385659508981509849147715973547457229029295526584351410281813731593170470817309110789876049747009019009949757200409333866914797127029381219525171081649367682900079983068290393154404118264018185364905606965589045505005572066630122121150375280811289992817027578011638093603433244372443437925332947876282657417807723726415290604403918202072098770116006990175350820492314867796387685661273702215556922453698175420527665425961486623775069041082819614980223231440570232620689816525157996858630797825675874156474646732065652602821773250214911095523839301872173514572945534777185829446594458412939559790823335335988943249612096741437113159733496107309438749517155816113611466181606413786593079760286476932502122540382520346014562754440684858961033148757521944516188781560550967342223679376726927253300939809903760523174681426976332580145397706760699651938934492314536611971407185558853691943983900622101911869433034988901671398749303046154807811343347079647262775389547959397251809798861843882195477113660504281821150366169039324164617598327207275003383926645719618807107118775499837007692943421107557066566151632494226460059669482223627000755320102291265532871104516620408021503469564960744840527318501733587855812003819890890023893498130260498951286347694871337136866334557342356711006118238958427510975755322669497692071461010165591733674071285408880586240632956831541705216908849696753484260512346231146506771015879263648500135313751979294236700008885800509693120930841769817301480352739004267277612475636269175159040483895116762728473969354479429135527425822803355504559236868842150825399906121046596018792183036698610028246005663710973350043476200695248674446173296357513573521498183102888985070332615743303290931992949087204064596760980551855974772314932770996526784911225488608910212901539625649853695492476183650987182998517921557222998098782725632700696246594120460326038060483755479352197136229776118789296545919836632814452748621216052104394615335775039904853067848468754958862041044060581067912446471855014833235066207766370613368257308071954943653479180111042281881188887660434936081241799850788470218012237849400298660425782403148718872653901005280466525095291577169601084339235634955604898374949141660578599870423680499360451073008559080164788699736386609233499025062855391709957273487073386537359165683384170380942428413622358059424469862102618894310733782269292492850029973291 QUESTION #4: To find Sum(binomial(3000,k)^2*binomial(3000+k,k)^2,k=0..3000), we first do: ope:=Z(binomial(n,k)^2*binomial(n+k,k)^2,k,n,N) which gives: (n + 1)^3 - (17*n^2 + 51*n + 39)*N*(2*n + 3) + (n + 2)^3*N^2 Then, SeqFromRec(ope,n,N,[1, 81054009000000],3001)[3001} gives us the sum which is: 701826215967075072391427984136805758815914214001252446718059011123719485692740992903536526403905331025637991110661206828376479316736914613266873016390035026446624910001841911397382751014788851289639006190145354123571589387155920190108178200182124798717976048197720005006051440529144795567317637162795273033989631951422638970019542892467039166729116378777208396754849496416417646961454943705192829420270144945398802902475791833187479929603504725338448113604501295345573170198541361636424025829626677226870838966853266846172718801246391265046679766203778461210893165644748272157329806297396564085053101110293570260664107042876375669211347476602400896492833439579881176389187745493303278159442177646537245207131785403842646396658858340438392066747047634652923670085786444021661603677414167490759894853153870647764895673190618466951827982419577459993075289089137661980668321776327881582843823466160219832280085154658534755576111285365723230380449197164083368803400097094339647800294211611032242702162868342853241787962067824772317595911024690027178957275258649366163506358849271207493420733660531805181196034552631858797037455537042336864074046596832787799271765408099452677705283243031689650365098819155377227045624451983117355762512331237590949718240426456474233092982331761343021872954737421402948348282060405397683353185182943370787008093961244440747829925159419281097668761778194610085771212663779351653559402370165848414117985534805307351654803436254189207481282782621320285124818278247580911300281523243713534569084636539964745029342901437193321106831693824964406376312456045909587136567857114092253169568244637122131133547810794324298996628924924447622375958972356843030744025546831333037363442750575298468921964039927349383235878788749750728824388452224232011049652228831191237442044170519533340875059013630577069727309098174494115608554081061616725732403907643588785469649460585961009043475297896153344593270638340840601995324198677222588689258501102226412269575918438899611550424534121868897892847787230068922438189013514453850929764001966912529792792894422107629326351609113729573633924354555703387296234577878705675906930949726136077635217279902666990368996811677929880390323848731538030306101556710362598418631471728606534858495967837101932260956117607419104936485260862295594651047525189978055822851743623846037179558399394462977909023477158657871644879799565709008697234802914318114441071779428276863220323123893417954755219045642544986705186479463962000779862580847349467206358095648160126070751043829687764385915805952833259210866554726992062634311508619473653775504475229461104847679450176322690414649097704564626440745014175091726427798204428857060552599264888059555008836100328726097204007736838965450489628150628902467961945537508098590802522891233407675467945366634980498442489894260518783671466791950674633279154794651878595473058790413250130387273340117361662950502500870191137663523132625469910802036474940038564862002032252420672204854191489460872043512944956066541668612064103195801515998935167657097389295058612106111805575273159441763411400651298987351476736750512608557051660498499342504602020530170321466018289215354961136652543164669313387534039664695916924944045094774093841300049920787386910245173871235697591608818630147381706230268639269055882200999360300510387573604922053180211230787524403079963815347347651767358011027607953680090358037249833753711435067467290010526397350804438840464276492354089515336604126809135746579049194222016457679685828852805459206820725370052598147469706708014725461889286836640361712100412474874963157447139587787602507625243855558506047646973608666250329237190094515082969067949084666858448579271358639456919205624921147695185610960984867561805675832680508327377954119019267485157994215405418992486901357024366858253000819932834877812847313395098078851135306612039983099765372066695865063823072615178730283935894704726454478870445692257965186362623601668296169657286403773832154793014025426964268166559576496769867491080955335711443764056362575432956316419109726106537874372649754538880130722792573805046932272663713426758909468277089513875687320871486832948813589161351492237932293123906694677577240652060755670290041366672811192405659196510934630843640516549083934622523716984653088218136215283625483692271890881607102522746948013208218377654637119441560249177462355588921431689447265273742907895391027559793440827769174289203238745314412187290796827004066611149945025720262667964723722920875598653435382682851661011181403225307907242387188352849840829007198714299669756621573291303243017408743724975229797575487722754501742319628841059841665897544747057904881588750338839154786458917699059448124161355296316042080511629287491790947168042466132526136069597243006137742691729170593545558278179816866053549070821445273042936225461684862692396687299330615179723579130980091678734904434580771609119567462745554533303589092908907417916549190171776356066020559612820137105738632872471464197028242620992377950682351713297528129871020855046879123925362446889619526069815171741166788954581354519757233082805893789602306587326581477419831882488626011880297539537920514092051048618942399233243077686777201062090562813561061995668242692418799468170816908988960479358234534192949404125368321247972235295443676908795512329180679742085754128081319656342687421464599060041163704714923401059992677927576881667254314296352885054056300478518599741425368642596552751371613483141558697290264247262428351009821397628939536511990658998810324240821911559220907813139590612913590783455630578601131156907989395185127860132965656869665973032755563553159751814614589585665925123847472177358509482259247373847538573617049627605753335437924726233364798187959968121124902298176096311932631540711282537629006200511307115572341604006906151226252979939648623890120467881341170916670423106768769165923055320564102205838989261697517505088328321340920138850571815843414856900503324335944804346462362487894382230834108319750535054980140133500904224604359289385296409550425805992334394513993637119399668579268211489701700187320217521620089824632860286262335459734683400617722038625351859405400751276549022722549003354211710696754935781229550567095507459176497744656604816085512447486670406773259875828457437480411073634297949135376793401370379698494249034614041872810882687772172762634227652611764481691696686627924100367772293877317079658156529731701639494166133367073357254212342454763892819783018870089336749406804827533131601074171435625100348814834903894822132957433915109356686760993212214157993116488860858224445764675683292267198627710433058336769865657868414940424750032276086682281596788282061064509679305342919299538300182937183561468091728050943169965495741398859109206979853373125350566951260515473207054844965967351949925718726743201447852931958400613616617912520520548771205665556186873203844483347436278658002051435966890479070567695337709509355466288720305680485146208212101281632900878379425819787369705731176791396857903876798168889741759531064264979646913955565730060442607305054810149629743433947382942380938285556817757102044424622079718515266893160683365576699584251787800532472228742736451325640133035887249110127315657127489734861312488137264958016580197757680448199653496534562509434336023277897270819809883789319285056879123082704996892699894830772105004166192386237441975348504252751752746776321773891324971875340893241643859722835401533215541330382056471477075447073190625573430823111243743115932008224983788688460570416613583062132500487488400916077948260107718192132929500250130245071224484956966174855716597654852870706840952318756745884401979766062419092970288323627957415904958307494691318686224086248023942925052043150800352566004006998651637466649662525450242659160520568417308341088731789053157290146710171346447191720617061956553496578396722347588079599061339917963295630400451083424124995660350582941844237480776353262625513169993251689242897708626914873571196846248577439860078963433299611123439438397710158657552313487424824303794156277205640076406750896677112171763280776914977266687428763521562145547614578939453474286389008923312772611986841345535189062843818430760767722613699766429106178198764268654683804503603154938618555919967321447456193453486808466097626371029146919973536993451355042621391123996227984407400081721854323072232714606805682998147594929251608790674703769669596339844847915351033691057712597342095892927402124253520303953123442620868790223553733092406770859193317621791314997243791755749357135056730234456972019865931/6830558206152205264748966950085674109115759043329145003709683448968707376651864647424847715951874416854867693113684274328990135651368216767664943006908536890088300180582274700417253372160023966367571514084099636590982492615617029201403162946193568486090357865493053190344503317147947716261271121751462523621689252250532915534889650043385314742554461600406961478195449883938713700428493871108738201913069726600780904148476138279651010704444403532170931590184496219665517702620470636877729529117524406083246202190858183799124860802651119580962325785871998482583474497763419848626304142662461073169739143070324325829553958712283485566973200793544649280139140655823900368178123355881187831610456636656410209426108750405886749800619645774785066768622588042967895118252772896166631617337780769701523591487179539207279145847703637519657718703094003699309392421715820454630606392634133120953070630438915501850504156516308802251365490230536344852613771979516502848183201842105261568278063194295485642453279967087489964890012984965812993001416147348963184101083213470182430037795512902915768821625030490815864294452402912871701930726171437612159755376430250755576723280405902943910942975430046925264596521221654180852313573478603194444346184287510199257728723132073896451536340372129441959070995639109472769950215567607782418451160126935683957568481288835766805224525852520986141888458326583880764249450681131571412195955979041134994246320186604695826984668930975630643924791942256946792746469770844912949152083808036878410344134116357406118676145591687439686408513397942670954761239018294188270366211679415492536816921932087674273883189517137306674482910868042797888096316680319916241021053355666842319665095183143085406092842260813004505043895023808934530992869001316769905399598745372137867081410102794898473985229707405125907586729355130023279062406970787216227586418959258259174715800110655488865140608602140010176734835359557650350207917282016259760770524606082988840568167872654358042193260828586915744950167247798160784214751426096227987239734100493592674562694108291339213847966590134770993858051094855446616806183533712498785533201008095722151078586541615446645699250292979427319997117698982829002154621203685213993784804684457410594896326018685212377896819569870106627727320791120590156397662839608865204319575340050176966015797435144795735986336162268928085284787880381292004924197699273311247734645095556847232363002350313652721068620844150816981680745136785341556357042830383443326856626414549842415659196048883294964275245365444277665842471834791024215736441471740987603058633262814174055414709429969556490301343112988976382519161797555001677435396470271235644833656631812610964596693671378649940756940235073601410782411294054306140214089892087648540623455728517863833580136943506573439840237851780543903401951896639654927663937434126708283220994732678333574668451762987440359606596950910941617960697586333652689014156359132967912142896413470901515233413406692376807050034837987823158972127772576351946427052307521075522425791371428380106520882718933449910265340486357429560403406764964552214754789342051169219040522450885702680230527006682587113873679613700007347422889567006180110164862317217726311976114595215633810463454323613129578616200496500662967719803494763879789098701020989738132006135696671045703911801261202876426914879905378039197446386224956673527686108197171379054976881076814906413246330350536777930104203227430846550013036920212519446095587767410629560246831382836888203691457402264344978695897848289968041929973993514612009565358995523785539701032148832779726838185568098259511774045395346886506104662466907604277913365654384437029357525072810528801633843146957658504754350837984513991602312498990505231479622802014284422458889872370103749749678728547336517153082497476482181028212142406109225966641627637633140211336459544126998133377335429380947090265282220759081476423680000000000 QUESTION #5: To find the number of 3 by 101 TicTacToe boards which end in a tie we can run: OddTTT3(50)[50] = 1290808418002135615116. QUESTION #6: To approximate the average degree of an induced graph by taking 1000 random choices of 257 vertices in Bn(9), we can run: SimuAvDegree(Bn(9)[1],257,1000); which outputs [4507.587549, 4503.079963], where 4507.587549 is the average degree QUESTION #7: To find the coefficient of x^2000y^2000, we can do the following: First, we can find the first 50 terms of the sequence of coefficients of x^iy^i by doing: L:=DiagSeq2(1/(1-4*x-5*y+11*x*y),x,y,50); Then, we can try to get a recurrence equation for the above sequence by running: ope:=Findrec(L,n,N,10); which returns 121*(n + 1)/(n + 2) - 29*(2*n + 3)*N/(n + 2) + N^2 Finally, we can get the 2000th value of the sequence from this recurrence function which gives us the coefficients of x^iy^i by running: SeqFromRec(ope,n,N,[29, 1201],2001)[2000] which gives us: 773646859915755345080592880711987868114000067411267711089645465297302185782140437651737245647882206781438666359768916791715657797616253271074975816775510891610817784007689815061811713118793808132127169156531956632210202931839862195808509640930194072475736797648958419891588400228778302107480391146576468783927091978800730725381748927502387454205436928125198975511378423794707365823379926986188749731089986500669917397396616873971504095084806867185794148201994249569708224664939358898156705285766137705808523882246825460865055845849608101602554124421655543281954942869347763265534288898345102646980249705245750411149901021906533804652856542653764498677365214438615665150615517343477647558880827613427285885357921841100046634238461334120207717747344306854642161789096422806822477126080459383319139414084891874813390575035056820274820249163621592543772865926118882829787233403086035287238779765054941813725170004414582374135508817403257313682626312641850119576783617936793647393405068210227926377575854139336013624990425865640946215471320032948282468940324846914561138775497162509724260118084959559782824445762245632299836411179392775648099505004754289691484084437878335072556789083071128828642026102198988713371433916086729092810868873365284186949520302620916959510360154686720720849426575947536973822089840926819039524739154650307471233566116603524983355463110367522269735546877184343991825037545531189756117352626296189893351782094577197526461536355028695315424139758095138975823719895497596876668131934199439173229485368636994380428110961997982663512993479753274524564588897844411090731278082694716259642257912209226715162964982766205644375213279962095754671175676851278122336924210409928907451885674299545970520895098122438167730023956375082767841919536492659592553484758514186588962566254898054642148157529356160985269637101035563320027681988296575398258581899930433851537298396125459746563645498518344619371613618855757920153091128439831385651061713354178518359400614334182811551611306246590748272172228421650703852569210285063688014891546768428033707913809454151141697846121976041016161198422075270533277284589452027578075668399593831720510523495731158754673764413760975340577700256181793723268102737700377434630624790249458797868911788044600805508485574241229253198181585117115731176981772669466598392654721571804299532408697203358580912723946227908232155338588428127174145078183468669908828952557055163469676170155844087464068982383237074344331350973287832545815695040580098426592501971544206619030825683346801296280335524080438127590769794668939223630265567779224717497406424337680111319658968840828783394398066924082596974045522418906009355130535708234172204495769135348785825545908155547519817718720637411445747313149486470464529574488009448609563739552269119003138524190110775062801488158287029560619172943034584983763324488306289724561326554924726583458117754924933611552675041469797148844028192904120049411967702119285010310450399474899988993586144695013187426300062274614261232855180913589064620769172807279547595522263494030111333199971899957574277407800812548961437147806523394123808961636877041743608198426614043951238220331970986440053143097092028066307341624392350207383551740144663484185505423935912306650375320554777485131772136130297787225160458443358096735851606998995447761379827375728762226123218580834402190682606068437153306290925913239883594710884034531237609827555387947652206110770058576176763122989223205695856623992082656117211112586521163319820736781340880001