Course Introduction

1 Today’s Information

1.1 Learning Goals for Today

  • Define Algorithms
  • Understand course structure
  • Brainstorm group and learning strategies

1.2 Announcements/Logistics

  • Apply to do research with CS profs in the summer:

    • Fill out application at go/cs_summer_research
    • E-mail profs to set up a time to talk to them about their research
    • Office hours (this week only), Th 2:30-4pm, Fr 9-10:30
  • Upcoming assignments

    • (Getting to know you quiz)[https://middlebury.instructure.com/courses/14189/quizzes/32848] (due today)
    • (PSet Rough Draft)[https://middlebury.instructure.com/courses/14189/assignments/255304] (due Thursday)
    • (Participation Check-in)[https://middlebury.instructure.com/courses/14189/assignments/257121]
  • Suggested Deadline Schedule

    Monday Thursday
    pset pset rough draft
    participation check-in pset self-assessment
    quiz
  • Tutoring hours??

2 What is an algorithm?

Definition: An algorithms is a finite, clearly defined sequence of instructions for carrying out a task.

Which of the following are algorithms?

  1. Go to Cambridge
  2. int i=1;
    while(i<5){
        i=i+1;
    }
  3. function Fib(\(i\))

    Input: integer \(i: i\geq 0\)

    Output: \(i^{\textrm{th}}\) Fibonacci number

    If \(i\in \{0,1\}\), then return \(i\)

    Return Fib(\(i-1\))+Fib(\(i-2\))

  4. public static void fun(int j){
        int k=1;
        k++;
    }

3 Plan for the Semester

We will look at 3 paradigms for designing algorithms:

  • Divide and Conquer
  • Greedy
  • Dynamic Programming

For each algorithm, we will do the following:

  • Describe using pseudocode and/or java
  • Prove correctness
  • Analyze the asymptotic runtime
  • Consider ethical implications of implementing in a particular domain

We will also study NP-completeness, which is a particular way of trying to understand and compare the difficulty of problems

3.1 Learning and Collaborating

The first learning goal of the course has nothing to do with algorithms:

Develop strategies to become a better learner and collaborator.

3.1.1 Learning

Think of something you are good at. How did you get good at it? Did you ever make mistakes? What did you do when you made a mistake?

Because learning is a process, and mistakes are one of the best ways to learn, I give you lots of opportunities to make mistakes:

  • Problem sets are graded on effort, not correctness
  • Quizzes and exams have unlimited revisions and credit/no-credit grading

3.1.2 Group Work

We will do group problem solving in class almost every period. This will help you learn course content

  • by trying to explain your thinking to others
  • by asking questions
  • by making mistakes It will also help you to learn to be a better team member and to meet lots of other cool CS students! I will always provide the solution in class after you’ve had a chance to work on it in groups.