Professional Documents
Culture Documents
http://mathlesstraveled.com/
Factorization diagrams
Posted on October 5, 2012
InanidlemomentawhileagoIwroteaprogramtogenerate"factorizationdiagrams".Heres700:
Itseasytosee(Ihope),justbylookingatthearrangementofdots,thatthereare
intotal.
HereshowIdidit.First,afewimports:afunctiontodofactorizationofintegers,andalibrarytodrawpictures (yes,thisisthelibraryIwrotemyself;Ipromisetowritemoreaboutitsoon!).
1 of 224
http://mathlesstraveled.com/
> module Factorization where > > import Math.NumberTheory.Primes.Factorisation (factorise) > > import Diagrams.Prelude > import Diagrams.Backend.Cairo.CmdLine > > type Picture = Diagram Cairo R2
TheprimeLayoutfunctiontakesanintegern(assumedtobeaprimenumber)andsomesortofpicture,and symmetricallyarrangesncopiesofthepicture.
> primeLayout 2 d > > | width d > height d = d === strutY (height d / 2) === d | otherwise = d ||| strutX (width d / 2) ||| d
ThismeanswhentherearemultiplefactorsoftwoandwecallprimeLayoutrepeatedly,weendupwiththingslike
Ifwealwaysputthetwocopies(say)nexttoeachother,wewouldget
Follow
2 of 224
http://mathlesstraveled.com/
> primeLayout p d = decoratePath pts (repeat d) > > > > > > where pts = polygon with { polyType } w = max (width d) (height d) r = w * c / sin (tau / (2 * fromIntegral p)) c = 0.75 = PolyRegular (fromIntegral p) r , polyOrient = OrientH
Forexample,heresprimeLayout 5appliedtoagreensquare:
Now,givenalistofprimefactors,werecursivelygenerateanentirepictureasfollows.First,ifthelistofprime factorsisempty,thatrepresentsthenumber1,sowejustdrawablackdot.
> factorDiagram' :: [Integer] -> Diagram Cairo R2 > factorDiagram' [] = circle 1 # fc black
Otherwise,ifthefirstprimeiscalledpandtherestareps,werecursivelygenerateapicturefromtherestofthe primesps,andthenlayoutpcopiesofthatpictureusingtheprimeLayoutfunction.
Finally,toturnanumberintoitsfactorizationdiagram,wefactorizeit,normalizethereturnedfactorizationinto alistofprimes,reverseitsothebiggerprimescomefirst,andcallfactorDiagram'.
> factorDiagram :: Integer -> Diagram Cairo R2 > factorDiagram = factorDiagram' > > > . reverse . concatMap (uncurry $ flip replicate) . factorise
3 of 224
http://mathlesstraveled.com/
Arethere11dotsinthosecircles?13?Icantreallytellataglance.Andheres611:
Uhhwell,atleastitspretty! Herearethefactorizationdiagramsforalltheintegersfrom1to36:
Follow
4 of 224
http://mathlesstraveled.com/
Powersofthreeareespeciallyfun,sincetheirfactorizationdiagramsareSierpinskitriangles!Forexample,heres :
Powersoftwoarealsofun.Heres
Follow
5 of 224
http://mathlesstraveled.com/
[ETA:asanonpointsout,thisfractalhasanametoo:Cantordust!] Onelastone:104.
Posted in arithmetic, pictures, primes, programming, recursion | Tagged diagrams, factorization, Haskell | 50 Comments
Follow
6 of 224
http://mathlesstraveled.com/
WhatIdontdo
Letmebeginbysayingthat"computerscience"isactuallyaterriblenameforwhatIdo.Itsakintoan astronomersayingtheystudytelescopescience,oramicrobiologistsayingtheystudymicroscopescience.Of course,astronomersdontstudytelescopes,theyusetelescopestostudystarsandsupernovas.Microbiologists dontstudymicroscopes,theyusemicroscopestostudycellsandDNA.AndIdontstudycomputers,Iuse computerstostudywell,what?
Computation
Inabroadsense,whatcomputerscientistsstudyiscomputation,bywhichwemeanprocessesofsomesortthat takesomeinformationandturnitintootherinformation.Questionsthatcanbeaskedaboutcomputation include: Whataredifferentwaysofdescribingacomputationalprocess? Howcaninformationbestructuredtomakecomputationalprocesseseasiertowrite,moreefficient,ormore beautiful? Howcantwodifferentcomputationalprocessesbecompared?Whenisoneprocess"better"thananother? Howcandifferentprocessesbecombinedintoalargerprocess? Howcanwebesurethatsomeprocessreallydoeswhatwewantitto? Whatsortsof"machines"canbeusedtoautomatecomputationalprocesses? What(ifany)arethelimitationsofcomputationalprocesses? Imsureotherquestionscouldbeaddedtothislist,butthesearesomeofthemostfundamentalones. Noticethatnoneofthesequestionsinherentlyhaveanythingtodowithcomputers.A"computationalprocess" couldbecarriedoutwithpilesofrocks,anabacus,paperandpencil(didyouknowthattheword"computer" usedtorefertoapersonwhosejobitwastodocarryoutcomputationalprocesses?),acarefullysetuproomfull ofdominoes,oracarefullysetuptesttubefullofDNA.Itsjustthatmoderncomputerscancarryout(most) computationalprocessesmanyordersofmagnitudefasterthananyothermethodweknowof,sotheymake exploringtheabovequestionspossibleinmuchdeeperwaysthantheywouldotherwisebe.Andindeed,the mathematicalrootsofcomputersciencegobackmanyhundreds,eventhousandsofyearsbeforetheadventof digitalcomputers.
Follow
7 of 224
http://mathlesstraveled.com/
Athree-for-onetoday!HerearethreebooksIwantedtomentiontoyou,dearreader,foronereasonoranother.
AWealthofNumbers BenjaminWardhaugh PrincetonPresskindlysentmeareviewcopyofthisbook.Asananthologyofpopularmathematicswritingfrom the1500 stothepresent,itsnotthesortofbookIusuallyreviewherebutitsnonethelessfascinating.The featuredexcerptsare,byturnsgripping,dull,lucid,incomprehensible,hilarious,irrelevant,andfun.Ididntlearn awholelotofnewmathematicsbyreadingthisanthology,butitgavemesomeeye-openingperspectiveonhow peoplehavethoughtandwrittenaboutmathematicsoverthelast500years. DeadReckoning:CalculatingWithoutInstruments RonaldW.Doerfler
Follow
8 of 224
http://mathlesstraveled.com/
Theresalotofcontroversyovertheuseofcalculatorsandcomputersinmathclassrooms.Shouldtheybe welcomedaslabor-savingdevicesthatallowstudentstoexploremathematicsinnewways,oreschewedas crutchesthatturnstudentsintobutton-pushingautomatawithnorealunderstanding?Itsanimportantdebate, butitseemstomethatthosewhoargueagainstcalculatorssometimeshaveanonethelessimpoverishedviewof thealternative:justtheabilitytodothestandardWesternalgorithmsforthefourbasicarithmeticoperations, andunderstandwhythealgorithmswork. Thisbook(whichIreceivedasagiftaboutsixmonthsago)isntintendedtoenterthatdebatedirectlybutitis afar-rangingsurveyofmethodsforpencil-and-paper(ormental)calculation.Therearegeneralalgorithms,of course,(andnotjustforarithmetic,butforsquareroots,logarithms,trigfunctions)buttherearealsoallsorts oftricksandspecialcaseswhicharisefrom,andengender,intimatefamiliaritywithnumbers.Isit"practical"? Well,notreally.Butthatscertainlynotthepoint.Ihadsomuchfunreadingthroughthisbookandtryingoutall thedifferentalgorithms:multiplyinginmyhead,computingsquarerootstomanydecimalplacesusingjusta singlesheetofpaperHonestlyIdontrememberanyoftheactualalgorithmsanymore,butIcameawaywith betternumbersenseandImayjustpullitoutandtrysomeofthealgorithmsagain.Eventuallysomeofthem areboundtostick!
Follow
9 of 224
http://mathlesstraveled.com/
Hereareafewexamplesofnim-likegames:
Follow
10 of 224
http://mathlesstraveled.com/
Inthegameofnim,youmayonlybuyonetypeofanimaloneachturn(butyoucanbuyasmanyasyou want).Onagrid,youareallowedtomoveanydistanceleftordown(butnotboth). Theinterestingthingisthatwecanvisualizethewinningstrategyforthisgameinthefollowingway. (ZacharyAbelhasamuchmoredetailedexplanationofthisidea.)Awinningpositionisasquarethat guaranteesawinthatis,ifitisyourturnandyouareonawinningsquare,then(assumingyoumakethe rightmoveandcontinuetoplayperfectly)youwillwinthegame.Illindicatewinningpositionsbylight greensquares,likethis: .Alosingpositionisapositionsuchthatyoucantwinnomatterwhatmoveyou make(assumingyouropponentplaysperfectly).Illindicatelosingpositionsbydarkbluesquares,likethis: .Infact,thewinningpositionsareexactlythosefromwhichthereexistsatleastonelegalmovetoalosing position;andthelosingpositionsarethosefromwhicheverylegalmoveistoawinningposition. Hereswhatitlookslikefornim:
Follow
11 of 224
http://mathlesstraveled.com/
Youcanreadallaboutthefascinatinganalysisofthisgame(anditsvisualization)onZacharyAbelsblog. Inacomment,MaxdescribedagamefromtheInternationalOlympiadinInformatics: Youstartwitharectangle,andyoucancutiteitherverticallyorhorizontallyatintegersizes,each timekeepingthelargerpiece;thegoalistoobtainaunitsquare(sothatyouropponentcantmove). Itsnotasobvious,butthisisalsoanim-likegame.Thetwodimensionsoftherectanglecorrespondtothe numberofpetsoftwodifferenttypes.Forexample,a rectanglecorrespondsto10xolosand7yaks. Therectanglemustbecuteitherverticallyorhorizontally,meaningthatyoucanonlybuyonetypeofpeton agiventurn.Theinterestingtwististhatyoumustkeepthelarger pieceresultingfromacut,whichis equivalenttosayingthatyoumaybuyanynumberofpetsbutonlyuptohalfthenumberofpetsthestore currentlyhas.Forexample,ifthestorehas xolosand yaks,youmaybuyupto xolos,orupto yaks. Buyinganymorethanthatwouldcorrespondtocuttingtherectangleandkeepingthesmaller piece,whichis notallowed. Naturally,Iwonderedwhatthevisualizationofthisgamelookslike.Ifiguredithadtobesomething interesting,andIwasntdisappointed!Hereitis(notethatthebottom-leftsquarerepresents whereasinthevisualizationsfornimandWythoffsgameitrepresented ): here,
Follow
12 of 224
http://mathlesstraveled.com/
Woah,neat!Itlooksasifthelosingsquaresfallalongdiagonallinesofslope forallinteger n(thatis, , , , , ,andsoon)thoughthelinesdontallpassthroughtheorigin.Itsnotsurprisingthatthemain diagonalconsistsofalllosingpositionsthestrategyisthesameasfornim;thefactthatonecanonlybuy uptohalfofacertaintypeofanimaldoesntmakeanydifference.Ifitisyouropponentsturntomoveand thestorehasanequalnumberofxolosandyaks,iftheybuyacertainnumberofyaksyoucanbuythesame numberofxolos,andviceversa.Eventuallythestorewillhaveoneofeach,atwhichpointyouropponent losessincetheycantbuyanymoreanimals(theywouldonlybeallowedtobuy,say,halfayak,butthepet storehasthesensiblepolicyofnotchoppingpetsinhalftoomessy). However,apparentlythereareadditionallosingpositionsotherthanthemaindiagonal.Forexample, accordingtothegraph,ifthestorehas4xolosand19yaks,thenthenextplayertomoveisgoingtolose! Youcanverifyforyourselfthatfromthispoint,theonlylegalmovesaretolightgreen(i.e.winning) positions,andthatfromanyofthesepositionstheotherplayercanmakealegalmovetoanotherdarkblue (i.e.losing)position,andsoon. Somedirectionswecouldgofromhere: Canyouthinkofanyvariantnim-likegamestoexplore?Ihaveaverygeneralprogramforcreatinggame visualizationsliketheabove,soifyoudescribeavariantgameinthecommentsIwillbehappytotryto generateavisualizationforit. Whataboutnim-likegameswiththree(ormore)piles?Tovisualizethestrategiesforthese,wehavetouse three(ormore!)dimensions.Ihopetoeventuallycomeupwithawaytodothis,atleastforthree dimensions.Ihappentoknowthatnimismuchmoreinterestinginthreedimensionsthanintwo! Canyouprovethatthevisualizationoftherectangle-cuttinggamereallylooksliketheabove?Canyoucome upwithanicewaytocharacterizethewinningstrategy,oratleastthelosingpositions?
Posted in games, pattern, pictures | Tagged nim, strategy, visualization, Wythoff | 4 Comments
Follow
13 of 224
http://mathlesstraveled.com/
IwishIcouldrememberwhereIfirstcameacrossthis.
Posted in geometry, group theory, links, pattern, pictures | Tagged beauty, database, search, symmetry, tiling | 2 Comments
TheEnigmaoftheSpiralWaves(SecretsofCreationVolume2) wordsbyMatthewWatkins,picturesbyMattTweed MatthewWatkinsandMattTweedhavedoneitagain!Ipreviouslywrotea(verypositive) reviewofVolumeIthisbookisjustasengaging,ifnotmore.ItexplainstheRiemann Hypothesisoneofthebiggest,mostmysteriousopenquestionsinmathematicstodayin greatdetail.But,asonemightexpectafterreadingVolumeI,itremainsthoroughly accessible,eventothosewithnotmuchmathematicalbackground.Asamathematical writer,Ifinditincrediblyinspiring:itshowsthatwithenoughtimeandhardwork,itis possibletoexplainverytechnicalideasinawaythatisaccessiblebutstilldetailedand accurate. So,whatistheRiemannHypothesis?Simplyput,itstatesthatthesolutionstothefunction
14 of 224
http://mathlesstraveled.com/
Highlyrecommendedforanyonewhowantsaglimpseintooneofthemostfascinatingandmysteriousopen questionsinmodernmathematics!
Posted in books, open problems, primes, review | Tagged Reimann Hypothesis, spiral, waves | 1 Comment
Blockly
Posted on June 28, 2012
Picture this
Posted on June 13, 2012
Posted in challenges, links, pattern, pictures | Tagged interactive, picture, rectangles, this | 6 Comments
Follow
15 of 224
http://mathlesstraveled.com/
Moregenerally,ifyouhaventseenZacharysblogbefore,gocheckitout.Ifyouenjoymyblog,Ithinkyoull enjoyhistoo.
Posted in fibonacci, games, links | Tagged Wythoff's game | 7 Comments
.Forexample,lets
Herearethefirst17Fibonaccinumbers:
Andherearetheirremainderswhendividedby 0):
,representedgraphically(red=1,orange=2,blankgap=
Follow
16 of 224
http://mathlesstraveled.com/
Andindeed,aswewouldexpectifthetheoremistrue,everyfourthremainderiszero: random!Letstry
isevenlydivisibleby
.Butthereseemstobeabitmorethanthatgoingonthepatternofremainderswegotisdefinitelynot .Herearetheremainderswhenthefirst21Fibonaccinumbersaredividedby5:
becausealltheFibonaccinumbersbefore
areofcourselessthan
,sowhenwedividethemby
theyare
simplytheirownremainder.Next,ofcourse, Well,
leavesaremainderofzerowhendividedbyitself.Thenwhat? is .OK,sofarwehave
bydefinition,soitsremaindermod
17 of 224
http://mathlesstraveled.com/
andnow,itseems,wearestuck!Whatdowegetwhenweadd
?Whoknows? by ,likethis:
HereiswhereIwilldosomethingsneaky.Iamgoingtoreplacethesecondcopyof
Huh!?Whatdoesthatevenmean?Surelywecanneveractuallygetanegativenumberasaremainderwhen dividingby .Well,thatstrue,butfromnowon,insteadofstrictlywritingtheremainder when isdividedby .Thisisallthatreallymatters,sinceIjustwant . ,andthenwecan ,Illjustwritesomethingwhichisequivalentto modulo toseewhichpositionsareequivalenttozeromodulo So,theclaimisthat justsubtract Thenwhat? frombothsides. ;then ,andsoon:wegettheFibonacci
.Whyisthat?Well,
numbersinreverse,withalternatingsigns!
Afterthispointweget
,andsoon,andthewholepatternrepeatsagain,asweveseen.
Thisexplainswhywehadtolookatalongerportionoftheremaindersmod5beforetheyrepeated.Heresmod 5again,withnegativesshowngraphically:
Follow
18 of 224
http://mathlesstraveled.com/
Thecolorsofthebarsstillrepeat:forwards,thenbackwardsbutalternatingupanddown,thenforwardsbutall upsidedown,thenbackwardsandalternating(buttheotherway).Butattheendwerebackto ,sothewhole thingwillrepeatagain. Inanycase,whether isoddoreven,thesepatternsofremainderswillkeeprepeatingforever,witha always occurringevery positionsthatis,at ,so willalwaysbedivisibleby !
Nature by Numbers
Posted on June 6, 2012
Fibonacci multiples
Posted on May 15, 2012
. evenlydivides ,andsure
19 of 224
http://mathlesstraveled.com/
Iknowoftwodifferentwaystoproveit;thereareprobablymore!NeitheroftheproofsIknowisparticularly obvious,buttheydonotrequireanydifficultconcepts.
Posted in arithmetic, challenges, fibonacci, number theory, pattern | Tagged divisibility, fibonacci | 12 Comments
Carnival of Mathematics 86
Posted on May 8, 2012
issemiprime, .Infact,itisthe
smallesthappy,nontotientsemiprime(theonlysmallerhappynontotientis68whichis,ofcourse,86in
Art
Follow
20 of 224
http://mathlesstraveled.com/
ChristianPerfecthasstartedaseriesofpostsonthethemeofArtyMaths,withlinkstoartisticimagesand videoswithamathematicalbent.Aboveisacoolexample,somesortofstellatedpolyhedronmadeoutofmoney byKristiMalakoff(youcanfindmorehere). KatieStecklessubmittedalinktoRobbyIngebretsensblogpostFirstDigital3DRenderedFilm(from1972)and MyVisittoPixar.Katiesays, Thisispossiblytheearliestexampleofacomputeranimation,andoneofitstwocreators,Edwin Catmull,whowentontofoundPixar,iscreditedwithhavingwork[ed]out[the]mathtohandle thingsliketexturemapping,3Danti-aliasingandz-buffering.Fascinatingtothinkhehadtoinventall ofthatinordertodothis! Robbysblogpost(andtheextensivecommentsonit)givealotmorecontextandfascinatingdetails.And,of course,youcanwatchthevideoitself!
MikeCroucherofWalkingRandomlywritesaboutsomecoolmathematically-themedstainedglasswindows,and wonderswhetheranyoneknowsofanyothers.
Statistics/dataanalysis
ArthurCharpentierofFreakonometricswritesaboutNonconvexity,andplayingindoorpaintball:ifabunchof peopleinanonconvexplayingareaareallholdingwaterpistolsandshootattheclosestperson,whodoesntget wet? KatieStecklessubmittedalinktoData:itshowstoresknowyourepregnant,anarticlebyMatthewLaneof MathGoesPop!Everwonderhowcompaniescanpredictvariousthingsaboutyou(suchaswhetheryouare pregnant!)basedonyourbrowsinghabitsandotherpubliclyavailabledata?Thisarticleexplainssomeofthe basicmathunderlyingthissortofdatamining. JohnCookofTheEndeavouranswersthequestion:Whatisrandomness?inRandomisasrandomdoes.Itturns outthatthebestanswermightjustbetoavoidansweringatall!
Geometry
AugustusVanDusenofthinkingmachineblogsubmittedaposttitledSuperellipse,saying IreadanarticleaboutSergelstorg,aplazainStockholm,beinganexampleofasuperellipse.WhenI lookedupsuperellipseonWolframmathworld,Inoticedthattheareaformulainvolvedgamma
Follow
21 of 224
http://mathlesstraveled.com/
Teaching
ColinWrightwritesTheTrapeziumConundrum:howshouldatrapezium(akatrapezoidifyourefromtheUS) bedefinedwithexactlyonepairofparallelsidesoratleastonepairofparallelsides?Moregenerally,howare definitionsarrivedatandagreedupon?Theanswermaydependontheaudience. KarenG.ofschoolaramamusesupontherelationshipbetweenlanguageandlearningplacevalueinherpost LookingtoAsia. OnherblogMathMamaWrites,SueVanHattumwritesaboutLinearAlgebra:LeadingintotheEigenStuff.Sue says,Imteachinglinearalgebraforthefirsttimeinoveradecade.Thathasmeantrelearningitadelightful experience. PaulSalomonofLostInRecursionwritesExponentsandtheScaleoftheUniversea21stCenturymathlesson, afunstoryabouthowaninitiallydrylessononexponentsturnedintoaremarkablelearningexperience.
Fun
AlistairBirdsubmittedalinktoEnormousIntegers,saying, Itsstillacommonenoughmisconceptionthatpuremathematicsresearchmustbeaboutlargerand largernumbers,butitsstillnicetosometimesplayuptothisstereotype,asJohnBaezsblogposton AzimuthaboutEnormousIntegersdoes.Commentsareworthalooktoo. PatBallewwritesonPatsBlogaboutPandigitalPrimes:exploringpandigitalprimesandfindingouthowhandy
Follow
22 of 224
http://mathlesstraveled.com/
Landsburgonhisblog,TheBigQuestions,maysurpriseyou!(ThankstoKatieStecklesforthesubmission,via
PaulSalomonofLostInRecursiondisplaysTheLostinRecursionRecursion.Canyoufigureoutwhatsgoing onwithoutgettinglostintheTheLostinRecursionRecursionrecursion?
StuffThatDidNotFitInAnyOtherCategoryButIsStillAwesome
ColinBeveridgeofFlyingColoursMathssubmittedSecretsoftheMathematicalNinja:Thesurprisingintegration ruleyoudontgettaughtinschool,andwrites, WhenIstumbledacrossthisrule,myreactionwaswhoa.Itsquick,itsextremelydirty,andits surprisinglyaccurate.Thekindofthingthemathematicalninjadreamsof. AndrewTaylorwritesaguestpost,ElectoralReformsandNon-TransitiveDice,onTheAperiodical,explaining WhyChoosingaVotingSystemisHardintermsofasetofnontransitivedice. PeterRowlett,ofTravelsinaMathematicalWorld,opinesinhispost,Whatanicejobyouhave,thatapopular rankinglistingmathematicianasoneofthetoptenbestjobsshouldntjustbeacceptedandrepeated uncritically. InherarticleHowcultureshapedamathematician,CarolClarkgivesaglimpseintothelifeandbackgroundof mathematicianSkipGaribaldi.Shewrites: Mathematiciansseetheworlddifferentlythanme.Iinterviewedamathematiciantogetaglimpseof thatview,andlearnedhoweverythingfromfinearttopopularfilmsandbooksplayedaroleinshaping thatview.
23 of 224
http://mathlesstraveled.com/
deadlineofthisFriday.
Posted in links | Tagged Carnival of Mathematics | 3 Comments
IllbehostingtheCarnivalofMathematics,andthesubmissiondeadlineiscomingupsoonTuesday,May1.Pleasesubmitsomething!Itcouldbe somethingyouwrote,orsomethingsomeoneelsewrotethatyouenjoyed.Allmathematicsrangingfromelementarytoadvancediswelcome.
Posted on April 23, 2012
Asmathematicalproblemsgo,thetravelingsalesmanproblem(TSP)is araregem:itissimultaneouslyofgreattheoretical,historical,and practicalinterest.Onthetheoreticalfront,itisawell-knownexampleof theclassofNP-completeproblems,whichlieattheheartofthemilliondollarPvsNPquestion(whichIstillintendtoexplainatsomepoint). Historically,ithasbeenstudiedforalmost200years(givenasufficiently inclusivedefinitionofstudy),andhasoccupiedaplaceinthepublic consciousnessforatleastthelast50.Andthisgreathistoricalinterestis partlyduetotheproblemspracticalsignificance. So,whatisit?Givenasetofpointsintheplane(or,moregenerally,aset ofpointswithdistancesspecifiedsomehowbetweeneachpairof points),theproblemistodeterminetheshortestpathwhichvisitsevery pointexactlyonceandthenreturnstothestartinglocation.Ofcourse,in onesensethisiseasy:justlistallpossiblepathsandcomputethe lengthofeach.Note,however,thatforasetof points,thereare (thatis, )possiblepathsthatvisiteverypointonceandthenreturntothestart.Evenwithonly possiblepathsifyoucouldcomputethelengthof years,slightlylongerthan points,thatsawhopping
onetrillionpathseverysecond,itwouldstilltake280millionmillenia(thats
Ivebeenalive)tocheckallofthem!Andthatsonly pointsinpractice,peoplewanttosolvetheTSPforsets ofpointsmuchlargerthan .Sothepointisnotjusttosolvetheproblem;therealquestionis,canitbe solvedefficiently? Amazingly,nooneknows!Butthathasntstoppedpeoplefromcomingupwithextremelycleveralgorithmsthat seemtoworkwellinpractice,onverylargesetsofpoints(i.e.thousands,oreventensofthousandsof points)eventhoughtherearepathologicalinputsforwhichthesealgorithmsdoessentiallynobetterthan justtryingeverypath.SothesealgorithmsconstituteagoodsolutiontotheTSPfromapracticalpointofview butnotatheoreticalone! WilliamCooksnewbook,InPursuitoftheTravelingSalesman:MathematicsattheLimitsofComputation,doesa wonderfuljobpresentingthehistoryandsignificanceoftheTSPandanoverviewofcutting-edgeresearch.Itsa beautiful,visuallyrichbook,fullofcolorphotographsanddiagramsthatenlivenboththenarrativeand mathematicalpresentation.Anditincludesawealthofinformation(perhapsevenabittoomuchattimes;Igot Follow
24 of 224
http://mathlesstraveled.com/
Factorial,permutations,andmatchings
Letsstartwiththeright-handside, .Thisoneisnottoohard: countsthenumberofpermutationsof objects,thatis,thenumberofdifferentwaystotake distinctobjectsandarrangetheminanorderedlist.Why isthat?Well,thereare objectswecouldchoosetoputfirst;oncewevemadethatchoice,thereare remainingobjectswecouldchoosetogosecond;then choices.Forexample,herearethe choicesforthethirdobject,andsoon,foratotalof differentpermutationsofsize :
Follow
25 of 224
http://mathlesstraveled.com/
Butwecanalsoseeacorrespondencebetweenpermutationsandmatchingsmoredirectly.Startbylabelingthe dotsontheleftofamatchingwithconsecutivenumbers:
Now,imagineeachnumbertravelingalongthecorrespondingrededgeuntilitreachesthedotontheother side.Likethis:
Follow
26 of 224
http://mathlesstraveled.com/
Seehowthe traveleddownthesteepedgetoendupatthefourthdotfromthetop;the traveledacrossthe horizontaledgetostayinthesameposition;the traveleduptothetop;andsoon. Whatwegetoutisalistofthenumbersfrom16insomeorder;inthisexampleweget someparticularorder. Hereareallthepermutationsofsize again,thistimevisualizedasmatchings. .Inother
words,wecanviewamatchingasalittlephysicalmachinefortakingalistofobjectsandputtingtheminto
Now,atthispointIamverytemptedtogooffonatangentexploringgrouptheory,symmetrygroups,andall sortsofotherstuff,butIshallrestrainmyself(fornow!).
Binomialcoefficients
Anotherpieceoftheequationisthebinomialcoefficient coefficientscount asize- set.(Ialsotalkedaboutthislasttime.) .Butofcoursewealreadyknowwhatbinomial isthenumberofwaystochoose thingsoutof ,thatis,thenumberofsize- subsetsof
Exponentiationandfunctions
Whatabout ?Whatdoesthatcount?Itturnsoutthatexponentiationcorrespondstocountingfunctions:in particular, isthenumberoffunctionsfromasetofsize toasetofsize .Whyisthat?Well,foreachofthe elementsofthedomain,wehave choicesforwhereafunctioncouldsendit,andeachofthesechoicesis independentsothetotalnumberofchoicesis Forexample,hereareallofthe .
Follow
27 of 224
http://mathlesstraveled.com/
mysterious
.Itcertainlydoesntmakesensetointerpretthatasthenumberoffunctionsfromasetofsize
Combinatorial proofs
Posted on February 17, 2012
Continuingfromapreviouspost,wefoundthatifwebeginwith thpowersof
consecutiveintegersand
thatis,
),
Follow
28 of 224
http://mathlesstraveled.com/
Considerthefirstelementofthesize- set.Everysubsetofsize eitherincludesthisfirstelement,oritdoesnt. Thenumberofsize- subsetswhichdonotincludethefirstelementis choose thingsfromtheremaining elementis . Heresanillustrationofhowthisworksintheparticularcasewhen and : ,becausetheycorrespondtochoosing ,sincethatsthenumberofwaysto things.Therefore elements.Thenumberofsize- subsetswhichdoincludethefirst oftheremaining
29 of 224
http://mathlesstraveled.com/
Severalcommentersfiguredthisoutaswell.Doesthisalwayshappen?Ifso,canweproveit? Letsstartbythinkingaboutwhathappenswhenwedothesuccessive-differencingprocedure.Ifwestartwith thelist ,thenweget .(Iwanttokeepthelettersinorder,whichiswhyIwrote ,weget . (Thenegationof is ;addingthisto yields .)From weget insteadof . Insteadofsubtractingthefirstvaluefromthesecond,wecanthinkofitasaddingthenegationofthefirstvalue tothesecond.)Ifwestartwith
Doyouseeanypatternsyet?Letsdoonemore.Fromtheabovecalculationwecanalreadyseethatdoingfour iterationson givesus . Hmm.Letsmakeatable. Result 1 2 3 4 5 Iincludedonemorerow(whichyoucanverifyifyoulike).Nowdoyouseeapattern?Thecoefficientsseemto betakenfromPascalstriangle,butwithalternatingsigns! Infact,itsactuallynottoohardtoseewhythishappens.Ateachstepwetaketwooffsetcopiesoftheprevious row(by"offset"Imeanthatthelettersareshiftedbyone,like and )andaddthenegationof
Follow
willresultin
(doyouseewhy?).Doingonefinaliteration
30 of 224
http://mathlesstraveled.com/
thefirsttothesecond.Sincethesignsarealternating,wereallyendupaddingabsolutevaluesofthe coefficients.Probablythebestwaytoreallyseethisisthroughanexample:
Letscallthefirstinteger ,sothesequenceofconsecutiveintegersis
nowwritedownanexpressionforwhatweendupwithafterdoingtheiterateddifferenceprocedure:
terms;thatsthe
part(youcanreadmore ,whichis
aboutsigmanotationhere).Welluse toindextheterms.Wealsoknowthatthetermsalternatesign,sowe raisedtosomepowerinvolving ;thelasttermisalwayspositive,soweuse .Thebinomialcoefficient isthe thpowerofoneoftheintegerswestartedwith. givesusthe thentryonthe throwofPascalstriangle.
Theclaim,therefore,isthat
AndIwillproveittoyou,withprettypictures,aspromised!
Posted in arithmetic, iteration, pascal's triangle | Tagged binomial coefficients, consecutive, difference, integers, powers | 3 Comments
Quick,whatsspecialaboutthefollowingpicture?
Follow
31 of 224
http://mathlesstraveled.com/
AsjustannouncedbyBillGasarch,thisisa
gridwhichhasbeenfour-colored(thatis,eachpointinthe
OrheresanotherversionwhereIrandomlypickedagridpointinthemiddle,changeditscolor,andsureenough, moremonochromaticrectanglesresult:
anyonewhocouldfindsuchafour-coloring.TheprizewillbecollectedbyBerndSteinbachandChristian PosthoffyoucanfindmoredetailsinBillspost.Nooneyetknowsexactlyhowtheyfoundtheirfour-coloring,
Follow
32 of 224
http://mathlesstraveled.com/
NineAlgorithmsthatChangedtheFuture:theIngeniousIdeasthatDriveTodays Computers,byJohnMacCormick.PrincetonUniversityPress,2012. Imoftenwaryofbookswrittenforgeneralaudiencesontechnicaltopics.Itsquite difficulttowriteinawaythatisbothaccessibletoawideaudienceandtechnically accurate.Manysuchbooksendupsacrificingaccuracyinthenameofaccessibility, tryingtoconveyjusttheintuitionorgeneralsenseofsometopic,butoftenend upgivingpeoplethewrongideainstead. Iwasquitehappytofind,therefore,thatJohnMacCormicknailsit:9Algorithms thatChangedtheFutureistechnicallyrightonthemoney,butmanagestoexplain thingsinwaysthatarebothunderstandableandfun.Wanttounderstandhow Googlerankssearchresults?OrhowAmazonmanagestoneverloseormessupyourorderinformation,even thoughtheygethundredsofthousandsoforderseachdayand(asweallknow)networksandharddrivesare unreliable?Everwonderhowyoucanordersomethingovertheinternetwithoutyourcreditcardnumberbeing stolen?Orhowzipisabletomakeyourfilessmaller,seeminglybymagic?Evenifyouhaveneverwondered aboutthesethings,perhapsIhavemadeyouwonderaboutthemjustnow.Andthatsexactlythepointofthis book:therearequiteafewingeniousalgorithmicideasthatmostofusrelyoneverydaythatwerarelyor neverevenstoptowonderabout. Forexample,Iactuallylearnedsomethingnew:Iknewaboutpublic-keycryptographybuthadneverreally knownmuchaboutDiffie-Hellmankeyexchange,whichiswhatallowsyourwebbrowsertotalkto,say, Amazonsserverssecurelyeventhoughtheyhavenevercommunicatedbefore.Itslikehavingasecret conversationincodewithapen-palwhomyouvenevermet,eventhoughlotsofpeoplearereadingyourmail. Howcanyoueveragreeonasecretcodeinthefirstplacewithoutthepeoplereadingyourmailfindingout(and hencebeingabletoreadallyoursubsequentcodedmessages)?Soundsimpossible,doesntit?Butitturnsout thatitispossible,withsomecleverideas,whichMacCormickskillfullyexplainsusingafunmetaphorabout mixingcolorsofpaint. Eachchapterstartsoutverysimply,graduallybuildingupmorecomplexexamplesuntilyoureachafull understandingofthealgorithmbeingexplained.AlongthewayMacCormickintroducesthetrickstheclever,
Follow
33 of 224
http://mathlesstraveled.com/
Follow
34 of 224
http://mathlesstraveled.com/
> {-# LANGUAGE TypeSynonymInstances > > > > module Decadic2 where > > import Control.Monad.State > > -- State for incrementally constructing u_n. > -- Invariant: curT = 10^n; un^2 = pn*curT + un > data UState = UState { pn > > > > > > -- u_1 = 5; > > uStep :: State UState Int > uStep = do > > > > > > > > > > > > > type Decadic = [Int] > > u :: Decadic > u = 5 : evalState (sequence $ repeat uStep) initUState return $ fromInteger d -- return the new digit put (UState p' u' (10*t)) -- record the new values let d u' p' = p `mod` 10 = d * t + u -- next digit -- prepend the next digit to u -- see above proof u <- gets un p <- gets pn t <- gets curT 5^2 = 25 = 2*10 + 5 > initUState = UState 2 5 10 deriving Show , un , curT } :: Integer :: Integer :: Integer #-} , FlexibleInstances
First,wehavespecialcasesforzero,representedbytheemptylistofdigits:inthosecaseswejustreturnthe othernumberunchanged.
Follow
35 of 224
http://mathlesstraveled.com/
Next,toaddadecadicnumberwhosefirstdigitisxtoadecadicnumberwhosefirstdigitisy,wejustaddxandy andthencontinueaddingrecursively.
Thenormalizefunctionsimplycallsarecursivehelperfunctionnormalize'whichkeepstrackofthecurrent"carry". Thestartingcarry,ofcourse,iszero.
Tonormalizezero(theemptylist)whenthecurrentcarryiszero,justreturntheemptylist.
>
where normalize' 0 [] = []
Withanonzerocarryandtheemptylist,wesimplyextendthelistwithaspecialzerodigitandcontinue normalizing.
>
> >
Andnowformultiplication,whichisbasedontheobservationthatzerotimesanythingiszero,andinthe generalcase
Follow
36 of 224
http://mathlesstraveled.com/
> mul :: Decadic -> Decadic -> Decadic > mul [] _ = [] > mul _ [] = [] > mul (x:xs) (y:ys) = x*y : (map (x*) ys + (xs * (y:ys)))
Finally,wedeclareDecadictobeaninstanceoftheNumclass,whichallowsustousedecadicnumbersinthesame waysthatwecanuseothernumerictypes:
Toaddormultiplydecadicnumbers,usetheplusandmulfunctionsandthennormalize.
> >
Tonegateadecadicnumber,subtractthelastdigitfrom10andtherestofthedigitsfrom9.
negate [] = [] negate (x:xs) = normalize $ (10-x) : negate' xs where negate' [] = repeat 9 negate' (x:xs) = (9-x) : negate' xs
Finally,toconvertanintegerintoadecadicnumber,puttheintegerintoalistofoneelementandnormalize.
>
So,letstryit!Wellwantawaytodisplaydecadicnumbers:
> showDecadic :: Decadic -> IO () > showDecadic d = putStrLn . dots $ digits > > > > where d' = take 31 d | otherwise digits = = ("..." ++) dots | length d' <= 30 = id concat . reverse . map show . take 30 $ d'
Normaldecimalintegerscanalsobeusedasdecadicnumbers:
Follow
37 of 224
http://mathlesstraveled.com/
*Decadic2> showDecadic 7 7
Heres :
Andheres ;ithadbetterbethesameas !
.Remember,if
then
shouldbeanotherself-squarenumber.Rememberhowwe
Finally,wecancheckthat
Now,ifyouremember,fromevenfurtherback,whatgotusintothiswholedecadicmessinthefirstplace:
Follow
38 of 224
http://mathlesstraveled.com/
Well,bythispointIhopeitsclearthatthereisindeedadeepermathematicalexplanationlurking!Theequation
admitsthesolutions
and and
,whichhas
Sointhiscaseweget
asasolution(theothersolutionisnotadecadicinteger). Toimplementit,weneedawaytohalvedecadicnumbers(Illletyouworkoutwhatsgoingonhere):
> halve :: Decadic -> Decadic > halve [] = [] > halve t@(s:_) > > > > > > > > | odd s where halve' [] = [] halve' [x] = [x `div` 2] halve' (x:x':xs) = (x `div` 2 + adj) : halve' (x':xs) where adj | odd x' = 5 | otherwise = 0 = error "foo" | otherwise = halve' t
Andnowwecandefine
Woohoo!Thisclearlyshowsthatthepatterndoes,infact,continueforever.Italsoshowsusthat
is
Follow
39 of 224
http://mathlesstraveled.com/
notparticularlyspecial:anyquadraticfunctionthatfactorsas likethis,andprobablylotsofotherequationsdotoo.
,attheveryleast,willleadtoapattern
seemsthattheauthorofthatpage,GrardMichon,hasrecentlyaddedadiscussionofthisveryproblem,
PatrickVennebushofMathJokes4MathyFolksrecentlywroteaboutthefollowingprocedurethatyields surprisingresults.Choosesomepositiveinteger .Now,startingwith consecutiveintegers,raiseeach integertothe thpower.Thentakepairwisedifferencesbysubtractingthefirstnumberfromthesecond,the secondfromthethird,andsoon,resultinginalistofonly numbers.Dothesamethingagain,resultingin numbers,andrepeatuntilyouareleftwithasinglenumber. Forexample,supposewechoose alltothefourthpower,givingus ,andstartwiththefiveconsecutiveintegers .Weraisethem
Nowwetakepairwisedifferences: newlist
,then
,andsoon,andwegetthe
Repeatingthedifferenceproceduregives
Follow
40 of 224
http://mathlesstraveled.com/
u-tube
Posted on January 10, 2012
withthecuriouspropertythatitisitsownsquare. Wealsodiscoveredanalgorithmforcomputing :startingwith (thatis,wekeeponlythelast . (Asanaside,noticewhyweareallowedtodefine asalimit:becauseofthefunnydecadicmetric,thedistance betweensuccessive isactuallygettingsmallerbyafactorof andthatsomethingis .) So, eachtime;theyareconvergingonsomething, digits)togiveus ,wesquareeach andtaketheremainder .Then isdefinedasthelimitofthe as
> u1 :: Integer > u1 = 5 > > nextU :: Integer -> Integer -> Integer > nextU n un = (un^2) `mod` (10^(n+1))
Follow
41 of 224
http://mathlesstraveled.com/
generatesalistwith asitsfirstelement,andtheremainderofthelistcomputedbyarecursivecallto
generateUs(with
and
asitsinputs).usjustgetsthingsstartedbycallinggenerateUswith
and
> us :: [Integer] > us = generateUs 1 u1 > where generateUs n un = un : generateUs (n+1) (nextU n un)
Letsseeifitworksbyaskingforthefirsttenelementsofthelistus:
ofcourseitdoes,sincethatsthedefiningpropertyofthe .Butthatmeansthathalf(moreorless)ofthe wascompletelywasted!Theresnopointincomputingthelasthalfof ,since wealreadyknowitisgoingtobe .Weonlycareabouttherestofit. Realizingthatourprogramisdoingtoomuchworkisonething;turningthisintuitionintoactualimprovements isquiteanother!Initiallyitwasfarfromobvioustomehowtoavoidtherepeatedwork.ButIfinallyfiguredit out. Thekeyistorememberateachstepnotjust ,but .However,sinceweknowthat endswith ,wecan remember alongwiththeprefix(callit )of thatcomesbeforetheending .Forexample,for remember . Thekeyquestionnowis:given and ,howdowecompute thelastdigitof ;then Itscomputing out . ,theideaistoexpand : and ?Well,computing iseasy:itsjust tobe and (since ).Thatis,wewillalwaysinsistthat well
withanextradigittackedon,namely,thefinaldigitof .Inparticular,wecandefine
whichisthetrickypart.Sincewewanttohave
,manipulateitintothedesiredform,andseewhatwegetfor
Now,notethatwecanbreak intotwoparts:thelastdigit(whichwerecalling
)andtherest.Thatis,
Follow
42 of 224
http://mathlesstraveled.com/
where
denotesroundingdowntothenearestinteger,so
meanstodivide by10andthrowawaythe
remainderthatis, withoutitsfinaldigit.Continuing,
andtherewehaveit!Wehaveexpressed
intheform
.Inparticular,
Noticethat
isactuallyguaranteedtobeaninteger,since isdivisibleby5thisisthesame
,sowe
First,thedatastructureweusetokeeptrackofthecurrentvaluesof , ,and
> -- State for incrementally constructing u_n. > -- Invariant: curT = 10^n; un^2 = pn*curT + un > data UState = UState { pn > > > > deriving Show , un , curT } :: Integer :: Integer :: Integer
Theinitialstatefor
has
,and
> -- u_1 = 5;
5^2 = 25 = 2*10 + 5
andupdatesthemto
asitsresult,whichwecanusetobuildup digit-by-digit.
Follow
43 of 224
http://mathlesstraveled.com/
> uStep :: State UState Int > uStep = do > > > > > > > > > > > return $ fromInteger d -- return the new digit put (UState p' u' (10*t)) -- record the new values let d u' p' = p `mod` 10 = d * t + u -- next digit -- prepend the next digit to u -- see above proof u <- gets un p <- gets pn t <- gets curT
So,didwegainanything?Asaconcretecomparison,letsseehowlongittakestocompute simplecode,ittakes7.2seconds:
.Usingourfirst,
*Decadic> :set +s *Decadic> length . show $ us !! 10000 10001 (7.23 secs, 208746872 bytes)
(Ijusthaditprintthenumberofdigitsof
toavoidwastingatonofspaceprintingouttheentirenumber.)
Andusingournewandhopefullyimprovedcode?
*Decadic> length . show . un . flip execState initUState $ replicateM_ 10000 uStep 10001 (1.55 secs, 225857080 bytes)
> type TenAdic = [Int] > > u :: TenAdic > u = 5 : evalState (sequence $ repeat uStep) initUState
Follow
44 of 224
http://mathlesstraveled.com/
Nifty!Nexttimetherealfunbegins,asIshowoffsomecoolthingswecandowithourshinynew implementationof .
Posted in computation, convergence, infinity, iteration, modular arithmetic, number theory, programming | Tagged decadic, Haskell, idempotent, streaming, u | 2 Comments
A self-square number
Posted on January 4, 2012
[Thisistheseventhinaseriesofpostsonthedecadicnumbers(previousposts:Acuriosity,Aninvitationtoa funnynumbersystem,Whatdoes"closeto"mean?,Thedecadicmetric,Infinitedecadicnumbers,Morefunwith infinitedecadicnumbers).Iknowit'sbeenawhilesinceI'vewrittenonthistopic,soifyou'vebeenfollowing along,youmightwanttogobackandrefreshyourmemory.] Finally,aspromised,Icanshowyouthestrangenumberuwhichisitsownsquare(butwhichisntzeroorone!). Upuntilnowallthedecadicnumbersweveconsideredhavebeenequivalenttofamiliarrationalnumbers,but zeroandonearetheonlyrationalnumberswhicharetheirownsquare;clearlyumustbesomethingquite different! Assumingthatsuchaucouldexistandassumingitsadecadicinteger ,thatis,hasnodigitstotherightofthe decimalpointletsthinkforaminuteaboutwhatucouldpossiblybe.Forexample,whatcoulditslastdigitbe?
Follow
45 of 224
http://mathlesstraveled.com/
0 1 2 3 4 5 6 7 8 9
Ivehighlightedthedigitswiththedesiredproperty:ofcourse,
in .Wealreadyknowwedontwanttoconsider and .Sofornow,letssupposethat endswith . Whataboutthelasttwodigitsof ?Again,thelasttwodigitsof dependonlyonthelasttwodigitsof .(If thisisntobvioustoyou,youshouldtryafewexamplestoconvinceyourself.Forexample,whatis ? Whatinformationdidyouneedtocomputethelasttwodigitsoftheanswer?)Sowhateverthelasttwodigits are,theirsquare,whenconsideredontheirownasatwo-digitnumber,mustbesomenumberthatendsinthe sametwodigits.Assumingthelastdigitis ,wecanturnthisrequirementintoamodularequationwhichwecan usetosolveforthesecond-to-lastdigit:
Sureenough,
whichendswith .
Canwetakethisfurther?Whataboutthelastthreedigits?
Check:
,whichindeedendswith
.Continuinginasimilarfashion(Illletyouworkoutthedetails
Follow
onyourown),wefindthatthefourthdigitmustbe ,andthefifthdigitmustbe .
46 of 224
http://mathlesstraveled.com/
Areyouseeingapattern?Letsmakeatableoftheresultssofar:
1 2 3 4 5
,andsoon).Oncewehavefound ,wecansetupamodularequationtofindthenextdigit(thisisjusta
Now,
isclearlydivisibleby
sothattermgoesaway.Butwhatabout
?Itseemsthatweonly
knowitisdivisibleby with
,notnecessarilyby
Now,
intheplaceof stdigitof
digitstogetthenextnumber.Theabove
47 of 224
http://mathlesstraveled.com/
Sowehave
Four-figure offer
Posted on December 1, 2011
Follow
48 of 224
http://mathlesstraveled.com/
CommenterRachelrecentlyasked,
Follow
49 of 224
http://mathlesstraveled.com/
Howwouldyoufindthesumof
Seehereforanexplanationofsigmanotationinthiscaseitdenotesthesum
Why?Ifyouthinkaboutitabit,youcanseethatthesametermsshowupontheleftandtheright,justina differentorder:theleftsideis Sinceadditionisassociative( Next,weobservethat , thatis, So,wehave .Thisisbecausemultiplicationdistributesoveraddition. . ;itisequalto .Sofar,we whereastherightsideis )andcommutative( )theseareequal. .
Forexample,if and
wehave
.Noticethatweendupwithboth and
infact,everythingcancelsexceptthe
50 of 224
http://mathlesstraveled.com/
thatingeneral,
Thissortofsumiscalledatelescopingsum,becausethewholethingcollapseslikeoneofthoseold-school telescopesthatpiratesuse.
However,wecanalsoexpandoutthe
andthensimplify:
Sonowweknowthat
sincebothsidesareequalto
.Fromherewejustneedsomealgebratoput
ononesideand
everythingelseontheother,andcleanthingsupabittoobtainwell,Illletyoufinishworkingitout.=)
Posted in algebra | Tagged notation, sigma, squares, sum, telescope | 6 Comments
51 of 224
http://mathlesstraveled.com/
Posted in fractals, geometry, links, video | Tagged Dimensions, fibration, polytope, projection, video | 2 Comments
ThisbookiscertainlyquitedifferentfromthesortIusuallyreadand reviewbutIamalwaysinterestedinnewandcreativewaystoteach mathematics!Thisisquiteafunbook.Itsallaboutvisualartandsome ofthewaysitisinformedbymathematics,withfocusesonperspective andfractals.Itsfullofhands-onlearningactivities:reproducinga buildingusingmaskingtapeonaglasswindow,usingshishkebab skewerstohelpviewartworksatamuseum,drawingassignments,and, yes,somemathexercises.Interspersedbetweenthechaptersareartist vignettestellingthestory(andshowingoffthe(oftenamazing!) artwork)ofartistswhoseworkissomehowmathematicallyinspired.I didntlearnmuchmathfromthisbook,butIdidlearnsomefunthings aboutart,andIsuspectthatthereversewouldbetrueforartists withoutmuchmathbackground.Thisbookshouldworkwellfor studentswhohaventhadtoomuchfunwithmathinthepastbutare willingtotrysomethingnew.Itwouldespeciallyworkwellasthetextbookforahands-onclassorworkshop taughtbyanenthusiasticinstructoras,infact,itisdesignedtobe. Myonegripeiswiththequalityofmanyoftheincludedimages(andyes,IfinditstrangethatIshouldhaveto complainaboutthisinabookaboutart!).Firstofall,thebookisprintedinblackandwhite(withacollectionof colorplatesinthemiddle);yes,ofcourseIunderstandthattherearetradeoffsinvolvingthecostofprintingthe book,butstill,itsratherdisappointingtohaveabookaboutartprintedinblackandwhite.Theincluded diagramsandfigureslookgreat,butmanyoftheincludedimages(i.e.reproductionsofartworks)aremuchtoo darkandhardtosee,andIrepeatedlyfoundmyselfthinking,Ibetthispainting/photograph/artworkwouldbe reallybeautiful/interesting/amazingifonlyIcouldseeitincolor. Still,overall,thisisagreatbookwithfreshperspectiveontheintersectionofmathandartthatilluminatesboth subjects.
Posted in books, fractals, geometry, pattern, pictures, review | Tagged art, fractal, geometry, perspective, review, textbook
Follow
52 of 224
http://mathlesstraveled.com/
InFunwithrepunitdivisorsIposedthefollowingchallenge: Provethateveryprimeotherthan2or5isadivisorofsomerepunit.Inotherwords,ifyoumakealist oftheprimefactorizationsofrepunits,everyprimeotherthan2or5willshowupeventually. Mypreviouspostexplainedtwodifferentproofs.AttheendofFunwithrepunitdivisorsIalsoposedaseries offollow-upchallenges;herearesolutionstothose. 1. Computearepunitwhichisdivisibleby2011(youllprobablywanttouseacomputer!). Aswenowknowfromthesecondproof(usingFermatsLittleTheorem),therepunitwith divisibleby thesmallestrepunitwhichisdivisibleby ?Inthatcasewecancompute , onesmustbe , .Soitsufficesto , ,butatthenext , .Forexample,Icomputedthisusing .SoIguessacomputerisnotreallynecessaryafterall!However,whatifwewanttocompute
,untilwegetzero.However,wedonthavetoactuallycomputeabiggerandbiggerrepuniteachtime! Eachrepunitisrelatedtothepreviousonebyanapplicationofthefunction keeponlytheremainder (reducing stepwecanreduce then secondwefindthat Haskellbydefining ateachstep,andapply toget .Thenwecompute whenneeded).Forexample,westartoutbycomputing , , toeachremaindertogetthenext
,andsoon.Iteratingthisprocessonacomputerisveryfast,andinafractionofa isthesmallestrepunitdivisibleby
fpx=(10*x+1)`mod`p smallestRepp=(+1).length.takeWhile(/=0).iterate(fp)$1
2. Provethateveryprimeotherthan2or5isactuallyadivisorofinfinitelymanyrepunits. Proof:Notethatmultiplying,say, by gives ;multiplyingby gives forall ,andsoon.In . general,wecanseethattherepunitwith digitsalwaysevenlydividestherepunitwith digitswhenever evenlydivides .Soif isadivisorof thenitisalsoadivisorof
3. Provethateveryintegerwhichisnotdivisibleby2or5isadivisorofsomerepunit. Proof:suppose hastheprimefactorization ; divides Hence mustbeadivisorof , divides ,since .Weknowthateach isadivisorofsomerepunit .Asasimpleexample, ,and isarepunititself. .Then,bytheargumentabove, mustbeadivisorof
.(Actually,wecanmakethisabitmoreprecise
inordertofindamuchsmallerrepunitthat
mustevenlydivide.Canyouseehow?)
.Everythingaboveisstilltrue
53 of 224
http://mathlesstraveled.com/
Bringing
overtotheleft-handsideandsimplifyinggives
Since
wecanfactorout
,giving
54 of 224
http://mathlesstraveled.com/
55 of 224
http://mathlesstraveled.com/
Follow
56 of 224
http://mathlesstraveled.com/
(Thisismy200thpost!=)
Posted in counting, pattern, pictures, posts without words, recursion | 11 Comments
57 of 224
http://mathlesstraveled.com/
Atthispointwemayalsoask,if yieldszero:
is
,thenwhatis
?Itmustbe
,sinceaddingthatto
Hmm,so :
is
,and
is
(sinceitis8times
).Thisalsomakessensebecause
isnegativebut
ispositive.Canyoufigureouta
relativelysimplewaytotell,justbylookingataninfinitedecadicnumber,whetheritispositiveornegative?
Hence
,so
.Asafurthercheck,
,so
whichoughttobe
:sureenough,adding to
yieldszero. willbeequal
Ingeneral,wecanseethattheinfiniterepeatingdecadicnumber to
;bythispointIhopeyoucanseewhy. whenmultipliedby
isdifferent:wewouldhavetofindsomenumberwhichyields
58 of 224
http://mathlesstraveled.com/
importanttonotethatwecanonlyallowfinitestringsofdigitsafterthedecimalpoint:anumberlike ismeaninglessbecausethesequenceofnumbers pointareOK. Ingeneral,wecalldecadicnumberswithnodigitsafterthedecimalpoint(includinginfiniteones)decadic integers.Obviouslyallthenormalintegersarealsodecadicintegers;butsoarefractionssuchas denominatorsarerelativelyprimeto .Otherfractionssuchas Exercises: A. Showthatanyfractionwhosedenominatorhasonly and asfactorsisrepresentedbyafinitedecimal number. B. Showthatbyallowingafinitenumberofdigitsafterthedecimalpoint,wecanrepresentanyfractionasa decadicnumber.(Hint:factorthedenominatorintoonepartconsistingonlyoftwosandfivesandanother partwitheverythingelse.) YoumayrecallthatinapreviouspostIpromisedtoshowyouastrangedecadicnumber ,whichisnotzero,but isequaltoitsownsquare.WevenowfinallyseenenoughformetotellyouwhatitiswhichIwilldoinmy nextpost.Inthemeantimeyoumaywanttotrydiscoveringit!
Posted in arithmetic, infinity, number theory | Tagged decadic, decimal, fractions, integers, representation | 4 Comments
doesnotconvergeto
anything;infact,theyaregettingfurtherandfurtherapart!Butanyfinitenumberofdigitsafterthedecimal
whose
arenot.
OccasionallysomeonefromPrincetonUniversityPresssendsmealistof upcomingtitlesandasksifthereareanyIdliketoreview.Ijumpedwhen Isawthisone:abookaboutmagictricksandmath!ByPersiDiaconisand RonGraham!RonGrahaminparticularisoneofthecoolest mathematiciansIknowof. SoIsaidIwasinterestedandthenpromptlyforgotaboutitthatwas severalmonthsago.Imaginemydelightwhenthebookshowedupinthe mail!AssoonasIopeneditIknewIwasinforatreat:itissimplya beautifulbook.Thedesign,layout,typography,eventhepaperis beautiful. SoIsettledintoreaditoverthepastfewdaysandwasnotdisappointed:thisisoneofthemostfun,engaging newpopularmathematicsbooksIveseeninalongtime.Ilovehowitreadsmorelikeaconversationthana traditionalbook:theauthorswendtheirwayfromexplainingmagictricks,toexplainingthemathbehindthem, tospeculatingonopenmathematicalquestions(andwhethertheiranswerscanbeturnedintogoodmagic tricks),topersonalreminiscencesandstoriesaboutgreatmathematicalmagicians.Theresachapteronjuggling (completewithinstructionswithpictures!),achapterontheIChing,achapteronshufflingcards.Thereare
Follow
59 of 224
http://mathlesstraveled.com/
Torecap:wevenowdefinedthedecadicmetric onintegersby
.Accordingtothismetric,twonumbersareclosewhentheir and areatadistanceof ,but and are arecloserstill,withadifferenceof and are .Putsimply:themorefinal
differenceisdecadicallysmall.So,forexample,
digitstwointegersshare,theclosertheyare.Thisisareversaloftheusualsituationinwhichintegersareclose whentheysharealotofinitialdigits(like withoutsharingdigitsforexample, and ).MarkJamesnotesthatitisalmostasifwewere apart.Butinthiscasethenegativenumberendswith reversingthenumbers.Jonathannotesthatthisisnotquiteright,negativeandpositiveintegerscanbeclose digitsthataredualtothedigitsthepositivenumberendswith. Letskeepthinkingaboutnegativenumbersabit. apart. to and arecloserstill, and :specifically, arealways ,so and are apart. and are isveryclose . , ,
.Infact,Ihopeyoucanseethatingeneral, apart.Sothemore9sweadd,thecloserwegetto
.Wecandothesamething
tobeequalto
.Weird,huh?Butitgetsweirder(andcooler).Thereallyneatthingisthatarithmeticstill wehadbetter
60 of 224
http://mathlesstraveled.com/
whichIclaimrepresents
:youshouldhavenotroubleverifyingthat
3. Canyoufindaninfinitedecadicnumberwhichrepresents
Posted in arithmetic, convergence, infinity, number theory | Tagged decadic, negative, numbers | 7 Comments
Continuingmyseriesofpostsexploringthedecadicnumbersinmypreviouspost,Iexplainedthatwewill defineanewsizefunction,ormetric ,differentfromtheusualabsolutevalue,andwritten numberswillbeclosetoeachotherwhenthesizeoftheirdifferenceissmall. Fornowwewilldefine ; ontheintegers.First,everynonzerointeger canbefactoredas ; .Now,for notdivisibleby ,wesimplydefine . So, ; ; .Thisdefinitiondoesntcoverzero,however,because ,sowedefine for ,since ,where is .Two
So,whatpairsofintegersareclosetoeachother,underthisnewmetric?Howabout compute
and
?We
61 of 224
http://mathlesstraveled.com/
So,whataboutapairofintegersthatareclosertogetherthan absolutevaluemetric!Letscomputetheirdecadicdistance:
and
?Howabout
and
Thosedontseemverycloseatall!Youmightprotest.Aha,butyouarestillthinkingintermsoftheold
Aha,sotheyreallyareabitclosertogether.Whatabout
and
Continuingfromlasttime,considerthe(normal,decimal)number
.But
Follow
62 of 224
http://mathlesstraveled.com/
Thestandardansweristhatwethinkoftheinfinitedecimalnumber thesequence
asashorthandforthelimitof
Thatis,thesequenceofrationalnumbers
,andsoon,getinfinitelyclosetosomenumber,namely,
whichistakenasthemeaningofthesequence.(Iamwavingmyhandsabithere;thisisusuallymademore precisethroughthenotionofaCauchysequence.Buttheintuitionisthesame.) Now,inthepreviousparagraphIsaidthatthenumbers ifwegiveadifferentanswerthanusual. First,letsthinkaboutwhatclosetomeansinthecontextoftheusualrealnumbers.Thedistancebetweentwo numbers and isdefinedtobe ,where denotestheusualabsolutevalueofanumber.Wecanthinkof theabsolutevaluefunctionasassigningasizetoeachnumber:42and-42bothhavethesamesize,namely,42. Sothedistancebetweentwonumbersisthesizeoftheirdifference. Thenameofthegamenowwillbetodefineadifferentsizefunction,whichwewillwrite issmall.
Posted in convergence, number theory | Tagged absolute value, Cauchy, distance, limit, sequence | 3 Comments
,getinfinitelyclosetosomenumber.Whatdowe
meanbycloseto?Youmaythinkthisasilly,obviousquestion.Butitturnsoutthatinterestingthingshappen
.Usingthissize
Considertheequation
Solvingthisequationisnosweat,right?Letsdoit.First,wesubtract frombothsides:
Nowwecanfactoran outoftheleftside:
Now,iftheproductoftwothingsiszero,oneofthemmustbezero.Soeither
,or
,thatis,
63 of 224
http://mathlesstraveled.com/
Noticealsowhathappenswhenwemultiplythesetwosolutions:
strange:twonumbers,neitherofwhichiszero,whichmultiplytogivezero!Suchnumbersarecalledzero divisors.Thisisthestepinoursolutionabovewhichfailsforthedecadicnumbers:oncewefactoredtoobtain ,wereasonedthatiftwothingsmultiplytogivezero,thenoneofthemmustbezero.ButIvejust claimedthatthisisnottrueforthedecadicnumbers. Oftenmathematiciansstayawayfromsystemswithzerodivisors,sincetheyruinsomeniceproperties.For example,noteverynonzeronumberhasamultiplicativeinverse.(Recallthatthemultiplicativeinverseofa number isanothernumber suchthat ;forexample,themultiplicativeinverseof is .)For homework,provethatthe wediscussedabovedoesnothaveamultiplicativeinverse!(Hint:trysupposingthat itdoes,andderiveabogusequation)Butwerenottryingtoaccomplishanythinginparticular,justtohavefun andlearnsomething,sobringonthezerodivisors! OK,sowhatexactlyarethesedecadicnumbers?Whatis ?Andwhatelsecanbesaidaboutthecuriosityinmy previouspost?Allthisandmore,comingsoontoaMathLessTravelednearyou (Ifyoureimpatient,youcanreadsomeaboutp-adicnumbershere,andaboutthedecadicnumbershere.Butas usual,Iplantoexplainthingsatamoreleisurelypace.)
Posted in arithmetic, number theory | Tagged idempotent, numbers, ten-adic, zero divisor | 8 Comments
A curiosity
Posted on September 14, 2011
FromFutilityCloset,afunblogofrandomtidbitsIenjoyreading,comesthefollowingcurioussequenceof equations,attributedtoJ.A.H.Hunter:
64 of 224
http://mathlesstraveled.com/
Mypreviouspostdisplayedthispicture:
AsYuriyKashnikovguessed,Imadethispictureusingdiagrams,aHaskelllibraryIamdevelopingforcreating imageslikethis.(Youcanseethesourcecodeforthispicturehere.) Ifyouhaventhadachancetopondertheimageandlookforpatterns,maybeyouwanttodothatnow!Iwant tosayafewthingsaboutit.First,asJMobserved,onewaytolookatthisisatreewitheachbranchasking, `WhichcolorshouldIeliminate? Heresanotherwaytothinkaboutit(whichreallyamountstothesamething).Eachgraphisapictureofallthe subsetsofacertainset,arrangedsothattheemptysubsetisatthebottom,thecompletesetisatthetop,andall thesetsinbetweenarearrangedsothatthereisanupwards-pointingedge(orpathofseveralupwards-pointing edges)connectingeachsettotheothersetsofwhichitisasubset.Soifwestartatthebottomandtravel upwardsfollowingtheedges,moreandmorecolorswillbeadded,butoncewehaveseenacertaincolor,itwill remaininallthesetsweencounterfromthenon(aslongaswekeeptravelingonlyupwards).Thesesortsof
Follow
65 of 224
http://mathlesstraveled.com/
diagramsareactuallycalledHassediagrams.(Hassediagramsareabitmoregeneral;theycanactuallybeusedto visualizeanypartiallyorderedset.) Now,xandercountedthenumberofsetsineachrow.HecorrectlypointedoutthatIshouldhaveincluded anotherdiagramatthetop,namely,anemptydottedbox.Ifweincludethat,countingthenumberofsetsinthe rowsofeachdiagramgivesaninterestingpattern: 1 11 121 1331 14641 Doyourecognizethispattern?Thatsright,itsPascalstriangle!Wewouldexpectthenextrowtobe1510105 1.Letssee:
Follow
66 of 224
http://mathlesstraveled.com/
Posted in counting, pascal's triangle, pattern, pictures, posts without words | 10 Comments
67 of 224
http://mathlesstraveled.com/
Happy day!
,ofcourse,isthefundamentalcircleconstantwhichrepresentstheratioofany
Andhereswhat soundslike:
Follow
68 of 224
http://mathlesstraveled.com/
Formore linkgoodness,checkoutDenisespost.
Posted in famous numbers, links, video | Tagged day, pi, tau | 3 Comments
69 of 224
http://mathlesstraveled.com/
AfewdaysagoJohnCookreportedadraftpaperclaimingtosolvetheCollatzconjecture.Ofcourse,sincethe Collatzconjectureissosimpletostate,itconstantlyattractstonsofwould-besolvers,andmostofthepurported proofstheygeneratearenotevenworthmathematicianstimetolookat.Sowhyshouldthisonebedifferent? Well,onthesurface,itseemedtobeamuchmoreseriousattemptthanthevastmajority.OfScottAaronsons TenSignsaClaimedMathematicalBreakthroughisWrong,thispaperexhibitedonly#6(jumpingstraightinto technicalmaterialwithoutpresentinganewidea)and#10(usingtechniquesthatseemtoowimpy).But#6 couldjustbeduetopoororganizationofthepaper,and#10isnotobviousuntilyougettotheend. Butandyouknewthiswascomingitiswrong.Ivespentseveralhoursoverthepastfewdaysreadingover thepaperandcametothisconclusionindependenlyandthenfoundseveralotherpeoplewhohadcometo thesameconclusion,forthesamereason. ConsiderthefollowingproofoftheCollatzconjecture.WeconsiderrunningtheCollatzfunction(callit ) backwards,tofindoutwhichnumber(s)couldhaveprecededagivennumberinaCollatzsequence.Wealways have ,sofrom wecangobackwardsto .Also, when isan oddinteger,thatis,when isonemorethananoddmultipleof .Thesearetheonlytwopossibilities.So, startingfrom ,wecangobackwardsto ;from wecangobackwardsto ;from wecangoto or ;from we get ;from weget or ;andsoon.Inthiswaywecanbuildupaninfinitetreeofnumbers.Butthistree containseverynaturalnumbersincewecanalwaysworkupthetreefrom untilwefindanynumberwewant. Henceeverynumbermustreach wheniteratingtheCollatzfunction. Doyouseetheproblemwiththisproof?Well,thisisessentiallywhatGerhardOpfersproofboilsdowntoas
Follow
70 of 224
http://mathlesstraveled.com/
well(thedetailsarenotexactlythesame,buttheformisprettymuchidentical).Thereisalotofstufffirst aboutlinearoperatorsovercomplexfunctions,butforthispartheisjustrelyingonworkthatsomeoneelse alreadydidanyway,andintheendhejustendsuplookingatcoefficientsofpowerseries,whichjustboilsdown tosomenumbertheory.Hebuildsatreebyinvertingacertainfunction(nottheCollatzfunctionbutaclosely relatedone),andthewholeargumentrestsonthefactthatthistreecontainseverynaturalnumberwhichhe statesbutdoesnotprove!AnditseemscleartomethatprovingthiswouldbenoeasierthanprovingtheCollatz conjectureitself.Intheend,forallthedetailedargumentandcontortion,hehascomebackpreciselytowhere hestarted. (Bytheway,Iamnotinterestedinreadingyour supposedproofoftheCollatzconjecture,sopleasedonotpost alinktoitinthecomments!)
Posted in open problems, proof | 43 Comments
Posted in fibonacci, pattern, pictures, posts without words | Tagged fibonacci, partition | 13 Comments
Follow
71 of 224
http://mathlesstraveled.com/
Cassinis identity
Posted on May 15, 2011
MypreviouspostaskedyoutotakeanyFibonaccinumber,squareit,andalsomultiplythetwoadjacent Fibonaccinumbers,andseeifapatternemerged.HeresatableImadeforthefirst6Fibonaccinumbers:
(Hmm,thenumbersinthatlastrowsurelookfamiliar)ItseemsthatthesquareofaFibonaccinumberandthe productofitstwoadjacentFibonaccinumbersalwaysdifferbyexactlyone.Moreover,whichoneisbigger alternates:thesquareisbiggerforoddvaluesof andtheadjacentproductisbiggerforevenvaluesof . Algebraically, . Thisisactuallytrue,andisknownasCassinisidentity,sinceitwasfirstpublishedbytheItalianastronomerGian DomenicoCassiniin1680.Letsproveit! First,wecancheckthatitholdswhen : . Nowwecanassumeitholdsforsome ,andshowthatitalsoholdsfor :
Sobyinduction,Cassinisidentityholdsforall anotherpost!)
.(Actually,thereisasensiblewaytodefinenegative
FibonaccinumberswhichmakesCassinisidentitytrueforallintegers ,butperhapsthatcanbethesubjectof
Posted in algebra, fibonacci, induction, pattern, proof, solutions | Tagged Cassini, fibonacci, identity | 8 Comments
A Fibonacci pattern
Posted on May 13, 2011
72 of 224
http://mathlesstraveled.com/
An area paradox
Follow
73 of 224
http://mathlesstraveled.com/
HeresafunparadoxwhichhasbeenaroundforquiteawhileandwasapparentlyafavoriteofLewisCarroll.
Feelfreetopostquestions,comments,thoughts,guesses,etc.below.(However,pleaserefrainfromcommenting ifyouhaveseenthisparadoxanditsexplanationbefore!)
Posted in challenges, geometry, paradox, pictures | Tagged area, Lewis Carroll, paradox | 18 Comments
74 of 224
http://mathlesstraveled.com/
Justforfun,inhonoroftheoccasion:
>--@powmodbaseexpm@efficientlycomputes(base^exp(modm)). >powmod::Integer->Integer->Integer->Integer >powmod_0_=1 >powmodbaseexpm|evenexp=(x*x)`mod`m >|otherwise=(x*x*base)`mod`m >wherex=powmodbase(exp`div`2)m > >fn=powmod2nn > >--http://oeis.org/A015910 >a015910=mapf[1..] > >--http://oeis.org/A050259 >test=all(==3) >(mapf[4700063497 >,3468371109448915 >,8365386194032363 >,10991007971508067 >,63130707451134435989380140059866138830623361447484274774099906755 >] >)
Follow
75 of 224
http://mathlesstraveled.com/
Posted in arithmetic, pattern, pictures, proof, solutions | Tagged number, pictures, proof without words, triangular | 10 Comments
TheotherdayIwasfiddlingaroundabitwithtriangularnumbers.Byonlydrawing picturesIwasabletocomeupwiththefollowingtriangularnumberequations,where denotesthe thtriangularnumber(thatis,thenumberofdotsinatriangularfigurewith dotsinthebottomrow, top). 1. 2. 3. 4. Now,noneofthesearehardtoprovealgebraically,butthatsnotthepoint.Canyoucomeupwithpicturesto illustratethevalidityofeachequation?Canyouuseapicturetofigureouthowtogeneralize#2inthesameway that#3generalizes#1? (thisoneisageneralizationofthefirstone)
The fourth triangular number
dotsinthenextrow,andsoon,andonedotonthe
Follow
76 of 224
http://mathlesstraveled.com/
Posted in challenges, pictures, proof | Tagged equation, proof, triangular, visual | 8 Comments
Recallthatthetriangunitnumbersaredefinedasthenumbersyougetbyappendingthedigit1totheendof triangularnumbers.Putanotherway, where denotesthe thtriangularnumber,and the th triangunitnumber.Thechallenge,posedbyPatrickVennebush,istodiscoverandprovesomethinginteresting aboutthedivisorsoftriangunitnumbers.(Therearespoilersahead,soifyoustillwanttothinkaboutthis problemyourselffirst,stopreadingnowandgoreadmypreviouspostinstead.) Asyoumayhavediscovered,allthedivisorsoftrianguntnumbersseemtoendineither1or9.Thisiscertainlya strikingpattern,andifitstrue,canweexplainwhy? First,wecanstartwiththeformulafortriangularnumbers(whichIhaveshownhowtoderivebefore), ,andcomputeasfollows:
Soeverytriangunitnumberisoftheform
forsomenaturalnumber .
Butthisisextremelytelegraphic,andonlymakessensebyitselfifyouhaveagoodbackgroundinnumbertheory soitsagreatprooftoincludeontheOEISbutnotsogoodforalltherestofus!Thankfully,AdamGlesser
Follow
77 of 224
http://mathlesstraveled.com/
flesheditoutabitinacommentonmypreviouspost.Imre-formulatinghisexplanationinmyownwords, partlytotrytomakeitasaccessibleaspossible,andpartlytomakesureIunderstandit! Suppose isaprimenumberwhichdividesthetriangunitnumber of5alwaysendwith0or5). Thefactthat isafactorof canbewrittenusingamodularequationas . (Incaseyouhaveneverseenthissortofequationbefore, remainderwhendividedby .) ThenextstepisthecrucialonewhichIneverfiguredoutbutIdontfeeltoobadaboutit(andneithershould you,ifyoudidntfigureitouteither)sinceitrequiressomeexperienceandbackgroundinnumbertheoryto thinkofit.Theideaistocompletethesquaresincethisletsususequadraticreciprocity.Whatsthat,yousay? Readon!Wemultiplybothsidesoftheequationby20,thendoabitofrearranging: meansthat and havethesame .Obviously, cannotbe2since
triangunitnumbersalwaysendwith1(andarethereforeodd). alsocannotbe5forthesamereason(multiples
Well,therearenttoomanypossibilitiesforsquareswhenworking
.Thatmeansthatitendswith1,4,6,or9.
Butwhataboutthatmagicalquadrilateralrecipricosi-thingummyorwhateveritwasinthemiddle!?Ihearyou cry.Neverfear,Ishallexplainitsoon!Itisratherfamousandinterestinganddeservesitsownpost
Posted in arithmetic, modular arithmetic, number theory, primes, proof | Tagged OEIS, quadratic, reciprocity, triangular, triangunit | 5 Comments
Moved to wordpress.com
Posted on March 20, 2011
78 of 224
http://mathlesstraveled.com/
Triangunit divisors
Posted on March 1, 2011
HeresaneatproblemfromPatrickVennebushofMathJokes4MathyFolks: Appendthedigit1totheendofeverytriangularnumber.Forinstance,from3youdget31,andfrom 666youdget6,661.Nowtakealookatallofthedivisorsofthenumbersyouvecreated.Whatarethe unitsdigitsofthedivisorsforeverynumbercreatedinthisway?Canyouprovethatthisresultalways holds? JustforfunIhavedubbedthesenumberstheonesyougetbyappendingaunittotriangularnumbersthe triangunitnumbers.Ivefoundapatternandevencheckeditforthefirst10,000triangularnumbersusinga computer,butsofaraproofhaseludedme! Bytheway,thetriangunitnumbersaresequenceA062786intheOnlineEncyclopediaofIntegerSequences,but thatpagecontainsaspoiler(Ithink,Ididntreadit)sodontpeekifyouwanttofigureitoutyourself!
Posted in number theory, pattern, puzzles | Tagged divisors, numbers, triangular, triangunit, unit | 9 Comments
Myblogisfinallybackupafteralonghiatusduetohostingproblems(notthefirsttime).Imseriously contemplatingmovingsomewheremorereliable,butitshardtocomeupwithasolutionthatwouldnot(a) invalidateanylinkstomyblogorparticularposts,(b)costalotofmoney(mycurrenthostingisfree),or(c) requirealotofworktoconvert/transfereverything.Ideaswelcome. Ihopetogetbacktobloggingsoon.Inthemeantime,heresanoldchestnutforyoutopuzzleover,ifyou haventalreadyseenit: Acertainmathclassmeetseveryweekday.OneFridayattheendofclass,theprofessortellstheclass thatsometimeduringthenextweek,theyaregoingtohaveasurprisequiz.Iamnotgoingtotellyou onwhatdaythequizwillbe,shesays.TheonlythingIwillsayforsureisthatitwillbea surpriseyouwillnotknowwhatdaythequizwillbeuntilthemomentIhanditoutatthebeginning ofclass. Whenwillthequizbe? Feelfreetopostquestions,ideas,andsolutionsinthecomments(sodontpeekatthecommentsifyouwantto
Follow
79 of 224
http://mathlesstraveled.com/
thinkaboutityourselffirst).
Posted in logic, meta, puzzles | Tagged logic, puzzle, quiz, surprise | 8 Comments
Inarecentblogpost,PatrickVennebushofMathJokes4MathyFolksnotedthat2011canbeexpressedasa sumofconsecutiveprimenumbers,andchallengedhisreaderstoworkouthow.Healsoposedacouplefurther challenges: Asitturnsout,2011isextracoolbecauseitcanbewrittenasasumofaprimenumberofconsecutive primenumbers. Whenwillthathappenagain? Andfinally Whatisthenextyearthatwillbeaprimenumberandalsobeasumofaprimenumberofconsecutive primenumbers?(Wow,thatsamouthful,aintit?) JustforfunIdliketosharehowIcomputedsolutionstoPatrickschallengesinmyfavoriteprogramming language,Haskell.Itsgreatfordoingthissortofrecreationalmathematics(amongmanyotherthings),asIhope youwillsee.Dontworryifyoudontknowit,Ivetriedtowritethispostinsuchawaythatanyonecanfollowit tosomeextent.Also,thispostisLiterateHaskell;youcancopyandpastetheentiretextofthepostdirectlyinto afilewithan.lhsextensionandloaditinaHaskellinterpreterlikeghci. WARNING:spoilersahead!!Ifyoudliketoworkoutthechallengesyourself,stopreadingnow. Okay,firstthingsfirst.Somesmartpersonhasalreadyputtogetheranicelibraryforefficientlylistingprime numbers,soletsuseit:
Afewotheroddsandendswewillneed:
> import Control.Arrow ((>>>), (&&&)) > import Data.List (tails, find, intercalate) > > infixl 0 >$> > x >$> f = f x -- backwards function application
First,letswriteafunction,primeSums,whichtakesatargetnumberandfiguresoutifitcanbeexpressedasasum ofconsecutiveprimes.
Follow
80 of 224
http://mathlesstraveled.com/
> -- Find runs of consecutive primes that sum to n. > primeSums :: Int -> [(Int, Int)]
Nextweapplytailswhichgivesusthelistofallsuffixes,or"tails",ofalist.Forexample,tails
[1,2,3] =
primes.Wedontwanttheemptylistattheendsoweuseinitwhichthrowsawaythelastelementofalist.
> >
Wenowhavealistoflistsofprimenumbers,eachliststartingatadifferentplace.Wewanttoapplythesame processingtoeachlist,whichwecandowithmap:
>
>>> map (
Witheachlistofprimeswefirstcomputeallthepartialsumsusingscanl
[1,2,3,4] = [0,1,3,6,10].
>
scanl (+) 0
The0atthebeginningisclearlyuselesssowethrowitawaywithtail.
Follow
81 of 224
http://mathlesstraveled.com/
>
>>> tail
>
Soatthispoint,ifwehadstartedwiththelist[2,3,5,7,11,13,17,19,23]andthetargetnumber28,wewouldhave
[2,5,10,17,28](2=2;5=2+3;10=2+3+5;;28=2+3+5+7+11;andthesumsincluding13and
> >
>
Nowtheelementsofthelistlooklike,forexample,(0,
(5,28))whichmeansthatstartingfromindex0thereisa
>
Finally,wecanthrowawaythesumfromeachelementsinceweknowwhatitis;wekeeponlythestartingindex
Follow
82 of 224
http://mathlesstraveled.com/
andlengthofeachrun.
>
Andthatsit!WecantryitoutbyloadingthisfileinghciandevaluatingprimeSumsappliedtovariousarguments attheprompt:
*Main> primeSums 28 [(0,5)] *Main> primeSums 311 [(4,11),(10,7),(15,5),(25,3)] *Main> primeSums 2011 [(36,11),(120,3)]
> expandRun :: (Int, Int) -> [Int] > expandRun (i,n) = primes >$> drop i >>> take n
Giventhepair(i,n)representingastartingindexiandnumberofprimesn,wesimplytakethelistofprimes, dropthefirstiofthem,andthentakethenextn.
Thatsbetter!Apparently2011=157+163+167+173+179+181+191+193+197+199+211= 661+673+677.Andwhynotaddthemupjusttomakesure?
Follow
83 of 224
http://mathlesstraveled.com/
isSumOfPrimeConsecPrimessimplycomputestheprimeSumsofanumberandthencheckswhetheranyofthesecond
(snd)elementsofthepairsreturnedareprime(remember,thesecondelementsgivethelengthsoftheruns). Letsmakesureitstruefor2011:
Sureenough.Andwhenisthenextone?
*Main> find isSumOfPrimeConsecPrimes [2012..] Just 2015 *Main> primeSums 2015 [(76,5)]
gettospecifyhowmanywayskwerequire.Itkeepsonlyrunswhoselengthisprime,countshowmanysuch runsthereare,andtellsuswhetherthatnumberisnolessthank.
*Main> find (iSoPCPiMW 2) [2012..] Just 2155 *Main> find (iSoPCPiMW 3) [2012..] Just 2303 *Main> find (iSoPCPiMW 4) [2012..] Just 2867
Follow
84 of 224
http://mathlesstraveled.com/
insteadofsearchingthelistofallnumbersbiggerthan2011:
85 of 224
http://mathlesstraveled.com/
Itmaynotbeimmediatelyobviousyoucantturnthisintoacirclejustbyfiddlingaroundwithit,butyoudont havetotakemywordforit:itcanbemathematicallyproventhatyoucant.(Perhapsthatsasubjectforanother post.)Ileaveitasanexercisetofigureouthowpeoplestandingaroundacirclecouldgraboneanothershands inordertoformafigureeightknot.ThegamereallyoughtbecalledHumanUnknot,sinceifyouactuallyform aknotthegameisnofunatall! Knotscanalsohavearbitrarilyhighunknottingnumber ,whichistheminimumnumberoftimestheknotwould needtopassthroughitself(correspondingtobreakingandrejoiningonelinkinthechain)inordertobecome unknotted;soallowingtheparticipantsonebreak/relinkmightnotbeenough. Peopleplaythisgameallthetime,andyetmostofthedescriptionsofthegamegrosslymisunderstandthe possibleoutcomes.Howcanthisbe?Forme,itraisesthefollowingquestion: Ifnpeoplestandaroundacircleandrandomlytakeoneanothershands,whatistheprobabilitythattheyforma knot? Therearealotmorequestionsonecouldask,andIveleftthequestionsortofvagueonpurpose;toreally answeritwouldrequirepinningdownwhatwemeanmuchmoreprecisely.ButfornowIlljustopenitupto discussion!
Posted in games, people, probability | Tagged games, human, icebreaker, knot, team, teambuilding | 9 Comments
Follow
86 of 224
http://mathlesstraveled.com/
Severalmonthsago,MatthewWatkinssentmeareviewcopyofhisnewbook,Secretsof CreationVolumeOne:TheMysteryofthePrimeNumbers.Itstakenmeawhiletoget aroundtoreviewingit,butnotforlackofenthusiasm.Letmecutrighttothechase: Thisisafantasticbook.Afabulousbook.Asplendiferousbook! Itseasyenoughtosaywhatthebookisabout:itexplainssomeextremelyfascinating propertiesofthedistributionofprimenumbers.Butthatdoesnttellyouwhyitsso great;booksaboutprimenumbersareadimeadozen. Firstofall,Watkins(withthehelpoftheillustrations,whichIllgettoshortly)managestoexplaineverything extremelyclearly,beginningfromfirstprinciplesandIreallymeanfirstprinciples;hebeginswiththedefinition ofthenaturalnumbersandgoesfromthere.Theonlythingthatcouldpossiblystandbetweenelementaryschool studentsandanappreciationofthisbookistheirreadingabilityandattentionspan,NOTtheirmathematical abilities.ButandhereisthetrulyastoundingthingI,aPhDstudentwhohasstudiedmathmywholelife, couldnotputthisbookdown.NotonlywasInotbored,Ilearnednewthings!Howisthispossible?Partly,itwas duetothefresh,creative,insightfulwayeverythingisexplained,coupledwithexcellentwriting;partly,itwas duetothesubject,whichstartsconventionallyenoughbutsoonwandersintofascinatingterritoryunfamiliarto manymathematicians(includingthisone).Abooklikethis,accessibletoyoungchildrenandengagingtoadults, isarareandwonderfulaccomplishmentindeed!
Follow
87 of 224
http://mathlesstraveled.com/
ImvolunteeringagainthisyearwiththemiddleschoolmathclubatPennAlexander.Imgoingtotrytobe betterthisyearaboutpostingwhatwedoeachweek,forposterityssakeandincaseitinspiresanyoneelse!
88 of 224
http://mathlesstraveled.com/
subsets,andwithabitofpromptingfrommefiguredoutageneralalgorithmforfindingorderingsforevenmore tiles!
Theinspirationforthisactivitycamefromthiswebsite,whereyoucanfindabunchmoreinformationand resources.
Posted in counting, pattern | Tagged code, counting, Gray, Penn Alexander, subsets | 1 Comment
Back in business
Posted on October 24, 2010
MathJokes4MathyFolks
Afewmonthsago,PatrickVennebushwaskindenoughtosendmeareviewcopyofhisnewbook, MathJokes4MathyFolks.Itsatreasure-troveofmath-relatedjokeswithahugerangeof material,fromwordplaytolightbulbjokestovisualgagstolongerstories,fromelementaryto graduatelevelmathematics,fromcornytosubtle.Trulytheressomethinghereforeveryone!Here areacoupleofmyfavorites: Astatisticsstudentacceleratedbeforecrossingeveryintersection.Hispassengerfinallyasked,Whydo yougosofastthroughintersections?Thestudentreplied,Statisticallyspeaking,yourefarmorelikely tohaveanaccidentatanintersection,soItrytospendlesstimethere. Whenthelogicianssonrefusedtoeathisvegetables,thefatherthreatenedhim,Ifyoudonteatyour veggies,youwontgetanyicecream!Theson,frightenedattheprospectofnothavinghisfavorite dessert,quicklyfinishedhisvegetables.Afterdinner,impressedthathissonhadeatenallhisvegetables, thefathersenthissontobedwithoutanyicecream. Patrickhasalsostartedablogasanextensionofthebook,whichcontainsjokessubmittedbyreaders,new jokesdiscoveredbytheauthor,detailsaboutspeakingappearancesandworkshops,andotherrandombitsof informationthatmightbeinterestingtothestrangefolkswholikemathjokes.Thatwouldbeme!
Follow
89 of 224
http://mathlesstraveled.com/
EasyasPi:TheCountlessWaysWeUseNumbersEveryDay
IalsorecentlyreceivedareviewcopyofEasyasPi:TheCountlessWaysWeUseNumbersEveryDay,byJamie Buchan.Itsabitlightontechnicaldetailsformytastes;butthenagainIhaveprettyweirdtastes.Puttingaside mypersonalloveofrigor,itsfulloffunandinterestingtidbitsaboutthehistory,sociology,andmathbehindthe numbersthatshowupallovertheplaceinourculture.Thisisagreatbooktokeepnexttoyourtoilet(andI meanthatinthebestpossibleway!)tointrigueyournon-mathematicalguests.
Posted in books, humor, links, review | Tagged humor, jokes, numbers, pi
Aspromised(betterlatethannever),Imgoingtobeginexplainingthe(in)famousPvsNPquestion(seethe previouspostforabitmorecontext).Asastart,heresasuper-concise,30,000-footversionofthequestion: Arethereproblemswhosesolutionscanbeefficientlyverified,butwhichcannotbeefficientlysolved? Ofcourse,thisissovagueastobealmostmeaningless!Myjoboverthenextfewpostswillbetoun-vagueifyit foryou.Lookingatthestatement,threequestionsmayimmediatelycometomind,andwellconsidereachin turn: Whatcountsasaproblem? Whatdowemeanbyefficient? Whatdowemeanbyverify? Todaywellstartbyconsideringthefirstquestion:whatcountsasaproblem? ThePvsNPquestionisusuallystatedintermsofdecisionproblems,whichareproblemswithayes/noanswer. Forexample,IsthereawaytodrivefromheretoKalamazoowithoutdrivingonamajorhighway?Eitherthereisa waytodoit,orthereisnt,andwemighthopethatacomputer(givenanappropriatemapasinput)wouldbe abletotelluswhich.
90 of 224
http://mathlesstraveled.com/
interestingandimportantproblemslikethis.Sowhyrestrictourselvestojustdecisionproblems? Itseasytoseethatdecisionproblemsarethesimplestpossiblekindofproblem.Theanswercarriesjustasingle bitofinformation.(Theonlythingthatcouldpossiblybesimplerthanaproblemwithayes/noanswerisa problemwithano/noanswer,whichcarrieszeroinformation.Forexample,Doesthisdressmakemelook fat?Butthesearentthesortsofproblemsweareusuallyinterestedinsolvingwithacomputer.)Thereisalong scientifictraditionofstudyingthesimplestpossiblekindofsomething,inordertogaininsightintomore complicatedthingsaswell.Thatswhatweredoinghere. Butcanstudyingdecisionproblemsreallygiveusinsightintoproblemswithmorecomplicatedanswersaswell? Actually,yes!ToseeanexampleofwhatImean,consideragainourquestionHowlongdoesittaketogetto Kalamazooifyougobythefastestpossibleroute?Thisisaproblemwithacomplicatedanswer(youmightthink thatasinglenumberisnotverycomplicated,butyouhavetoadmitthatitiswaymorecomplicatedthana simpleyes/no!).Butnowconsiderthisrelatedquestion:IsitpossibletogettoKalamazooin minutesorfewer? Actually,thisisawholefamilyofquestionsparameterizedbythetime .Foranyparticular ,thisisclearlya decisionproblemwithayesornoanswer.Butifwehadacomputerprogramwhichcouldefficientlysolvethis problemforany ,wecoulduseittosolvetheoriginalproblemtoanydesiredaccuracy.Forexample,wemight askthefollowingseriesquestions,withtheanswertoeachquestionshowninbold: IsitpossibletogettoKalamazooin1000minutesorfewer?YES IsitpossibletogettoKalamazooin500minutesorfewer?NO IsitpossibletogettoKalamazooin750minutesorfewer?YES IsitpossibletogettoKalamazooin625minutesorfewer?NO andsoon Afteronlyafewmorequestions,wewouldlearnthatifwegobythefastestpossiblerouteandgoexactlythe speedlimitthewholetimeandneverstopforfoodorgasortousearestroom,itwouldtakeexactly665 minutestogettoKalamazoo. Thatsallverywell,youmightsay,Icanseehowthatworksforproblemswithnumericalanswers.Butwhat aboutanswersthataremorecomplicatedyet?Forexample,whatifwewantedtoknownotonlythetimeit takestogettoKalamazoobythefastestroute,butalsotherouteitself?Thisiscertainlynotjustanumber,itis alistofturns,oralistofstreetnames,orsomethingcomplicatedlikethat.Surelywecantreducethistojust somedecisionproblem? Well,nomatterhowcomplicatedtheanswertoaproblem,itisalwayspossibletoencodetheanswerinbinary, asasequenceofonesandzeros.Forexample,toencodeaseriesofturnswemightagreetoencodealeftturnas 01,arightturnas10,goingstraightas11,anduse00toindicatetheendofthedirections.So011110101100 wouldmeanTurnleft,thengostraight,thenturnrighttwice,gostraightagain,andyourethere.Inorderto encodestreetnameswewouldneedamuchmorecomplexencodingbutitcanbedoneeasilyenough.For examplewemightencodetheletterAas00000,Bas00001,Cas00010,andsoon. OK,sowhat?Heresthepunchline:givenaproblemPwithsomecomplicatedanswerandasuitablewayto encodetheanswertoPinbinary,wecanmakethefollowingdecisionproblem:
Follow
91 of 224
http://mathlesstraveled.com/
Isthe thbinarydigitinthebinaryencodingoftheanswertoPaone? Ihopeyoucanseehowwecoulduseacomputerprogramcapableofsolvingthisproblemforany tosolvethe originalproblem:justaskaboutthebinarydigit(orbit)ateachposition,andbuilduptheanswertoPonebitat atime. Perhapsyouthinkthisisbitcontrived.Butitshowsthatinsomesense,theresnothingfundamentallyinteresting goingonwithproblemsthathavecomplicatedanswers;wecanalwaysreducethemtodecisionproblems.Sofor thesereasons(andperhapsafewothers),thePvsNPquestionisphrasedintermsofdecisionproblemsonly. WecannowrestatethePvsNPquestionabitmoreprecisely: Aretheredecisionproblemswhosesolutionscanbeefficientlyverified,butwhichcannotbeefficientlysolved? Inmynextpost,Illexplainwhatwemeanbythathand-wavywordefficiently.
Posted in computation, open problems | Tagged binary, decision, Kalamazoo, P vs NP, problem | 9 Comments
P NP?
Posted on August 10, 2010
Afewdaysago,VinayDeolalikar,aPrincipalResearchScientistatHPLabs,begancirculatingadraftofapaper entitledPNP.Themathematicsandcomputersciencecommunitiesimmediatelyeruptedinafrenzyof excitementandactivity. Themilliondollarquestion:whytheexcitement?Well,thatsexactlyit:itisamillion-dollarquestion.ThePvs NPproblemisoneofthesevenMilleniumPrizeProblemsestablishedin2000bytheClayMathematicsInstitute; eachproblemcarrieswithitaprizeof$1,000,000.OneoftheseventhePoincarConjecturehasalready beensolved,bytheRussianmathematicianGrigoriPerelman(whofamouslyrefusedtoacceptbothaFields Medalandthe$1million).Anditsnotevenreallyaboutthe$1millionprize;thePvsNPproblemiswidely agreedtobethemostsignificant(anddifficult)openquestionintheoreticalcomputerscience,soforsomeone tosolveitwouldbeaReallyBigDeal. So,didDeolalikarreallysolveit?Willhewinthe$1million?Wellitswaytooearlytotell!Hereareafew thingstokeepinmind: SincePvsNPissuchafamousproblem,therearetonsofattemptsatsolvingitpublishedallthetime.Most arebypeoplewhoeitherhaveanoverinflatedestimateoftheirmathematicalunderstanding,orbelievethe solutionwastoldtotheminadreambybenevolentaliens,orboth.Hencetheyarentevenreallyworth seriousmathematicianstimetoread.Sadbuttrue.Butthisisclearlynotthecasehere:Deolalikarisa respectedresearcherwhohasdonerelatedworkinthepast,andhis100-pagepaperiswell-writtenand demonstratesagoodunderstandingoftherelevantissues(youdonthavetotakemywordforit).Evenifthe proofendsuphavingsomesortoffatalflaw,itsclearthathehassomeinterestingnewideasthatmaylead tootherdiscoveries.Hencetheexcitement. Unfortunately,therehavealreadybeensomepossibleflawspointedout.Butkeepinmindthatanypaperof thismagnitudeisboundtocontaintonsoferrors,omissions,andtypos(ifyoudontbelieveme,trywriting
Follow
92 of 224
http://mathlesstraveled.com/
onesometime!).Onlytimewilltellwhethertheseflawsturnouttobefatalproblemsthatinvalidate Deolalikarsentireapproach,mistakesthatcanbefixedrelativelyeasily,orjustmisunderstandingsonthe partofthepeoplewhopointedthemout. SupposingtheflawsarefixableandDeolalikarsproofendsupbeingacceptedbythemathematical community,itwillstillbequiteafewyearsbeforehecouldpossiblywinthe$1million.First,theproof needstobepublishedinamajormathematicaljournal(whichwillprobablytakeatleastayear),thenthere isamandatorytwo-yearwaitingperiod,andthenaspecialcommitteehastoexaminetheproofanddecide whethertoawardtheprize!Sodontholdyourbreath. Atthispoint,youmayalsobewonderingwhattheheckthePvsNPproblemactuallyis,andwhyitisso important.Fortunately,itstheoneMilleniumPrizeproblemthatIamactuallyqualifiedtoexplain,andinthe followingpostortwoIintendtodojustthat!(UnfortunatelyIamemphaticallynotqualifiedtoexplainanything aboutDeolalikarsattemptedproof.)Ivebeenintendingforquiteawhiletowriteaboutsomeinterestingtopics intheintersectionofmathematicsandcomputerscience(mydayjob,afterall,isasacomputerscientist!)and thiswillprovidetheperfectexcuse.
Posted in computation, links, open problems, people, proof | Tagged Deolalikar, Millenium, P vs NP, prize | 7 Comments
More cookies
Posted on July 27, 2010
IrecentlyreceivedthefollowinginterestingproblemfromShadowcat,whichisageneralizationofthecookie problemIvewrittenaboutpreviously.Weagainwanttocountthewaystodistributeidenticalcookiesto non-identicalstudents,withthetwistthatweimposeanupperboundonthenumberofcookiesreceivedbyeach student(quitereasonableifwewanttobemindfulofthestudentsnutrition): Imaginethatinsteadoftencookiesandfivestudents,youhavefiftycookiesandtenstudents.(Itseasier toquantifythissituationusinglargernumbers.)Howmanywayscanyoudistributethesecookies amongthestudentssothatnostudenthasanymorethantencookies? Studentsmaybegivenanynumberofcookieslessthanorequaltoten,includingzero.Thecookiesare identical,justasintheoriginalproblem,so,aswiththeoriginalproblem,itdoesntmatterwhich cookiethestudentgets,justhowmany.Butthestudents,again,are*not*identical,sowhichstudent getsaspecificnumberofcookiesisimportant. Iunfortunatelyhaventhadmuchtimetothinkaboutityet.Feelfreetoleavecomments,thoughts,partial solutions,andsolutionsinthecomments!
Posted in arithmetic, challenges, counting | Tagged cookies, counting, students | 9 Comments
Follow
93 of 224
http://mathlesstraveled.com/
Optimal change-carrying
Posted on June 24, 2010
RecentlyMichaelleftthefollowingchallengeinacomment: Ivebeentryingtooptimizemychange-carryinghabits.Whatisthesmallestamountofquarters,dimes, nickelsandpenniesonecancarrywhilestillbeingabletogiveperfectchange(twodecimals)? Itsnot100%clearwhatMichaelmeantbygiveperfectchange,butletsassumethegoalistobeabletomake anyamountbetween1and99cents.Fornon-USreaders,UScoinsareworth1,5,10,and25cents. Somequestionsforexploration: 1. Whatsthesmallestnumberofcoinsyoucancomeupwiththatworks?Whatarethey? 2. Aretheremultiplesolutions,oristhesolutionunique? 3. Howcanyouprovethataproposedsolutionisoptimal?Unique? 4. Canyouanswerthequestionforadifferentsystemofcoins?Forexample,Iamcurrentlyspendingthe summerinCambridge,England,wherecoinsareworth1,2,5,10,20,and50pence.Whatifyoualsoinclude the1-and2-pound(100and200pence)coins,andwanttobeabletomakechangeforeveryamountupto5 pounds(thesmallestnote)? 5. TheUSandUKcoinsystemsbothhavethepropertythatagreedystrategyworksforgivingthesmallest amountofchange.Thatis,tomakeacertainamountofchangewiththesmallestpossiblenumberofcoins, youcanjustkeeppickingthebiggestcoinlessthanorequaltotheremainingamount.Whataboutcoin systemswithoutthisproperty?Dotheymakethisproblemharder?Easier? 6. Ifyougottodesignyourownsystemofcoinswithwhateverdenominationsyouwanted,howwouldyou
Follow
94 of 224
http://mathlesstraveled.com/
Manufactoria
Posted on May 25, 2010
Posted in games, links, logic, programming, puzzles | Tagged game, robot, test | 17 Comments
Firstofall,letmesaytoallmyreadershowfantasticitfelttopostapuzzle,afternotpostinganythingfortwo months,andgeteighteenthoughtful,insightfulcommentsinjustthreedays;itseverybloggersdream.Youall arefantasticandmakethisalotoffunthanksforreading! IthoughtIdtakeapostjusttosummarizesomeoftheresponsesandsolutionstothebrokenweightproblem. Asmanycommentersrealized,thesolutionisthattheweightsareofsizes1,3,9,and27.Hmm,powersof threecoincidence?Ofcoursenot! Asseveralcommentersnoted,somethinginvolvingbasethreereadilypresentsitselfifwerealizethatthereare threepossibilitiesforeachweight:itcanbeontheleftofthebalancescale,ontheright,ornotonthescaleat all.Sinceonesideofthescalecorrespondstoaddingtheweightandtheothersidetosubtracting,weare essentiallywritingnumbersinbasethree,butusingthedigits-1,0,and1insteadoftheusual0,1,2.For example,25canbewrittenas10(-1)1,thatis, (ifwewerereallygoingtousethissystem wedwanttocomeupwithabettersymbolfor-1).Infact,thisisknownasbalancedternary,anditisafact(as provedbyafewcommenters)thatndigitsofbalancedternaryallowustouniquelyrepresenteveryinteger
Follow
95 of 224
http://mathlesstraveled.com/
between
.Withfourdigits(asintheproblem)wecanuniquelyrepresenteveryintegerbetween-40and40.
JMnotedthatthisgeneralizesto
HeresafantasticproblemIrecentlyheard.ApparentlyitwasfirstposedbyClaudeGaspardBachetdeMziriac inabookofarithmeticproblemspublishedin1612,andcanalsobefoundinHeinrichDorries100Great ProblemsofElementaryMathematics. Amerchanthadafortypoundmeasuringweightthatbrokeintofourpiecesastheresultofafall.When thepiecesweresubsequentlyweighed,itwasfoundthattheweightofeachpiecewasawholenumberof poundsandthatthefourpiecescouldbeusedtoweigheveryintegralweightbetween1and40pounds. Whatweretheweightsofthepieces? Notethatsincethiswasa17th-centurymerchant,heofcourseusedabalancescaletoweighthings.So,for example,hecouldusea1-poundweightanda4-poundweighttoweigha3-poundobject,byplacingthe 3-poundobjectand1-poundweightononesideofthescale,andthe4-poundweightontheotherside. Thesolutiontothispuzzleisreallyfascinatingandleadsintoallsortsoffungeneralizationsandothertopics;Ill writemorelater.Fornow,asalways,feelfreetoleavequestions,observations,andsolutionsinthecomments (sodontlookatthecommentsbeforeyouvesolveditifyoudontwanttoseetheanswer!).
Follow
96 of 224
http://mathlesstraveled.com/
Posted in arithmetic, challenges, number theory, puzzles | Tagged puzzle, weights | 22 Comments
TodayinmathclubIhadthestudentsexploremapcoloring.Itriedtoleaveitasopen-endedaspossibleto startIjustsaidthatweweregoingtodrawmapswithcountries,andtrytogiveeachcountryacolor,sothat notwoadjacentcountrieshavethesamecolor.Iwascarefulnottospecifywhatacountryis,orwhatitmeans fortwocountriestobenexttoeachother! Prettymuchontheirown,theyfiguredouthowtodrawamapwithfourcountriesalltouchingeachother, whichthereforerequiredfourcolors.WhenIchallengedthemtodrawamapwithfivecountriesalltouching eachother,theycameupwithmapsinvolvingcountriestouchingatacorner,andwithsatellitedisconnected regionsthathadtobegiventhesamecolorasthemothercountry.Theyalsofiguredoutthatifweallowthese things,wecandrawmapsrequiringanarbitrarynumberofcolors,andconjecturedthatwithoutthesethingswe canthavefivecountriesalltouchingeachother.Ithentoldthemaboutthefour-colortheoremandwehadfun tryingtofour-coloramapofNorthAmerica(includingtheUSstates). ThenIshowedthemhowtointerpretmapsasgraphs,whymapscorrespondtoplanargraphs,andhowtoturn themap-coloringquestionintoagraph-coloringquestion.Ishowedthemthecompletegraphon5verticesand howitwouldcorrespondtohavingfivecountriesalltouchingeachother.ThenforfunIposedthethreeutilities problem,whichafterplayingwithforawhile,theycorrectlyguessedcouldnotbesolvedwithinthegiven constraints.Onestudentdidcomeupwithaningenioussolutioninvolvingapairofteleporters,which (althoughIdidntpointthisouttothematthetime)correspondstothefactthat of canbeembeddedona torus!Ithenshowedthemhowtointerpretthisalsoasastatementaboutgraphs(specifically,thenon-planarity ),andthentoldthemKuratowskisTheorem(whichIstillfindratheramazingandmagical).
97 of 224
http://mathlesstraveled.com/
Andnowforthepunchline!Todaywellshowthat,forlargeenoughvaluesof ,
istoo.Rememberthat
isalsopositivewhen
.Fromherewesimply
notethatifafunctionispositiveoveranentireinterval,theintegralofthefunctionoverthatintervalwillbe
Whyisthis?Well,clearly that
(since
),andalso
)andhence
,soweconclude
Thisdoesntyetincludethe
,butnoticethatmultiplyingby
canonlymakethingssmaller,since
is
assmallaswewantbymaking big
Now, thedenominatorof mightbeverylarge.Itmighthavefourteenmillionzilliondigits.Butnomatter howbig is,therewillofcoursebeaninteger whichisbiggerthan ,so reallylongtimetocancelouttheenormousproduct .Andthen ,and , andsoonofcourse,multiplyingbysomethinglessthanonemakesthingssmaller.Anditmighttakeareally ,butifwejustwaitpatientlyitwillgetsmaller andsmallerandeventuallytherewillcomesome forwhich
Follow
98 of 224
http://mathlesstraveled.com/
box,thenitsintegralonthisintervalmustbelessthantheareaofthebox).
andshowedthat
and
arebothintegers,
and
);thelast
:itsjustsothatwehaveaconvenient
.Wecouldjustdoeverythingdirectlyintermsofalternatingsums
Nowthatweknowtheantiderivativeof thefollowingintegral:
,wecanusetheFundamentalTheoremofCalculustocompute
Notethatthevalueofthisintegralisaninteger,sinceboth
and
areintegers.Butnexttimewellshow
thatitisalsostrictlybetween0and1(forasuitablechoiceof ),whichisclearlynonsense!
Posted in famous numbers, proof | Tagged Fundamental Theorem of Calculus, integral, irrational, Ivan Niven, pi, proof | 4 Comments
Dimensions
Posted on February 3, 2010
Iveonlywatchedthetrailersofar,butthislooksextremelycool!Somebeautiful,fascinatingvideosaboutmath, withlotsofextraaccompanyingmaterialandexplanationsonthewebsite.
Follow
99 of 224
http://mathlesstraveled.com/
HattiptoPhilWadler.
Posted in links, video
Divisor nim
Posted on February 3, 2010
YesterdayinmathclubIhadthestudentsplayagamewhichIdimlyrememberseeingsomewherebutforget where.SinceIdontknowwhatitisreallycalled,Imcallingitdivisornim.Hereshowitworks:
Follow
100 of 224
http://mathlesstraveled.com/
1. Theplayerspickapositiveinteger. 2. Thetwoplayersworktogethertowritedownallthedivisorsofthechoseninteger(beingsuretoinclude1 andtheintegeritself). 3. Theplayersnowalternatemovesasfollows:onaplayersturn,shemustchooseoneofthedivisors ,and thencrossoutthatdivisoraswellasalloftheotherlistednumberswhicharedivisibleby . 4. Onsubsequentturns,playersmayonlychoosenumberswhicharenotyetcrossedout. 5. Whoeverisforcedtochoose1(becauseitistheonlynumberleft)istheloser! Forexample,supposethechosennumberis12.Wewritedownthedivisorsof12: 1,2,3,4,6,12. Nowsupposethefirstplayerchooses4(actually,thisisabadmove;Illletyoufigureoutwhy);theythencross out4and12,since12isdivisibleby4.Thegamenowlookslike 1,2,3,4,6,12. Nowitstheotherplayersturn;supposetheypick3(thisisactuallyabadmovetoo!),sotheycrossout3and 6.Nowthegamelookslike 1,2,3,4,6,12. Thefirstplayernowcrossesout2,andthesecondplayerisforcedtochoose1,sothefirstplayerwins. Thekidsthoughtthiswasalotoffunanditleadstoallkindsofinterestingdiscussions.First,ofcourse,you havetofigureouthowtowritedownallthedivisorsofthestartingnumber(howdoyouknowwhenyouve listedthemall?whataresomesystematicstrategiesforlistingthedivisors?).Thenyoucantalkaboutstrategies forplayingthegame.Imighttalkaboutsomeofthesethingsinsomefutureposts.FornowIwilljustnotethat thisactuallyhassomedeepconnectionstothetheoryofposets(wearebasicallyjustusingeachintegerasan abbreviationforitsposetofdivisors).AlthoughIveplayedaroundwithitabitIdontyetknowofageneral strategyalthoughanyparticularstartingintegernecessarilygivesawinningstrategyforONEofthetwo players,anditsnottoohardtofigureitoutbyworkingbackwards.Moreonthislater,Isuppose. Inthemeantime,havefunplaying!
Posted in games, number theory, pattern | Tagged divisor, game, lattice | 2 Comments
Battlestations!
Posted on February 1, 2010
TheworldsLARGESTFRACTALDORITO!
Posted in fractals, humor, links, video | Tagged Blownapart Studios, dorito, fractal | 2 Comments
Follow
101 of 224
http://mathlesstraveled.com/
(really,afamilyoffunctions,oneforeachvalueof )where and arethenumeratoranddenominatorof . Wethenshowedthat showedthatallthederivativesof ,andinfactthat issymmetric,with intermsof .Inmythirdpost,we ,andshowsomeofits takeoninteger valueswhenevaluatedatboth0and .Wereabout
halfwaythere!Todaywellcontinuebydefininganewfunction
Inwords, as
isthealternatingsumofalltheevenderivativesof
.(Isayallbecause,asnotedinmylast
post,anyderivativeof
higherthan iszero.)UsingSigmanotation,wecanalsowritethismoreconcisely
:sinceallthederivativesof , mustbeanintegertoo.
Sincethederivativeofasumisthesumofthederivatives,wecancompute
as
Thatis,
turnsinto attheendof
turnsinto
turninto
zero,sothattermjustgoesaway.Nowwenotethateverytermof
102 of 224
http://mathlesstraveled.com/
oppositesign,except except :
,whichhasnocorrespondingterm.Sowhenweadd
and
,everythingcancels
Astutereaderswillnoteafunnyresemblancebetweenthedefinitionof
andtheTaylorseriesfor and .
and
indeed,nexttimewellstartmakingsomeconnectionswithouroldtrigonometricfriends,
Posted in famous numbers, proof | Tagged derivatives, irrationality, Ivan Niven, pi, proof | 10 Comments
Perfect age
Posted on January 10, 2010
Book review: Riot at the Calc Exam and Other Mathematically Bent Stories
Posted on January 8, 2010
YouveheardthestoryofRumpledStiltsken,right?Youknow,theonewherethe topologistsdaughterislockedinthegradstudentloungeandforcedtoturncoffee intotheoremsbymorning?whatsthat,yousayyouhaventheardthatone?Funny, Ithoughteveryoneknewthatstory.Well,itsafascinatingandsoberingtalefullof insightintolifeandthenatureofoops,wait,thoseweremynotesforTheKite Runner .RumpedStiltskeniswell,justreadit,OK? ColinAdamsentertainsuswiththisandmanyotherhumorouslymathematical (mathematicallyhumorous?)storiesinhisnewbook,RiotattheCalcExamandOther MathematicallyBentStories.TipsonhowtoavoidRERI(RepetitiveEyeRollInjury), advicefromamathematicalethicist,storiesabouteveryonesfavoritePrincipalInvestigator,DirkMangum,P.I.,a transcriptfromthehitradioshowMathTalkwithPlugandChugthelistgoeson.Somearefunnierthan others,ofcourse(bytheend,theconceitofanthromorphizing/metaphorizingmathematicaltheoremsandthe processorprovingthemhadgottenparticularlyold),butonbalancemyFunny-o-Meterwasdefinitelypointing somwherebetweenamusingandhilarious.Thisbookwouldmakeagreatgiftforthatspecialpersoninyour lifewholikestoreadfunnystoriesaboutmathwhiletheyareinthebathroom,orforanyonewholikesreading funnystoriesaboutmathingeneral,oranyonewholikesfunnystories,orwholikesmath.Thisbookwouldnot makeagoodgiftforgrumpypeoplewhohatemath.DontsayIdidntwarnyou. Fulldisclosure:theAMSkindlysentmeafreereviewcopyofthisbook.Also,ColinAdamswasactuallyoneof myprofessorsincollege,whichyoumightthinkwouldmakemesomewhatbiased,whichisprobablytrue,butit alsomeansthatIhappentoknowthathereallyisquitefunny,andalsothatheistheFastestDraw(erof3D surfaceswithcoloredchalk)intheWest(ernMassachusetts).Alsoalso,thismorningforbreakfastIateabowlof Follow
103 of 224
http://mathlesstraveled.com/
shreddedwheatcereal.
Posted in books, humor, review | Tagged humor, short stories
MangaHigh.com
Posted on December 28, 2009
IrecentlyreceivedanemailsuggestingthatIcheckoutthewebsiteMangaHigh.com,whichhasinteractive math-basedgamesforelementarythroughhighschoolstudents.Now,Iamgenerallyprettyskepticalofsuch things.Forone,theyareusuallyofrelativelypoorquality.Ifyoureallywantstudentstobeinterestedina computergame,youhavetocompetewithgamecompanieswhichpourmillionsofdollarsintodetail,graphics, andgameplayandkidscantellthedifference!Foranotherthing,tryingtomakemathinterestingand relevantbyspicingitupwithinteractivegamescanbackfire:whywouldyouneedtodothatunlessitis actuallyboringandirrelevant?Itisliketryingtogetyourchildrentoeatasparagusbyhidingitinsidetheir hamburgers.Kidsarenotfooledbythis.(Infact,asparagusisoneofthemostdeliciousvegetablesIknow,but onlyifitisfreshandcookedright;ifnotfreshorovercooked,itisdisgusting.Iwillletyoumaketheappropriate metaphoricalinferences.) Nevertheless,Iwasintrigued,especiallysincemycorrespondentclaimedthatthiswebsitewasendorsedbythe eminentmathematicianandeducatorMarcusduSautoy.SoIvisitedthesiteandtriedplayingafewgames andwaspleasantlysurprised!Thegamesarefairlyhigh-qualityandhumorous(Iactuallyspenttwentyminutes orsoplayingthefirstgameItried,eventhoughitwasrathereasyforme),andthesitepromisestotrackpoints andaccomplishmentsforstudentswhoregister(adefiniterequirementifyouwanttogetstudentshookedon thegames). Ontheflipside,thecommercialstatusofthesiteisntcompletelyclearyoucanplayallthegamesforfreebut itclaimsthisisforalimitedtime,soImnotsurewhathappensafterthelimitedtimeisup.Thesitealso appearstohaveverylittletodowithManga,sothetitleisabitodd.Buttheseareminorconsiderationsatthe moment. Imstillnotsoldontheideaofinteractivegamesforteachingmathbutifyourelookingforsuchthings, MangaHigh.comseemslikeoneofthebestsitescurrentlyoutthere.
Posted in games, links, teaching | Tagged education, games, interactive | 1 Comment
Inmypreviouspostinthisseries,wedefinedthefunction
andshowedthat and
arenotnecessarilyzero,theyarealwaysintegers.(Thenotation
104 of 224
http://mathlesstraveled.com/
succinctly:everyderivativeof takesonintegervaluesat
and
Itseasytoseethat goingon!
.Butletstakethederivative:
so
,whichisclearlynotaninteger. )theremustbesomefancycanceling
Forthederivativesof toalwaysgiveanintegerat
(letaloneat
(wellcomebackto
isjusttheconstanttermof
isalwaysaninteger. ,thatis,
Considerthenumeratorof
Notethat
,whenexpandedout,isapolynomialoftheform
,wheretheellipsiscontains .(Infact,wecouldusethe
BinomialTheoremtocomputetheprecisecoefficientsbutitreallydoesntmatter;allwewillcareaboutisthat
so
termofzero);thesecondderivativehastermsofdegree
willhaveaconstantterm,so
.Whataboutthe thderivativeandhigher?Thisiswherethefancycancelingcomes
isasumofabunchoftermsoftheform
where
;ifwe
takethederivativeagain,itwillbecome times,wewillendupwiththeconstantterm
,andsoon.Doyouseewhatishappening?Aftertakingthederivativeexactly
Follow
105 of 224
http://mathlesstraveled.com/
andheresourfancycanceling:
integer.Voila!Saidadifferentway,andmoresuccinctly:sinceeachtermof
wehavetakenthederivativeenoughtimesforittoyieldaconstantterm,the willbecanceledfromthe denominator,sincewewillhavetakenthederivativeatleastateachpowerof from downto . Finally,ifwetakethederivativeof morethan times,weget ,sonoproblemsthere. Great,so isalwaysaninteger.Butwhatabout ?Well,remember,lasttimeweshowedthat ),weget
(thetwonegativescancelontheleftside),
,andsoon.Buttheextranegativesignforoddderivativesdoesntreallymatter:ineither
intermsof
anditsderivatives;this
which(ifyourecallthepunchline)willturnouttobean
Posted in calculus, famous numbers, proof | Tagged derivatives, irrationality, Ivan Niven, pi, proof | 10 Comments
MathTeachersatPlay#21isupatMathMamaWrites,anditincludesthiscutepuzzle,whichSueapparently madeupherself: TheNumberlandNewsrunspersonalads.21waslookingforanewfriendandputanadin. Two-digit,semi-prime,triangular,Fibonaccinumberseekssame.Imabinarypalindrome,what aboutyou? Will21findafriend? Asemi-primeisanumberwithexactlytwoprimefactors,like6.Seethispostforadefinitionoftriangular number ,thispostforsomehintsonhowtofigureoutageneralformulaforcomputingtriangularnumbers,and thisoneforthesolution.Fibonaccinumbersarediscussedhere.Finally,apalindromeisanumber(orword,or phrase)whichisthesameforwardsandbackwards;abinarypalindromeisanumberwhichisapalindromewhen expressedinbasetwo.
Posted in fibonacci, links, number theory, puzzles | Tagged binary, fibonacci, MTaP, palindrome, puzzle, semi-prime, triangular | 13 Comments
Follow
106 of 224
http://mathlesstraveled.com/
The haybaler
Posted on December 16, 2009
AtPennAlexandersmathclubyesterday,thestudentsworkedonafunpuzzlethatIdneverseenbefore.Itgoes likethis: Youhavefivebalesofhay. Forsomereason,insteadofbeingweighedindividually,theywereweighedinallpossiblecombinations oftwo.Theweightsofeachofthesecombinationswerewrittendownandarrangedinnumericalorder, withoutkeepingtrackofwhichweightmatchedwhichpairofbales.Theweights,inkilograms,were80, 82,83,84,85,86,87,88,90,and91. Howmuchdoeseachbaleweigh?Isthereasolution?Aretheremultiplepossiblesolutions? Unfortunately,theproblemseemedalittlebeyondthem(oratleast,theythoughtitwasbeyondthem,sothey quicklylostinterest)butthisseemslikeagreatproblemtouseinmiddleschoolorhighschoolmathclasses.In middleschool,keepthemtalkingandfocusonthemethodstheyemploytotrytosolveit.Inhighschool, perhapsoncetheysolveityoucouldgetthemtotrygeneralizingtheproblem(toothersetsofweights,more thanfivebales,etc.).
Posted in arithmetic, challenges, logic, puzzles, teaching | Tagged bales, hay, weights | 11 Comments
Follow
107 of 224
http://mathlesstraveled.com/
(Incaseyouveforgotten, ,pronouncednfactorial,istheproductofallthenumbersfrom1to .)OK butwhatis ?Ihearyouask.Goodquestion.Theshortansweris,itdoesntmatter: canbeanypositive integer.Wewillshowabunchofthingsthataretrueabout nomatterwhat is.Later,wewillseethatwegeta contradictiononlyforvaluesof whicharebigenough.ButthatsOK;sinceeverythingweproveuptothat pointwillbetruenomatterwhat is,wecanpickavalueof whichisasbigaswelike. Letsexploresomepropertiesof aswell(rememberingthat .First,itseasytoseethat ,ofcourse,whichmeansthat .Itsnottoohardtoseethat ):
So
haszerosat
and .Thatis,
.Butmoreistrue:infact,
issymmetric (amirrorreflectionofitself)
aroundtheline
Letsprovethis:
Irrationality of pi
Posted on December 7, 2009
Everyoneknowsthat theratioofanycirclesdiametertoitscircumferenceisirrational,thatis,cannotbe writtenasafraction .Thisalsomeansthat sdecimalexpansiongoesonforeverandneverrepeatsbut haveyoueverseenaproofofthisfact,ordidyoujusttakeitonfaith? Theirrationalityof wasfirstproved(accordingtomodernstandardsofrigor)in1768byLambert,buthisproof wasrathercomplicated.Amoreelementaryproof,usingonlybasiccalculus,wasgivenin1947byIvanNiven. Youcanreadhisoriginalpaperhere,butitsratherterse!JustasIdidforCalkinandWilfspaper,Recountingthe Rationals,IplantowriteaseriesofpostsexplainingNivensproofinabitmoredetail,withsomeaccompanying intuition.Illassumeabasicknowledgeofcalculus;ifyoudontknowcalculus,justhangtightforafewposts! Heresthebasicoutlineoftheproof.Webeginbysupposingthat isrational:inparticular,suppose someintegers and .Wellthenusethesevaluesof and todefineaspecialfunction for
Follow
,aboutwhichwewill
108 of 224
http://mathlesstraveled.com/
Inmynextpost,welldefinethespecialfunction
Posted in calculus, famous numbers, proof | Tagged irrational, Ivan Niven, pi, proof | 14 Comments
ThenextCarnivalofMathematicsgoesupthisFridayat idiotsbloggetyoursubmissionsin!
Posted in links, people | Tagged Carnival of Mathematics
Who Am I?
Posted on November 29, 2009
AnexcellentpuzzlefromJD2718: Therearefivetrueandfivefalsestatementsaboutthesecretnumber.Eachpairofstatementscontains onetrueandonefalsestatement.Findthetrues,findthefalses,andfindthenumber. 1a.Ihave2digits 1b.Iameven 2a.Icontaina7 2b.Iamprime 3a.Iamtheproductoftwoconsecutiveoddintegers 3b.Iamonemorethanaperfectsquare 4a.Iamdivisibleby11 4b.Iamonemorethanaperfectcube 5a.Iamaperfectsquare 5b.Ihave3digits Pleasedontpostthesolutioninacomment,soasnottospoilitforothers.Butfeelfreetoleaveacommentif youneedahint,ortoemailmeifyouthinkyouhavesolveditandwanttocheckifyouarecorrect.(Actually,its easytocheckyourself:justmakesurethateachofeachpairofstatements,exactlyoneistrueandoneisfalse!)
Follow
109 of 224
http://mathlesstraveled.com/
Posted in challenges, logic, number theory, puzzles, teaching | Tagged number, puzzle, secret | 13 Comments
m-bracelets code
Posted on November 27, 2009
> import Data.Graph.Inductive > import Data.GraphViz > > import System.Environment
A"link"inanumberbraceletisapairofdigits;knowingapairofdigitscompletelydeterminestheremainderof thebracelet.
Thenextlinkinabraceletisobtainedbyaddingandtakingtheresultmodm.
> nextLink :: Int -> Link -> Link > nextLink m (a, b) = (b, ((a + b) `mod` m))
Weconstructthelistofallpossiblelinks.
Wenowalsoconstructthelistofallthe"edges"fromonelinktothenext.
Wewillalsoneedafunctiontoconvertalinkintoauniquenumericrepresentation,sincethegraphlibrary assumesthatverticesarenamedbyintegers.
Follow
110 of 224
http://mathlesstraveled.com/
> braceletGraph :: Int -> Gr Link () > braceletGraph m = mkGraph (map mkNode (braceletLinks m)) > > > > > dotGraph m = graphToDot True (braceletGraph m) > > > > > linkAttrs (_, (a,b)) = > > > > > > > > colors = cycle $ map ColorName [ "lightblue" > > > > > > > > > > > > main = do > > (m:_) <- fmap (fmap read) getArgs putStr . printDotGraph $ dotGraph m , "red" , "orange" , "yellow" , "green" , "blue" , "purple" , "brown" , "pink" , "grey" ] [ Label . StrLabel . show $ a , Shape Circle , Color [colors !! a] , FillColor $ colors !! a , Style [SItem Filled []] ] [] linkAttrs (const []) where mkNode l (map mkEdge (braceletEdges m)) = (linkToLabel m l, l) mkEdge (l1,l2) = (linkToLabel m l1, linkToLabel m l2, ())
Wecanrunthisprogrambypassingitthevalueofmwewanttouse,anditoutputsafilein.dotformat,which wecanturnintoanimageusingoneofgraphizsgraphlayouttools,likeneatoorcirco.Forexample:
$ ghc --make BraceletGraph.lhs $ ./BraceletGraph 9 > bracelets9.dot $ neato -Tpng bracelets9.dot > bracelets9.png
Posted in arithmetic, computation, links, pictures, programming | Tagged bracelets, graph, graphviz, Haskell, literate | 3 Comments
Follow
111 of 224
http://mathlesstraveled.com/
m-bracelets
Posted on November 22, 2009
m=2
m=3
m=4
Follow
112 of 224
http://mathlesstraveled.com/
m=5
m=6
m=7
Follow
113 of 224
http://mathlesstraveled.com/
m=8
m=9
m=10
m=11
Follow
114 of 224
http://mathlesstraveled.com/
m=12
IusedalittleHaskellprogramtooutputdescriptionsofthegraphs,andGraphviztogeneratetheimages.Idbe happytopostthecodeifanyoneisinterested.
Posted in arithmetic, fibonacci, iteration, pattern, pictures, sequences | 6 Comments
HattiptoTanyaKhovanova.
Posted in pattern | Tagged odd one out, puzzle | 9 Comments
Number bracelets
Posted on November 17, 2009
115 of 224
http://mathlesstraveled.com/
minim
Posted on November 4, 2009
IrecentlyacquiredacopyofLogicomix:AnEpicSearchforTruth,byApostolosDoxiadisandChristos Papadimitriou,withartbyAlecosPapadatosandAnnieDiDonna.Itdefiescategorization:isitacomicbook?A biography?Abookofphilosophy?Ofhistory?Ofmathematics?Well,itsallofthesethings,andmanagestopull itoffwithgraceandstyle. LogicomixisagraphicnovelfocusingonthestoryofBertrandRussell,theEnglishmathematicianand philosopher,andthequestatthebeginningofthetwentiethcenturytodiscoveralogicallyrigorousfoundation formathematics.Thisquesthadasurprisingoutcome:inonesense,itwasafailure;inanothersense,itled directlytothedevelopmentofcomputers!IfyouwanttoknowwhatImeanyoullhavetoreadthebook. Itsbeatifullyandsmartlyillustrated,andtellsarivetingstory,interspersedwithmeta-narrativeaboutthe authorsofLogicomixandtheirprocessofplanningandwritingit.IfyoureadLogicomixexpectinga comprehensivemathematicalhistoryofthistimeperiodincomicbookform,youllbedisappointed.Itreallyis tellingthestoriesofthepeopleinvolved,withbigmathematicalideasexplainedasnecessary(althoughthe mathematicalexplanationsitdoesincludearecreativeandclear).Fortunately,thepeopleareratherfascinating! LikeE.T.BellsMenofMathematics,Logicomixcertainlydispelsthemyththatmathematiciansaredull.Logicomix wouldmakeagreatadditiontoanylibrary,butIparticularlyrecommendittomiddleandhighschoolteachers forlendingtostudents!
Posted in books, logic, review | Tagged Bertrand Russell, book review, foundations, graphic novel, logic, philosophy, set theory | 2 Comments
Andnow,theamazingconclusiontothisseriesofpostsonNeilCalkinandHerbertWilfspaper,Recountingthe
Follow
116 of 224
http://mathlesstraveled.com/
Rationals,andtheanswerstoallthequestionsaboutthehyperbinarysequence.Holdontoyourhats!
TheCalkin-WilfTree
First,recalltheCalkin-Wilftree,definedasfollows:therootofthetreeisthefraction1/1,andeverynode labeled inthetreehastwochildren,withtheleftchildlabeled ,andtherightlabeled .Heres apictureofthefirstfourlevelsofthetree(ofcourse,thetreeisinfinite):
Nowwaitjustoneminutethosenumberslookfamiliar!Letslistthosefractionsinorder,onelevelatatime, fromlefttoright:
LabellingtheCW-tree
LetslabelthenodesintheCalkin-Wilftreewithpositiveintegers,startingwith1attherootandproceedingin orderbylevels,fromlefttoright.Thismeansthatthefractionatnode is weretryingtoprove!Heresanillustrationofournumberingscheme: atleast,thatswhat
117 of 224
http://mathlesstraveled.com/
Well,itscertainlytruefortherootnote:itslabelled1,anditschildrenarelabelled2and3.Nowwenotethatif thepatternholdsforthenodeimmediatelyprecedingnode thatis,thechildrenofnode thenthechildrenofnode comeimmediatelyafterthechildrenof .Ifyouthinkaboutit,thisistrueregardlessofwhether ofoneleveland isthebeginningofthenext. WecanthinkoflabellingeachedgeoftheCalkin-Wilftreewitheithera0ora1:0forleftedges,and1forright edges.Thentakingallthezerosandonesalongthepathfromtheroottoanynodeandstickinganextra1atthe beginninggivesusthelabelofthatnodeinbinary!Forexample,thepaththatgoesleft,left,rightcorresponds to0,0,1,andaddinganextra1tothefrontgivesus1001whichisindeedthebinaryrepresentationof9! are and istheend ,sotheyarenumbered and
and areonthesamelevel,or
needtoseewhy.Firstofall,therootnodeofthetreethatis,node1is(bydefinition) ,andthefractionattherightchildis
Theequality,ofcourse,followsdirectlyfromtherecurrencerelationforthehyperbinarysequence!Likewise,the rightchildis
Solvingthe
mystery
118 of 224
http://mathlesstraveled.com/
intheCalkin-Wilftree, such
numbers,sothisistheproofofFergalsconjecture!Thereareexactly
howmanyreducedfractionstherearebetween0and1whichhaveadenominatorof .
Computingprimaryoccurrences
TheconnectionwiththeCalkin-Wilftreealsoallowsustocompute (in time)computealltheprimaryoccurrences suchthat thatis,givenany ,wecanefficiently !
Howdoesthiswork?Well,ifyouremember,theEuclidanAlgorithmgivesusawaytofindourwayupthe Calkin-Wilftreefromanystartingfraction.Combiningthiswiththerelationshipwediscoveredearlierbetween thelabelonanodeandthelabelsonitschildrenallowsustocomputethelabelonthenodewherewestarted. Asanexample,letscomputeoneoftheprimaryoccurrencesof5.Inparticular,letsdotheonethatcorresponds tothefraction .Since3issmallerthan5, .Finally, ; .Therefore mustbetheleftchildof istheleftchildof .3isbiggerthan2,so isnode ; ;and istotheleft istherightchildof istotheleft,soitsnode again,soitsnode .Nowwecanworkbackwards:
istotherightofthat,soitsnode
isaprimaryoccurrenceof5!Wecanalsothinkofthismore
succinctlybyrecallingthatpathsintheCalkin-Wilftreecorrespondtobinaryrepresentationsofthelabels.Sowe canruntheEuclideanAlgorithm,gettingazerooroneateachstep,andthenreversethemandputanextra1at thebeginningtogetthebinaryrepresentationoftheprimaryoccurrence.Tobemoreprecise: 1. Startwiththepair 2. Given ,if where . isrelativelyprimeto .Callthecurrentpairofnumbers .Otherwisewrite . .
thenwrite
3. Repeatstep2untilreaching
Follow
119 of 224
http://mathlesstraveled.com/
importSystem.Environment(getArgs) importControl.Monad(forM_) importData.Maybe(catMaybes) importData.List(sort) --FindafractionintheCalkin-Wilftree.findCWabcomputesthe --locationofa/bintheCalkin-Wilftree,orreturnsNothingifa --andbarenotrelativelyprime. findCW::Integer->Integer->MaybeInteger findCW11=Just1 findCWab|a<b=left`fmap`findCWa(b-a) |a>b=right`fmap`findCW(a-b)b |a==b=Nothing leftx=2*x rightx=2*x+1 --Findtheprimaryoccurrencesofn. primaryOccs::Integer->[Integer] primaryOccsn=sort.catMaybes$[findCWmn|m<-[1..n]] main::IO() main=do(from:to:_)<-getArgs forM_[readfrom..readto]$\i->do putStr$showi++":" putStrLn.unwords.mapshow.primaryOccs$i
Iftheresinterest,Icouldwriteanotherpostexplaininghowthisprogramworksinabitmoredetail,but hopefullyyoucanmostlyunderstandwhatitsdoingfromtheprecedingdiscussion.Letscheckthatitworks:
[brent@archimedes:~/teaching/mlt/hyperbin]$./prim-occs216 2:2 3:46 4:814 5:10121630 6:3262 7:1822242864126 8:2026128254 9:34464860256510 10:38565121022 11:3640545866949612410242046 12:445020484094 13:4252707811212013019019225240968190 14:6880110122819216382 15:721182583823845081638432766 16:92981341582242483276865534
Yup,looksgood!Andtoshowthatitreallyisefficient,letsuseittocomputetheprimaryoccurrencesof1000 (yes,all400ofthem!):
Follow
120 of 224
http://mathlesstraveled.com/
FurtherReading
Ihopeyouveenjoyedthislittle(1.5-year-long!)excursionintothefascinatingworldopenedupbyCalkinand Wilfspaper.(Ivesureenjoyedwritingit!)Ifyoureinterestedinexploringmore,IsuggestlookingatRoland BackhouseandJooFerreiraspaper,RecountingtheRationals,Twice!whichalsoexplainstheconnectionto anotherfamoustreeoffractions,theStern-Brocottree.Ifyoureinterestedinthecomputationalaspectofthe hyperbinarynumbers,havealookatEnumeratingtheRationals,byJeremyGibbons,DavidLester,andRichard Bird.
Posted in arithmetic, computation, induction, iteration, number theory, pattern, proof, recursion, sequences, solutions | Tagged algorithm, binary, Calkin-Wilf, Euclidean, Haskell, hyperbinary, tree | 6 Comments
Hyperbinary conjecture seeking proof for a good time, long walks on the beach
Posted on October 12, 2009
Thereareinfinitelymany,butinapreviouspostIarguedwhyweonlyneedtofindoccurrencesatevenpositions ofthesequence,whichwecallprimaryoccurrences.Ihavenoideahoweasyorharditistogiveageneral methodforfindingallprimaryoccurrences.Butsomeprogresshasbeenmade: Brendanprovedbyinductionthat Brendanalsoprovedthat least,itwasnttome!). FergalDalyconjecturedthatthenumberofprimaryoccurrencesof is totientfunction; . denotestheso-calledEuler isdefinedtobethenumberofpositiveintegerssmallerthan whicharerelativelyprime ! and .Thesecorrespondtothenumbersthatoccur ).
rightnextto1inthesequence(wesawearlierthat
.Thisisimpressive,sincethispatterncertainlyisntobvious(at
Follow
121 of 224
http://mathlesstraveled.com/
Iveseenseveralrecentpostswonderingaboutanintuitiveexplanationforthefactthataminustimesaminus equaltoaplus.Iunderstandwhypeoplewouldwonderaboutthisthewayitsoftentaught,itseemstobe justanarbitraryrulewithnowhy!Butinfact,itsquitelogical. Paulatcrossedstreams.comgivesanexplanationinvolvingtwoquantitieswithreal-worldinterpretations associatedwithnegativevalues:networth(negativemeansadecreaseinnetworth),andtime(thepastis negative).Itsfairlyintuitive,butinsomesenseitonlyshowswhyitisnicethataminustimesaminusisaplus, sinceitallowsustomodelthisreal-worldsituation;itdoesntreallyshowwhyitistrueinadeepsense.Mikeat WalkingRandomlygivesaproofessentiallyfromthefieldaxioms,but(ashehimselfadmits)itisnot particularlyintuitive. HereshowIwouldexplainit.Itisntrigorousatall,andImnotevencompletelysatisfiedwithit,butIhopeit ishelpfulforbuildingsomeintuition. Thinkaboutthefamiliarnumberline:positivenumbersgoofftotheright,andnegativenumbersaretothe left.Addingapositivenumbercorrespondstomovingrightalongthenumberline.Addinganegativenumber (thatis,subtractingapositiveone)correspondstomovingleftalongthenumberline.Sowithadditionwe alreadyseethisideaofnegativecorrespondingtodoingsomethingintheoppositedirection. So,whatdoesmultiplicationcorrespondtoonthenumberline?Ofcourse,multiplicationcorrespondstoscaling, orstretching:forexample,ifwestartatapointonthenumberlineandmultiplyby3,wewillendupatapoint threetimesasfarfromzeroaswestarted.Andwhataboutmultiplyingbyanegativenumber?Itcorrespondsto ascaleintheotherdirection:forexample,ifwestartatapointonthenumberlineandmultiplyby-3,weendup atapointontheothersideofzero,andthreetimesasfar.Thatis,multiplyingbyanegativenumbermeansthat weflipfromonesideofzerototheother.So,ofcourseifwestartfromtheleftofzero(anegativenumber)and multiplybyanegative,weendupontherightofzero(apositivenumber)! [Asanafterthought,Ithinktryingtoexplainitanymoredeeplythanthisreallydoesrequirebringinginthe
Follow
122 of 224
http://mathlesstraveled.com/
Firstthingsfirst
Davefirstnoticedthat
forall
.Inotedthisinmypreviouspostaswell,butsaidonlythatthisisapparentfromthinkingabout
Nowwecanshowthat Now,letssupposethat
for
.First,thebasecase:when
;check!
forsomeparticular
;thisiscalledtheinductivehypothesis,whichIwill isobviouslyodd,sowewanttoapplyrule
abbreviateasIH.wewanttoshowthat
aswell.
(O).Theonlytrickistogetitintotherightformfirst:
Presto!Sincethethingwewantedtoshowistruewhen inductionitmustbetrueforall .
andistruefor
wheneveritistruefor ,by
Follow
123 of 224
http://mathlesstraveled.com/
Secondthings,thirdthings
ButDavethenwentontonoticethatthissortofpatternisntuniqueto1.Forexample,
for
,and
alsofor
.Daveconjecturedthatthisgeneralizes,andindeeditdoes:mostgenerally,wecansaythat
for
.Thatis,onceacertainnumberoccursatposition .Notethat
,itwillkeepoccurringinaregularpatternafter isaspecialcasewith .
that,ateverypositionoftheform
,andsoon?Arethereanypatternstobefoundhere?ThisiswhatDaveexplorednext;letsfollow.
Primaryoccurrencesandtheinverseofh
Letsthinkalittlemoreaboutthisequation when form (inwhichcase . Thismeansthatif isanyoddnumber,wecanwriteitintheform ,andso :thatis, .Letssupposethat isodd(ifitisnt,wecan isalwaysodd,except
alwaystakeanotherfactoroftwooutofittocombinewiththe ).Noticethat
,whichiseven).Moreover,wecanalwayswriteanyoddnumberinthe
,where isodd:justaddone,andfactoroutasmanycopiesof2aspossible.Forexample,
everyoddpositioninthehyperbinarysequenceisjustcopiedfromanearlierevenposition.Ofcourse,thiscan alsobeseenfromtherecursiveconstructioninmypreviouspost;butnowwehavereallyprovedit!Andwhat abouttheevenpositions?Thevaluesofthehyperbinarysequenceatevenpositionsareobtainedbyadding, ratherthancopying.If occursatanevenposition,wewillcallitaprimaryoccurrenceof . Thenicethingaboutprimaryoccurrencesisthat(a)thereareonlyfinitelymanyprimaryoccurrencesofany particular (challenge:provethis!),and(b)onceweknowthepositionsoftheprimaryoccurrencesof ,we knowthepositionsofalltheoccurrencesof :theyareatpositionsoftheform occurrence. So,given ,canwefindallitsprimaryoccurrences?Essentiallyweareaskingifwecancompute (bywhichI ,where isaprimary
124 of 224
http://mathlesstraveled.com/
somesmallvaluesof :
n Primary occurrences
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 2 4,6 8,14 10,12,16,30 32,62 18,22,24,28,64,126 20,26,128,254 34,46,48,60,256,510 38,56,512,1022 36,40,54,58,66,94,96,124,1024,2046 44,50,2048,4094 42,52,70,78,112,120,130,190,192,252,4096,8190 68,80,110,122,8192,16382 72,118,258,382,384,508,16384,32766 92,98,134,158,224,248,32768,65534
Doyouseeanypatterns?Ifso,canyouprovethembyinduction?Illtalkaboutafewinmynextpost.ButIstill dontknowwhethertheresaneffectivewaytocompute !
Posted in challenges, induction, pattern, proof, recursion, sequences, solutions | Tagged hyperbinary, induction | 12 Comments
denotesthenumberofdifferentwaystowritenasa
sumofpowersoftwowithatmosttwocopiesofeachpowerallowed.Whatcanyousayaboutthe
125 of 224
http://mathlesstraveled.com/
Howtoanalyzethis?WecanuseasimilarapproachtothatoutlinedinthesolutiontopartIII(whichaskeda similarquestion,butallowinganynumberofcopiesofeachpoweroftwo).Firstletsthinkaboutoddnumbers, thatis,numbersoftheform .Anyrepresentationofanoddnumbermustincludeanoddnumberofcopies of (otherwisethesumwontbeodd!),butsinceatmosttwocopiesareallowed,theremustbeexactlyone copyof .Ifwetakeawaythe anddivideeverythingelsebytwo,wegetavalidrepresentationof .The reverseworksaswell:ifwestartwithanyvalidrepresentationof ,multiplyeverythingbytwo,andaddacopy of ,wegetavalidrepresentationof . Whataboutevennumbers?Avalidrepresentationof haseithertwocopiesof ,ornone.Ifithasnone, (andviceversa);iftwo,wecantakeawaythe .Thismeansthat
wecansimplydividebytwotogetavalidrepresentationof
copiesof andthendividebytwotogetarepresentationof ,andviceversa.Therefore, . Thesetwoequations, completelycharacterize and .Wecaneasilycompute ,alongwiththefactthat forthefirstfewvaluesof : ,areenoughto
continuetogetbiggeronaverage,therearestillsomevaluesof1
Thenextthingwenotice,afterstaringabit,isthatthe
sequencecontainsalotofpalindromes!Everysection
Follow
126 of 224
http://mathlesstraveled.com/
)jumpsback
127 of 224
http://mathlesstraveled.com/
Iamnotaphysicist. Myhighschoolphysicsclasswastaughtbyamanwhowasprobablybrilliant.Isayprobablybecausehewas sobadatexplainingthingsthatitwasimpossibletotell.Hislectureswentlikethis:hewouldstateaproblem anddrawsomesortofdiagramontheboard.Hewouldthenproceedtomumbleincomprehensiblethingswhile drawing(apparentlyrandom)arrowsandequationsonthediagram.Thenhewouldwritedownthecorrect answer.Ourfinalexamconsistedofthemultiple-choiceportionofanoldAPphysicsexam;Igotascoreof17. Outof200. Itwasthehighestscoreintheclass. Incollege,Ioccasionallythoughtabouttakingaphysicscourse,butitneverquitefitmyschedule.Besides,Ihad thisvaguesense,leftoverfromhighschool,thatphysicswasmessy,inelegant,andfullofequationsthatdidnt yieldanyintuitiveinsightintoanything. Iwaspleasantlysurprised,then,toenjoyMarkLevisnewbook,TheMathematicalMechanic:UsingPhysical ReasoningtoSolveProblems(PrincetonUniversityPress,2009).[Fulldisclosure:PUPkindlysentmeafree reviewcopy.Doesthatmakemebiased?Well,probably.] Herestheidea:youhaveathornymathematicalproblemtosolve.Forexample,letssayyouwanttoprovethe PythagoreanTheorem(whichis,infact,thesubjectofChapter2).Youthen(thisisthehardpart)comeupwith somesortofappropriateidealizedphysicalsystem,suchasafreelyrotatingtriangulartankfullofwater,ora
Follow
128 of 224
http://mathlesstraveled.com/
frictionlessringslidingonasemicircleandattachedtotwosprings,andsoon.Youthenmakesomesortof observationthatqualifiesyouasbeingatleastthreeyearsold,suchas,Thetankfullofwaterdoesntmove. Becauseatankfullofwaterdoesntjustmovebyitself.Andthenyouwritedownsomeequationswhich representthefactthatthewaterdoesntmove,andheypresto!ThePythagoreanTheorem! Thebookischock-fulloftheseseeminglymagicalphysicalthoughtexperimentsinvolvingbicyclewheels,pistons, springs,soapfilms,pendulums,andelectriccircuits,withapplicationstogeometry,maximizationand minimizationproblems,inequalities,optics,integrals,andcomplexfunctions,obviouslycollectedoveran (intellectuallyadventurous)lifetime.Idoubtitwillactuallyhelpmesolveproblemsanytimesoon,butinsome sensethatisntreallythepoint;itgavemenewintuitionandinsightintobothphysicsandmathematics,anda newappreciationmissedinhighschoolfortheeleganceandbeautyfoundinthestudyofaphysicalworld thatcanbedescribed(perhapsunreasonablyso)bymathematicalequations. Theproseispithy,andIhadnotroublefollowingthegistofthearguments.Myonecomplaintisthatthedetails areoftenhardtofollowforanon-physicistlikeme:althoughthebookclaimstobeself-contained,withan appendixcoveringallthenecessarybackground,theappendixissoconciseastobenotallthatusefulunlessyou alreadyknowsomephysicsinwhichcaseyouprobablydontneedtheappendixinthefirstplace!Butinsome sense,thisismoreacomplaintaboutmylackofeducationthanaboutthebook.Itisntmeanttobe(norshould itbe)aphysicstutorial,soitsappropriateforittoassumesomebackground;Imprettysurethatanyonewitha (decent!)highschoolcourseinphysicscouldfollowmostofitwellenough. Overall,Ihighlyrecommendittoanyonewhois(evenslightly)interestedinphysics,andappreciates mathematicaleleganceandcleverness.Itwouldmakeagreatgiftforalmostanyone,whetherahighschool studentoruniversityprofessor,armchairphysicistorprofessionalmathematician.
Posted in books | Tagged physics, problem solving, review | 1 Comment
Follow
129 of 224
http://mathlesstraveled.com/
Ways to multiply
Posted on June 12, 2009
at360hasacoupleofposts(withmoretocome!)listingabunchofdifferentalgorithmsforperforming
aboutsomeofthem.
Posted in computation | Tagged algorithms, methods, multiplication
multiplication.Didyouevenknowtherewasmorethanone?Wouldyoubesurprisedtolearnthatoverthe
years,peoplehavecomeupwith(atleast)twentyfivedifferentmethods?Itstrue!Headoverto360toread
Follow
130 of 224
http://mathlesstraveled.com/
Thefirststepistowritedownthefirstdigitofthesolution.Thisiseasy: example,00).
(toosmall),but
(toobig),
sowewritedown2,thensubtract4from7andwritetheremainder,andbringdownthenexttwodigits(inthis
.So6isthedigitwearelookingfor,
Illcarryitonemorestep:twice264is528,and
(whereas
istoobig),soweget
Follow
131 of 224
http://mathlesstraveled.com/
Sofar,wehavecomputedthat
.Andindeed,wecancheckthat
,but
So,whydoesthiswork?Well,supposewehaveworkedoutsofarthat
andwewanttofindanotherdigitinthisapproximation.First,wecanmultiplybothsidesoftheequalityby100:
Nowwewanttofindthevalueofbsothat
whichwillgiveusonemoredigitofprecision.Expandingoutthebinomialontheleft:
Factoringandrearrangingabit:
So,whichisbetter,thismethodortheBabylonianmethod?Idontknow,theyareverydifferent.Icanthinkof situationswhereIwouldwantoneortheother.IguessIllleavethedeterminationuptoyou!
Posted in algebra, computation | Tagged pencil and paper, square root | 8 Comments
Welcometothe53rdCarnivalofMathematics!Asomewhatshortercarnivalthistime,butIgreatlyenjoyed readingthesubmissionsIdidget,andIhopeyoudotoo. MeaghanMontroseatTutorFipresentstentipsfordailypracticingyourmathskills. ErinatNotefromtheTeachersharessometipsonhowtogettutoring,practicematerials,andothermath helpforyourchildwithoutcoughingupatonofmoney. MathMama,akaSueVanHattum,linkstotheInstituteforFiguring,anamazingorganizationwhichis,to quotetheaboutpage, dedicatedtoenhancingthepublicunderstandingoffiguresandfiguringtechniques.Fromthe physicsofsnowflakesandthehyperbolicgeometryofseaslugs,tothemathematicsofpaperfolding andgraphicalmodelsofthehumanmind,theInstitutetakesasitspurviewacomplexecologyof figuring.
Follow
132 of 224
http://mathlesstraveled.com/
Thesiteiswellworthexploring!Mathmamaparticularlylikestheirphotogalleries,whichshowoffcrocheted explorationsofhyperbolicgeometry! BarryLeibaofStaringatEmptyPagesexploresthetrigonometryofcardoors.Ifyouretryingtogetoutof yourcarinatightparkingspot,whichwouldyouratherhave,awidedoororanarrowone? PatBallewtalksaboutthesubfactorialoperation!n,whichcountsthenumberofwaysofreorderingnthings sothatnoneofthemisinitsoriginalposition(knownasderangements),andwonderswherethenotation camefrom. Whatcouldbreastfeedingpossiblyhavetodowiththegoldenratio?JohnCookdiscussesrational approximationsoverathisblog,TheEndeavour. BadalJoshi,amathgradstudentatOhioStateUniversity,hasaneatnewblog,TheSquaredCircle.I especiallylikehisrecentseriesofpostsongamesandprobability,butthereslotsofothergreatstuffaswell. TheNumberWarrior,JasonDyer,writesaboutanapparentbuginWolframAlpha.HowcanwetrustWolfram togetcomplexintegralsrightiftheycantevenmanageBabyloniannumbernotation? Lastbutnotleast,DaveRichesonatDivisionbyZerohassomebeautifulGeoGebraappletsforplayingwith theJapaneseTheorem,whichrelatestheradiiofcirclesinscribedintriangulationsofcyclicpolygons.
Posted in links, meta, people | Tagged Alpha, approximation, Babylonian, breastfeeding, car, Carnival of Mathematics, coral, crocheting, derangements, doors, games, GeoGebra, golden ratio, hyperbolic, Japanese Theorem, notation, probability, rational, subfactorial, tips, trigonometry, tutoring, Wolfram | 9 Comments
Follow
133 of 224
http://mathlesstraveled.com/
Everyoneknowshowtoadd,subtract,multiplyanddividewithpencilandpaper;butdoyouknowhowtofind squarerootswithoutacalculator?(Incidentally,IhighlyrecommendreadingTheFeelingofPowerbyIsaac Asimov,ashortstoryaboutafutureinwhichhumansaresoreliantoncomputersthattheyhaveforgottenhow todoarithmetic.) Anobviousmethodistoguessandcheckwhilekeepingtrackoflowerandupperbounds.Forexample,ifwe wantedtofindthesquarerootif7,wemightstartbyguessingthatthesquarerootis2.Computing seethat2istoosmall.Sowetry3: inbetween2and3.Letstry2.5: ,we ,so3istoobig!Soweknowthesquarerootof7mustbesomewhere .So2.5istoosmall,andthesquarerootof7issomewherebetween
2.5and3.Wemighttry2.7next(toobig),andsoon. Thisworks,butitisextremelytediousandinefficient!Wecancutthesearchrangeinhalfateachstep,butthis meansthatonaverageweonlyaddasinglenewdecimalplaceevery3.3stepsorso( bettermethods;Illshareoneofthemtodayandoneinafuturepost. ThefirstmethodisoftencalledtheBabylonianmethodsinceitwasknowntotheancientBabylonians.Heres howitworks.SaywearetryingtofindthesquarerootofN .Justlikewiththeguessandcheckmethod,westart outwithsomeguessR.ThenwecomputeanewvalueforRasfollows: ).Notto mentionthatateachstepwehavetocomputethesquareofincreasinglylongnumbers.Thereareatleasttwo
asourinitialguess.Wecancomputeafewiterationsofthe
processaccordingtotheaboveformula:
Howclosedidweget?Thetruevalueof
,to15decimalplaces,is
(Incidentally,IcomputedthisusingWolfram|Alphabytypingsqrt7to15digits.)Hereareour approximations,withthecorrectdecimalplacesinbold:
Follow
134 of 224
http://mathlesstraveled.com/
Also,itisnottoohardtoseethat eachstep.
mustlieinbetween and
,since
;sotakingtheiraverage at
(whichisessentiallywhattheBabylonianmethoddoes)willnecessarilygiveusabetterapproximationto
Wolfram|Alpha
Posted on May 16, 2009
TheInternetisabuzzwiththereleaseofWolfram|Alpha,Wolframsnewcomputationalknowledgeengine. (WolframisthecompanythatmakesMathematica.)SoIwenttotryitout.Itssortoflikeasearchenginein thatyoutypeinqueries;butitdoesntactuallysearchtheweb,itsearchesan(apparentlyhuge)setofdatabases thatithasandcomputesvariousanswersandtypesofinformationbasedonyourquery.Forexample,Itypedin mybirthday(January10,1982)andittoldmewhatdayoftheweekitwas,theamountoftimethathaspassed sincethen(inyears+months+days,intotalweeks,intotaldays),anyholidaysthatwereobserved,famous peoplewhodied/werebornonthatday,sunrise,sunset,andthephaseofthemoon.Inoticedthatthetotal numberofdayssincemybirthdaywas9988almost10,000!SoItriedtypinginJanuary10,1982+10000 daysandsureenough,itworked:ittoldmethatmy10,000thdayofbeingalivewilloccuronThursday,May 28,12daysfromnow,whenthemoonwillbewaxingcrescentandsunrisewillbeat5:37AM.Neat!
Follow
135 of 224
http://mathlesstraveled.com/
Hoorayforsummer!Nowthatfinalsarefinallyover,youcanexpectalotmorefrommeoverthenextfew months.Ivegotalotofexcitingthingsplanned,including adescriptionandexplanationofanalgorithmforfindingsquarerootsbyhand(whichmostpeopledont knowanymore); finallyFINALLYforrealfinishingmyseriesofpostsonRecountingtheRationals(yes,Jason,thisoneisfor you!); goingthroughaneatlittlepaperbyIvanNivengivingaproofthatpiisirrational; alittlenumbertheory,focusingontheFundamentalTheoremofArithmetic; funlinkstointerestingmathematicsaroundtheweb; andwhateverelseticklesmymathematicalfancy! Togetthingsstarted,heresalinkforyou:NormanWildbergersMathFoundations,aseriesofvideosexplaining thefoundationsofmathematics.Idontagreewithallhisopinionsparticularlyregardinginfinitesetsbutthis isasubjectonwhichImwillingtoagreetodisagree;asalegitimate,publishedresearchmathematicianwhos beendoingmathematicslongerthanIvebeenalive,hescertainlyentitledtohisopinions!AndIcertainlydo agreewithmanyofhisopinions,especiallyregardingmathematicseducation.Inanyevent,thevideosarevery well-done,andthereslotsofinterestingstuffthere!
Posted in links, meta, people, video | Tagged foundations, Normal Wildberger, plans, summer | 3 Comments
ThisweeksMondayMathMadnessisanicelittleprobleminvolvingcomplexexponentiation.Gocheckitout, andmaybewinaprize!
Posted in challenges, complex numbers, links | Tagged complex, exponentiation, madness, math, monday
Idempotent endofunctions
Posted on April 17, 2009
anyinputx.Endofunctionisjustafancywayoftalkingaboutafunctionwhosedomainandcodomainarethe
136 of 224
http://mathlesstraveled.com/
Forexample,whenn=3onesuchfunctionisgivenby
Solution1:CookiesandFences
Thefirstsolution,asdescribedinacommentbyMike,consistsinconsideringpermutationsofcookiesand fences.
Ifwesetupthecookiesinarow,wecanusefourfencestoseparatethemintofivesections;thefirststudent willgetthefirstsectionofcookies,thesecondstudentwillgetthesecondsection,andsoon.Intheexample above,studentAgetsonecookie,studentBgetstwo,studentCdoesntgetany,andstudentsDandEgetthree andfour,respectively.Itseasytoseethateverydistributionofcookiescorrespondstoanarrangementoffences, andviceversa.So,howmanywaysaretheretoarrangethefences?Thinkofitthisway:wehavefourteen slots,andintoeachslotwecanputeitheracookieorafence.Choosingadistributionisjustchoosinginwhich ofthefourteenslotstoputthefourfences,andthereare waystochoosefouroutoffourteenslots.(If youdontknowaboutbinomialcoefficients,youcanreadaboutthemhere.)Incidentally,thisisalsothenumber ofwaystodistributefourfencestoelevenstudents;justusethecookiestodividethefencesintoelevensections (mostofwhichwill,ofcourse,beempty).AlthoughIhavenoideawhystudentswouldwantfences. Thiscanbeeasilygeneralized:theaboveargumentshowsthatthereare students. So,theproblemissolved,right?Whatmorecantherebetosayaboutit? plenty!Thisisaniceelegantsolution,butittakessomecleverness(and/orluck,and/orexperiencewiththis sortofproblem)toseeit,andinfactitisntthefirstsolutionIcameupwith.Lookingatsomedifferentmethods Follow waystodistributec cookiestos
137 of 224
http://mathlesstraveled.com/
ofsolutionwillalsoilluminatesomeoftherichstructureofbinomialcoefficients.
Solution2:DontBeSoMean
Itseemsmeanthatsometimessomestudentsdontgetanycookiesatall.Wouldntitbemuchnicerifevery studentgotatleastonecookie(eveniftheystillmightbedistributedunevenly)?Thekeyinsight,aspointedout byJonathan,isthis:thenumberofwaystodistributetencookiestofivestudentsisthesameasthenumberof waystodistributefifteencookiestofivestudentsinsuchawaythateachstudentgetsatleastonecookie. Whyisthis?Well,supposeyouhavedistributedfifteencookiestofivestudentssothateachstudenthasatleast one.Nowtakeonecookieawayfromeachstudentandyouhavenowdistributedtencookiestofivestudents. Conversely,ifyouhavedistributedtencookiestofivestudentssomehow,ifyounowgiveeachstudentanextra cookie,youhavedistributedfifteencookiesandeachstudenthasatleastone.Eachdistributionoftencookies correspondstopreciselyonedistributionoffifteencookieswhereeachstudentgetsatleastone,andviceversa, socountingoneisthesameascountingtheother.Now,howmanywaysaretheretodistributefifteencookies likethis?Wecanlinethecookiesupandimaginechoosingpointsatwhichtodividethem;todividetheminto fivegroups,wehavetochooseexactlyfouroutofthefourteenpossibleplacestodividethecookies.(Thereisat leastonecookiebetweenanytwodividingpoints,whichmeansthateachstudenthastogetatleastonecookie.)
.Also,thetotal
numberofwaystodistributec cookiestosstudentsisthesameasthenumberofwaystodistributec+scookies
Solution3:Oneatatime,please!
Anotherwayofapproachingtheproblemcomescourtesyofmeichenl.Todistributecookiestosstudents,we firsthavetogivesomenumberofcookiestothefirststudent;wecangiveheranywherefromzerototen cookies.Ifwegiveherkcookies,thereareckcookieslefttodistributetotheothers1students.Ifwelet standforthenumberofwaysofDistributingc cookiestosstudents,wecanwritethisobservationas
becausewecanidentifysomebasecases,thatis,simplesituationsinwhichweknowtheanswerwithout breakingthingsdownfurther.Inparticular,
138 of 224
http://mathlesstraveled.com/
namely,togivezerocookiestoeachstudent),and cookiestoasingleluckystudent!).
foranyc (theresonlyonewaytodistribute
So,oncewehavethisrecurrence,whatdowedowithit?Wecanuseitfordirectcalculation,asMarkJames apparentlydid;healsousedtherecurrenceinacomputerprogramtoprintallthedistributions.Asobservedby DanielKlein,thissortofrecurrenceisalsoperfectlysuitedforaprogrammingtechniquecalleddynamic programming;itseasytoturnthisrecurrenceintoacomputerprogramtocompute foranyvaluesofc and ). Soifwe s(althoughinthisparticularcase,asweveseen,therearemoreefficientwaystocompute Butheresanotherinterestingthing:wealreadyknowwhat substitutethisintotheaboverecurrence,weget is,fromsolutions1and2:its
Ifwesubstituted+1inplaceofs1everywhere,wecanmakethisalittlenicerwithoutchanginganything(d isjustanewvariableImadeup,itdoesntstandforanythinginparticular):
Solution4:Howmeandoyouwanttobe?
Thelastsolution(atleast,thelastsolutionIwilldiscussinthispost!)comescourtesyofDave.Insteadof breakingthedistributionintocasesaccordingtohowmanycookieswegivetothefirststudent(asinthe previoussolution),wecanbreakitintocasesaccordingtohowmanystudentsgetanycookies:wecangiveall thecookiestoonestudent,orgivethemalltotwostudents,orthree,andsoon. Thefirstcaseiseasy:ifwegiveallthecookiestoonestudent,thereare5waystochoosewhichstudenttogive thecookiesto,andonlyonewaytogivethemthecookies.Whatifwegiveallthecookiestotwostudents?Well, thereare waystochoosewhichtwostudentsgetcookies.Nowwewanttodistributethetencookiestothese twostudentsinsuchawaythateachstudentgetsatleastonecookie(otherwisewearebackinthefirstcase). Aspreviouslynotedinsolution2,thereare waystodothis.Ifthreestudentsgetcookies,thereare waysto choosethethreestudents,and waystodistributethecookies,andsoon.Generalizing,weseethat
Egads!Wevediscoveredanothercombinatorialidentity,thisoneinvolvingasumofproductsofbinomial coefficients!
Follow
139 of 224
http://mathlesstraveled.com/
Distributing cookies
Posted on April 1, 2009
Therearetenidenticalcookiesandfivestudents.Howmanywayscanthecookiesbedistributedamongthe students? Notethatthecookiesareidentical,soitdoesntmatterwhichcookiesastudentgets,justhowmany.The students,ofcourse,arenotidentical,sostudentAgettingfourcookiesandstudentBgettingtwoisdifferent thanAgettingtwoandBgettingfour.Assumethatthecookiescantbesplitintopieces.Notethatgivingcookies tosomestudentsbutnotothersisavalidwayofdistributingthem,aslongasallthecookiesaredistributed.For example,givingsixcookiestostudentA,fourtostudentC,andnonetoanyoneelseisavaliddistribution. MywifeandIhadafuntimesolvingthisproblem,whichleadstoallkindsofinterestingcombinatorialinsights. Illdescribeour analysisinanupcomingpost.
Posted in challenges, counting | Tagged combinatorics, cookies, Putnam | 23 Comments
Andnowforsomesolutionstothechessboardcountingchallenges. 1. Thefirstchallengewastocountthenumberofsquaresofanysizeonan88chessboard.Thekeyhere(as
Follow
140 of 224
http://mathlesstraveled.com/
withmanycountingproblems)istobreaktheproblemdowninanappropriateway.Inthiscase,wecan thinkaboutcountingeachsizesquareseparately.Thereisonlyonesquarewithsidesoflength8.Thereare4 squaresofsize7theycanbeinoneoftwopositionshorizontally,andoneoftwopositionsvertically.Its nothardtoseethatthereare squaresis . totalsquares.Theres .(Showinghowtoderivethisformulaisa ,asexpected.) 1by1rectangles, jbyk squaresofsize6, ofsize5,andsoon.Sothetotalnumberof
3. Countingrectanglesinsteadofsquaresturnsoutnottobetoomuchharder.Thereare rectangles.Sothetotalnumberofrectanglesis
Thatlooksannoyingtoaddup,buttheresaclevertrickwecanpull.Noticethatwecanfactoran8outofthe firstparenthesizedexpressionabove,a7outofthesecond,andsoon,yielding
Butnowwecanfactor
outofthis,yielding
Ah,thatsmuchnicer! 4. Forageneralmbynchessboard,thesamemethodyields
totalrectangles.Usingtheclosedformulaforthesumofthenumbersfrom1throughn,wecanrewritethis as .
Chessboard counting
Posted on March 13, 2009
141 of 224
http://mathlesstraveled.com/
Pentaflakes
Posted on February 7, 2009
142 of 224
http://mathlesstraveled.com/
willbeadivisorof
YoumaywonderhowIknowthis.Well,askingfortherepetendlengthofafractionwithdenominatord amountstoaskingforthesmallestpowerof10whoseremainder,whendividedbyd,is1.Anotherwaytosay thisisthatwewanttoknowtheorderoftheelement10inthegroup (thegroupofpositiveintegersless ?Theanswer,asexplainede.g. thanandrelativelyprimetodundermultiplication).ByLagrangesTheorem,theorderofanyelementofagroup dividestheorderofthegroup;sothequestionbecomes,whatistheorderof onp.155ofContemporaryAbstractAlgebrabyJosephGallian(HoughtonMifflin,2002),istheaboveformula. Now,maybethatwentwayoveryourhead.Itcertainlydidifyouveneverstudiedanygrouptheory.ButIdont knowasimplerwaytoexplainit!Perhapsthereisabetterway,andifyouknowofone,Idlovetohearaboutit inthecomments.Nonetheless,thisisagreatexampleofasimplequestionthatquicklyleadsintosomevery deepstructure. YoumayalsowonderhowonearthIknowthattherepetendlengthof1/17303is726!No,Ididntsitthereand dolongdivision;ofcourse,Iwroteacomputerprogram.PerhapsIwillpostitsoon.
Posted in group theory, number theory, pattern, primes | Tagged decimal, expansion, fractions, length, repetend | 6 Comments
FormybirthdayIgot,amongotherthings,acopyofTheAnnotatedTuring:AGuidedTour ThroughAlanTuringsHistoricPaperonComputabilityandtheTuringMachine,byCharles Petzold.Ihaventfinishedreadingityet,butsofar,Ihighlyrecommendit;notonlythat, butImpleasedtoreportthatIrecommenditevenforpeoplewhodonthavemuch backgroundincomputerscience.Petzolddoesagoodjobofsettingthestage,soto speak,describingthenecessarymathematicalbackgroundandcontext.Andsofarhis explanationofTuringspaperitselfisquitereadableandengaging. Whymightyoubeinterestedinreadingsuchathing?AlanTuringisoftenregardedasthe fatherofcomputerscience,anddidimportantfoundationalworkincomputerscience,mathematicsandwhat wewouldnowcallartificialintelligence.HisinventionoftheTuringmachineasimple,imaginarymachine whichservesasaformalizationofcomputationwasanachievementofcreativegeniusthatlaidthe foundationsformuchofmoderncomputerscience.Atthesametime,italsoputtorestoneofthebiggestopen Follow
143 of 224
http://mathlesstraveled.com/
Today,IdliketoanswersomeofthequestionsIraisedintheDecimalExpansionZoo: 1. Whichdecimalexpansionsterminate,andwhicharerepeatingandhowdoesitrelatetothedenominator? Asweknow,thedecimalexpansionofeveryrationalnumbereitherterminatesorrepeatsbutinasense, theyallrepeat;theonesthatterminatejusthappentorepeatthedigitzero.Thatis,0.25isreallyjust 0.25000000.Thisshouldgiveusacluethattheterminatingisnotreallyafundamentaldifference,butan artifactoftheparticularwaywevechosentorepresentnumbers,inbase10.Andindeed,asyoucancheck, thefractionswithterminatingrepresentationsarethosewhosedenominatorsaredivisibleonlyby2and5 (since2and5arethedivisorsof10).Ifweused,say,base21insteadofbase10,thefractionswith terminatingrepresentationswouldbetheoneswhosedenominatorsaredivisiblebyonly3and7,andsoon. 2. Howarethedifferentcyclesforagivendenominatorrelatedtoeachother,andwhy? Ifsomefractionhasadecimalexpansionwitharepeatingportionlike[abcde],theneverycyclic rearrangementof[abcde](thatis,[bcdea],[cdeab],[deabc],andsoon)alsooccursastheexpansionof someotherfractionwiththesamedenominator.Toseewhythisissoisnothardifyouthinkaboutthe processoflongdivision;theremainderateachstepuniquelydeterminesthenextremainder,andsoon,so giventhesamedivisor,wearealwaysgoingtoseetheexactsamesequenceofdigitsinthedecimalexpansion followingagivenremainder. 3. Howarethelengthsofthecyclesforagivendenominatorrelatedtothedenominatoritself? AsnotedbyJonathan, Thelengthoftherepeatingunitislessthanorequaltoonelessthanthedenominator.Thatscool. Indeed!Andunderstandingwhythismustbethecaseisnothard,again,ifwethinkabouttheprocessoflong divisiontoproducethedecimalexpansionforsomefraction.Supposethefractionhasdenominatord.At eachstepofthelongdivision,wemustgetaremainderlessthand.Ifweevergetaremainderofzero,the expansionterminates.Ifweevergetaremainderthatweveseenbefore,theexpansionwillbegintorepeat. So,thelongestanexpansioncanpossiblygobeforerepeatingis(d-1). However,asnotedbysilverpie,theresmore:
Follow
144 of 224
http://mathlesstraveled.com/
RecallthechallengeIposedinapreviouspost:giventhesequenceofintegers
,whatcanyou
learnabout (assumingyoudidntknowanythingaboutitbefore)?Theanswer,asexplainedinanotherpost,is thatyoucanlearn towhateverprecisionyoulike,ifyouwaitlongenough.Notonlythat,butyoucandobetter thanisinitiallyobvious.Youcanlearnndigitsofthedecimalexpansionof ifyouwaitfor throwingawaytoomuchinformation:instead,notingthat on fromeachterminthesequence: ,butthisis ,wegetupperandlowerbounds
Letsgraphtheseupperandlowerboundsforvariousvaluesofn:
Follow
145 of 224
http://mathlesstraveled.com/
Follow
146 of 224
http://mathlesstraveled.com/
Cool!Nowwecanseesomemoreinterestingstructureatthebottomofthegraph(inthepreviousgraph,the approximationsquicklygotsoclosetotheaxisthatitwasimpossibletotellwhatwasgoingon;thisiswhy plottingthelogarithmoftheerrorhelps).Wecanseethatmostoftheapproximationsareinthatbigmass slopinggentlydownandtotheright.Thisrepresentsabouthowwellwewoulddoatapproximatingpiifwejust lookedatthe thelementsofthesequence.Buttheinterestingthingistheapproximationswhicharenotpart ofthatbigmass.Atseveralplacesmostnotablyataroundn=5,n=100,andn=30000therearedownward spikes,representingapproximationswhichjumpoutasbeingwaybetterthanmostoftheotheronesatthat point.Thesearepreciselytheconvergentsof ,whichare(inaspecifictechnicalsense)thebestrational approximationsto .Thisiswhy,bylookingatalltheapproximationsandchoosingthebestones,wecando muchbetterthanjustlookingatthe thelementsofthesequence(imaginealinedrawnthroughthe bottommostpointsinthegraph;itsmuchsteeperthantheaverageslopeofthebigmassofapproximations aboveit).InafuturepostIhopetowriteabitmoreabouttheseso-calledconvergentsandwheretheycome from;Iveactuallywrittenabitaboutthembefore,butdidntpointitoutatthetime!
Posted in convergence, famous numbers, pattern, sequences | Tagged approximation, convergents, graphs, pi | 5 Comments
Follow
147 of 224
http://mathlesstraveled.com/
Nifty,eh?Wanttoseeaproof?Hereitis:
148 of 224
http://mathlesstraveled.com/
Doyouseewhy?Takingthefloorofsomethingnevermakesitbigger,so
(infact,itcanneverbeequal
Thatis,ifthenthelementofthesequenceisk,thenweknowthat mustbebetweenk/nand(k+1)/n.Of course,thisworksforanynumberr,notjustfor . Letsseehowthisworks.Thefirstfewnumbersinthesequence weknowthat .Afterseeingthe6,weknowthat now(3.5)thanwedidbefore(4).Afterseeingthe9,weknow boundhasn'tchangedyet.Thatwon'thappenuntilwegetto are .Afterseeingthe3,
10 100
3.1 3.14
Follow
149 of 224
http://mathlesstraveled.com/
Predicting Pi
Posted on October 1, 2008
Theanswerhasmanyinterestingconnectionstothetheoryofirrationalnumbersandcontinuedfractions.
Posted in challenges, pattern, sequences | Tagged approximation, floor, pi, sequence | 3 Comments
150 of 224
http://mathlesstraveled.com/
4/7=.571428 5/7=.714285 Iverearrangedtheorderofthefractionstomakethepatternobvious. Thisisprettycoolindeed,andprobablywell-knowntomany.Buttheresnothingparticularlyspecialabout7, otherthanthefactthatitissmall.Inordertotalkaboutthesortsofpatternswefindintheexpansionsof rationalnumbersandwhyImgoingtostartbyhavingaspecialexhibit:theDecimalExpansionZoo!Havea lookaroundandseeifyounoticeanypatterns.Illfollowtheconventionofenclosingrepeatingportionsin [squarebrackets].So,forexample,0.23[48]means0.234848484848andsoon. Somequestionsforyoutothinkaboutwhileyouwanderaboutthezoo:whatpatternsdoyounotice?Which decimalexpansionsterminate,andwhicharerepeatingandhowdoesitrelatetothedenominator?Howare thedifferentcyclesforagivendenominatorrelatedtoeachother,andwhy?Howarethelengthsofthecyclesfor agivendenominatorrelatedtothedenominatoritself?Illanswerallthesequestions,andmore,inanupcoming post!
Follow
151 of 224
http://mathlesstraveled.com/
1/2=.51/8=.125 3/8=.375 1/3=.[3]5/8=.625 2/3=.[6]7/8=.875 1/4=.251/9=.[1] 3/4=.752/9=.[2] 3/9=.[3] 1/5=.24/9=.[4] 2/5=.45/9=.[5] 3/5=.66/9=.[6] 4/5=.87/9=.[7] 8/9=.[8] 1/6=.1[6] 5/6=.8[3]1/10=.1 3/10=.3 1/7=.[142857]7/10=.7 3/7=.[428571]9/10=.9 2/7=.[285714] 6/7=.[857142]1/12=.08[3] 4/7=.[571428]5/12=.41[6] 5/7=.[714285]7/12=.58[3] 11/12=.91[6] 1/11=.[09] 2/11=.[18]1/13=.[076923] 3/11=.[27]10/13=.[769230] 4/11=.[36]9/13=.[692307] 5/11=.[45]12/13=.[923076] 6/11=.[54]3/13=.[230769] 7/11=.[63]4/13=.[307692] 8/11=.[72]2/13=.[153846] 9/11=.[81]7/13=.[538461] 10/11=.[90]5/13=.[384615] 11/13=.[846153] 1/17=.[0588235294117647]6/13=.[461538] 10/17=.[5882352941176470]8/13=.[615384] 15/17=.[8823529411764705] 14/17=.[8235294117647058]1/14=.0[714285] 4/17=.[2352941176470588]3/14=.2[142857] 6/17=.[3529411764705882]5/14=.3[571428] 9/17=.[5294117647058823]9/14=.6[428571] 5/17=.[2941176470588235]11/14=.7[857142] 16/17=.[9411764705882352]13/14=.9[285714] 7/17=.[4117647058823529] 2/17=.[1176470588235294]1/15=.0[6] 3/17=.[1764705882352941]2/15=.1[3] 13/17=.[7647058823529411]4/15=.2[6] 11/17=.[6470588235294117]7/15=.4[6] 8/17=.[4705882352941176]8/15=.5[3] 12/17=.[7058823529411764]11/15=.7[3] 13/15=.8[6] 1/18=.0[5]14/15=.9[3] 5/18=.2[7] 7/18=.3[8]1/16=.0625 11/18=.6[1]3/16=.1875 13/18=.7[2]5/16=.3125 17/18=.9[4]7/16=.4375 9/16=.5625 1/19=.[052631578947368421]11/16=.6875 10/19=.[526315789473684210]13/16=.8125 5/19=.[263157894736842105]15/16=.9375 12/19=.[631578947368421052] 6/19=.[315789473684210526]1/31=.[032258064516129] 3/19=.[157894736842105263]10/31=.[322580645161290] 11/19=.[578947368421052631]7/31=.[225806451612903] 15/19=.[789473684210526315]8/31=.[258064516129032] 17/19=.[894736842105263157]18/31=.[580645161290322] 18/19=.[947368421052631578]25/31=.[806451612903225]
Follow
152 of 224
http://mathlesstraveled.com/
Aspromised,IcannowrevealtheidentityofthetwonewlydiscoveredMersenneprimes.Thesmallerofthe two,discoveredonSeptember6byHans-MichaelElvenichinLangenfeld,Germany,is
153 of 224
http://mathlesstraveled.com/
oncebefore,atapublichighschoolinWashington,DC,andeversincethatexperienceIvehadsomestrong opinionsaboutwaysthatthecurriculumshouldbedifferent.PerhapsIllwritemoreonthatrantlater. Atanyrate,thepointisthatIllbemakinganumberofmymaterialsavailableonlineunderaCreativeCommons Attribution-Noncommerciallicense(thesamelicensethatappliestoallthecontentonthisblog).Thereare alreadyacoupleassignmentsposted,alongwithabasicLaTeXtutorialandasyllabus.Feelfreetouseitfor learning,teaching,orwhatever.Iimaginethattheweeklyassignmentscouldbeprofitablyusedforenrichment, extracredit,orevenstraight-upassignmentsaspartofotherclassesatvariouslevels.ImalsomakingtheLaTeX sourceavailablesoyoucanevenmakeyourownmodifications,orjustuseindividualexercises,paragraphs,or whatever,aslongasyoucitemeasthesource.Iwontbemakingsolutionsavailable,forhopefullyobvious reasons,butifthereisenoughdemandandIhavetimeImightbeabletowriteupsomesolutionsandhave themavailablefordistributiontoteachersbyrequest,soletmeknowifyoudbeinterested. IllprobablyoccasionallywritesomethingherewhenIvepostedsomenewmaterials,butifyoureparticularly interestedtoknoweachtimeIvepostedsomethingnew,letmeknowandIcouldperhapssetupsomesortof automatednotificationsystem.
Posted in links, meta, teaching | Tagged correspondence course, creative commons, latex, precalculus, teaching | 6 Comments
Asyoumayrememberfromschool,rationalnumbershaveaterminatingoreventuallyrepeating(periodic ) decimalexpansion,whereasirrationalnumbersdont.So,forexample,0.123123123123,with123repeating forever,isrational(infact,itisequalto41/333),whereassomethinglike0.123456789101112131415,which willneverrepeat,isirrational. Butdoyouknowwhythisistrue?(Despitewhatyourteachersmayhavetoldyou,themostimportantquestion inmathematicsisnothow,itiswhy!)TodayIwillshowwhyeveryrationalnumberhasaterminatingor eventuallyrepeatingdecimalexpansion,andinafuturepostIwillshowwhyeveryrepeatingorterminating decimalexpansionrepresentsarationalnumber.Fromthesetwopiecesofinformation,ofcourse,wecanalso deducethateverydecimalexpansionwhichdoesntterminateorrepeatmustrepresentanirrationalnumber,and viceversa. Continuereading
Posted in infinity, iteration, number theory, pattern | Tagged decimal, periodic, rational | 9 Comments
154 of 224
http://mathlesstraveled.com/
Mandelbrot Maps
Posted on September 1, 2008
Posted in fractals, links | Tagged applet, fractal, interactive, julia, mandelbrot, real-time
155 of 224
http://mathlesstraveled.com/
historyinmoredetailhere;itsactuallyquiteconfusedandunclearastowhodidwhatwhenandsoon.Maybe Illtrywritingaboutthatinafuturepost.Fornow,Illjustoffersomeincontrovertibleproofthatatleastone numberexistswhichisntrational.Probablymanyofyouhaveseenitalready,butitsagoodplacetostart,asI intendtowritemorepostsonthistopicinthenearfuture. Ready?OK,Imthinkingofanumberwhichwellcalls.Inparticular,sisthelengthofonesideofasquare whoseareais2.ThisishowtheGreekswouldhavethoughtofit,andcertainlynoonecanarguethatitisnta number!Thereobviouslymustbeasquarewithanareaof2,andthesidesofthatsquareobviouslymusthavea length,andthatlengthisanumber.(AstutereaderswillnotethatImplayingratherfastandloosewiththeterm number.Whichistrue.Sosueme.)Inmoremodernterms,wewouldsaythatsisthepositivesolutiontothe equation ,orjust . .Remember,wewantto
Now,supposethatsisarationalnumber,sothatscanberepresentedbyaratio
showthatsisntrational,soIllshowthatmakingthisassumptionleadstoanabsurdity,fromwhichwecan concludethatitwasanincorrectassumptioninthefirstplace.Thisiscalledaproofbycontradictionassumethe logicaloppositeofwhatyouwanttoprove,andshowthatthisleadstoanabsurdity,like beingbothtrueandnottrueatthesametime. Wellassumethatp/qisinlowestterms,thatis,thatpandqhavenocommonfactors.Itsoktoassumethis, sinceanyrationalnumbercanalwaysbeturnedintoanequivalentoneinlowestterms. Weknowthatsquaringsyields2,sosubstitutingp/qforsgivesustheequation that forsomeotherintegerr .Substituting,wefindthat ,andtherefore .Rearranging,wefind .Butthismeansthat ,orsomething
iseven,andthereforesoisqbutthisisabsurd,becauseweassumedthatpandqhavenocommonfactor,so theycantbothbeeven!Therefore,ouroriginalassumptionthatsisrationalmustbefalse. InupcomingpostsIplantoexplorethisandotherrelatedtopics,possiblyincluding:theconnectionbetween rationalnumbersanddecimalexpansions,theperiodofrepeatingdecimals,repunits,setcardinalityandorders ofinfinity,somefamouslyirrationalnumbers(like ande),andmaybeevensomecontinuedfractions.Thereare manyfascinatingtopicsconnectedinonewayoranothertothisdistinctionbetweenrationalandirrational numbers,soitshouldbeinterestingIhopeyoullcomealongfortheride! Asafurtherchallenge,canyouextendtheaboveprooftoshowthatthesquarerootofanyprimenumberis irrational?Whataboutthesquarerootofanypositiveintegerwhichisnotaperfectsquare?(Thissecondoneis abittrickier,becauseifnisnotprime,youcannotassumethatifndivides thenitmustdividepaswellfor example,12divides ,butitdoesnotdivide6.)
Posted in algebra, challenges, number theory, proof | Tagged rational irrational proof | 11 Comments
Ilearnedsomethingnewtoday!
Follow
156 of 224
http://mathlesstraveled.com/
Manypeopleprobablyknowofthesesimpledivisibilityrules: Anintegerisdivisibleby10ifitendsinazero. Anintegerisdivisiblebyfiveifitendsinzeroorfive. Anintegerisdivisiblebytwoifitsfinaldigitis. Anintegerisdivisiblebythreeornineifthesumofitsdigitsis. Anintegerisdivisiblebysixifitisdivisiblebybothtwoandthree. Slightlylesswell-knownaretheserules: Anintegerisdivisiblebyfourifthetwo-digitnumberformedfromitslasttwodigitsis. Anintegerisdivisiblebyeightifthethree-digitnumberformedfromitslastthreedigitsis. Thatlastoneissimplerthanitsoundsyoudonthavetomemorizeallthethree-digitnumbersthataredivisible byeight(thatwouldberathersilly!),sinceitsprettyeasytotrydividingathree-digitnumberbytwoinyour headthreetimes.Ifyoucandivideitbytwothreetimes,itsdivisiblebyeight;ifyouhitanoddnumberbefore thethirddivision,itsnot.Forexample,29873458636->636->318->159,oops,notdivisiblebyeight. Youwillnoticethatthereisanicesimpledivisibilityrulelistedaboveforeverynumberuptotenexcept seven.TheonlydivisibilityruleIhadeverseenforsevenwasrathercomplicatedandhardtoperforminones head,makingitratheruseless.Atleast,Ithinkitwas,becauseIdontrememberit. Butjusttoday,IreadanexcellentpostoveratFoxmaths!explainingcompletewithderivationanice divisibilityruleforseven.Theruleisthis:takethenumber,andsubtracttwicethefinaldigitfromthenumber formedbytheremainderofthedigits.Theresultwillbedivisiblebysevenifandonlyiftheoriginalnumber was.Ofcourse,thisprocesscanberepeateduntilyoureleftwithsomethingsimple.Forexample,imagine startingwith3641:subtracttwice1from364,giving3642=362.Nowsubtracttwicetwofrom36,giving32, whichisnotdivisiblebyseven.Therefore,3641isnt,either.See,niceandsimple! ThereallyneatthingisthatthisisntpeculiartosevenFoxgoesontoshowhowthesametechniquecanbe used,inprinciple,toderiveasimilardivisibilitytestforanyprimenumber!Goreadit.
Posted in computation, links, number theory | 14 Comments
Change probabilities
Posted on June 9, 2008
157 of 224
http://mathlesstraveled.com/
UScoinsyouputcoinsinthetop,anditsortsthemintostacksbytype.Iwenttoputsomecoinsintheother dayandnoticedthattherewereatonofquartersinit,butalmostnonickels,whichmademewonderwhether therewasareasonforthat,orwhetheritwasjustsomesortoffluke.So,thequestionforyouis:wasitafluke? Orwouldyouexpectmetohavefewernickelsthanquartersinmycoin-sortingpiano? [Foranynon-USreaderswhodon'tknow,thevaluesofUScoinsare25(quarters),10(dimes),5(nickels),and1 cents(pennies).Actually,therearealsocoinsworth50(half-dollar)and100cents(dollar),butthosearefarless common.] Tobealittlemoreprecise,youcanmakethefollowingassumptions,allofwhichare,ofcourse,completelyfalse intherealworld,buthey,thisisamathproblem.=) 1. Istartedwithacompletelyemptycoin-sortingpiano. 2. Ineveruseanycoinsinmakingpurchases,butalwayspaywithbillsonly. 3. ThecentsportionofthepricesofthingsthatIbuyarerandomanduniformlydistributedbetween0and99; inotherwords,foranyparticularnumbernbetween0and99,thereisa1/100chancethatthepriceof somethingIbuywillbesomenumberofdollarsplusexactlyncents. 4. Cashiersalwaysgivemechangeinquarters,dimes,nickels,andpennies(nodollarsorhalf-dollarcoins), usingthefewestnumberofcoinspossible.(ForexampleifIamowed16centsinchange,Iwouldgetone dime,onenickel,andonepenny,notthreenickelsandapennyoranythinglikethat.) Asusual,postcomments,questions,and/orsolutionsinthecomments(dontpeekifyouhaventtriedsolvingit first!=)
Posted in challenges, counting, probability | 17 Comments
Follow
158 of 224
http://mathlesstraveled.com/
IllbeginbyprovidingananswertothefirstofthethreequestionsIposedinapreviouspost. Continuereading
Afewinterestingproblemsforyoutothinkabout: 1. Givenapositiveintegern,inhowmanywayscannbewrittenasasumofpowersoftwo,wheneachpower isallowedtooccuratmostonce?Forexample,11canbewrittenas allowedtowrite and dontcountasdifferentsums. denotesthenumberofdifferentwaystowritenasasumofpowersoftwo .Butwerenot ,since occurstwice.Theorderofthetermsinthesumsdontmatter,so
Hello again!
Posted on April 15, 2008
159 of 224
http://mathlesstraveled.com/
Thismethodisintuitive,andworkswellforrelativelysmallnumbers,but(theresalwaysabut,isntthere?)it
Follow
160 of 224
http://mathlesstraveled.com/
failshorriblyforlargernumbers.Forexample,whatifyouwantedtofindtheGCDof2257394839and 45466644967?(Goahead,tryit!=)Theproblemisthatfactoringishard,evenforcomputerswherebyhard Imeanhardtodoquickly.Itseasytowritecomputerprogramstodofactoring,itsjustthatnooneknows howtowriteaprogramwhichfactorslargenumbersquickly.(BylargeinthiscontextImeannumberswith hundredsofdigits;thetwonumbersIgaveasanexampleabovecouldbefactoredveryquicklybyacomputer, butIbetYOUcantfactorthemquickly,sothepointisthesame.) Well,asyouprobablyguessed,theresabetteralgorithmforcalculatingtheGCDoftwonumbers,sincetheGCD canactuallybefoundwithoutanyreferencetofactorizations.ThisbetteralgorithmiscalledtheEuclidean Algorithm,inhonorofEuclid,thefirstmathematiciantowriteitdown(around300BC,makingitoneofthe oldestalgorithmsknown!).ItsbasedonthepropertyIshowed(andproved)inmylastpost,namely,that . (Technically,inmylastpostIshowedthat versa.)Hereshowitworks: 1. Giventwointegersmandn,iftheyarethesame,thenclearlytheyareequaltotheirgreatestcommondivisor. 2. Otherwise,reducethelargerofthetwonumbersbysubtractingthesmallernumberfromit. 3. Lather,rinse,repeat. Thatsit.Wereyouexpectingsomethingmorecomplicated?Wealreadyknowthatdoingthesubtractionstep doesntchangetheGCD,andsincethenumbersarealwaysgettingsmaller,thealgorithmmusteventuallystop. Genius!ThatEuclidwasonesmartdude.Anyway,letstryitonasimpleexample:findingtheGCDof56and20. 1. 56isgreaterthan20,sosubtract20from56,leaving36and20. 2. 36isstillgreaterthan20,sosubtract20again,leaving16and20. 3. Subtract16from20,leaving4and16. 4. Subtract4from16threetimes,eventuallyleaving4and4. 5. HencetheGCDof56and20is4!(Thisiseasytoverifybyfactoring.) Neat!ButwhathasallthisgottodowiththeCalkin-Wilftree?Well,ifyouhaventalreadynoticed,the EuclideanalgorithmisexactlythesameasthemethodforfindingyourwayuptheCalkin-Wilftree!Inparticular, sincealltherationalsintheCalkin-Wilftreeareinlowestterms,findingyourwayuptheCalkin-Wilftreefrom m/nexactlycorrespondstousingtheEuclideanAlgorithmonmandninordertoshowthattheirGCDreallyis1. Andingeneral,if ,runningtheEuclideanAlgorithmonmandnislikefindingyourwayupa Calkin-Wilftreeinwhichallthenumbershavebeenmultipliedbyd(sothatitstartsatd/dinsteadof1/1).Inan importantsense,wecansaythattheCalkin-WilftreeistheEuclideanAlgorithm,intreeform! Inclosing,IshouldnotethatinpracticetheresaslightimprovementwecanmakeuponthebasicEuclidean Algorithm.Toseewhatitis,considerrunningtheEuclideanAlgorithmon20451and2.Well,20451isbigger than2,sosubtract2from20451,leaving20449and2.Subtract2again,leaving20447and2.20447isstill biggerthan2,sosubtractthisisthepointwherewestartgettingverybored.Everyonecanseeperfectlywell
Follow
,butsinceanythingthatdividesxalsodivides
-x,wecanfliparoundthem-nifwewant:anythingthatdividesm-nwillalsodivide-(m-n)=n-m,andvice
161 of 224
http://mathlesstraveled.com/
ContinuingaseriesabouttheCalkin-Wilftree(seethoselinksforsomebackground),todayIdliketoshowwhy alltherationalsinthetreemustbeinlowestterms.Letsstartoffwithalittlenumbertheory! Whatdowemeanwhenwesaythatafractionisinlowestterms?Wesimplymeanthatthenumeratorand denominatorhavenocommonfactorsotherthan1.So isinlowestterms,but isnt,sincethenumerator anddenominatorarebothdivisibleby7.Youwillsometimesalsohearthetermrelativelyprimetodescribetwo numberswhichhavenocommonfactors.Itdoesntreallyhaveanythingtodowithbeingprime;forexample,6 and49arerelativelyprime(andhence isinlowestterms),eventhoughneither6nor49isprime.
YoushouldbeabletoverifyafewsimplepropertiesoftheGCDfunctionyourself.Forexample, ,and ourpurposes,isthat mandn,sowecanwrite and .Anotherslightlylessobviousproperty,butmoreimportantfor .Whyisthis?Well,suppose .Therefore .Thatmeansddividesboth ,soddividesm+ntoo!So,disa ,soitwouldbeacommondivisorofmandnbutwe .Theargumenttoshowthat isexactlythe
alreadyknowthatdisthegreatestcommondivisorofmandn.Therefore,dreallyisthegreatestcommondivisor
162 of 224
http://mathlesstraveled.com/
intheCalkin-Wilftree, .
.Andsupposingitistrue
InmylastpostIclaimedthatthistreehasanumberofremarkableproperties;inthisandsubsequentpostsI plantoshowexactlywhythesepropertiesaretrue,sinceforthemostparttheyhaverelativelysimple explanationsalthoughthatinnowaymakesthemanylessremarkable! TodayletsbeginbytacklingthefirstpropertyIclaimed,namely,thateverysinglepositiverationalnumber occurssomewhereinthistree.Howcanweprovethis? First,noticethatgivenanyrationalinthetree,thereisanyeasywaytotellwhetheritistheleftorrightchildof itsparent.(Canyoufigureitoutbeforereadingon?) Sinceleftchildrenarealwaysoftheform numerator( ,theywillalwayshaveadenominatorgreaterthantheir and ,todecide
Follow
,sincejispositive);andviceversaforrightchildren,whichareoftheform
consequentlyhaveanumeratorgreaterthantheirdenominator.So,givensomefractioninthetree
163 of 224
http://mathlesstraveled.com/
whetheritisaleftorrightchild,justcomparemandn.Ifnisgreater,itisaleftchild,anditsparentis ;otherwise,itistherightchildof .
Forexample,ifwestartwith5/3,weseethat5>3,so5/3mustbetherightchildof(5-3)/3=2/3;2/3,in turn,hasagreaterdenominator,soitistheleftchildof2/(3-2)=2/1,and2/1istherightchildof1/1.
Infact,itiseasytoseethatIvejustdescribedasimpleprocedureforfindingyourwayupthetree,startingfrom anypositiverationalinlowestterms.Ateachstep,justtakethenumeratoranddenominator,andsubtractthe smallerfromthelarger.(Theycanneverbeequaluntilwegetto1/1,sincewestartoutwithsomethingin lowestterms.)Buthowdoweknowthatwewilleventuallyreach1/1thisway?Well,boththenumeratorand thedenominatorarealwayspositiveduringthisprocess(theystartoutpositive,andyoucantgetsomething negativebysubtractingsomethingsmallerfromsomethinglarger),andoneofthemgetssmallerateverystep. Thinkaboutthisforaminute.Theymusteventuallyreach1/1theresnowhereelseforthemtogo! Well,ifwecanfindapathupto1/1fromanyreducedpositiverational,everysuchrationalmustbeinthetree inthefirstplace!Youmayalsonotethatsincewehavenochoiceateachstep,thereisexactlyonepathfromany rationaluptotherootofthetreewhichmeansthateachreducedrationaloccursinonlyoneplaceinthetree; therearenoduplicates. Now,technically,onethingwehaventshownisthattherearentanyunreducedrationalswhichsneakilysneakin alongwiththereducedones;butthatsnottoohardtoshow,andIlltalkaboutthatnexttime. Thereareseveralotherinterestingthingsgoingonhereforexample,thepathfromanyreducedrationalupto therootofthetreecorrespondsdirectlytousingtheEuclideanAlgorithmtoprovethattherationalis,infact, reduced!AndifyouinterprettheleftsandrightsinthepathaszerosandonesinbinarybutImgettingahead ofmyself,thatsforalaterpost.=)
Posted in number theory, pattern, proof, recursion | 10 Comments
164 of 224
http://mathlesstraveled.com/
TodayIdliketocontinuemyexpositionofthepaperRecountingtheRationals,whichIintroducedina previouspost.Recallthatourgoalistocomeupwithanicelistofthepositiverationalnumberswherebya nicelistwemeanonewhich: 1. iseasytodescribe, 2. includeseveryrationalnumber, 3. exactlyonce, 4. inlowestterms, 5. atafiniteindex. Soundslikeaprettytallorder!Butitspossible,asCalkinandWilfshow.So,withoutfurtheradodidyou knowthatfractionsgrowontrees?Suretheydo!Heresone:
Thisisatreeoffractionsdefinedbythefollowingsimplerules: 1. Thefractionatthetop(theroot)ofthetreeis1/1. 2. Eachfraction theleftis inthetreehastwochildren(thatis,fractionsunderneathitconnectedbybranches):to ;totherightis . ,sorule2saysthattheleftchildshouldbe .Likewise,thechildrenof are and
Prettysimple,right?Thepictureaboveonlyshowsthefirstfourlevelsofthetree,butitsclearhowtocontinue
Follow
165 of 224
http://mathlesstraveled.com/
extendingthetreedownwardsasfarasyoudlike(forexample,thefirsttworationalsonthenextlevelare1/5 and5/4).Now,guesswhat? 1. Everypositiverationalnumberoccurssomewhereinthistree. 2. Therearenoduplicates:eachrationaloccursexactlyonce. 3. Everyrationalinthetreeisinlowestterms. 4. Ifyoulistouttherationalsinthistreeinorderbylevel(thatis,1/1,1/2,2/1,1/3,3/2,2/3,3/1,1/4), thedenominatorofeachrationalinthelistisequaltothenumeratorofthenext. 5. Thenthintegerinthelistofdenominators(1,2,1,3,2,3,1,4,3,5,)isthenumberofhyperbinary representationsofn,thatis,thenumberofwaystowritenasasumofpowersoftwo,whereatmosttwo copiesofeachpoweroftwoareallowed. Wow!Whatanamazingtree.Andallthatjustfromthosetwosimplerules!Itshouldbeclearthatthisisan answertoouroriginalgoal:justlistingtherationalsinthetreelevel-by-levelgivesusalistofthepositive rationalswithallthepropertieswewerehopingfor.Buttheresalotmoreinterestingstuffhereaswell.Next timeIllstarttalkingaboutwhyeachofthesepropertiesistruebutinthemeantime,youmaywanttotry figuringsomeofthemoutforyourself!Theyareallconsequencesofthetwosimplerulesweusedtodefinethe tree. (Hintfor#1,#2,and#3:rule2tellsushowtomovedownthetree,butwithalittlecleverness,youshouldbe abletofigureouthowtomoveupthetreeaswell.Forexample,assumingthat43/19occurssomewhereinthe tree,rule2tellsusthat43/62and62/19arebelowit;butcanyoufigureoutwhatfractionmustbeaboveit?)
Posted in infinity, number theory, pattern, recursion, sequences | 22 Comments
ThenextCarnivalofMathematicswillbehostedatArsMathematicaonJanuary11.Itsnottooearlytosendin yoursubmissions!
Posted in links, meta
166 of 224
http://mathlesstraveled.com/
makemathmoreinteresting. Itsnotalready? FromNaomiStevenssDiaryFromEngland:agovernmentbidtomakemathsmoreinteresting. 2. Neat,useperfectspheres todefinethekilogram! Offbyjustatoms HeatherLewis,of360,writesaboutAustralianscientistswhoaretryingtomakeaperfectsphere.Pretty incrediblestuff! 3. Freshmenworkingroups, andanswertheirownquestions. Effective?Discuss. JackieBofContinuitiesexplainsthepedagogicalapproachshetakeswithherfreshman.Besuretoread(or contributeto!)thefascinatingdiscussionthatensuesinthecommentssection. 4. Multiplechoice,now withbonuschoiceenhancement! Hardtests,nicetograde. MariaAndersen,attheTeachingCollegeMathTechnologyBlog,showsoffanewsortofmultiple-choicetest thatseasytograde,butavoidsmanyofthewell-knownproblemswithtraditionalmultiple-choicetests.I wishIdthoughtofthiswhenIwasteachinghighschool! 5. Areyoulearningtwo languagesmathANDEnglish? Greatsitesforyouhere. LarryFerlazzopresentsalistofthebestmathsitesforenglishlanguagelearners. 6. Mathematicsblogs aremany;whicharethebest? Heresoneopinion. DeniseofLetsplaymath!writesaboutherfavoritemathblogs. 7. Ihavenotyetread LettersToAYoungMathster. Imnotmissingmuch. Andrehaswrittena(not-too-favorable)reviewofIanStewartsbookLetterstoaYoungMathematician, overatherblogmeeyauw. 8. Albatrossesfly infractalpatterns!Ohwait experimentsucked. JulieRehmeyerdiscusseshowscientistsarerevisitingsomeresearchonfractalpatternsintheflightpatterns ofalbatrossatMathTrek.Apparently,justbecauseanalbatrosssfeetaredrydoesntnecessarilymeanits
Follow
167 of 224
http://mathlesstraveled.com/
flying.Whoknew? 9. Eightninety-eight,eight ninety-nine,ninehundredsigh infinityyet? ThadGuyhasafunnycomicaboutinfinity.Checkoutsomeofhisothercomics,tooIma(new)fan! 10. Needsocksinthedark? Thepigeonholeprinciple comestoyourrescue! MaryPatCampbell(akameep)presentsacutevideoexplainingthepigeonholeprinciple.Didyouknowthat atleasttwopeopleintheUShavetheexactsamenumberofhairsontheirbody?Youcantarguewithmath! 11. Acountingproblem: howmanybraceletsarethere? Harderthanitlooks MathMomcameacrossaninterestingMathCountsprobleminvolvingbeadedbracelets,whichgeneratedsome greatdiscussion.Howwouldyousolveit? 12. Listofrationals, bothelegantandcomplete? Isitpossible? Yourstrulyhaspostedthefirstinaplannedmulti-partseriesexplainingaparticularlyelegantwayto enumeratethepositiverationalnumbers. 13. Kochsnowflakefractal: Area?Perimeter? Fractalsaresostrange OveratReasonableDeviations,rodusesgeometricseriestocalculatetheareaandperimeteroftheKoch snowflake.Theresultisrathersurprising! 14. TwelveDaysofChristmas? Howmanypresentsisthat? Letsfigureitout! OveratWildAboutMath!,SolLedermanpresentsaseasonally-appropriateexplorationincountingpresents. Fun! 15. Atrickypuzzle: rectanglesandanglesums. Isolvedit,canyou? JD2718sharesagemofapuzzleinvolvingthesumofsomeangles.Itstrickyareyouuptothechallenge?I wouldespeciallyencouragewould-besolverstocomeupwithanicegeometric solution(Icouldnt)! 16. PascalsTriangle:
Follow
168 of 224
http://mathlesstraveled.com/
writingitoutisachore. Howfastdoesitgrow? Foxy,ofFoxMaths!fame,presentsaninterestingtwo-partanalysisoftheasymptoticgrowthoftherowsof Pascalstrianglenotthegrowthoftheactualvaluesintherows,butofthespaceneededtowritethem! makinguseofsomecleveralgebraicgymnasticsandasymptoticanalysis. 17. Inhowmanyways cantheNaurugraphbedrawn? Theanswer:alot! DavidEppsteinof0xDEpresentsThemanyfacesoftheNaurugraph:acollectionofdiversewaystovisualize aparticulargraphwhichhedubstheNaurugraph,duetothesimilarityofoneofitsdrawingstotheflagof Nauru.Planartesselation,hyperbolictesselation,embeddingonthesurfaceofatorusallthatandmuch more,with,yes,prettypicturesforeverything!Eventhosewhodontunderstandthearticleitselfshouldstill gotakealook,solelyforthesakeofthepictures.=) Thankstoeveryoneforthegreatsubmissions,Ihadafuntimereadingthemandputtingthistogether.Thenext CoMwillbehostedatArsMathematica.Asalways,emailAlonLevy(includingCarnivalofMathematicsinthe subjectline)ifyoudliketohostanedition. Wait!Beforeyougo,inhonorofthenewyear,heresonelastlinkfromMikeCroucheratWalkingRandomly, whowantstoknow:whatisinterestingaboutthenumber2008?
Posted in algebra, books, calculus, challenges, counting, fractals, geometry, infinity, links, meta, number theory, pascal's triangle, pattern, people, sequences, trig, video | 17 Comments
ThisisthefirstinaseriesofpostsImplanningtowriteonthepaperRecountingtheRationals,byNeilCalkin andHerbertWilf,mathematiciansatClemsonUniversityandtheUniversityofPennsylvania,respectively.Im reallyexcitedaboutit,andIhopethatyoullsoonseewhy!Itsanincrediblyelegantandinterestingpaper,but itsalsoquiteaccessibletoanyonewithonlyamodestbackgroundinmathematicsthatis,itwouldbeifitwere longerthanthreeandahalfpages.CalkinandWilfsmainaudienceisothermathematicians,ofcourse,sotheir presentationisfairlyconcise,trustingthereadertofillinmanyofthedetails.So,Iplantotakemytimegoing throughtheirideas,fillinginmanyofthedetails,andhighlightingsomeinterestingtangentsalongtheway. However,IdonotplantodumbitdowninanywayImgoingtowriteabouteverysinglebitofmathematics intheirpaper. Today,bywayofintroduction,Idliketotalkaboutthemotivatingquestion:isitpossibletomakealistofall thepositiverationalnumbers?Ifitispossible,howcanwedoitinaniceway?
Well,letsthinkaboutit.Howwouldyoumakealistofallthepositiverationalnumbers?(Youmaywishtostop andactuallythinkaboutthisquestionforafewminutes.No,really!)Recallthatrationalnumbersaresimply
Follow
169 of 224
http://mathlesstraveled.com/
Unfortunately,whiletechnicallycorrect(forsuitablevaluesoftechnically),thisisnotaverygoodsolution. Theproblemisthatifyoutriedtowritedownthislist,youdneverevenmakeitthroughtherationalswith denominator1,sincethereareinfinitelymany!Youwouldnever,evergetto1/2,letalonesomethinglike 43/19.Wedlikeourlisttocontaineverypositiverationalatafiniteindex:thatis,ifsomeoneelse(say,your evil,plaid-pants-wearing,math-hatingarch-nemesis)picksapositiverationalnumber,nomatterwhatitis,you shouldbeabletostartwritingoutyourlistofrationalsfromthebeginningandeventuallyaslongasyoukeep writingforalongenough,yetfinite,amountoftimewritedownthechosenrational.Obviously,ourfirsttryis afailureinthisdepartment.Thatevilarch-nemesishasonlytopicksomethinglike1/3,andweresunk! Now,youmaythinkthisisimpossible:ourfirsttryfailed,soitwouldseem,becausetherearetoomany rationals.Wecouldntevenmakeitthroughalltherationalswithdenominator1;howcanwepossiblyhopeto rearrangethingssothateveryrationaloccursatafiniteplaceinthelist?Well,thefirstruleofdealingwith infinityis:donttrustyourintuitionwhendealingwithinfinity!Asitturnsout,therearenttoomanyrationals, wejusthappenedtoputtheminabadorder.Togetabettersenseofwhatsgoingonhere,thinkaboutmaking alistofallthepositiveintegers,likethis:first,writedownalltheoddpositiveintegers;then,writedownallthe evenones.
170 of 224
http://mathlesstraveled.com/
followedby1/4,2/3,3/2,4/1,andsoon.Thisisthesamethingasputtingtherationalsinagrid,andlisting thembydiagonals,likethis:
Prettysimple,right?Now,itseasytoseethateverypositiverationalisincludedinthislist:thenumeratorand denominatorofeverypositiverationalsumtosomething(duh!),soanyrationalwecanthinkofwillgetincluded whenwegettothatsum.Moreexcitingisthefactthatthereareonlyafinitenumberofrationalswithanygiven sum(infact,youcanseethatthereareexactly rationalswithsum ),whichmeansthateveryrationalmust occuratafiniteplaceinthelist!Hooray!(Bytheway,anotherwaytosaythatwecanmakealistofthepositive rationalnumberslikethisisthatthepositiverationalsarecountable.Itisanastonishingfact(withaniftyproof) thatalthoughtherationalnumbersarecountable,therealnumbersarentbutthatsforanotherpost!) Theresstillsomethingunsatisfyingaboutthissolution,though:manynumbersoccurmorethanonce.Infact, everynumberoccursinfinitelymanytimes!Forexample,1/1,2/2,3/3,4/4,andsoonarereallyallthesame rationalnumber(namely,1)buttheyalloccurseparatelyinourlist.Thesameistrueof1/2,2/4,3/6andso on.Shouldweleavetherepeatsin?(Bleh.)Shouldwejustsaythatwewontwritedownanynumbersthathave alreadyoccurredearlier?(Yuck.)Eitherwayseemsinelegant. Isittoomuchtoaskforalistofthepositiverationalswhichincludeseachnumberexactlyonce,inlowest terms? Asyouhaveprobablyguessed,itisnttoomuchtoaskandthatswhereCalkinandWilfspapercomesin!They describeanextremelyelegantwaytolistallthepositiverationalnumbers,whichhasalltheniceproperties wevejusttalkedabout,andafewmorebesides.Inthenextpostinthisseries,Illrevealwhatthatlistactually is,andthenIllspendseveralpoststalkingabout(andproving)allofitsniceproperties.Alongthewaywelltalk aboutbinarytreesandbinarynumbers,theprincipleofinduction,recursion,andabunchofotherinteresting things. (PStheCarnivalofMathematicsiscomingsoon!Therearestillafewmorehoursleftforlast-minute submissionsIshouldhaveitupbymidnightattheearliestortomorrowmorningatthelatest.Getexcited!=)
Posted in counting, infinity, number theory, pattern, sequences | 19 Comments
171 of 224
http://mathlesstraveled.com/
proveit!Sincenisperfectif Applyingtheformulafor
,wewanttoshowthat
,thisisjustsomestraightforwardalgebra.(Note:bystraightforwardIdontmean
Follow
172 of 224
http://mathlesstraveled.com/
mustbeprimeisveryimportant:the
assumesthatnisfactoredasaproductofprimepowers,sothecomputationaboveisinvalidif
prime?Well,firstofall,mmustbeprime;ifm .Butisitenough
Noticethatthefirstfourperfectnumberscorrespondtothefirstfourprimes,2,3,5,and7:
Thenextone,however,dashesourhopes: necessarilymeanthat
isntperfect:wehaveonlyprovenabovethat
173 of 224
http://mathlesstraveled.com/
JimBlinnaspartofProjectMATHEMATICS!.
Also,dontforgettopostyourdiscoveriesaboutperfectnumberfactorizationsascommentstotheprevious post!
Posted in famous numbers, geometry, links, video | 5 Comments
Recallthatthefirstthreeperfectnumbersare6,28,and496.Andifyoutriedcomputing here?(Hint:tryfactoring)
asIsuggested
neartheendofpartI,youmighthavenoticedthat8128isperfectaswell!Doyouseeanyinterestingpatterns
Postyourdiscoveriesascommentshere(unlessyoualreadyknowtheanswer,inwhichcaseyoushouldrefrain fromspoilingotherpeoplesfun=).
Posted in challenges, famous numbers, number theory | 4 Comments
Foryourviewingpleasure,afantasticallybeautifulvideoaboutMbiustransformations,whicharefunctionsof theform
.Forexample,
isaMbiustransformation
isalsoaMbiustransformation.However,
.SinceanyMbiustransformationsendsacomplexnumberztoanothercomplex
,itcanbethoughtofasatransformationonthecomplexplane.Thequestionis,whatsortsof
transformationsarepossible?Thatswhatthevideoisabout.
Follow
174 of 224
http://mathlesstraveled.com/
ThevideowasmadebytwomathematiciansattheUniversityofMinnesota,DouglasArnoldandJonathan Rogness.Theresmoreinformationaboutthevideohere.
Posted in complex numbers, geometry, video
).Ofcourse,thisisslightlynonstandard -notation;
Forexample,
.So,thefunctionthatwehavebeencalling
isreally
,and
Follow
175 of 224
http://mathlesstraveled.com/
Doyouseethepattern?18canbefactoredas
,andeverydivisorof18isoftheform
,where
and
(thatis,each fallsbetween0andthecorresponding ,
Inotherwords,togetadivisorof18,firstchooseapowerof2 ofalldivisorsoftheform
andthenchooseapowerof3
Thedotsinthemiddleindicatethatthereisoneterm
andtherefore
Follow
176 of 224
http://mathlesstraveled.com/
Looksfamiliar,doesntit?Sureitdoes!Nowdoyouseewheretheformulafor Nextup:findingmoreperfectnumbers!
Posted in algebra, famous numbers, number theory | 8 Comments
comesfrom?
TodayIdliketotalkaboutperfectnumbers,whichtouchonsomecleveralgebraandsomeneattopicsinnumber theory.Atleast,Illstarttalkingaboutthem,sinceitwillprobablytakemethreeorfourpoststosayeverythingI wanttosay.=) Withoutfurtherado,thedefinitionofperfectnumbersisverysimple:anumbernisperfectifitsproperdivisors addupexactlyton.Adivisorofn,ofcourse,isanumberwhichevenlydividesn;talkingabouttheproper divisorsofnsimplyexcludesnitself.Forexample,theproperdivisorsof6are1,2,and3,whichhavethesum1 +2+3=6so6isaperfectnumber.Anequivalentwayofexpressingthedefinitionisthatnisperfectifall itsdivisors(includingnitself)adduptotwicen.Thesumofallthedivisorsofnisoftenwritten formally,wecanwritethatnisperfectif . ,so
?Onewaywouldbetosimplycheckeverynumberfrom1to252tosee
.Ingeneral,wecanwriteanynumbernin
where
forexample,wewouldhave
Now,Iclaimthatifnisfactoredintheformabove,then
[Incidentally,areyouoneofthosepeoplewhofreaksoutwhenyouseeascary-lookingequationliketheone above?Well,stopitthisinstant!Ifyouthinksomethingistooscaryorcomplicatedforyoutounderstand,then
Follow
177 of 224
http://mathlesstraveled.com/
you'reabsolutelyright--becauseyouhaven'tevengivenyourselfachance.Butifyouforceyourselftogetover yourinitialfear,takeagoodhardlook,andconsideritslowlyinsmallpieces,youmightbesurprisedathow muchyoucanunderstandafterall.] BigPi( )isjustlikeBigSigma( ),exceptthatitdenotesaproductinsteadofasum.Youcanreadmoreabout sigmaandbigpinotationhere.Inthiscase,theformulafor ofn,wecompute justmeansthatforeach inthefactorization : ,andthenmultiplythemalltogether.Asanexample,wecancompute
Letsalsotryiton perfectnumbers.
and
.Weknowthisshouldyield12and56respectively,since
for
Itworks!OK,nowitsyourturn:canyouusethismethodtocompute
CheckoutthefollowingtotallysweetvideoofzoomingintoaMengersponge!
178 of 224
http://mathlesstraveled.com/
easytomake.Hereswhatyoudo: 1. Startwithasolidcube. 2. Slicethecubeinto27equallittlecubes,bymakingtwoparallelslicesineachdimension(justlikeaRubiks cube). 3. Removethecubeintheverycenter,andthesixcubesinthecenterofeachfaceofthebigcube.Youllbeleft withacube-shapedobjectwithsquareholesgoingstraightthroughthemiddleoneachside. 4. Repeatthisprocedureoneachofthe20remaininglittlecubes,andsoonrecursivelyforever. TheWikipediapagehassomenicepicturesthatshouldmakethisprettyclearifitsnotalready.Incasethevideo didntblowyourmindenough,youshouldnotethatMengerspongeshavezerovolumebutinfinitesurfacearea! (Howisthatpossible?!Ihearyoucryindismay.Well,infinityplaysveryweirdgameswithyourintuition!) FoundviaGodPlaysDice.
Posted in fractals, video | 6 Comments
firstneedtheslope.Slopeisriseoverrun,thatis,thechangeinydividedbythechangeinx,whichinthiscase
factorsas
,sothe
scancelaslongas ,butthatsOKsince
andwedbetryingtodrawalinefromapointtoitself,whichdoesnt
makesense.Thisjustmeansthatwecantusethismethodtocomputeaproductlike andnegatetheresult.So,wenowhave
Thisisalreadyaperfectlygoodequationfortheline,butletssimplifyitabit:
Follow
179 of 224
http://mathlesstraveled.com/
Nowthatwehaveanequationfortheline,wewanttoknowwhereitcrossesthey-axis.Butthisissimple:it crossesthey-axiswhenxiszero;plugging0intotheaboveequationforxyields
Posted in algebra, geometry, proof
Geometric multiplication
Posted on November 8, 2007
Ivejustlearnedaboutafairlyuseless,yetutterlybeguilingmethodforperformingmultiplication,andIdliketo shareit! Supposeyouhavetwonumbersyouwishtomultiply,callthemaandb.Yourfirstinstinctisprobablytowrite oneundertheotherandstartwritingdownpartialproducts,ortoreachforacalculator.Butwaittheres anotherway!Allyouneedisapencil,aruler,andaVeryLargesheetofgraphpaper.Thefirststepistodrawthe parabolawhichisthegraphof correspondingto and (actually,thisstepisoptional).Now,findthepointsontheparabola .Inotherwords,plotthepoints and and .So,forexample,ifwe .Now,usetherulertoconnectthetwo
wantedtomultiply4by9,wewouldplotthepoints
Hello, reader!
Posted on November 3, 2007
Follow
180 of 224
http://mathlesstraveled.com/
Andnow,forthepromisedanalysisoftheNuclearPenniesGame! First,recalltherulesofthegame:thereisasemi-infinite(i.e.withabeginningbutnoend)stripofsquares,each ofwhichcancontainastackofanynumberofpennies(ornopenniesatall).Youareallowedtosplitapenny byreplacingitwithtwopennies,oneinthesquareoneitherside.Thisrulecanalsoberuninreverse;two penniesseparatedbyexactlyonespacecanbefusedintoasinglepennyonthemiddlesquare. Wesawhowtogetfromasinglepennyonsquare#7toasinglepennyonsquare#1.However,Iclaimedthatit isimpossibletomoveasinglepennyfromsquare#7tosquare#2.Letmeshowyouwhy. Weregoingtostartbydoingsomethingthatmightseemabitodd,butyoullseewhysoonenough.Weregoing tolabelthenthsquarewith .Likethis:
(Remember,
.)Now,wewillthinkofthenumberofpenniesonagivensquareasbeingmultipliedbythe
Now,heresthekeyidea:wewanttopickavalueforxsothattwopolynomialshaveequalvaluesifthey representpennyconfigurationsthatyoucanconvertbetweenwhileonlymakinglegalsplittingandfusingmoves. Ifwecandothat,allyouneedtodotoseewhetheritispossibletomovefromoneconfigurationtoanotheristo writedowntheirpolynomials,pluginthemagicalvalueofx,andseeiftheyarethesame! So,howcanwefindthismagicalvalueofx?Well,letssupposewestartwithasinglepennyonsquare#1.That wouldberepresentedbythepolynomial .Bythesplittingrule,wecanreplacethiswithapennyonsquare#0 andapennyonsquare#2,givingusthepolynomial .Wewantthesepolynomialstohavethesamevalue, .Now,whatifwehadstarted but sincewecanconvertbetweenthemwithalegalmove,sowemusthave thatsreallythesamethingas
withapennyon,say,square#4andappliedthesplittingrule?Inthatcasewewouldhave Thesamegoesforanystartinglocation,sotheequation
rule.Whataboutthefusionrule?Well,remember,thefusionruleisreallyjustthesplittingrulebackwards,soit Follow
181 of 224
http://mathlesstraveled.com/
givesustheexactsameequation. So,bothrulescanbesummedupbythissingleequation: number,justasIpromised! Now,ifitwerepossibletomoveasinglepennyfromsquare#7tosquare#2,thenwewouldhave isthesameas singlepennyfromsquare#7tosquare#2isntpossible!Infact,thesmallestpowerofxforwhich else,youcanonlymoveitbysixsquaresatatime! TheNuclearPenniesgameisoriginallyfromDanPiponiatANeighborhoodofInfinity(fromwhomIalsostolea lotofthenicepictures),whobaseditontheideasinthepaperSevenTreesinOne,byAndreasBlass.The mathematicallyintrepidmightwanttotryreadingsomeoftheoriginalpaper,whichisreallyquiteexcellent butthecontentofthepaperiswaydeeperthanwhatIvewrittenabouthere,sodontbediscouragedifyou dontunderstandalotofit(Idontunderstandtheentiresecondhalfofthepaper!).Justtryingtogivecredit wherecreditisdue.
Posted in algebra, complex numbers, games, proof | 3 Comments
.Allwehavetodoissolveittofindour .Aha,acomplex
magicalvalueofx.Well,usingthequadraticformula,thatsnothard:weget
,which is6.x,
.Well,isthattrue?Itturnsoutthatitisnt,asyoucanverifyforyourselfso,movinga
infact,isoneofthecomplexsixthrootsof1.Soifyouwanttostartwithasinglepennyandmoveitsomewhere
Itseemsthateveryonewithablogisalwaysapologizingfornotpostinginawhile,asifthishassomehow inconveniencedtheirreaders.Ofcourse,withthemagicoffeedreaders,emailnotifications,andthelike,thisis nottrueatall.You,gentlereader,inalllikelihoodhavenoteventhoughtaboutmyblogoncesincethelasttime Iposted.(Yes,Iforgiveyou.)SoIwontapologizefornotpostinginawhile.IfIdid,Imightaskyoutoplease forgivemeduetothefactthatIamhardatworkongraduateschoolapplications.ButIwont,remember? Onwards! YoumayrecallthatmylastpostconcernedthegameofNuclearPennies.Ifyoudontrememberitorifyou haventhadachancetotrysolvingityourselfnowisagoodtime! FromGeorgeBell(whoalsohasagreatsiteaboutpegsolitaireifyouenjoythesesortsofmathematicalgames, youshouldcheckitout)comesthefollowingexcellentsolution: Thispuzzleseemsratherdifficulttosolvebytryingrandommovesthatappeartogetoneclosertothe solution.However,considertheboardasequenceofintegers,eachbeingthenumberofpenniesatthat location,andthemovesasaddingorsubtracting(+1,-1,+1)tothreeconsecutivevalues. Thenbyinspectionwecancomeupwithasolution,notworryingaboutwhetherthenumberofpennies isalwayspositive,byaddingthecolumns:
Follow
182 of 224
http://mathlesstraveled.com/
000000010 000000101 000001011 000010111 000101111 001011111 010111111 101111111 110211111<--+1-1+1 111121111<--+1-1+1 111112011 111111101<---1+1-1 111111010<---1+1-1 111110100 111101000 111010000 110100000 101000000 010000000
Follow
183 of 224
http://mathlesstraveled.com/
Thefusionrule,ontheotherhand,statesthatiftherearetwopenniesseparatedbyexactlyoneintervening square,youmayreplacethembyasinglepennyinthatmiddlesquare.Forexample:
Follow
184 of 224
http://mathlesstraveled.com/
canyouendupwithjustasinglepennyinsquare#1,
Now,considersubtractingonefromtheother:
Butnowitisasimplemattertosolvefor :
Follow
185 of 224
http://mathlesstraveled.com/
Amazing!Itseemsweirdthataformulatogenerateintegersinvolvesallthesestrangenon-integerslike and butthereitis.Wecanevensimplifythisfurtherbynotingthatsince than1,ingeneral isverysmall.So,whatshappeninghereisthat than ,andsubtractingoffthe(verysmall) round(upordown)tothenearestinteger: hasanabsolutevaluesmaller isjustatinybitbiggerorsmaller and
gives exactly.Wecouldjustaswellcompute
Excellent!NowwecancomputeFibonaccinumbersdirectly,withoutcomputingallthepreviousones.
Posted in famous numbers, fibonacci, golden ratio, proof | 4 Comments
Golden powers
Posted on September 10, 2007
So,weknowfromapreviouschallengethat
.Thatsaprettyinterestingproperty,whichissharedonly
Interesting!Whatabout ?
And ?
186 of 224
http://mathlesstraveled.com/
forsome
,andseeifthisallowsus
aswell.Themethodweusedabovetoevaluate , andsoon
So,sinceweveprovedthatthestatementistruewhennis2,andwevealsoprovedthatitmustbetrueforn+ 1wheneveritstrueforn,itmustbetrueforall !
Nextup:wellusethisneatrelationshipbetween andtheFibonaccinumberstodiscoveranotherone!
Posted in famous numbers, fibonacci, golden ratio, induction, proof | 6 Comments
HaveyoutriedsolvingChallenge#10yet?Gotryitfirstifyouhavent.Itsnottoohard,Ipromise! Continuereading
.Aswellsee,thesefamousconstantsactuallyrelatetoFibonacci
numbersinsomeamazingways.Butfirst,wellneedafewpropertiesofthesenumbers.Canyoushowwhyeach
Follow
187 of 224
http://mathlesstraveled.com/
2. 3. 4. Extrapointsforespeciallyslickproofs.=)
Posted in challenges, famous numbers, fibonacci, golden ratio, number theory, proof | 6 Comments
USAMTS problems
Posted on August 30, 2007
Prime Shooter!
Posted on August 15, 2007
Hereisacollectionofinterestingmathproblems.Despiteappearances,theyallhavesomethingincommon.Can youfigureoutwhatitis? Asinglepairofbabyrabbitsisplacedonanisland.Theytakeonemonthtogrowup;afterthat,theyhave onenewpairofbabyrabbitseverymonth.Eachnewpairofbabyrabbitstakesamonthtogrowup,then starthavingbabyrabbitsoftheirown,andsoon.Howmanypairsofrabbitsareontheislandaftern months? Susiecanclimbeitheroneortwostepsatatime.HowmanydifferentwayscanSusieclimbastaircasewithn stairs?(Forexample,shecouldclimbastaircaseof3stairsin3differentways:1-2,2-1,or1-1-1.) Howmanydifferentwaysaretheretotilea2xnrectanglewith21dominoes? Ifmalebees(drones)areproducedasexuallyfromafemale(queen),butfemalebeeshavetwoparents,one
Follow
188 of 224
http://mathlesstraveled.com/
Asyoumayrecall,Iamwritingamathbook,andIfinallyhavemoredraftsreadyfortest-reading(justclick here)!TherearerevisedversionsofthePrefaceandChapter0,aswellasfirstdraftsofChapter1(ProblemSolvingandProof)andChapter2(Numbers).Asusual,anyandallfeedbackiswelcome!
Follow
189 of 224
http://mathlesstraveled.com/
Bytheway,thedraftsarehostedonanewblogwhichImusingformoreacademic/professional/mostlycomputer-relatedthings,incaseanyonereadingthisisinterestedinthatsortofthingtoo.
Posted in books, meta | 6 Comments
Carnival of Mathematics #9
Posted on June 4, 2007
Nowletsjustreplace with(A+B)andseewhathappens!
Follow
190 of 224
http://mathlesstraveled.com/
Pickanyintegeryoulike.Gotaninteger?OK,nowapplythissimplerule:iftheintegeriseven,dividebytwo; otherwise,multiplybythreeandaddone.Forexample,ifyoustartedwith10,youwouldget5;ifyoustarted with13,youwouldget40.Prettysimple,right?Youcanprettymuchdoitinyourheadforsmallnumbers. (Actually,ifyourewillingtoconcentrateyoucanprobablydoitinyourheadforbignumberstoo!Quick,what wouldyougetifyoustartwith217?) Youmightnotthinktheresanythingveryinterestingtobesaidaboutthisrulebutyouwouldbewrong. Thefunstartswhenweconsideriteratingthisrule.Ivetalkedaboutiterationbefore:itjustmeansrepeatingthe rule.So,forexample,ifwestartwith10,weget5;applyingtheruleagainto5,weget16;applyingitto16 gives8,andsoon.Whathappensifyoukeepgoing?Tryitbeforereadingon! Continuereading
191 of 224
http://mathlesstraveled.com/
Sowewritethisobservationasasimpledifferentialequation;afterswapping andzwecanintegrate:
Nowforareallygoodtime,set intheWorld:
.
Follow
192 of 224
http://mathlesstraveled.com/
Oops,somuchforpostingonceaweek!MyexcuseisthatIvebeenhardatworkonmybook.Well,nothingto dobutgetrightbackatit.Ipromise*Iwillbebetter**aboutpostingregularly***fromnowon. *IhadmyfingerscrossedwhenItypedthat.Seriously. **Forlowvaluesofbetter. ***Somerestrictionsmayapply. Anyway,IthoughtIwouldbeginanintermittentseriesdescribingsomecurrentlyopen(unsolved)problemsin mathematics.Itsprettyfascinatingthatinmathematics(unlikeinmanyotheracademicdisciplines)itsnottoo hardtocomeupwithquestionsthatareveryeasytounderstand,butincrediblydifficulttoanswer!Itjustgoes toshowthatsometimes,thesimplestquestionsendupbeingthedeepest. Today,Imgoingtotalkaboutthetwinprimeconjecture.Aprimenumber ,asyoumayrecall,isapositiveinteger greaterthan1whichhasnodivisorsotherthan1anditself.Forexample,17isprime,sincethereisnonumber lessthan17thatevenlydividesit,but18isnotprime(itiscomposite)sinceitisdivisibleby,forexample,3.The firstfewprimenumbersarethus2,3,5,7,11,13,17,19,23,29,31,37Primenumbersserveasbuilding blocksforalltheotherintegers,sinceanyintegercanbewrittenuniquelyasaproductofprimes(thisiscalled theintegersfactorization). Letslookatthesequenceofdistancesfromeachprimetothenext:1,2,2,4,2,4,2,4,6,2,6,Seea pattern?Isuredont.Infact,thisisoneofthemostenigmaticthingsabouttheprimenumbers:althoughthere aretheoremsdescribingapproximatelyhowoftenprimesoccur,thereisnoneatpattern(thatanyoneknowsof) whichdescribesexactlywhenprimeswilloccur.Asyougothroughbiggerandbiggerintegers,primestendtoget rareryetthereisstillnopattern.Onaverage,thehigheryougo,thefartheraparttheprimeswillbeyet everynowandthen,primesstilloccurrightnexttoeachother,like29and31.Pairsofprimeswhichareonly twoawayfromeachotherarecalledtwinprimes.Largerexamplesoftwinprimesinclude101and103,281and 283,andthewhopping
agargantuanpairoftwinprimeswith58711digitseach!Thisisactuallythelargestknownpairoftwinprimes, discoveredjustthisyear,onJanuary15.So,heresthequestion:arethereinfinitelymanypairsoftwinprimes,
Follow
193 of 224
http://mathlesstraveled.com/
Happy pi day!
Posted on March 14, 2007
Happy day!Today,March14,iscelebratedas day,sincewhentodaysdateiswritteninAmericanformat (3/14)itcorrespondswithacommonapproximationof (3.14).(IdontknowwhenEuropeanscelebrate day. [Edit:AccordingtoJester(seebelow),EuopeanscelebrateitonJuly22--22/7isanothercommon approximationof .]) ,ofcourse,istheratiobetweenanycirclescircumferenceanddiameter,andshowsupall overtheplaceinmathematics(notonlyingeometry).Asyouprobablyknow,itisntequalto3.14,or22/7;its actuallyirrational,whichmeansthatitcantbeexpressedasafraction,anditsdecimalrepresentationcontinues onforeverwithoutrepeating. 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899 86280348253421170679821480865132823066470938446095505822317253594081284811174502 84102701938521105559644622948954930381964428810975665933446128475648233786783165 27120190914564856692 Incelebrationofthisamazingnumber,herearesomefun factsandlinksforyou!
194 of 224
http://mathlesstraveled.com/
TheBinomialTheoremisanextremelyimportantandgeneral(andtotallysweet)resultinthefieldof combinatorics(whichisthebranchofmathematicsaboutcountingthings).Withoutfurtherado,hereitis:
,when
,whereaandbalwaysaddupton;thecoefficientsof
Ingeneralyougetatotalof terms,onecorrespondingtoeachpossiblewaytochooseastringofnxsandys. Everytermwithexactlykxs(andtherefore(n-k)ys)canbecombined,since,forexample, thenumberofsuchtermsisthenumberofwaystochoosekxsoutofnletters.Thus,theBinomialTheorem! Now,whyistheBTsosweet?Hereareafewreasons,intheformofproblemsforyoutotry: 1. Provethebinomialcoefficientsumequationfromlasttimeinyetanotherway(hint:expand BinomialTheorem). 2. Proveanotherinterestingbinomialcoefficientidentitybyexpanding 3. Compute , , , , happenswhenyoucompute ?Canyouthinkofawaytofixit? . .Noticeanythinginteresting?Whydoesthathappen?(Hint:11=10+1.)What
Follow
usingthe
195 of 224
http://mathlesstraveled.com/
4. AccordingtotheBT,whatis
?Doesthatlookfamiliar?
5. Ifyouknowsomecalculus,usetheBTandthedefinitionofthederivative
toprovethepowerruleforderivatives:
Challenge #9 Solution
Posted on March 4, 2007
RememberPascalstriangle?
Follow
196 of 224
http://mathlesstraveled.com/
forallintegers
.(Heresanexplanationofsigmanotationifyoudontknowwhatthe means.)
Iwontkeepyouinsuspense;itturnsoutthatthisistrue.Butcanyoufigureoutwhy?Postyourexplanations here!Iknowofatleasttwo,onehavingtodowiththewayPascalstriangleisdefined(intermsoftheadditionrule),andonehavingtodowiththewaybinomialcoefficientsaredefined.Butthereareprobablymore.
Posted in challenges, pascal's triangle, pattern, proof | 25 Comments
Carnival of Mathematics
Posted on February 24, 2007
Andnow,thetriumphantterminationtothetantalizingtaleoftetrahedraltotals! Tosumupsofar:webeganbyobservingthatthenumberofgiftsinthepopularsongTheTwelveDaysof Christmascanbedescribedbytetrahedralnumbers.Unsatisfiedwithaddinguptetrahedralnumbersbyhand,we firstexperimentedwithusingacomputertocalculatethemforus,butfoundeventhatmethodhaditslimits.In searchofthewayofcunningratherthanforce,wefirstdevelopedaformulaforcalculatingthesimplertriangular numbers,thenmadeaseeminglyunrelateddetourtodiscussbinomialcoefficients,andsawanamazing connectionbetweenbinomialcoefficientsandPascalstriangle.Itmightnotbeobvious,butwereincredibly closetoourgoalthepiecesareinplace;allthatremainsistoputthemtogether. ThefirstthingtoclearupiswhyonearthbinomialcoefficientshaveanythingtodowithPascalstriangle. Remember,thebinomialcoefficient
Follow
197 of 224
http://mathlesstraveled.com/
ItsclearwhytheleftandrightsidesofPascalstrianglearemadeofall1 s,anditsclearwhythecorresponding binomialcoefficientsarealsoequalto1(theyareoftheform additionrulethatcreatesPascalstriangle? LetstranslatetheadditionruleofPascalstriangleintothelanguageofbinomialcoefficients.Theadditionrule saysthattogetanyentryinPascalstriangle,youaddtheentryaboveitandtheoneaboveandtotheleft;ifa particularentryisgivenby theadditionrulesaysthat ,thentheonesaboveitandaboveandtotheleftare and respectively.So or theresonlyonewaytochoose nothing,oreverything).Sotherealquestionis,whydobinomialcoefficientsobeythesamekindofsimple
198 of 224
http://mathlesstraveled.com/
(Remember,theleftmostcolumnisthezerothcolumn.)Forthatmatter,thetriangularnumbersareinthe secondcolumn.(Andyes,thefourthcolumnisthepentatopenumbers,apentatopebeingthefour-dimensional analogofatetrahedron;pentatopenumbersarecreatedfromsumsoftetrahedralnumbers.Andthefifthcolumn is)Itsnottoohardtoseewhythisisso:thinkabouttheadditionrule,andtheprogressionfromacolumnof all1 s,toacolumnofthecountingnumbers,toacolumnoftriangularnumbers,toacolumnoftetrahedral numbers(ifyouhavetroublefiguringoutwhythisworks,leaveacommentandIllexplaininmoredetail). SothetetrahedralnumbersarejustthenumbersinthethirdcolumnofPascalstriangle.Butheresthe punchline:wealreadyknowhowtocomputetheentriesofPascalstriangle,usingbinomialcoefficients!A momentsthoughtrevealsthatthenthtetrahedralnumbercaninfactbegivenby (the+2 isbecausethe firsttetrahedralnumberisactuallyfoundinthethirdrow).Wecanexpandthisabitifwewant:
Woohoo!Letstryit:
youllget
justlikewefoundbefore.AndIllleavethefunof
Inapreviouspost,Iintroducedbinomialcoefficients,andwesawthattheycanbegivenbytheformula
Follow
199 of 224
http://mathlesstraveled.com/
|:!/~i.12 100000000000 110000000000 121000000000 133100000000 146410000000 15101051000000 161520156100000 1721353521710000 18285670562881000 19368412612684369100 11045120210252210120451010 1115516533046246233016555111
Notethatthefirstrowandcolumnofthetablecorrespondton=0andk=0,respectively.Soifwewantedto knowthevalueof,say, ,wewouldlookinthefourthrowandthesecondcolumntofind3,asexpected.Ifwe wantedtoknowthevalueof ,wewouldlookinthefifthrow,thirdcolumnsureenough,its6. Noticethatthefirstcolumn(correspondingtok=0)containsall1 s.Doesthatmakesense?Suretheres alwaysonlyonewaytochoosenothing!Noticealsothatalltheentriesintheupper-rightarezero.Theseare placeswherek>n.Thismakessensetoo,since,forexample,theresnowaytochoose7thingsifyouonlyhave 3options.Onemoreinterestingthingtonoteisthateachrowofthetableissymmetric.Forexample, and .Thismakessenseifyouthinkaboutitchoosingfourthingsoutofsix(forexample)isthesame aschoosingthetwothingsoutofsixthatyourenotgoingtochoose! Nowletsdosomethingcompletelyunrelated.Getoutapieceofpaper,oropenNotepad,orwhatever.Were goingtowritedownabunchoflinescontainingnumbers.Startbywritingdownasingle1byitselfonthefirst line.Nowforeachnewlineafterthat,startbywritinga1inthefirstcolumn,andthenforeachsubsequent columnwriteanumberwhichisthesumofthenumberaboveitandthenumberaboveandtotheleft(ifthere isnonumberabove,treatitaszero).Remember,thisiscompletelyunrelatedtobinomialcoefficients.Sothe firsttworowswouldlooklikethis:
1 11
Follow
200 of 224
http://mathlesstraveled.com/
Challenge #8 solution
Posted on February 16, 2007
inwhichyouwereaskedtofindaformulafor Continuereading
,thenthtriangularnumber.
Binomial coefficients
Posted on February 14, 2007
201 of 224
http://mathlesstraveled.com/
matter:ABisthesameasBA.)So,
Togetthere,letsstartwithsomethingabitsimpler.Sayyouhavendifferentfruits(anApple,aBanana,a Cherry,aDate,aumanEgguh).Howmanywayscanyoulinethemupinarow,puttingoneparticular fruitfirst,onesecond,andsoon?Imagineplacingthemonebyone.Forthefirstfruit,youcanchooseanyone ofthem,soyouhavenchoices.Forthesecondfruitintheline,youcannolongerchoosetheonethatsfirst,so youonlyhave(n1)choices.Thenforthethirdfruityouhave(n2)choices,andsoon,untilforthelastfruit youonlyhaveonechoice,sinceitstheonlyoneleft.Intotal,then,youhave haveonlythreefruits,youhave Forfourfruits,thereare aswell.=) Nowforanother,relatedquestion:supposeyoutakeyournfruits,andyouwanttolinethemupasbefore,but youonlywanttomakealineofkfruitsoutofthetotaln?Again,youhavenchoicesforthefirstfruit,(n1) choicesforthesecond,andsoon,exceptthistimeyoustopafterthekthfruit,forwhichtherewillbe(nk+ 1)choicessothetotalnumberofwaystodothisis : .Noticewecanwritethisas waysof puttingyourfruitsinorder.(Theexclamationpointrepresentsthefactorialfunction.)So,forexample,ifyou waysofputtingtheminorder:ABC,ACB,BAC,BCA,CAB,CBA. waysofputtingtheminorder.Iwontbotherwritingthemallout
here,butfeelfreetoverifythisforyourself.Itshouldbeobviousthatthisargumentextendstonon-fruitobjects
Forexample, seethisfunctioncallednPr.
.Whatweredoinghereiscountingpermutations;oftenoncalculatorsyouwill
,check!
.Nowyouknow.Isurewouldnthavewantedtocountallthosepossibilitiesby
Follow
202 of 224
http://mathlesstraveled.com/
Morehostingissuesrecentlysigh.ImseriouslyconsideringmovingTMLTtoadifferenthostingproviderthe onlyproblembeingthatrightnow,myhostingisfree,anditmightbehardtofindanotherhostwhichprovides allthetoolsIneed(LaTeX,imagemagick,PHP,andmySQL,forastart). Inothernews,giventhedismalfrequencyofmypostsrecently,Ivedecidedtotrystickingtoapost-a-week schedule.Wellseehowitgoes! Asyoumayrecall(youprobablydont),Iminthemiddleofaseriesofpostsbuildinguptoawayofcalculating tetrahedralnumbersbyhand.Thatsstillwherewereheaded,butitwillprobablytakeafewmorepoststoget there!Today,welltakeasmallstepintherightdirectionbyderivingasimplerformulaforcalculatingtriangular numbers. Recallthatthenthtriangularnumber(whichwellcall )isthesumofthefirstnpositiveintegers:
Follow
203 of 224
http://mathlesstraveled.com/
Book excerpt
Posted on January 23, 2007
Ileftoffthediscussionoftetrahedralnumbersinmylastpostbyposingthequestionofwhatthe144th tetrahedralnumberis,andpromisingtoexplainaquickwaytofigureitoutwithouthavingtoactuallyaddup thefirst144triangularnumbers.Istillintendtodothatbutfirst,Illdemonstratehowwecanuseacomputer tocalculateitforus.Althoughitwouldbeincrediblytediousanderror-proneforahumantocalculateandadd upthefirst144triangularnumbers,anymoderncomputercandoitinafractionofasecond(minecandoitin aboutthreemilliseconds). IllusetheprogramminglanguageJ,whichiscompletelyfreeandisgreatforplayingaroundwithmath.Ifyouve neverprogrammedacomputerbefore,dontworryJisntmuchlikeotherprogramminglanguages;althoughit doeshavealotofadvancedfeatures,itsprettyeasyandintuitivetogetstarted.Itmostlyjustactslikeareally sophisticatedcalculator.Ifyouwanttotrydownloadingittoplayaroundwithyourself(goahead,itsfun!),the websiteisjsoftware.com;heresalinktothedownloadpage.Somebooksandreferencematerialscanbefound here(Ihaventreadmostofthem,soIcantvouchforthedifficultylevel/quality.) Atitscore,Jactsjustlikeacalculator:youtypeinexpressions,anditevaluatesthem.Inallofthefollowing examples,anythingindentedthreespacesiswhatyoutype,andanythingnotindentedistheanswerprintedby J.
Follow
204 of 224
http://mathlesstraveled.com/
3+5 8 2-9 _7 9*8*5 360 8%5 1.6 !5 120 !20 2.43290200818e18 !20x 2432902008176640000
i.12 01234567891011
Thei.functioncreatesalistofintegersfromzerotoonelessthanthenumberyougiveit.Sotypingi.
12prints
>:i.12 123456789101112
+/>:i.12 78
Follow
205 of 224
http://mathlesstraveled.com/
+/\>:i.12 136101521283645556678
Gotthat?The>:
i. 12part,ofcourse,generatesthelistofnumbersfrom1to12.Weknowthat+/meanstoadd
206 of 224
http://mathlesstraveled.com/
(Edit,12/5/07:Iguessitsthattimeofyearagain,isntit?=)Ivestartedtoseealotmoretraffictothispostinthe lastfewdays.ForanyonefindingmethroughaGooglesearch,Iwantedtonotethatthiswasactuallythefirstpostin aseven-partseries,andyoucanreadtherestoftheserieshere:computingtetrahedralnumbers,triangularnumbers, binomialcoefficients, asolutiontothetriangularnumberchallenge,pascalstriangle,andtheconclusiontyingeverythingtogether.) OnthefirstdayofChristmas,mytruelovegavetome ThustheopeningwordstothepopularChristmassong.Incaseyoudontknowit(hey,itspossible),itconcerns anindividualwhorecounts,inobsessivedetail,acatalogueofgiftsreceivedfromtheirtruelove.Itisamatter ofsomespeculationwhetherthetruelovebitisintendedassarcasm,forreasonsweshallsoonsee.Atany rate,oneachofthetwelvedaysofChristmasthetruelovegivesthenarratorallthesamegiftsasonthe previousday,plusanewgiftiteminaquantitydeterminedbythenumberofdayssincethestartofChristmas. Forexample,onthefifthday,thenarratorreceivesfivegoldenrings,fourcallingbirds,threefrenchhens,two turtledoves,andapartridgeinapeartree.(Orfiveonionrings,fourcallingcards,threefrenchfries,twoturtle necks,andanMCHammerCD,dependingonwhichversionofthesongyouknow.)Thissongraisesseveral interestingquestions,includingWhattheheckisaturtledove?andWhodoesthat?Moretothepointofthis post,however,italsoraisesthequestion,So,howmanygiftsISthat!? Goodquestion,Imgladyouasked!Letsstartbythinkingabouthowmanygiftsaregivenoneachday.Onthe firstday,thenarratorreceivesonegift:apartridgeinapeartree.Onthesecondday,thenarratorreceivestwo turtledovesandapartridgeinapeartree:2+1=3giftsintotal.Onthethirdday,thereare3+2+1=6 gifts,onthefourthday,4+3+2+1=10gifts,andsoon.Ingeneral,itsnothardtoseethatonthenthday, thenarratorreceivesanumberofgiftsequaltothesumofalltheintegersfrom1ton.Sothenumberofgifts thenarratorgetsoneachdayare1,3,6,10,15,21,28,36,45,55,66,78. Thesenumbersareknownastriangularnumbers,duetothefactthattheycanberepresentedpictoriallybydots arrangedintriangles.Likethis:
207 of 224
http://mathlesstraveled.com/
Doyouseewhy?Eachlayerofatetrahedronisatriangleofdotsrepresentingatriangularnumber:henceeach tetrahedronisasumoftriangularnumbers.Thetwelfthtetrahedralnumber,364,tellsushowmanygiftsour narratorreceivedintotal.364giftsisalot.Andwithallthosegeeserunningaroundlayingeggseverywhere,the continualracketfromthedrummers,andsoon,ImnotsureIdreallywantthem. So,wevelearnedabouttriangularnumbersandtetrahedralnumbers,andthatthetotalnumberofgiftsreceived bythenarratorofthesongcorrespondstoatetrahedralnumber.Butwhatiftherewere144daysinChristmas insteadof12?Howmanygiftswouldourintrepidnarratorreceivethen?Easy,yousay,itsthe144thtetrahedral number!Well,true,butwhatisthatnumber?Wedontyetknowaquickwaytofigurethatoutotherthanjust addingeverythingupbutforanumberasbigas144thatwouldbeincrediblytedious(nottomentionthat wedprobablymakeamistake).Itturnsoutthereisaquickwaytofigureitoutbutthatwillhavetowaitfor thenextpost!
Posted in famous numbers, games, geometry, sequences | 17 Comments
Go resources
Posted on October 28, 2006
IfyouenduplearningGo,letmeknow!MaybeIcouldfindtimetogiveyoualessonortwoonKGS.
Posted in games, links, meta
Hosting issues
208 of 224
Follow
http://mathlesstraveled.com/
CirclesAreAwesome.Enoughsaid.
Posted in geometry, links | 2 Comments
AfterseeingJohnH.ConwayandRichardGuys TheBookofNumberscitedinyetanotherinterestingarticle/book/whatever,Ifinally decidedthatIclearlyhadtoreadit.(Itseemstogetcitedalotincertaincircles.)I wasntdisappointeditsafun,well-written,andfar-rangingtourofmathematical ideasallstemmingfromtheconceptofnumber .Youmightthinksuchatopicwould besomewhatlimiting,butyouwouldbeverywrong!AlongthewayConwayand Guymanagetotouchonsuchtopicsasnumbertheory,geometry,algebra,pi, fractions,partitions,Babylonians,infinity,irrationals,primes,pineapples,Fibonacci numbers,Pascalstriangle,complexnumbers,quaternions,surrealnumbers,harmonicnumberstonamejusta few. Inordertopacksomuchinterestingstuffintothebook,thepresentationisbynecessityfairlyconcise;forthis reasonandbecauseofthetopicscovered,thelevelofthebookisdefinitelymoreadvancedthanmanyofthe otherbooksonmybookshelf.Theauthorsdontshyawayfromadvancedtopics,butthewritingstyleisstill friendlyandcompelling.Evenifyoudontunderstandeverythinginthebook(evenIdidntfollowafewthings thefirsttime),youllundoubtedlylearnsomecoolthings,anditcouldbeabooktogrowwithasyoucontinue tolearnmoremathematics. AtsomepointIhopetocreateapagewithmoredetaileddescriptionsofallthebooksonmybookshelf(which canbefoundintherightmargin).Inthemeantime,ifyoureadabookthatyouthinkIshouldinclude,orread oneofthebooksalreadyonthebookshelfandwanttotalkaboutitorofferyouropinionorcomments,of coursefeelfreetoleaveacommentore-mailme. [Note:Amazon.comisn'tpayingmetolinktothemoranything,it'sjustaconvenientwayformetolinktomore infoaboutthebook.Ifyouwanttobuyacopy,ofcoursefeelfreetobuyitfromanywhereyouwant!]
Posted in books, famous numbers, geometry, golden ratio, infinity, links, primes | 3 Comments
Follow
209 of 224
http://mathlesstraveled.com/
Proof by animation
Posted on September 20, 2006
GIMPShasjustannouncedtodaythattheyhaveindeedfoundanewMersenneprime!
ObviouslyIcantprintthewholethinghere,butIcantellyouthatthefirst50digitsare 12457502601536945540085550157479950312279598515115,andthelast50digitsare 212445737104635692000092659011752880154053967871.Thisisnowthelargestknownprimenumber, breakingthepreviousrecordsetinDecember2005.(Ofcoursetherearelargerprimenumbersthereare infinitelymanybutthisisthelargestnumberthatwecanactuallypointtoandsay,thisnumberisprime.) Youcandownloadithere.Youcanevenorderaposterofit!(Itsprettyexpensivethough,sinceitsverydifficult toprintdigitstinyenoughtomakethewholenumberfitonaposter.) Unfortunately,at9,808,358digits,itsjustshyofthetenmilliondigitsneededtoclaimthe$100,000prize offeredbytheEFF.Butitsstillprettyexciting. Moreinformationcanbefoundinmypreviouspost.
Posted in links, primes
Challenge #5 Solution
Posted on September 7, 2006
Okay,timeforasolutiontoChallenge#5 Continuereading
Follow
210 of 224
http://mathlesstraveled.com/
areallMersennenumbers.Mersennenumberswhicharealsoprime(thatis,whichhavenodivisors otherthanthemselvesandone)arecalled(notsurprisingly)Mersenneprimes.Forexample,3and7are Mersenneprimes,but1023isnot( ).ThethingaboutMersennenumbersisthattherearewaysto writecomputerprogramstocheckwhethertheyareprimewhichareaLOTfasterthansimplytryingallpossible divisors.Forawhilenow,thelargestknownprimenumbershavebeenMersenneprimes. TheGreatInternetMersennePrimeSearchisadistributedcomputingeffortsortoflikeSETI@Homeifyouve everheardofthatwhichtriestofindnewMersenneprimes.Anyoneatallcansignuptohelp;allyouhaveto doisgototheirwebpage(linkedabove),downloadsomesoftware,andthenwheneveryouarenotusingyour computeritwillworkoncheckingreallybigMersennenumberstoseeiftheyareprime.Giveitatry!Itwont runwhileyoureactuallyusingyourcomputer,soyouwontnoticeanyslowdown.Andyouhaveasmallchance ofbeingfamous(well,sortof)orevenreceivingacashprizeifyourcomputerhappenstobetheonetodiscover anewprime. So,howbigarethesenumbersweretalkingabout?Well,thelargestcurrentlyknownprimenumber(not countingtheonethatwasjustannounced,whichwedontknowyet)is is9MBinsize! YoucanreadmoreaboutMersenneprimesonMathWorld.
Posted in links, primes | 1 Comment
,whichhasawhopping
9,152,052digits!Youcandownloadithere,butkeepinmindthatsinceeachdigittakes1bytetostore,thefile
Challenge #7
Posted on July 28, 2006
ThisdelightfulproblemiscourtesyofDianaDavis(dontfollowthelinkunlessyouwanttoseethesolution, though!),althoughIdidtakethelibertyofformulatingitslightlydifferently.=) Onebrightandsunnyday,yourewalkingdownthestreetthinkingaboutfractals,andyouareaccostedbya strange-lookingwomanwithclothescoveredinprintedtriangles,protractors,andcompasses(alaMs.Frizzle fromtheMagicSchoolBus).Ihaveamathematicalpropositiontomake!shesays.Yourinitialreactionisto walkrightbymumblingsomethingaboutthanksbutIalreadyhaveaprotractorbutsomethingmakesyou pausetolisteninstead.Wewillpickarandomtriangle,shecontinues,andifitsobtuse,youpayme$1,butif itsacute,Illpayyou$2!Hmmyousay,whatdoyoumeanbyarandomtriangle?Oh,wewilljustroll thesetwospecialdicehere,shereplies.Theyhaveinfinitysides,andwhenyourollthem,theygiveyoua completelyrandomnumberbetween0and180like28.3,94.11106749,andsoon.Wellusethemtopick Follow
211 of 224
http://mathlesstraveled.com/
Fractal Art
Posted on July 15, 2006
Follow
212 of 224
http://mathlesstraveled.com/
TakealookatthefractalartofJockCoopertherearesomeamazingimagesthere!Andtonsofthem.Hereare acouplemoreorlessrandomlychosenexamples:
Challenge #6
Posted on July 12, 2006
Follow
213 of 224
http://mathlesstraveled.com/
MegaPenny Project
Posted on June 14, 2006
Challenge #5
Posted on June 11, 2006
Andnowforsomethingcompletelydifferentorisit?
Follow
214 of 224
http://mathlesstraveled.com/
E-mailmewithquestions,comments,orsolutions,orpostthemhere.Also,ifanyonehassolvedeitherorboth partsofChallenge#4,feelfreetopostyoursolutionnow!
Posted in challenges, geometry | 2 Comments
Pi Music
Posted on May 23, 2006
215 of 224
http://mathlesstraveled.com/
Thedigitsneverrepeatsince isirrational.Trysearchingforyour7-digitphonenumber.Surprisedthatitwas found?EvenmoresurprisedthatIwassosureyourphonenumberwouldbefound? Well,letsthinkaboutitforaminute.Assumingthedigitsof areessentiallyrandom,thechanceofaparticular digithavingaparticularvalueis1in10;inotherwords,theprobabilityofaparticulardigithavingaparticular valueis .Sotheprobabilitythat7digitsinarowwillallhavecertainvalues(suchasyourphonenumber)is ,oronechanceintenmillion.Thismightsoundlikeaverysmallchance,butremember,wearetalking about3.2billiondigitsinwhichtosearch.Soinfact,wewouldexpectthatyourphonenumberoccursabout timesinthefirst3.2billiondigitsof !Thisalsomeansthatyouhaveagoodchanceoffinding anyeight-digitsequenceofnumbers,andafairlygoodchanceoffindinganynine-digitsequenceofnumbers,but yourchancesoffindinganyparticularsequenceoftenormoredigitsarenotsogood.Tryitandsee!
Posted in famous numbers
Follow
216 of 224
http://mathlesstraveled.com/
ForthoseofyoualreadyfamiliarwiththeMandelbrotSet,Isupposethiswillbelikevisitingwithanoldfriend. Forthoseofyouwhoarentyoureinforatreat!
(Notethatzoftendenotesacomplexnumber.)Nowstartwith
anditeratethefunctionf,bytakingeach andfollowthisprocessforafew
217 of 224
http://mathlesstraveled.com/
WecanmakeapictureoftheMandelbrotsetbylettingeachcomplexnumber coordinates
.Forexample,acomputercaneasilymakeapictureoftheMandelbrotsetbylookingateach
pointonthescreenonebyone,decidingwhichcomplexnumberc thatpointcorrespondsto,then(say)coloring thepointblackifc isintheMandelbrotset,andwhiteotherwise.(Often,insteadofjustwhite,programswill choosedifferentcolorsforpointswhicharenotintheMandelbrotset,basedonhowmanyiterationsthe programhadtodobeforeitcoulddecidewhetherthepointwasinthesetornot.) Youmightthinkthatwithsuchasimplefunction,thepicturewouldbesimpleaswelllikeacircle,ora parabola,orsomethinglikethat.Butinfactyougetthatcrazythingshownabove.Iterationcanmakeeventhe simplestfunctionsbehaveinverycomplexways! Infact,theMandelbrotsetiswhatisknownasafractal,anobjectwhichisinfinitelydetailedandcontains copies(ornear-copies)ofitselfonalldifferentscales.Thismeansthat(theoretically)youcankeepzoominginto theMandelbrotforever,andyouwillalwaysseedetailsjustasfineandcomplexasyoudoatthetoplevel. Moreover,asyouzoomin,youwillfindstructuresthatappeartobetinycopiesoftheentirepicture. Butdonttakemywordforitherearesomenicezoomed-inpicturesoftheMandelbrotset,andyoucanfind lotsmorewithGoogleimagesearch.Youmightalsowanttodownloadsomesoftwareforviewingfractalstobe abletoplayaroundwithityourself. Themostamazingthingisthatnoonemadeupthesepicturestheyhaveexistedforever,builtintothe mathematicalstructureoftheuniverse,justwaitingforsomeonetocomealonganditerateacertainfunction andmakeapictureoutofit.Andinfact,itsonlybeensincetheinventionofcomputersthatwevebeenableto dosuchthings(althoughitseasytocarryouttheiterationdescribedaboveforaparticular valueofc byhand,to doitforenoughdifferentvaluesofc tomakeadecentpicturewouldtakesolong,andbesomind-numbingly tedious,astomakeitpracticallyimpossible.) MoreabouttheMandelbrotset,ifyoureinterested: onDr.Math onMathWorld
Posted in convergence, fractals, infinity, iteration | 1 Comment
Challenge #4
Posted on May 3, 2006
Anothersequence-relatedchallengeforyoursequencingpleasure.ForthoseofyouinmyElementaryFunctions class,thisisextracredit.(Hence,ifyoupostacommentwithyoursolutions,pleaserefrainfrompostingan
Follow
218 of 224
http://mathlesstraveled.com/
explanationalongwithit.) 1. Findthesumofthefirst500termsofthisseries:
2. Findthesumofthefirst100terms:
Challenge #3 Solution
Posted on April 28, 2006
SolutionstoChallenge#3follow.Ifyouabsolutelymustreadthesolutionswithoutattemptingthechallenge,I certainlycantstopyou.ButSantaClausknows.Continuereading
Posted in sequences, solutions | 2 Comments
Challenge #3
Posted on April 22, 2006
219 of 224
http://mathlesstraveled.com/
numbersallaroundthemtheirage,phonenumberstheyknow,numberstheyhavejustrecentlybeenthinking of,ornumbersthatareprintedonthingsthattheycansee.(Forexample,stoprightnowandtakealookaround you,whereveryouarehowmanynumberscanyousee?Probablyhundreds.)Bybeingawareofthisyoucan learntoguesswhatnumberspeoplehaverandomlychosen. Thefirststepistospendsometimebecomingawareofthenumbersaroundyoutuningin,sotospeak.Pay attentiontonumbersyouseearoundyou,andnumbersthatyouhearpeoplesay.Althoughitdoesnthelp directlywithguessingnumberspeoplearethinkingof,Ivefoundthatdoingthingslikereadingthedigitsofpi outloudcanhelpjustbygettingmybraininamorenumber-mindfulstate. Afterthat,itjusttakespractice.Askyourfamilyandfriendstochooseanumber(startwithanumberfrom1-10, butwithmorepracticeyoumightbeabletodo1-100).Thentrytoguesswhatnumbertheyrethinkingof.But dontjustguessrandomly:trytobeawareofthesurroundingnumberenvironmentnumbersthathavebeen spokenrecently,numbersprintedonthingsnearby,andsoon.(Ifyourereallycleveryoucantrytodothings likeworkacertainnumberintoconversationseveraltimesbeforehavingtheotherpersonchooseanumber,to trytosubliminallyinfluencetheirchoice;butbecarefulnottobetooobvious.)Aboveall,trytosensewhat numberitfeelsliketheyarethinkingof.Iknowthatsoundssilly;ofcourse,mindreadingisntactually possible,butwhatImeanisthatifyouaretunedintothenumberenvironment,yoursubconsciousmight suggestanumberwithoutyourconsciousmindreallyknowingwhywhichcanfeelalotlikemind-readingeven ifthereareactuallymorecomplexandrealisticthingsgoingon. Ofcourse,dontbediscouragedifyoudontdoverywellatfirst!Itwilltakesomepracticebeforeyoustartto getbetteratit.Andeventhebestnumber-guesserscantguesscorrectlyallthetime.Ifyoucanguesscorrectly oneoutofeveryfivetimes,youredoingextremelywell!(Remember,bypurechanceyouwouldonlyexpectto guesscorrectlyoneoutofeverytentimes,iftheotherpersonchoosesanumberfrom1to10.) Happyguessing!Feelfreetocommentandletmeknowifitworksordoesntwork,interestingexperiencesyou havetryingthistechnique,oranythingelse.
Posted in meta | 4 Comments
Convergence
Posted on March 20, 2006
Follow
220 of 224
http://mathlesstraveled.com/
,andthesecondexpressionfrom (notetherearenoellipses)means
,startingwith1,
(Tryconfirmingthesevaluesforyourself.)Asyoucansee,itseemslikethesenumbersaregettingcloserand closertosomethingheresagraphicalviewofwhatsgoingon:
Theredsquaresindicatethestopping-pointvaluesthatwecalculated:theleftmostsquare(inthebottomleft)is thevalueatthefirststoppingpoint,andthevaluesprogresstotheright.Itseasytoseethattheyseemtobe quicklyzoominginonaparticularvalue(indicatedbythehorizontalblueline),somewherearound1.62. Themathwordforthisisconvergencetheredsquares(thevaluesofsuccessivestopping-pointsalongtheway to )convergetoaparticularvalue.Technically,thismeansthatwecangetascloseaswewanttothat particularvalue,aslongaswearewillingtopickastoppingpointthatisfarenoughalong.Thestoppingpoint valueswillkeepgettingcloserandcloser(converging)tothisparticularvalueforever,eventhoughtheywill neveractuallyreachitexactly. Notealsothatthisiswhythevalueof gettingbiggerandbigger: isinfinity.Ifwelookatthevalueatsuccessive
stoppingpoints(i.e.1,1+1,1+1+1,etc.),theyarenotgettingcloserandclosertoanything;theyaresimply
Follow
221 of 224
http://mathlesstraveled.com/
,wearereallyasking:whatdothestopping
,otherwise
Challenge #2 Solution
Posted on March 19, 2006
AndherearethesolutionstoChallenge#2 Continuereading
Challenge #2
Posted on March 10, 2006
CanyouapplythetechniqueslearnedfromthesolutiontoChallenge#1inordertofindavalueforthese expressions?
1.
2.
3.
Follow
222 of 224
http://mathlesstraveled.com/
Challenge #1 Solution
Posted on March 10, 2006
ReadonforthesolutiontoChallenge#1butgiveitatryfirstifyouhaventalready! Continuereading
Challenge #1
Posted on March 8, 2006
Welcome!
Posted on March 8, 2006
223 of 224
http://mathlesstraveled.com/
Follow
224 of 224