Download Understanding Computer Science: Algorithms, Distributed Systems, and Clock Synchronization and more Study notes Computer Science in PDF only on Docsity!
Distributed Computing
Presentation to CPSC 181 October 2008 Prof. Jennifer L. Welch Parasol Lab & Department of Computer Science Texas A&M University
Outline
Centrality of notion of algorithm What is an algorithm? Designing and analyzing algorithms Understanding lower bounds and impossibility results Distributed systems Some sample distributed algorithms
- clock synchronization
- routing based on link reversal
What is Computer Science?
Brookshear: "Computer Science is the
discipline that seeks to build a scientific
foundation for such topics as computer
design, computer programming, information
processing, algorithmic solutions of problems,
and the algorithmic process itself."
- Most fundamental concept of CS is an algorithm: a set of steps that defines how a task is performed
- An algorithm is instantiated in a program and then executed on a machine
Brookshear's Diagram
Algorithm Limitations of Execution of Communication of Analysis of Discovery of Representation of theory of computation,… architecture, operating systems, networks,… software engineering,… algorithmics,… artificial intelligence,… data structures, programming language design,…
Schneider & Gersting's Diagram Algorithmic Foundations of CS The Hardware World The Virtual Machine The Software World Applications Social Issues design & analysis of algorithms,… computer organization,… assemblers, operating systems… programming langs, compilers,… artificial intelligence,…
What is Computer Science?
C.A.R. Hoare: the central core of computer science is "the art of designing efficient and elegant methods of getting a computer to solve problems" D. Reed: Identifies 3 main themes:
- hardware: circuit design, chip manufacturing, systems architects, parallel processing
- software: systems software (e.g., operating systems), development software (e.g., compilers), applications software (e.g., web browsers)
- theory: understand inherent capabilities and limitations of different models of computation (for instance, proving that certain problems CANNOT be solved algorithmically)
Sorting Example
Solves a general, well-specified problem
- given a sequence of n keys, a 1 ,…,a n , as input, produce as output a reordering b 1 ,…,b n of the keys so that b 1 ≤ b 2 ≤ … ≤ b n
Problem has specific instances
- [Dopey, Happy, Grumpy] or [3,5,7,1,2,3]
Algorithm takes every possible instance and
produces output with desired properties
- insertion sort, quicksort, heapsort, …
Challenge
Hard to design algorithms that are
- correct
- efficient
- implementable
Need to know about
- design and modeling techniques
- resources - don't reinvent the wheel
Tour Finding Problem
Given a set of n points in the plane,
what is the shortest tour that visits each
point and returns to the beginning?
- application: robot arm that solders contact
points on a circuit board; want to minimize
movements of the robot arm
How can you find it?
Finding a Tour: Nearest Neighbor
start by visiting any
point
while not all points
are visited
- choose unvisited point closest to last visited point and visit it
return to first point
How to Prove Correctness?
There exist formal methods
- even automated tools Even informal reasoning is better than none Seeking counter-examples to proposed algorithms is important part of design process
Efficiency
Software is always outstripping
hardware
- need faster CPU, more memory for latest
version of popular programs
Given a problem:
- what is an efficient algorithm?
- what is the most efficient algorithm?
- does there even exist an algorithm?
Faster Algorithm vs. Faster CPU
A faster algorithm running on a slower
machine will always win for large enough
instances
problem size running time faster alg, slower machine slower alg, faster machine
Modeling the Real World
Cast your application in terms of well-studied
abstract data structures
text, characters, patterns strings shapes, regions, boundaries polygons sites, positions, locations points network, circuit, web, relationship graph hierarchy, ancestor/descendants, taxonomy trees cluster, collection, committee, group, packaging, selection subsets arrangement, tour, ordering, sequence permutation Concrete Abstract