---
title: "Course Introduction"
format:
  html:
    toc: true
    number-sections: true
---
[In-class notes](hand_written_notes/IntroF24Class.pdf)

## Today's Information

### Learning Goals for Today

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

### Announcements/Logistics

- Office Hours: T/Th 12:30-1:30, 3:30-4:00
- Upcoming assignments
	- [Getting to know you quiz](https://middlebury.instructure.com/courses/14736/quizzes/36037) (due **today**)
	- [PSet Rough Draft](https://middlebury.instructure.com/courses/14736/assignments/271681) (due Sunday)
	- [Exit Ticket](https://middlebury.instructure.com/courses/14736/discussion_topics/194187) (due by 8am before Thursday's class)
- Course assistant drop-in hours TBD
- "What I did over the summer"  

## What is an algorithm?

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

::: {.callout-tip appearance="simple"}

### ABCD Question 

Which of the following are algorithms?

A) ```
Go to Cambridge
```

A) ```java
int i=1;
while(i<5){
	i=i+1;
}
```

A)
> 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$)
>

A) ```java
public static void fun(int j){
	int k=1;
	k++;
}
```

:::

## 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

### Learning Goals


* Describe, design, and implement algorithms using the following paradigms: Divide and Conquer, Dynamic Programming, and Greedy.
* Prove correctness of algorithms using inductive proofs and exchange arguments.
* Analyze the runtime of algorithms. Analyze expected runtime of randomized algorithms using linearity of expectation and indicator variables.
* Describe ethical implications of algorithms.
* Create reductions from one problem to another and explain why reductions are important.
* Understand the importance of NP-completeness, and be able to prove a problem is NP-complete.
* Develop strategies to become a better learner and collaborator


### Learning and Collaborating
The last learning goal of the course has nothing to do with algorithms:

> Develop strategies to become a better learner and collaborator.
>

#### 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 assessments have unlimited revisions based on feedback and credit/no-credit grading

#### 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.

::: {.callout-tip appearance="simple"}
## Group Exercise

In groups we are going to brainstorm ways to manage challenges that arise in group work: 

- [go/CS302groups](https://docs.google.com/document/d/1JleYmKQP8q_7hb66PYlVnlGyC9vK82kLke6UbaSLL-g/edit#heading=h.r0xknoritz2k)
:::