39
UNDERSTANDING PROGRAM EFFICIENCY: 1 (download slides and .py files and follow along!) 6.0001 LECTURE 10 6.0001 LECTURE 10 1

MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

UNDERSTANDING PROGRAM EFFICIENCY: 1 (download slides and .py files and follow along!)

6.0001 LECTURE 10

6.0001LECTURE10 1

Page 2: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

Today § Measuringordersofgrowthofalgorithms

§ Big“Oh”notaAon§ Complexityclasses

6.0001LECTURE10 2

Page 3: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

WANT TO UNDERSTAND EFFICIENCY OF PROGRAMS § computersarefastandgeGngfaster–somaybeefficientprogramsdon’tmaLer?◦  butdatasetscanbeverylarge(e.g.,in2014,Googleserved30,000,000,000,000pages,covering100,000,000GB–howlongtosearchbruteforce?)

◦  thus,simplesoluAonsmaysimplynotscalewithsizeinacceptablemanner

§ 

§ separate!meandspaceefficiencyofaprogram§ tradeoffbetweenthem:◦  cansomeAmespre-computeresultsarestored;thenuse“lookup”toretrieve(e.g.,memoizaAonforFibonacci)

◦ willfocusonAmeefficiency

6.0001LECTURE10 3

howcanwedecidewhichopAonforprogramismostefficient?

Page 4: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

WANT TO UNDERSTAND EFFICIENCY OF PROGRAMS ChallengesinunderstandingefficiencyofsoluAontoacomputaAonalproblem:

§ aprogramcanbeimplementedinmanydifferentways

§ youcansolveaproblemusingonlyahandfulofdifferentalgorithms

§ wouldliketoseparatechoicesofimplementaAonfromchoicesofmoreabstractalgorithm

6.0001LECTURE10 4

Page 5: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

HOW TO EVALUATE EFFICIENCY OF PROGRAMS § measurewitha!mer

§ counttheoperaAons§ abstractnoAonoforderofgrowth

6.0001LECTURE10 5

Page 6: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

TIMING A PROGRAM § useAmemodule

§ recallthat!imporAngmeansto

bringinthatclass def c_to_f(c):!

intoyourownfile

return c*9/5 + 32 !!

§ startclock t0 = time.clock()!§ callfuncAon c_to_f(100000)!

t1 = time.clock() - t0!§ stopclock Print("t =", t, ":", t1, "s,”)

6.0001LECTURE10 6

import time!

!

Page 7: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

TIMING PROGRAMS IS INCONSISTENT § GOAL:toevaluatedifferentalgorithms§ runningAmevariesbetweenalgorithms§ runningAmevariesbetweenimplementa!ons§ runningAmevariesbetweencomputers§ runningAmeisnotpredictablebasedonsmallinputs

§ AmevariesfordifferentinputsbutcannotreallyexpressarelaAonshipbetweeninputsandAme

6.0001LECTURE10 7

Page 8: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

COUNTING OPE§ assumethesestepstakeconstant!me:•  mathemaAcaloperaAons•  comparisons•  assignments•  accessingobjectsinmemor

• thencountthenumberofoperaAonsexecutedasfuncAonofsizeofinput

RATIONS def c_to_f(c):! return c*9.0/5 + 32 !!def mysum(x):! total = 0!

ange(x+1):!+= i!

for i in r total y return tot

mysumà1+3

al!

6.0001LECTURE10 8

xops

Page 9: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

COUNTING OPERATIONS IS BETTER, BUT STILL… § GOAL:toevaluatedifferentalgorithms

§ countdependsonalgorithm

§ countdependsonimplementa!ons

§ countindependentofcomputers

§ nocleardefiniAonofwhichopera!onstocount

§ countvariesfordifferentinputsandcancomeupwitharelaAonshipbetweeninputsandthecount

6.0001LECTURE10 9

Page 10: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

STILL NEED A BETTER WAY • AmingandcounAngevaluateimplementa!ons

• Amingevaluatesmachines

• wanttoevaluatealgorithm

• wanttoevaluatescalability• wanttoevaluateintermsofinputsize

6.0001LECTURE10 10

Page 11: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

STILL NEED A BETTER WAY § GoingtofocusonideaofcounAngoperaAonsinanalgorithm,butnotworryaboutsmallvariaAonsinimplementaAon(e.g.,whetherwetake3or4primiAveoperaAonstoexecutethestepsofaloop)§ Goingtofocusonhowalgorithmperformswhensizeofproblemgetsarbitrarilylarge§ WanttorelateAmeneededtocompleteacomputaAon,measuredthisway,againstthesizeoftheinputtotheproblem§ Needtodecidewhattomeasure,giventhatactualnumberofstepsmaydependonspecificsoftrial

6.0001LECTURE10 11

Page 12: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

NEED TO CHOOSE WHICH INPUT TO USE TO EVALUATE A FUNCTION § wanttoexpressefficiencyintermsofsizeofinput,soneedtodecidewhatyourinputis

§ couldbeaninteger--mysum(x)

§ couldbelengthoflist--list_sum(L)

§ youdecidewhenmulApleparameterstoafuncAon--search_for_elmt(L, e)

6.0001LECTURE10 12

Page 13: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

DIFFERENT INPUTS CHANGE HOW THE PROGRAM RUNS § afuncAonthatsearchesforanelementinalistdef search_for_elmt(L, e):! for i in L:! if i == e:! return True! return False!

§ wheneisfirstelementinthelistàBESTCASE

§ wheneisnotinlistàWORSTCASE

§ whenlookthroughabouthalfoftheelementsinlistàAVERAGECASE

§ wanttomeasurethisbehaviorinageneralway

6.0001LECTURE10 13

Page 14: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

BEST, AVERAGE, WORST CASES § supposeyouaregivenalistLofsomelengthlen(L) § bestcase:minimumrunningAmeoverallpossibleinputsofagivensize,len(L) •  constantforsearch_for_elmt •  firstelementinanylist

§ averagecase:averagerunningAmeoverallpossibleinputsofagivensize,len(L) •  pracAcalmeasure

§ worstcase:maximumrunningAmeoverallpossibleinputsofagivensize,le•  linearinlengthof

n(L) listforsearch_for_elmt

•  mustsearchenArelistandnotfindit

6.0001LECTURE10 14

Page 15: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

ORDERS OF GROWTH Goals:§ wanttoevaluateprogram’sefficiencywheninputisverybig§ wanttoexpressthegrowthofprogram’srun!measinputsizegrows§ wanttoputanupperboundongrowth–asAghtaspossible§ donotneedtobeprecise:“orderof”not“exact”growth§ wewilllookatlargestfactorsinrunAme(whichsecAonoftheprogramwilltakethelongesttorun?)§ thus,generallywewant!ghtupperboundongrowth,asfunc!onofsizeofinput,inworstcase

6.0001LECTURE10 15

Page 16: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

MEASURING ORDER OF GROWTH: BIG OH NOTATION § BigOhnotaAonmeasuresanupperboundontheasympto!cgrowth,oiencalledorderofgrowth

§ BigOhorO()isusedtodescribeworstcase•  worstcaseoccursoienandistheboLleneckwhenaprogramruns

•  expressrateofgrowthofprogramrelaAvetotheinputsize

•  evaluatealgorithmNOTmachineorimplementaAon

6.0001LECTURE10 16

Page 17: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

EXACT STEPS vs O() def fact_iter(n):! """assumes n an int >= 0"""! answer = 1! while n > 1:! answer *= n! n -= 1! return answer!

§ computesfactorial§ numberofsteps: § worstcaseasymptoAccomplexity:

•  ignoreaddiAveconstants•  ignoremulAplicaAveconstants

6.0001LECTURE10 17

Page 18: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

WHAT DOES O(N) MEASURE? § InterestedindescribinghowamountofAmeneededgrowsassizeof(inputto)problemgrows

§ Thus,givenanexpressionforthenumberofoperaAonsneededtocomputeanalgorithm,wanttoknowasymptoAcbehaviorassizeofproblemgetslarge

§ Hence,willfocusontermthatgrowsmostrapidlyinasumofterms

§ AndwillignoremulAplicaAveconstants,sincewanttoknowhowrapidlyAmerequiredincreasesasincreasesizeofinput

6.0001LECTURE10 18

Page 19: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

SIMPLIFICATION EXAMPLES § dropconstantsandmulAplicaAvefactors§ focusondominantterms

: n2O(n2) + 2n + 2

O(n2) : n2 + 100000n + 31000

O(n) : log(n) + n + 4

O(nlogn) : 0.0001*n*log(n) + 300n

O(3n) : 2n30 + 3n

6.0001LECTURE10 19

Page 20: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

TYPES OF ORDERS OF GROWTH

6.0001LECTURE10 20

Page 21: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

ANALYZING PROGRAMS AND THEIR COMPLEXITY § combinecomplexityclasses

•  analyzestatementsinsidefuncAons•  applysomerules,focusondominantterm

LawofAddi!onforO():•  usedwithsequen!alstatements•  O(f(n))+O(g(n))isO(f(n)+g(n))•  forexample, for i in range(n):! print('a')! for j in range(n*n):! print('b')!

isO(n)+O(n*n)=O(n+n2)=O(n2)becauseofdominantterm6.0001LECTURE10 21

Page 22: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

ANALYZING PROGRAMS AND THEIR COMPLEXITY § combinecomplexityclasses

•  analyzestatementsinsidefuncAons•  applysomerules,focusondominantterm

LawofMul!plica!onforO():•  usedwithnestedstatements/loops•  O(f(n))*O(g(n))isO(f(n)*g(n))•  forexample, for i in range(n):! for j in range(n):! print('a')!

isO(n)*O(n)=O(n*n)=O(n2)becausetheouterloopgoesnAmesandtheinnerloopgoesnAmesforeveryouterloopiter.

6.0001LECTURE10 22

Page 23: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

COMPLEXITY CLASSES § O(1)denotesconstantrunningAme§ O(logn)denoteslogarithmicrunningAme§ O(n)denoteslinearrunningAme§ O(nlogn)denoteslog-linearrunningAme§ O(nc)denotespolynomialrunningAme(cisaconstant)§ O(cn)denotesexponenAalrunningAme(cisaconstantbeingraisedtoapowerbasedonsizeofinput)

6.0001LECTURE10 23

Page 24: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

COMPLEXITY CLASSES ORDERED LOW TO HIGH

O(1) : O(log n) : O(n) : O(n log n): O

O

(nc) :

(cn) :

constant

logarithmic

linear

loglinear

polynomial

exponenAal

6.0001LECTURE10 24

Page 25: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

COMPLEXITY GROWTH CLASS n=10 =100 =1000 =1000000

O(1) 1 1 1 1

O(logn) 1 2 3 6

O(n) 10 100 1000 1000000

O(nlogn) 10 200 3000 6000000

O(n^2) 100 10000 1000000 1000000000000

O(2^n) 1024 1267650600228229401496703205376

107150860718626732094842504906000181056140481170553360744375038837035105112493612249319837881569585812759467291755314682518714528569231404359845775746985748039345677748242309854210746050623711418779541821530464749835819412673987675591655439460770629145711964776865421676604298316

52624386837205668069376

Goodluck!!

6.0001LECTURE10 25

Page 26: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

LINEAR COMPLEXITY § SimpleiteraAveloopalgorithmsaretypicallylinearincomplexity

6.0001LECTURE10 26

Page 27: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

LINEAR SEARCH ON UNSORTED LIST def linear_search(L, e):! found = False! for i in range(len(L)):! if e == L[i]:! found = True! return found!

§ mustlookthroughallelementstodecideit’snotthere

§ O(len(L))fortheloop*O(1)totestife==L[i]◦ O(1+4n+1)=O(4n+2)=O(n)

§ overallcomplexityisO(n)–wherenislen(L)

6.0001LECTURE12 27

Page 28: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

CONSTANT TIME LIST ACCESS § iflistisallints◦  ithelementat◦  base+4*i

§ iflistisheterogeneous◦  indirecAon◦  referencestootherobjects

6.0001LECTURE12 28

Page 29: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

LINEAR SEARCH ON SORTED LIST def search(L, e):! for i in range(len(L)):! if L[i] == e:! return True! if L[i] > e:! return False! return False§ mustonlylookunAlreachanumbergreaterthane§ O(len(L))fortheloop*O(1)totestife==L[i]§ overallcomplexityisO(n)–wherenislen(L)§ NOTE:orderofgrowthissame,thoughrunAmemaydifferfortwosearchmethods

6.0001LECTURE12 29

Page 30: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

LINEAR COMPLEXITY § searchingalistinsequencetoseeifanelementispresent§ addcharactersofastring,assumedtobecomposedofdecimaldigitsdef addDigits(s):!

val = 0!

for c in s:!

val += int(c)!

return val!

§ O(len(s))

6.0001LECTURE10 30

Page 31: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

LINEAR COMPLEXITY § complexityoiendependsonnumberofiteraAonsdef fact_iter(n):!

prod = 1!

for i in range(1, n+1):!

prod *= i!

return prod!

§ numberofAmesaroundloopisn§ numberofoperaAonsinsideloopisaconstant(inthiscase,3–seti,mulAply,setprod)◦  O(1+3n+1)=O(3n+2)=O(n)

§ overalljustO(n)

6.0001LECTURE10 31

Page 32: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

NESTED LOOPS § simpleloopsarelinearincomplexity

§ whataboutloopsthathaveloopswithinthem?

6.0001LECTURE10 32

Page 33: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

QUADRATIC COMPLEXITY determineifonelistissubsetofsecond,i.e.,everyelementoffirst,appearsinsecond(assumenoduplicates)!def isSubset(L1, L2):! for e1 in L1:! matched = False! for e2 in L2:! if e1 == e2:! matched = True! break! if not matched:! return False! return True!

6.0001LECTURE10 33

Page 34: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

QUADRATIC COMPLEXITY def isSubset(L1, L2):! for e1 in L1:! matched = False! for e2 in L2:! if e1 == e2:! matched = break! if not matched:! return False! return True!

 outerloopexecutedlen(L1)Ames

 eachiteraAonwillexecuteinnerloopuptolen(L2)Ames,withconstantnumberTrue!ofoperaAons

 O(len(L1)*len(L2)) worstcasewhenL1andL2samelength,noneofelementsofL1inL2

 O(len(L1)2)

6.0001LECTURE10 34

Page 35: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

QUADRATIC COMPLEXITY findintersecAonoftwolists,returnalistwitheachelementappearingonlyonce!

def intersect(L1, L2):! tmp = []! for e1 in L1:! for e2 in L2:! if e1 == e2:! tmp.append(e1)! res = []! for e in tmp:! if not(e in res):! res.append(e)! return res!

6.0001LECTURE10 35

Page 36: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

QUADRATIC COMPLEXITY def intersect(L1, L2):! tmp = []! for e1 in L1:! for e2 in L2:! if e1 == e2:! tmp.append(e res = []! for e in tmp:! if not(e in res):! res.append(e)! return res!

 firstnestedlooptakeslen(L1)*len(L2)steps secondlooptakesatmostlen(L1)steps

1)!  determiningifelementinlistmighttakelen(L1)steps ifweassumelistsareofroughlysamelength,then O(len(L1)^2)

6.0001LECTURE10 36

Page 37: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

O() FOR NESTED LOOPS def g(n):! """ assume n >= 0 """! x = 0! for i in range(n):! for j in range(n):! x += 1! return x!

§ computesn2veryinefficiently§ whendealingwithnestedloops,lookattheranges§ nestedloops,eachitera!ngn!mes§ O(n2)

6.0001LECTURE10 37

Page 38: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

THIS TIME AND NEXT TIME § haveseenexamplesofloops,andnestedloops

§ giverisetolinearandquadraAccomplexityalgorithms

§ nextAme,willmorecarefullyexamineexamplesfromeachofthedifferentcomplexityclasses

6.0001LECTURE10 38

Page 39: MIT6 0001F16 Understanding Program efficiency: 1 · 6.0001 LECTURE 10 18 SIMPLIFICATION EXAMPLES § drop constants and mulplicave factors § focus on dominant terms O(n 2 ) 2: n +

MIT OpenCourseWarehttps://ocw.mit.edu

6.0001 Introduction to Computer Science and Programming in PythonFall 2016

For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.