What should Computer Science students learn from Mathematics?
description
Transcript of What should Computer Science students learn from Mathematics?
![Page 1: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/1.jpg)
What should Computer Science students learn from Mathematics?
Y. C. Tay
Department of MathematicsDepartment of Computer ScienceNational 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.
![Page 2: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/2.jpg)
What Mathematics should CS students learn?
Discrete Mathematics:– logic– sets/relations/functions– combinatorics/graphs– probability– automata/formal languages
![Page 3: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/3.jpg)
Traditional Topics– Linear Algebra– Calculus– ...– ...– ...– Partial Differential Equations
What Mathematics should CS students learn?
![Page 4: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/4.jpg)
Traditional Topic– Linear Algebra √ – Calculus– ...– ...– ...– Partial Differential Equations
What Mathematics should CS students learn?
![Page 5: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/5.jpg)
Traditional Topic– Linear Algebra √ – Calculus– ...– ...– ...– Partial Differential Equations
What Mathematics should CS students learn?
Central Limit Theorem√
![Page 6: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/6.jpg)
What Mathematics should CS students learn?
Traditional Topic– Linear Algebra √ – Calculus √ – ...– ...– ...– Partial Differential Equations ?
![Page 7: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/7.jpg)
What should CS students learn from Mathematics?
content
to be a programmer
discipline art
notimportant
methodrigor
important
![Page 8: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/8.jpg)
What should CS students learn from Mathematics?
content discipline art
methodrigor
Mathematics CS
definition data structure
2does 2 divide 2 ?example: Common virus trick :buffer overflows
lemma/theorem subroutine/procedure
example: { x : x >0 } contains a minimum Ariane 5 rocket explosionproof algorithm
example: if ... then ...example: one-page proof thousand-line codegcd (b, c)=d d=bx+cy
definition
![Page 9: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/9.jpg)
What should CS students learn from Mathematics?
content
to be a programmer
discipline art
notimportant
methodrigor
important
to be a researcher
important important
![Page 10: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/10.jpg)
What should CS students learn from Mathematics?
content discipline art
methodrigor
formalizing concepts with definitions
gaining intuition from examples
formulating conjectures to capture intuition
proving conjectures with lemmas/theorems
deriving corollaries/generalizations
how to construct a theory
![Page 11: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/11.jpg)
What should CS students learn from Mathematics?
content discipline art
methodrigor model
Maths CS
x
y
d
d(Newton/Liebniz)
iyx (Descartes)
?
Mathematics (Hilbert)
![Page 12: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/12.jpg)
I will then use the survey to illustrate my points so far.
Next: A survey of Computer Science
![Page 13: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/13.jpg)
P = NP?
![Page 14: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/14.jpg)
functions
NPP
(fast computation possible)
0
1)(nfPRIME
n is a prime
n is not a prime
0
1),( nmfFACTOR
if n has a factor d such that 1<d<m
otherwise
P = NP FACTORf P
FACTORf P P NP
PRIMEfFACTORf
P = NP?
f PRIME f FACTOR
![Page 15: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/15.jpg)
traditional cryptography
decryption key = encryption key
(secret) (secret)
public key cryptography
decryption key encryption key
(secret) (public)
example: p q = n
primes
PRIMEf P
easy to generate p, q
FACTORf P
hard to factor n to
get secret p,q
P = NP?
f PRIME f FACTOR
Public keycryptography
security
data network
electroniccommerce
![Page 16: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/16.jpg)
factorization
try one factor at a time slow
try all factors simultaneously fast
possible with quantum states
danger to public key cryptography
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
quantumphysics
![Page 17: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/17.jpg)
modeling business data :
QS123
NA55
NA11
NA11
Aini
Shanti
Shanti
Aini
88235235
11220000
11220000
88235235
B747
A033
B747
B747
200
16
200
200
$399
$500
$211
$188
Aini
Shanti
88235235
11220000
B747
A033
200
16
QS123
NA55
NA11
B747
A033
B747
QS123
NA55
NA11
NA11
Aini
Shanti
Shanti
Aini
$399
$500
$211
$188
or
relational database ($$$)
Mathematically, table relation
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
![Page 18: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/18.jpg)
putting business data on the web: XML
<!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>
]>
example:
formal language:
grammar to generate XML documents
automata theory:
how to parse XML documentsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
![Page 19: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/19.jpg)
telephone traffic
good model
Internet traffic
bad model
Poisson process
fractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
![Page 20: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/20.jpg)
UK X Y Z China... ...
ISP ISP ISP ISP ISP
how much should Y charge for forwarding traffic?
pricing
game
ISP
profit
network
efficiency
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
![Page 21: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/21.jpg)
Intel's Pentium bug (1994)x = 4195835, y = 3145727,
256
y
y
xx
specification
implementation hardwarebug
verification
= proof that gates/circuits satisfy specification
$$$
specification
implementation verification hardware
bug
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
computability
ComputerScience
verification
complexity
![Page 22: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/22.jpg)
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
possible?
complexity
ComputerScience
computability
distributedcomputing
![Page 23: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/23.jpg)
Assume computers C1, ..., Cn
• want to reach consensus
• by exchanging messages;
• each Ck can fail and
• message delay is unbounded
Impossibility Theorem:No algorithm can guarantee fault-tolerant consensus.
relativity
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
Proof?
![Page 24: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/24.jpg)
How to overcome Impossibility Theorem?
One way: randomized algorithms
(when stuck: toss a coin)
consensus achievable
in practice, computed by randomization (but with small error probability)
PRIMEf
power of randomization
relativity
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
![Page 25: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/25.jpg)
how to toss a coin in an algorithm?
X0=2004
deterministic but “look” random
Is there a pseudo-random number generator such that
no fast algorithm can distinguish its output
from a “true” random sequence?
Yes P NP
pseudo-random number generator
Xk+1 =remainder ((1317Xk+26797)/121072)
X1=45525X2=84218X3=55891
relativity
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
![Page 26: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/26.jpg)
another impossibility result:
0
1),( DPHALTf
if program P haltswhen run on input Dotherwise
Halting Problem:
Is there an algorithm to compute ? HALTf
Theorem: No.
pseudo-random number generator
relativity
Haltingproblem
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
![Page 27: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/27.jpg)
Can aliens in another galaxy
compute
and solve fault-tolerant consensus?
HALTf
Answer: No
magic: Church-Turing Thesismagic?
relativity
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
![Page 28: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/28.jpg)
Church-Turing Thesis:
is computable (by any means)
is computable with a Turing machinef
f
thesis theorem in Mathematics law in Physics
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
![Page 29: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/29.jpg)
verification
relativity
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
end of survey
![Page 30: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/30.jpg)
What Mathematics should CS students learn?
Discrete Mathematics:– logic– sets/relations/functions– combinatorics/graphs– probability– automata/formal languages
![Page 31: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/31.jpg)
logic
automata
graphs
formal languages
verification
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics relativity
combinatorics
probability
![Page 32: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/32.jpg)
What should CS students learn from Mathematics?
content discipline art
methodrigor
to be a researcher
important important
![Page 33: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/33.jpg)
relativity
verification
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysicsmethod
method
method
method method
method
![Page 34: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/34.jpg)
What should CS students learn from Mathematics?
Content Discipline Art
methodrigor model
Math CS
?
![Page 35: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/35.jpg)
relativity
verification
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
model model model model
model model
model
modelmodelmodel
![Page 36: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/36.jpg)
P=NP?
NP = co-NP?
co-NP = PSPACE?
PSPACE = BPP?
Maybe: Complexity model is wrong?
etc.
Complexity Zoo
![Page 37: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/37.jpg)
relativity
verification
Church-Turing Law
Science
universality
Haltingproblem
pseudo-random number generator
randomizedalgorithms
fault-tolerantconsensus
distributedcomputing
complexity
ComputerScience
computability
gamesfractalsXML
P = NP?
f PRIME f FACTOR
Public keycryptography
data
security
electroniccommerce
network
relations
quantumphysics
model model model model
model model
model
modelmodelmodel
Thank You!
![Page 38: What should Computer Science students learn from Mathematics?](https://reader035.fdocuments.net/reader035/viewer/2022062409/56814f7e550346895dbd308d/html5/thumbnails/38.jpg)
What should Computer Science students learn from Mathematics?
Y. C. Tay
Department of MathematicsDepartment of Computer ScienceNational University of Singapore