59
What EXACTLY Will You be Learning in Our Computer Science Program? Anthony K. H. Tung( 邓邓邓Associate Professor Department of Computer Science http://www.comp.nus.edu.sg/~atung http://www.renren.com/profile.do? id=313870900&_ua_flag=93w

What EXACTLY Will You be Learning in Our Computer Science Program?

  • Upload
    floyd

  • View
    28

  • Download
    0

Embed Size (px)

DESCRIPTION

What EXACTLY Will You be Learning in Our Computer Science Program?. Anthony K. H. Tung( 邓锦浩) Associate Professor Department of Computer Science. http://www.comp.nus.edu.sg/~atung http://www.renren.com/profile.do?id=313870900&_ua_flag=93w. Objective. - PowerPoint PPT Presentation

Citation preview

Page 1: What EXACTLY Will You be Learning in Our Computer Science Program?

What EXACTLY Will You be Learning in Our Computer

Science Program?

Anthony K. H. Tung(邓锦浩)Associate Professor

Department of Computer Science

http://www.comp.nus.edu.sg/~atunghttp://www.renren.com/profile.do?id=313870900&_ua_flag=93w

Page 2: What EXACTLY Will You be Learning in Our Computer Science Program?

Objective Okay, so you hear about the nice job prospects,

nice faculty members, nice environment, etc. by joining SOC, but what do you EXACTLY expect to learn in a Computer Science program?

Aim of this talk: Give you some example of the things you will

learn in SOC Explain to you why they are important and

how that will give you a broad and internationalized job prospects

Warning: I will be trying to explain ideas that you will learn within a semester using simple terms. Don’t get worried if you don’t completely understand now!

Page 3: What EXACTLY Will You be Learning in Our Computer Science Program?

Agenda What exactly is Computer Science? Is it just

programming? Examples of the things we learn in CS:

Database: How to make data safe and consistent? Networking: How to we ensure reliable and efficient sending

of data? Information Retrieval: How to we find the mot important

pages on the Web? Machine Learning: How do we make machine find patterns

and learn? Optimization Algorithm: How do we optimize our resources?

Picking a course: Points for Consideration

Page 4: What EXACTLY Will You be Learning in Our Computer Science Program?

What exactly is Computer Science?

Real World

Engineering

Biology

Chemistry

Physic

Mathematics

Computer Science (Storage and Compute)

Every fields involved converting part of the real world into a particular “language”, manipulating, computing and then putting the derived conclusion back into the real world.

Digital information

Decision, Actions, Computed Results

Page 5: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer vs Human Activities Computers are modelled based on human! Human ‘s main activities?

Remembering (Storage) Thinking(Computation) Communicating(Transfer of information to additional

storage!) Example

Remember: 1 Pen=$8, 1 Pencil=$5. Need to buy 3 pens and 3 pencils

Computation: Need $8x3+$5x3=$39 Communicating: “Mum, I need $39!” Sub-consciously, we try to make computation and storage

efficient as well: compute total price as ($8+$5)*3 Computer Science aims to make computers store, compute

and transfer information in an efficient and reliable manner. Understanding how computers works means understanding how human work. Not always straightforward.

Page 6: What EXACTLY Will You be Learning in Our Computer Science Program?

What exactly is the role of programming then? Every discipline has it’s fundamental principles and

practical implementation. However, no one is worried that they don’t have those foundations when they join EE, CE or any science program!Discipline Principles Implementation

Electrical Engineering

Properties of electrical components, how they can be connected etc.

Soldering various electrical parts together to perform certain functions etc.

Civil Engineering Properties of materials, architecture of transport systems etc.

Planning and scheduling how constructions can be done etc.

Bioinformatics Properties and principles of biological system

Design and implement experiments to verify hypothesis etc.

Computer Science

Principles and techniques for efficient and reliable information storage, computation and transfer

Computer programming

Page 7: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

only have time to talk about these 5

Page 8: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

Page 9: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $100XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Bank Database Yapeng Deposit $50

Read Record(Yapeng, BC345, $100)

Page 10: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150

XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Bank Database Yapeng Deposit $50

Read Record(Yapeng, BC345, $100)

Write Record(Yapeng, BC345, $150)

Very simple?

Page 11: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150

XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Read Record(Yapeng, BC345, $150)

Now both Yapeng and his wife Wang Fei deposit money concurrently

Wang Fei Deposit $100

Page 12: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $250

XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Read Record(Yapeng, BC345, $150)

Wang Fei update record first

Wang Fei Deposit $100

Write Record(Yapeng, BC345, $250)

Page 13: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $180

XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Read Record(Yapeng, BC345, $150)

Follow by Yapeng’s update

Wang Fei Deposit $100

Write Record(Yapeng, BC345, $180)

They lost $100!

Page 14: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150

XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Solution: add a lock, no others can access a record when it is locked

locked

Page 15: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Read Record(Yapeng, BC345, $150)

Wang Fei Deposit $100

Solution: add a lock, no others can access a record when it is locked

locked

Page 16: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Consistency

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $180XXX XXX XXXXXXX XXX XXXXXXX XXX XXXXXXX XXX XXXX

Database Yapeng Deposit $30

Read Record(Yapeng, BC345, $150)

Read Record(Yapeng, BC345, $150)

Wang Fei Deposit $100

Solution: add a lock, no others can access a record when it is locked

locked

Write Record(Yapeng, BC345, $180)

Read Record(Yapeng, BC345, $180)

Page 17: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Deadlock

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150XXX XXX XXXXWang Fei BC987 $1000XXX XXX XXXXXXX XXX XXXX

Database

Read Record (Yapeng, BC345, $150)Read Record(Wang Fei, BC987,$1000)Write Record (Yapeng, BC345, $100)Write Record (Wang Fei, BC345, $1050)

Wang Fei Deposit $100

Now Yapeng want to transfer $50 to Wang Fei and Wang Fei want to transfer $100 to Yapeng

locked

Write Record(Yapeng, BC345, $180)

Read Record(Yapeng, BC345, $150)

Read Record(Wang Fei, BC987,$1000)Read Record (Yapeng, BC345, $150)Write Record (Yapeng, BC345, $250)Write Record (Wang Fei, BC345, $900)

Read Record(Wang Fei, BC987, $1000)

locked

Page 18: What EXACTLY Will You be Learning in Our Computer Science Program?

Database Deadlock

Name Account No.

Savings

XXX XXX XXXXXXX XXX XXXXYapeng BC345 $150XXX XXX XXXXWang Fei BC987 $1000XXX XXX XXXXXXX XXX XXXX

Database

Read Record (Yapeng, BC345, $150)Read Record(Wang Fei, BC987,$1000)Write Record (Yapeng, BC345, $100)Write Record (Wang Fei, BC987, $1050)

Wang Fei Deposit $100

Both transactions cannot continue because they are holding each other’s record

locked

Write Record(Yapeng, BC345, $180)

Read Record(Yapeng, BC345, $150)

Read Record(Wang Fei, BC987,$1000)Read Record (Yapeng, BC345, $150)Write Record (Yapeng, BC345, $200)Write Record (Wang Fei, BC987, $900)

Read Record(Wang Fei, BC987, $1000)

locked

Page 19: What EXACTLY Will You be Learning in Our Computer Science Program?

Consistency and Deadlock The problem of inconsistency and

deadlock does not apply only to database or just computer science in general. It happens anywhere. Computer Science though try to develop principles and techniques to avoid these problems

Example: Imagine a group of 10 people trying to work together on a project. Inconsistency: Outdate info being pass

around Deadline: Waiting for each other to

finish before continuing A person trained in CS will be able to

avoid these

Page 20: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

Page 21: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Page 22: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Page 23: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Breakdown!

Page 24: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Resend

Page 25: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Resend

Page 26: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Long Message

Problem 1: Data Communication rely essentially on electronic signals which can be unreliable.

Resend

Page 27: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 2Short 3

Page 28: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 2Short 3

Page 29: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 2

Short 3

Page 30: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 2

Short 3

Page 31: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 2

Short 3

“Short 2” Breakdown!

Page 32: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

Short 1

Solution: Break long message to shorter message, have intermediate router

Short 3

Resend “Short 2” from second router!

Short 2

Page 33: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack Rose

Network

For more reliability, replicate short messages over many routes!

Short 2

Short 3 Short

2

Short 3

Short 1

Short 1

Page 34: What EXACTLY Will You be Learning in Our Computer Science Program?

Computer Network

Jack

Rose

Network

For intensive application like video, duplicates are stored and shared between peers

Duplicate Video

Video Server

Duplicate Video

Obtain video

from and display the first frame

available

Duplicate Video

迅雷看看 越多人看越流畅 !

Page 35: What EXACTLY Will You be Learning in Our Computer Science Program?

Chopping and Duplicate Again, the principle of message chopping

and duplicates sending are most critical in ensuring reliable and efficient network communication. They again can be applied anywhere.

Other things to be considered in network: Security: can someone impersonate

you? Can someone flood the network? Timeout: how long do I have to wait for

my message? Routing efficiency: where is the shortest

path?

Page 36: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

Page 37: What EXACTLY Will You be Learning in Our Computer Science Program?

Algorithm: Packing a Ship A ship that can carry 5kg of goods and there are

4 items with different weight and value to be carried. Which items will you carry to maximize the total values of items in the ship?

item weight value 1 2kg $12 2 1kg $10 3 3kg $20 4 2 kg $15

1kg

2kg 3kg 4kg 5kg

$0 $12 $12 $12 $12 1st item

$10 $12 $22 $22 $22 1st and 2nd item

$10 $12 $22 $30 $32 1st, 2nd and 3rd item

$10 $15 $25 $30 $37 All 4 items

Note that you understand this technique WITHOUT knowing how to program. This is a general principle for efficient computation.

Page 38: What EXACTLY Will You be Learning in Our Computer Science Program?

Algorithm: Packing in 2D

Article 1: $100 Article 2: $150

Article 3: $50

Article 4: $200

How do we pack these articles into the newspaper to maximize profit?

Page 39: What EXACTLY Will You be Learning in Our Computer Science Program?

Algorithm: Multiple Resources

Tasks

Machine

People Computers

Storage

Time Needed

Profit

Task 1

3 8 2 6 2 weeks

$10000

Task 2

2 3 5 4 1 weeks

$5000

Task 3

5 6 7 2 5 weeks

$10700

Task 4

1 2 1 7 7 weeks

$20000

Task 5

2 7 2 3 3 weeks

$6000If you company have 7 machines, 15 people, 9 computers and 10 units of storage, what are the task you will take up to maximize profit?

Page 40: What EXACTLY Will You be Learning in Our Computer Science Program?

Algorithm: Multiple Resources

One of our professor start a company that do such planning and NASA used it to schedule their MAR exploration!

http://www.friartuck.net/

Good news: you only need to learn to solve the first problem!

Page 41: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

Page 42: What EXACTLY Will You be Learning in Our Computer Science Program?

Artificial Intelligence(Machine Learning)

Among various sub-fields in AI, machine learning play an important role in knowledge extractionN0. RISK

HISTORYCREDIT DEBT COLLATERAL INCOME

1. high bad high none 0 to 15k

2. high unknown high none 15 to 35k

3. moderate unknown low none 15 to 35k

4. high unknown low none 0 to 15k

5. low unknown low none over 35k

6. low unknown low adequate over 35k

7. high bad low none 0 to 15k

8. moderate bad low adequate over 35k

9. low good low none over 35k

10. low good high adequate over 35k

11. high good high none 0 to 15k

12. moderate good high none 15 to 35k

13. low good high none over 35k

14. high bad high none 15 to 35k

New Client: Credit=unknown, Debt=high, Collateral=none, Income=15 to 35k, Risk=???

Page 43: What EXACTLY Will You be Learning in Our Computer Science Program?

Artificial Intelligence(Machine Learning)

Depending on the data given, machine learning (or data mining) is able to handle different prediction task: What treatment is more effective

for a patient? What customers will buy a product

if they receive an advertisement brochure?

Will the building collapse if we build it this way?

Page 44: What EXACTLY Will You be Learning in Our Computer Science Program?

Core CS Areas Algorithm & Theory Artificial Intelligence Computer Networks Database Systems Information Retrieval Parallel Computing Programming Languages Software Engineering Systems Security Visual Computing

Page 45: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D

Page 46: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C

Page 47: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C, A,

Page 48: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C, A, B,

Page 49: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C, A, B, C

Page 50: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C, A, B, C, A

Page 51: What EXACTLY Will You be Learning in Our Computer Science Program?

Information Retrieval Given a network of web pages that

contain a keyword, which page should be ranked the highest?

Page A

Page C

Page B

Page D

Random Walk Model

1. randomly pick a page and output the page2. randomly follow a link and move to the page3. output the new page and goto 2.

Order: D, C, A, B, C, A

The more important pages always get visited more.

Google’s pagerank algorithm!

Page 52: What EXACTLY Will You be Learning in Our Computer Science Program?

Application of Random WalkFinding important proteins

Finding important people in a social network

Page 53: What EXACTLY Will You be Learning in Our Computer Science Program?

Recap Database

Consistency and Deadlock Network

Chopping and Replicate Algorithm

Packing a Ship: Resource Optimization

Artificial Intelligence Machine Learning, Automatic

Prediction Information Retrieval

Random Walk: Google’s Pagerank

Page 54: What EXACTLY Will You be Learning in Our Computer Science Program?

So what exactly is Computer Science? It is the science of efficient

information storage, information processing and information transfer

Information form the cornerstone of today’s human society

Concepts in computer science is NOT limited by technologies and can easily be applied in everyday ‘s life simply because computers are modelled after human

Page 55: What EXACTLY Will You be Learning in Our Computer Science Program?

IT Trend Processors are cheap and will become

cheaper(multi-core processor, graphic cards)

Storage will be cheap but might not be fast Bandwidth will be growing What can we do with this?

Play more realistic games! Not exactly a joke since any technologies that speed up games

can speed up scientific simulation Smarter (more intensive) computation

ensuring that everyone can utilize IT Jobs will eventually belong to those that can

leverage on this trend

Page 56: What EXACTLY Will You be Learning in Our Computer Science Program?

Job Market for CS http://www.cccblog.org/2010/01/04/where-

the-jobs-are/

Page 57: What EXACTLY Will You be Learning in Our Computer Science Program?

What should you consider when choosing a course?

Your interest What type of person are you?

Stability: Technical High Risk, High Return: Business Travelling? CS is highly international People’s person? Good connection?

Technical Depth vs Generality Easy Come, Easy Go If everyone can score well, then you can

easily be replaced! Management?

Two ways: Build on interaction and connection or Build on your technical strength ( 学而优则士)

generality

Technical depth

low high

low

highArts, Business

EE, Civil EngScience

CS (SOC)

IS (SOC)

Page 58: What EXACTLY Will You be Learning in Our Computer Science Program?

What is common among these leaders?

PM Lee Hsien Loong DPM Teo Chee Hean Shantanu Narayen Sergey Brin

They are all computer science trained!

Page 59: What EXACTLY Will You be Learning in Our Computer Science Program?

Questions and Contact [email protected] http://www.comp.nus.edu.sg/

~atung http://www.renren.com/

profile.do?id=313870900&_ua_flag=93w