what should computer science students learn from mathematics?

38
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.

Upload: nevaeh

Post on 20-Jan-2016

33 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: What should Computer Science students learn from Mathematics?

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?

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?

Traditional Topics– Linear Algebra– Calculus– ...– ...– ...– Partial Differential Equations

What Mathematics should CS students learn?

Page 4: What should Computer Science students learn from Mathematics?

Traditional Topic– Linear Algebra √ – Calculus– ...– ...– ...– Partial Differential Equations

What Mathematics should CS students learn?

Page 5: What should Computer Science students learn from Mathematics?

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?

What Mathematics should CS students learn?

Traditional Topic– Linear Algebra √ – Calculus √ – ...– ...– ...– Partial Differential Equations ?

Page 7: What should Computer Science students learn from Mathematics?

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?

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?

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?

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?

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?

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?

P = NP?

Page 14: What should Computer Science students learn from Mathematics?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

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?

What should CS students learn from Mathematics?

Content Discipline Art

methodrigor model

Math CS

?

Page 35: What should Computer Science students learn from Mathematics?

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?

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?

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?

What should Computer Science students learn from Mathematics?

Y. C. Tay

Department of MathematicsDepartment of Computer ScienceNational University of Singapore