# Class 01: Algorithms: Thinking Formally

Held Friday, August 30, 2002

Summary

We begin the class by considering the discipline of CS and by trying to formally give instructions for an everyday problem.

Notes

Assignments

Overview

• Introduction; What is CS?
• An algorithm for making sandwiches

• Although I typically start the first day of computer science with the normal read through all the administrivia, because this class starts on a Friday, we're going to try a somewhat different approach.
• I'd like you to scan through the course web over the weekend and we'll discuss it on Monday.
• I've asked you to take a quiz on the administrative details so that the discussion will be quicker.

## An Introductory Question

• Rather than telling you exactly what the class is about, I'm going to start the class with a question for you. the questions will help ground the class and also begin to get you used to some aspects of my teaching style (particularly my reliance on recitation-style work).
• What is Computer Science?
• I will give some of my own responses after I've heard some of yours.

## What is CS?

• Computer scientists differ in how they define the discipline. However, most would aggree that
Computer science is the study of algorithms and data structures.
• By algorithms, we mean sets of instructions that can be used to solve problems.
• Some problems are mathematical. For example, you might write an algorithm to find the square root of a real number.
• Other problems deal with textual information. For example, you might write an algorithm that tells how to find a name in the phone book.
• You can write algorithms for a wide variety of problems.
• By data structures, we mean mechanisms for organizing information. For example, we organize some information in lists and other information in tables.
• By study, we mean specify, design, describe, evaluate mathematically, evaluate experimentally, implement in software, implement in hardware, prove properties, consider applications and implications, and much, much more.
• In our studies, we rely on the tools and techniques from a number of other disciplines.
• From mathematics, we take proof techniques, formal language for describing problems and solutions, and even core ideas.
• From science, we take experimental techniques.
• From engineering, we take techniques for designing and constructing things.
• From psychology and the social sciences, we take techniques for understanding the relationship of our work to human endeavors.
• These diverse perspectives and skill sets make CS interesting and challenging.

## An Everyday Algorithm

• We'll explore the problems of writing clear instructions through a simple exercise.
• Challenge: Write a clear, unambiguous, and detailed set of instructions for making a peanut butter and jelly sandwich.
• Format: Work in groups of about four.
• Each group will write its solution on one of the four boards.
• SamR will play the role of the sentient, but malicious and clueless follower of instructions.

## History

Thursday, 29 August 2002

Friday, 30 August 2002

• Fixed some typos.
• Moved a section on the purpose of programming languages to the next outline.

Monday, 2 September 2002

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Mon Dec 2 08:40:44 2002.
The source to the document was last modified on Mon Sep 2 07:49:47 2002.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2002F/Outlines/outline.01.html.

You may wish to validate this document's HTML ; ; Check with Bobby

Samuel A. Rebelsky, rebelsky@grinnell.edu