280 likes | 352 Views
INTRODUCTION. The Pervasive Computer Computer are Everywhere They are capable of doing things for us Some Examples of What they do email, bank accounts, And (briefly) How they do it both simple and complex both similar and different. Scenario:
E N D
INTRODUCTION • The Pervasive Computer • Computer are Everywhere • They are capable of doing things for us • Some Examples of What they do • email, bank accounts, • And (briefly) How they do it • both simple and complex • both similar and different
Scenario: Professor Newton (newton@cs.mit.edu) at MIT wants to send email to me (leonghw@comp.nus.edu.sg). Simple: Prof Newton’s computer takes a string of characters and passes on to my computer. Complicated: How does Prof Newton’s computer know what to do with the string of letters? What does address leonghw@comp.nus.edu.sg mean? Where is that? Example-1: Email (electronic mail)
First, Text Processing. detect address to send to, detect which is the message part, and so on, etc Server/Router: address ending with “.sg” send to a some gateway computer, which in turn will send it to a computer in Singapore. This computer in Singapore comp.nus.edu.sg --> send to a computer in SoC. The computer in School of Computing stores it away in a mail file. When I log in and execute my mail reader, it shows me all the messages filed in the mail file. I can then ask it to show me the mail from Prof Newton. Example-1: Email
So, what makes it work? To do all this work we need various machines to be linked together -- network using communication lines – the engineering folks. Machines need to know what to do with individual messages, detect the addresses, sender, message content etc. Why is it Complicated? Huge Volume -- Things become complex because we need to do this for hundreds of millions of users, sending and receiving tons of mail. Communication lines, networks may fail, etc. Example-1: Email
Scenario: Maintaining Bank Accounts Isn’t it simple? Depositing money is just addition, and withdrawing is just subtraction. Issues and Complications Thousands of customers, at hundreds of branches. To do the crediting to the correct account. Simultaneous access. Information needs to travel from the ATM machine to the computer, and back. Example-2: Bank Account
Similar to Email in some ways. Needs processing, network of computer, so, we can use lots of similar hardware and software. But, also Different: We need different kind of buttons on the ATM machine, We need to do printing on a different kind of paper, We need to read the ATM card, count money etc. Example-2: Bank Account
LINC (library system), Online Registration Computer, hardware may be same. Different interface, Different software. Have a database of items (books), can search, reserve, MP3 music player Similar to LINC database You may search, access information in similar way. Difference now your machine interprets the information differently. It converts the message into sound: a different interface. More Examples:
Scenario: 3D Walkthrough in Video Games Question: is it similar to what we have seen so far? The computer has a big file describing the 3D structure, and can work out mathematically what it would look like in 2D from a particular angle. The software receives your position, and appropriately updates the 2D picture on your screen. Similar to how your ATM showed a different picture based on which account you are accessing or what operation you did. The calculations for 3D walkthrough are very complicated, but still similarities are there with other applications. More Examples:
Can do Email, library search, etc. store large amount of information find a particular piece of wanted information move the information quickly produce new information from old information quickly the changes need to be specified in a step by step manner Algorithm. the variety of algorithms that we can come up with is where the versatility of computers come from. Intelligent Computer
Specifying an algorithm is however not simple, tedious, error prone, Requires professional training. You are able to use the computer because professionals have already done to hard work to make it look simple from your end. Complex: Applications such as Word Processing, Email, etc require thousands or millions of lines of code. Easy to make errors. (example: Y2K issue) Intelligent Computer (cont…)
Problem: 1+2+3….+99+100 Many Ways: 1+2=3; 3+3=6; 6+4=10; … … 1+2+3+4+5=15; 6+7+8+9+10=40; … Gauss’s Method: 1+100=101; 2+99=101; … Problem: Adding 1 to 100
sum = 0 i = 1 repeat: add i to sum add 1 to i i > 100 ? no -> repeat yes -> finish Algorithm: Find sum from 1 to 100
That algorithm was simple! So how are we able to use computers for solving complicated problems? Two KEY IDEAS: FIrst: Generalize Second: Combine different programs Intelligent Computer (continued)
First Trick: Generalize • Generalized Problem: find sum of n to m • algorithm is very similar to old one… sum = 0 i = n repeat: add i to sum add 1 to i i > m ? no -> repeat yes -> finish • HW: Algorithm for • find sum of n to m in steps of s?
Decompose problem into smaller parts: We can combine programs by using later programs to work on results of earlier programs. If we can divide into simple enough parts, then each part can be done separately, and then combined to give us the final product. Combining Algorithms (programs)
We are not THERE yet, We still do not have working algorithms for all problems you may want to solve. Even not for some “simple” problems. Face recognition. Difficulty: What exactly are we recognizing that is same in the photographs/persons? In Contrast, some problems are simpler. Finding the book by particular author in the huge number of books in the library is trivial for the computer. However….
Intelligent Computer • Common Capabilities • User Interface • “the face” of the computer • Database • Information store • Different types of info… • Database Retrieval • Fast, diverse • Data Transmission • Fast, accurate, secure • Complex Data Processing
Intelligent Computer – What Intelligence? • Human Intelligence • “Programmed” into the computer • Machine Intelligence • Key Ideas: • Abstraction • Knowledge Engineering
What is Computer Science? • Computer Science is NOT just • the study of computers • the study of how to write computer programs • the study of the uses and applications of computers and software • Computer Science is the study of algorithms, including • their formal and mathematical properties, • their hardware realizations, • their linguistic realizations, • their applications
Algorithm al go rithm n. A procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation; broadly: a step-by-step method for accomplishing some task. • Informally: an algorithm is an ordered sequence of instructions that is guaranteed to solve a specific problem. • Example of an algorithm: Step 1: Wet your hair Step 2: Lather your hair Step 3: Rinse your hair Step 4: Lather your hair Step 5: Rinse your hair Step 6: Stop.
What is Computer Science? • Can also define using the sub-areas: • Areas: • Algorithms and Data Structures • Programming Languages • Compilers and User Environments • Software Engineering • Computer Architecture • Logic Design • Computer Networking • Artificial Intelligence • Operating Systems • Parallel Processing • and many, many more…
History of Computers… • Processor (devices) Trends • Technology Trends
Processor Trends • Intel 4004 • Intel 8008 • Pentium (80x86 series) • Apple II • IBM PC • Non IBM PC (compatibles)
Technology Trends… • User Interfaces • Client Server Systems • Formatting versus Processing • Active Data • Web Computer • Web Business • Mobile Computers
Computer (what’s in it): Memory Box: Which can identify contents by name (address) Arithmetic Unit: Make calculations Pull data from memory, send to arithmetic unit, put back the answers to memory, etc. Know when to do what. Sort of pressing buttons on the calculator. You have to specify the algorithm in the particular language understood by the computer. Programming --> algorithm+language Intelligent Computer (cont…)
Generalize: Find sum of n to m in steps of s sum = 0 i = n repeat: add i to sum add s to i i > m ? no -> repeat yes -> finish Intelligent Computer (more…)