Outline of Class 53: An Overview of CS
Held: Friday, May 8, 1998
- Reminder: I want a self-grade on homework by noon today.
- Reminder: get extra credit by doing cool multimedia labs. Try contacting
Andrew Nashel, Omar Ghaffar, or Dan Wislocki.
- Reminder: The final will be Thursday, May 14, at 9 a.m. A short
review sheet is now available.
- There are two candidates for a visiting math position coming next week.
They will be speaking on Monday night and Wednesday night. I think
that the department will be providing Pizza. I'll offer the added
incentive that anyone who comes to a talk and sends the department
a summary of your reactions to the candidate gets one point of extra
credit in the class.
- The traveling salesperson problem (TSP) attempts to find a minimum
cost cycle in a weighted graph that visits all of the nodes in the graph.
- It gets its name from the typical task of a traveling salesperson:
visit all the cities in your teritory in the shortest time / shortest
- As before, we can do a brute force solution which requires
exponential time. That is, we list all the cycles and pick the smallest.
- Can we do better?
- Surprisingly, all of the known algorithms for solving TSP are exponential.
- Exponential solutions are generally unacceptable. What's a poor
TS to do?
- Take CS301 and CS341 to find out.
- In order to implement any of the aforementioned algorithms, we'll
Graph data structure.
- While we had suggested that it is easiest to represent graphs as
nodes, this isn't always the case. For example, note that in some
algorithms we needed to mark all the nodes in the graph. This requires
a way to get a list of all the nodes (and no, a traveral algorithm isn't
the best idea; the graph may not be connected). In others, we needed
a list of all the edges. Again, this may be time consuming (if not
impossible) to compute.
- As in other cases, our implementation depend on the way you intend to use the
graph. For example, if you frequently attempt to list all the
neighbors of a node (as we did in a few recent algorithms), you
want something that provides an answer to that question quickly.
- There are three main implementations of graphs:
- Nodes with adjacency lists
- Edge lists
- Adjacency matrices.
- In an adjacency list implementation, we associate a list
of neighbors (plus edge weights if appropriate) with each node.
Often, we store the individual nodes in a dictionary for quick
- This makes it relatively easy to add edges (both unidirectional
- This makes it relatively easy to get a list of all edges.
- This makes it very easy to get all the neighbors of a node.
- This makes is slightly difficult to determine if there is an
edge between two nodes (it's O(#neighbors)).
- In an edge list implementation, the graph is implemented
as a list of edges (pairs of nodes, potentially ordered, potentially
- This makes it easy to get a list of all the edges :-).
- This makes it easy to add edges.
- This makes it easy to present the graph in textual form
(just list the edges).
- This makes it difficult to get all the neighbors of a node,
as we must look at all the edges in the graph.
- This makes it difficult to determine whether or not a node
is in the graph.
- In an adjacency matrix implementation, we build a matrix
of all pairs of nodes. Each entry in the matrix reflects the weight
of the edge from one node to the corresponding node. (In a non-weighted
graph, it might simply contain a boolean value: true for edge, false
- This makes it easy to determine if there is an edge between two
- This makes it easy to add edges (O(1)).
- This makes is slightly more difficult to get lists of edges
- Can you think of other reasonable implementations?
- What is computer science? At times, it depends on who you ask.
- An engineer might tell you that it's the study of how to build
computers. Others would call this Computer Engineering.
- One of the faculty at my old institution might tell you that it's
the study of computational complexity -- what can and cannot be
computed. Others might call this a part of
Theoretical Computer Science.
- A programmer might tell you that it's the study of programming.
Others might call that Software Engineering.
- A typical computer user might guess that it's the study of
computer applications, like word processors or spreadsheets.
- A humanist might tell you that computer science is a preprofessional
specialization, unfit for a liberal arts education. Others might
call that severely biased. (Yes, that was intended as a joke.)
- While CS encompasses these ideas, it is much more.
- A book I like (Schneider and Gersting's An Invitation
to Computer Science) suggests that
Computer Science is the study of algorithms, including their
(1) formal and mathematical properties, (2) hardware realizations,
(3) linguistic realizations, and (4) applications.
- I would extend this definition in a number of ways.
- Computer science is also the study of data representation,
since some of what we do in CS focuses more on the data than on the
algorithm and structure and algorithm are integrally related
(as we've seen in this course).
- Computer science might also include the implications of
algorithms and data strucctures.
- Computer science might also include the interaction of
algorithms and data structures with humans.
- Computer Science lies at the intersection of a number of intellectual
- In fact, the recommended computing curriculum suggests that we approach
each topic in CS from each of these perspectives.
- If we're to do that, we need definitions. That's up to you ...
- Like many modern fields, computer science has segmented into a number
of subfields. There is some overlap between many of these subfields,
but there are also some clear divisions.
- Some of the ones that come to mind are ...
- Computer architecture -- the design and analysis of the
primary electronic components of computers.
- Programming languages -- the design, analysis, and
implementation of the languages we use to express computation.
- Algorithms -- the formal design and analysis of procedures
for solving problems.
- Computability theory -- the study of what can and cannot
- Human-computer interaction -- the study of how computers can
be made easier to use and how computers affect human task-completion
- Information retrieval -- mechanisms for organizing data for
quick access; models and systems for access to data.
- Operating systems -- how to provide a robust and reliable
computing system upon which other applications rely. Concerns itself
with processes (programs as they execute), memory, file systems, and
- Networking -- how computers can communicate with each other
reliably and quickly.
- Parallel and distributed computing -- the use and coordination
of multiple computers (and computer components) acting together.
- Applications -- the things we can do with computers.
- Software engineering -- the formal discipline of writing
- Artificial intelligence -- the attempt to simulate human
thought processes on computers.
- Social issues -- the effects of computers on humans and society.
- Multimedia -- the electronic integration of text, audio, video,
graphics, animations, .... Often, the study of multimedia involves
studying another domain in the context of multimedia. For example,
successful use of multimedia requires different networking starategies
then we've traditionally employed.
We've covered many topics in these fourteen weeks. I will attempt to
relate them, using the review sheet
for the final as a basis.
- My mother taught Psychology at Boston University for over thirty
years. ("Aha, that explains SamR's personality.") She ended every
class with the same statement. I try to do the same, although the
statement is filtered through my sensibilities.
Most of us will take or teach other classes. However, this one is
unique; none will ever be quite like this it for a number of reasons.
The people in the class made it what it was. We should acknoledge
each other's contributions and commit ourselves to making similar
contributions in future classes. I thank all of you for your
- Mom also makes a statement on the order of
While I enjoyed having you in my class, I'm also happy to have you
move on to other things. Like any parent, I've enjoyed seeing
you grow, but also want you to test your own wings.
- Mom also tells a story of an elementary school teacher she had worked
with who was leaving her job. Mom stopped by to give the teacher a
goodbye present. The teacher cried. Mom said "I expect that you've
been crying all day as you said goodbye to your students." The teacher
said "No, I forgot to say goodbye." Since then mom has always made it
a point to say goodbye to her classes. I encourage you to say goodbye
to your friends and colleagues who you may not see again.