390 likes | 583 Views
What should Computer Science students learn from Mathematics?. Y. C. Tay Department of Mathematics Department of Computer Science National University of Singapore. Proc. Asian Technology Conference in Mathematics, Singapore (Dec. 2004), 38--51.
E N D
What should Computer Science students learn from Mathematics? Y. C. Tay Department of Mathematics Department of Computer Science National University of Singapore Proc. Asian Technology Conference in Mathematics, Singapore (Dec. 2004), 38--51. Reproduced with permission in ACM SIGACT News 36, 2 (June 2005), 131--143.
What Mathematics should CS students learn? Discrete Mathematics: • logic • sets/relations/functions • combinatorics/graphs • probability • automata/formal languages
What Mathematics should CS students learn? Traditional Topics • Linear Algebra • Calculus • ... • ... • ... • Partial Differential Equations
What Mathematics should CS students learn? Traditional Topic • Linear Algebra √ • Calculus • ... • ... • ... • Partial Differential Equations
What Mathematics should CS students learn? Traditional Topic • Linear Algebra √ • Calculus • ... • ... • ... • Partial Differential Equations √ Central Limit Theorem
What Mathematics should CS students learn? Traditional Topic • Linear Algebra √ • Calculus √ • ... • ... • ... • Partial Differential Equations ?
rigor method not important What should CS students learn from Mathematics? content discipline art important to be a programmer
does 2 divide 2 ? gcd (b, c)=d d=bx+cy What should CS students learn from Mathematics? content discipline art rigor method Mathematics CS definition definition data structure example: lemma/theorem Common virus trick : buffer overflows subroutine/procedure example: { x : x >0 } contains a minimum proof Ariane 5 rocket explosion algorithm example: example: one-page proof if ... then ... thousand-line code
rigor method not important What should CS students learn from Mathematics? content discipline art important important important to be a programmer to be a researcher
What should CS students learn from Mathematics? content discipline art rigor method formalizing concepts with definitions gaining intuition from examples how to construct a theory formulating conjectures to capture intuition proving conjectures with lemmas/theorems deriving corollaries/generalizations
model Maths (Newton/Liebniz) (Descartes) What should CS students learn from Mathematics? content discipline art rigor method CS ? Mathematics (Hilbert)
Next: A survey of Computer Science I will then use the survey to illustrate my points so far.
? P = NP
functions P NP (fast computation possible) ? f PRIME f FACTOR P = NP n is a prime n is not a prime if n has a factor d such that 1<d<m otherwise P = NP P P P NP
public key cryptography decryption key encryption key (secret) (public) example: p q = n Public key cryptography primes security P P electronic commerce hard to factor n to get secret p,q easy to generate p, q data network traditional cryptography decryption key = encryption key (secret) (secret) ? P = NP f PRIME f FACTOR
try one factor at a time slow factorization try all factors simultaneously fast danger to public key cryptography quantum physics security electronic commerce network ? possible with quantum states P = NP f PRIME f FACTOR Public key cryptography data
? P = NP f PRIME f FACTOR Public key cryptography security electronic commerce Mathematically, table relation data network relational database ($$$) modeling business data : or quantum physics relations
example: <!DOCTYPE CATALOG [<!ENTITY AUTHOR "John Doe"> <!ENTITY COMPANY "JD Power Tools, Inc."> <!ELEMENT CATALOG (PRODUCT+)> <!ELEMENT PRODUCT (SPECIFICATIONS+,OPTIONS?,PRICE+,NOTES?)> <!ATTLIST PRODUCT NAME CDATA #IMPLIED CATEGORY (HandTool|Table|Shop-Professional) "HandTool" INVENTORY (InStock|Backordered|Discontinued) "InStock"> <!ELEMENT SPECIFICATIONS (#PCDATA)> <!ATTLIST SPECIFICATIONS WEIGHT CDATA #IMPLIED POWER CDATA #IMPLIED> <!ELEMENT OPTIONS (#PCDATA)> <!ATTLIST OPTIONS FINISH (Metal|Polished|Matte) "Matte" CASE (HardShell|Soft|NotApplicable) "HardShell"> <!ELEMENT PRICE (#PCDATA)> <!ATTLIST PRICE WHOLESALE CDATA #IMPLIED STREET CDATA #IMPLIED SHIPPING CDATA #IMPLIED> ]> ? P = NP f PRIME f FACTOR Public key cryptography security electronic commerce data network relations putting business data on the web: XML quantum physics formal language: grammar to generate XML documents automata theory: how to parse XML documents XML
bad model Internet traffic ? P = NP f PRIME f FACTOR quantum physics Public key cryptography security electronic commerce data network relations XML telephone traffic good model Poisson process fractals
? P = NP f PRIME f FACTOR quantum physics ISP profit network efficiency Public key cryptography security electronic commerce data network relations fractals XML ISP ISP ISP ISP ISP China UK X Y Z ... ... how much should Y charge for forwarding traffic? pricing game games
Intel's Pentium bug (1994) x = 4195835, y = 3145727, Computer Science complexity computability verification ? P = NP specification f PRIME f FACTOR quantum physics implementation hardware Public key cryptography bug specification security verification hardware implementation electronic commerce bug data network relations fractals XML $$$ verification = proof that gates/circuits satisfy specification games
distributed computing possible? Computer Science complexity computability Distributed Computing: Geographically separated computers collaborate through message exchange to achieve some global objective Example: Power blackout Computer that control power generators should agree on powering up sequence
relativity fault-tolerant consensus Computer Science complexity computability • Assume computers C1, ..., Cn • want to reach consensus • by exchanging messages; • each Ck can fail and • message delay is unbounded distributed computing Impossibility Theorem: No algorithm can guarantee fault-tolerant consensus. Proof?
relativity consensus achievable randomized algorithms power of randomization in practice, computed by randomization (but with small error probability) Computer Science complexity computability How to overcome Impossibility Theorem? One way: randomized algorithms (when stuck: toss a coin) distributed computing fault-tolerant consensus
pseudo-random number generator Xk+1 =remainder ((1317Xk+26797)/121072) relativity deterministic but “look” random randomized algorithms pseudo-random number generator Yes P NP Computer Science complexity computability how to toss a coin in an algorithm? distributed computing X0=2004 X1=45525 X2=84218 fault-tolerant consensus X3=55891 Is there a pseudo-random number generator such that no fast algorithm can distinguish its output from a “true” random sequence?
Halting problem if program P halts when run on input D otherwise relativity randomized algorithms Computer Science complexity computability another impossibility result: distributed computing Halting Problem: Is there an algorithm to compute ? fault-tolerant consensus Theorem: No. pseudo-random number generator
Halting problem universality relativity randomized algorithms magic: Church-Turing Thesis Computer Science complexity computability distributed computing Can aliens in another galaxy compute and solve fault-tolerant consensus? fault-tolerant consensus Answer: No magic? pseudo-random number generator
Science Computer Science Church-Turing Law complexity computability Church-Turing Thesis: is computable (by any means) is computable with a Turing machine Halting problem distributed computing universality fault-tolerant consensus thesis theorem in Mathematics law in Physics randomized algorithms pseudo-random number generator
Science Computer Science Church-Turing Law complexity computability verification Halting problem ? P = NP f PRIME f FACTOR distributed computing universality quantum physics relativity Public key cryptography fault-tolerant consensus security randomized algorithms electronic commerce data network pseudo-random number generator relations fractals games XML end of survey
What Mathematics should CS students learn? Discrete Mathematics: • logic • sets/relations/functions • combinatorics/graphs • probability • automata/formal languages
Science Computer Science Church-Turing Law complexity computability verification Halting problem ? P = NP f PRIME f FACTOR distributed computing universality quantum physics relativity Public key cryptography fault-tolerant consensus security randomized algorithms electronic commerce data network pseudo-random number generator relations fractals games XML combinatorics logic automata probability graphs formal languages
rigor method What should CS students learn from Mathematics? content discipline art important important to be a researcher
Science Computer Science Church-Turing Law complexity computability verification Halting problem ? P = NP f PRIME f FACTOR distributed computing universality quantum physics relativity Public key cryptography fault-tolerant consensus security randomized algorithms electronic commerce data network pseudo-random number generator relations fractals games XML method method method method method method
model Math What should CS students learn from Mathematics? Content Discipline Art rigor method CS ?
Science Computer Science Church-Turing Law complexity computability verification Halting problem ? P = NP f PRIME f FACTOR distributed computing universality quantum physics relativity Public key cryptography fault-tolerant consensus security randomized algorithms electronic commerce data network pseudo-random number generator relations fractals games XML model model model model model model model model model model
Complexity Zoo P=NP? NP = co-NP? co-NP = PSPACE? PSPACE = BPP? etc. Maybe: Complexity model is wrong?
Science Computer Science Church-Turing Law complexity computability model model model verification Halting problem ? P = NP f PRIME f FACTOR distributed computing model universality quantum physics relativity Public key cryptography fault-tolerant consensus model model security randomized algorithms electronic commerce data network pseudo-random number generator relations fractals games XML model model model model Thank You!
What should Computer Science students learn from Mathematics? Y. C. Tay Department of Mathematics Department of Computer Science National University of Singapore