# 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

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

## Implementing Graphs

• In order to implement any of the aforementioned algorithms, we'll need a `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:
• Edge lists
• 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 access.
• This makes it relatively easy to add edges (both unidirectional and bidirectional).
• 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 weighted).
• 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 for non-edge.)
• This makes it easy to determine if there is an edge between two nodes (O(1)).
• This makes it easy to add edges (O(1)).
• This makes is slightly more difficult to get lists of edges O(n^2).
• ...
• Can you think of other reasonable implementations?

## Defining Computer Science

• 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 endeavors, particularly
• Science
• Mathematics
• Engineering
• 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 ...

## Selected Subfields

• 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 be computed.
• Human-computer interaction -- the study of how computers can be made easier to use and how computers affect human task-completion activities.
• 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 such.
• 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 computer programs.
• 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.
• ...

## Wrapup

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.

## Final Statements

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

On to An Overview of CS
Back to Reachability, Revisited
Outlines: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
Current position in syllabus

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.