CS187 - Science Gateway Seminar for CS andMath
Fall 2013 – Class 3
Sep. 10, 2013
What is (not) Computer Science?
Network and system administration?
Playing video games?
Learning to use software packages?
Using and fixing computers?
Computer programming and code writing? (well, yes and no).
”Computer science is no more about computers than astronomy isabout telescopes” (attributed to Edsger Dijkstra, 1970)
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
What is it Really, Then?
The science of computation – theory and applications.
Theory – Algorithms, data structures, complexity,computability.
Programming languages.
Software engineering and design.
Hardware design, compilers, operating systems (this is actuallyabout computers!).
Application: Bioinformatics, robotics, computer vision,graphics, databases...
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
A Brief History
What we know as modern computer science was created inthe mid-20th century.
Often computer science did not exist as an independentdepartment/school until fairly recently (at UMB – only since2001).
The term ”Computer” was used to describe people until the1920’s!
Humans used mechanical devices for calculations forthousands of years.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Early History to 17th Century – First Mechanical Devicesand Theoretical Developments
Abacus, 2700–2300 BC – predating writtennumbers, Middle East and Asia
John Napier (1550–1617), discovery oflogarithms, decimal points, ”Napier bones”– a calculating instrument
Blaise Pascal (1623–1662), firstmechanical adding and subtracting device.
Gottfried Wilhelm Leibniz (1646–1716),binary system, formal binary logic,”stepped reckoner” – first mechanicaldevice capable of performing all 4arithmetic operations.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
19th Century – First Attempt at a ”Real” Computer
The ”difference engine” – amechanical computer fortabulating polynomialfunctions.
The ”analytical engine” – ageneral-purpose mechanicalcomputer containing a logicunit, conditional branching,loops, and integratedmemory.
Punched cards provided theinput.
Designed, never fully built.
Charles Babbage (1791–1871), inventedthe first computer.Ada Lovelace (1815–1852), first computerprogrammer.
Difference engine and analytical engine
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Turing and the Birth of Modern Computer Science
1930’s – the ”Church-Turingthesis” – formalization ofthe algorithm, the notion ofcomputability.
Lambda calculus (Church) –a framework for definingfunctions.
The Turing machine(Turing) – a theoreticalframework for a computer.
Alonzo Church (1903–1995)
Alan Turing (1912–1954)
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
The Turing Machine
A (hypothetical) devicerepresenting a computingmachine.
Contains an infinite tapewith a (finite) set of symbolsfrom a finite alphabet – theinput.
A read/write head that canmove to the left or right.
A (finite) set of state,including an initial state anda set of final states.
A (finite) list of instructionsthat tells us how to movefrom one state to another:Given a state qi and asymbol si , move to state qj ,write symbol sj and movethe head to the left or right.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Computability and the Universal Turing Machine
This is a very simple model... right?
Yet, it is as powerful as any computing device... even today.
As a matter of fact, any task can be computed (performed byany computational device following a list of instructions, justlike any of today’s computer programs) if and only if it can beperformed by a Turing machine.
The Universal Turing machine – A Turing machine that cansimulate any Turing machine on any input.
This is the foundation of modern day computers.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Stored-Program Computers, the Von-NeumannArchitecture
A design that does notrequire ”reprogramming” ofa computer for every newtask.
Instead, the programs andinstructions can be storedinside the computer.
Sort of like the UniversalTuring Machine...
Modern computers are stillbased on this architecture.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
What Are Algorithms, Anyway?
A set of instructions/procedures to solve a given problem.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
What Are Algorithms, Anyway?
A set of instructions/procedures to solve a given problem.
Input Algorithm Output
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
What’s in an Algorithm
Must be unambiguous, solve theproblem and terminate.
One starting point and (one ormore) end point(s).
Input and output (both optional).
Control flow – we follow theinstructions (not necessarily in theorder of their appearance) and atany stage we’re at some ”block”.
Conditional branching – if...then...(else...).
Loops – repeat some actions for acertain number of times or untilsome condition is filled.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
More (CS/Math Relevant) Examples
1 Print ”Hello, world!” on the screen.
2 Given a sequence of integers in no particular order, (-2, 17,36, 29, 100, 10), find the smallest.
3 Given a sequence of integers, sort them from the smallest tothe biggest.
4 Given a sequence of integers, calculate their sum.
How can you relate (2) and (3)?
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Use Smaller Building Blocks to Build a Larger Algorithm
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Use
1 Print ”Hello, world!” on the screen.
2 Given a sequence of integers in no particular order, (-2, 17,36, 29, 100, 10), find the smallest.
3 Given a sequence of integers, sort them from the smallest tothe biggest.
How can you relate (2) and (3)?
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Can Anything be Computed?
No. It can be mathematically shown that some problems areundecidable.
In other words – There are problems for which no algorithmcan be constructed that will always answer yes/no.
This concept is related to the Incompleteness theorems,stating that there cannot be a non-trivial, self-consistent setof mathematical axioms.
Any non-trivial axiomatic system will always containsunprovable theorems.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Computer Science is (also) About Computers
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math
Acknowledgements and Sources
Wikipedia
Ikea catalog
Kevin Amaral, CS department.
Nurit Haspel CS187 - Science Gateway Seminar for CS and Math