CSC 151 2019S, Class 01: An introduction to algorithms
Overview
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Questions
- Introduction - What is CS?
- Exercise - An everyday algorithm
- Debriefing on exercise
- Common parts of an algorithm
Preliminaries
News / Etc.
- Welcome to CSC151!
- I’m Sam (or SamR)
- Our class mentors are Sanah and Xinya
- You should have received five handouts at the start of class
- Since it’s the first day of class, I will take attendance. (It will take
me a few weeks to learn all of your names.)
- “Hi, my name is FORENAME SURNAME.”
- “You can call me PRIMARY_NAME.”
- “If you must address me by surname, you can call me
Mr./Ms./Mx./[nothing] SURNAME.”
- Something cool did you during break (if you’re willing to share)
- Optional: “My pronouns are ….”
Upcoming work
- Assignment 1 due Sunday night.
- Readings (handed out today), due before class Friday.
- We’re starting with a lot of reading. It will taper off after the
first few weeks.
- Assignment 2 due Tuesday night.
- Sam will assign partners on Friday.
None yet.
- Indoor track meet, Saturday at 9:30 a.m. The track meet is long, so
30 minutes of attendance suffices. (Send me a paragraph of reflection,
not report.)
None yet.
None yet.
Other good things
Questions
Introduction - What is CS?
- The study of the mechanics and processes of computing through coding
- coding: typing instructions to the computer, using a language
the computer can process
- Hey computer, please pick a number between 1 and 34.
- How do scientists study
- Find a problem and try to solve it
- Investigate using the scientific method
- Form a hypothesis
- Design an experiment
- Conduct the experiment
- Analyze the results
- “Confirm” or “reject” hypothesis
- You can do more experiments
- Using lived experience and oral history
- Humanitistic study of the world
- Rational thinking, discussion, and questioning
- Reflecting on what other people have said and thinking about it.
- An approach to the works of humanity through
- In computer science, we study computation
- Computation: understandable processes for achieving goals
- How do we write instructions that can be carried out?
- Most typically, by computer.
- This semester: Looking at how to write instructions to achieve particular
goals.
- Often: In a programming language that the computer understands.
- Sometimes: In a language that humans understand
- Terminology:
- “Algorithm” - A set of instructions to achieve a goal
- “Data structure” - A way of organizing information
- We will study in a variety of ways
- Writing them
- Reading them
Exercise - An everyday algorithm
- Get with a group of four people with the same card number as you.
- Introduce yourselves to each other.
- Assume I am relatively clueless.
- Give me instructions for making a soy butter and preserve sandwich
Debriefing on exercise
Three minutes, four lessons you might have taken from this process.
- “I’m worried about having Sam as a teacher. He appears to have
no clue whatsoever.” (Alternately: “I’m worried about Sam’s
dad jokes.”)
- Make sure you understand your inputs. (There are multiple kinds
of jars. There are multiple ways to end a loaf of bread. Nut-butter
jars often have a seal.)
- Make sure you understand the capabilities of your audience. (You
should have learned something similar in Tutorial - know your audience.)
[+1.5]
- Ambuiguity is dangerous. Computers generally choose whichever meaning
is least appropriate. [+0.5]
- It’s good to try your algorithm as you write it so that you understand
the state of the system.
- Four heads are better than one.
- Take time to understand the details of each operation.
- There are multiple processes for achieving the same goal.
- Need to make sure that you clean up after yourself.
- Be precise.
- Leave room for error (and ways to recover from errors).
- Algorithms may have unintended consequences.
- Be aware of the tools and resources you have available.
Common parts of an algorithm
We may not have time for this section.
Nope, we never do.