1 / 59

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/~atung http://www.renren.com/profile.do?id=313870900&_ua_flag=93w. Objective.

floyd
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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!

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

  4. What exactly is Computer Science? 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. Decision, Actions, Computed Results Digital information Engineering Physic Biology Real World Mathematics Chemistry

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

  6. 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!

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

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

  9. Database Consistency Yapeng Deposit $50 Bank Database Read Record (Yapeng, BC345, $100)

  10. Database Consistency Yapeng Deposit $50 Bank Database Read Record (Yapeng, BC345, $100) Write Record (Yapeng, BC345, $150) Very simple?

  11. Database Consistency Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) Now both Yapeng and his wife Wang Fei deposit money concurrently Read Record (Yapeng, BC345, $150) Wang Fei Deposit $100

  12. Database Consistency Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) Wang Fei update record first Write Record (Yapeng, BC345, $250) Read Record (Yapeng, BC345, $150) Wang Fei Deposit $100

  13. Database Consistency Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) Follow by Yapeng’s update Write Record (Yapeng, BC345, $180) They lost $100! Read Record (Yapeng, BC345, $150) Wang Fei Deposit $100

  14. Database Consistency • Solution: add a lock, no others can access a record when it is locked Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) locked

  15. Database Consistency • Solution: add a lock, no others can access a record when it is locked Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) locked Read Record (Yapeng, BC345, $150) Wang Fei Deposit $100

  16. Database Consistency • Solution: add a lock, no others can access a record when it is locked Yapeng Deposit $30 Database Read Record (Yapeng, BC345, $150) Write Record (Yapeng, BC345, $180) locked Read Record (Yapeng, BC345, $180) Read Record (Yapeng, BC345, $150) Wang Fei Deposit $100

  17. Database Deadlock Read Record (Yapeng, BC345, $150) Read Record(Wang Fei, BC987,$1000) Write Record (Yapeng, BC345, $100) Write Record (Wang Fei, BC345, $1050) • Now Yapeng want to transfer $50 to Wang Fei and Wang Fei want to transfer $100 to Yapeng Database Read Record (Yapeng, BC345, $150) Write Record (Yapeng, BC345, $180) locked locked 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) Wang Fei Deposit $100

  18. Database Deadlock Read Record (Yapeng, BC345, $150) Read Record(Wang Fei, BC987,$1000) Write Record (Yapeng, BC345, $100) Write Record (Wang Fei, BC987, $1050) • Both transactions cannot continue because they are holding each other’s record Database Read Record (Yapeng, BC345, $150) Write Record (Yapeng, BC345, $180) locked locked 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) Wang Fei Deposit $100

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

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

  21. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack

  22. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack

  23. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack Breakdown!

  24. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack Resend

  25. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack Resend

  26. Computer Network Problem 1: Data Communication rely essentially on electronic signals which can be unreliable. Network Long Message Rose Jack Resend

  27. Computer Network Solution: Break long message to shorter message, have intermediate router Network Rose Jack Short 1 Short 2 Short 3

  28. Computer Network Solution: Break long message to shorter message, have intermediate router Network Short 1 Rose Jack Short 2 Short 3

  29. Computer Network Solution: Break long message to shorter message, have intermediate router Network Short 2 Short 1 Rose Jack Short 3

  30. Computer Network Solution: Break long message to shorter message, have intermediate router Network Short 3 Short 2 Short 1 Rose Jack

  31. Computer Network Solution: Break long message to shorter message, have intermediate router Network Short 3 Short 2 Rose Jack Short 1 “Short 2” Breakdown!

  32. Computer Network Solution: Break long message to shorter message, have intermediate router Network Short 2 Short 3 Rose Jack Short 1 Resend “Short 2” from second router!

  33. Computer Network For more reliability, replicate short messages over many routes! Short 1 Short 3 Network Short 2 Short 1 Rose Jack Short 3 Short 2

  34. Computer Network For intensive application like video, duplicates are stored and shared between peers Obtain video from and display the first frame available Duplicate Video Jack Network Video Server Rose 迅雷看看 越多人看越流畅! Duplicate Video Duplicate Video

  35. 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?

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

  37. 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 • Note that you understand this techniqueWITHOUT knowing how to program. This is a general principle for efficient computation.

  38. Algorithm: Packing in 2D Article 2: $150 Article 1: $100 Article 3: $50 Article 4: $200 How do we pack these articles into the newspaper to maximize profit?

  39. Algorithm: Multiple Resources If 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?

  40. 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!

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

  42. Artificial Intelligence(Machine Learning) • Among various sub-fields in AI, machine learning play an important role in knowledge extraction New Client: Credit=unknown, Debt=high, Collateral=none, Income=15 to 35k, Risk=???

  43. 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?

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

  45. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D

  46. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D, C

  47. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D, C, A,

  48. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D, C, A, B,

  49. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D, C, A, B, C

  50. Information Retrieval • Given a network of web pages that contain a keyword, which page should be ranked the highest? Random Walk Model 1. randomly pick a page and output the page 2. randomly follow a link and move to the page 3. output the new page and goto 2. Page B Page A Page D Page C Order: D, C, A, B, C, A

More Related