Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in...
-
Upload
phoebe-matthews -
Category
Documents
-
view
226 -
download
1
Transcript of Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in...
![Page 1: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/1.jpg)
CS221Algorithms and Data Structures
![Page 2: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/2.jpg)
Who am I?
Dr. Barry Wittman Not Dr. Barry Whitman Education:
PhD and MS in Computer Science, Purdue University
BS in Computer Science, Morehouse College Hobbies:
Reading, writing Enjoying ethnic cuisine DJing Lockpicking
![Page 3: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/3.jpg)
How can you reach me?
E-mail: [email protected] Office: Esbenshade 284B Phone: (717) 361-4761 Office hours: MWF 11:00am –
12:00pmMF 3:30 – 5:00pmT 1:00 – 3:00pmAnd by appointment
Website:http://users.etown.edu/w/wittmanb/
![Page 4: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/4.jpg)
Who are you?
60%13%
7%
7% 7%
7%
Major
Computer Science Information SystemsActuarial Science Computer EngineeringEnglish Undecided
![Page 5: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/5.jpg)
Why are we here?
What’s the purpose of this class? What do you want to get out of it? Do you want to be here?
![Page 6: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/6.jpg)
Course Overview
![Page 7: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/7.jpg)
Textbook
Robert Sedgewick and Kevin WayneAlgorithms 4th Edition, 2011, Addison-Wesley
Professional ISBN-10: 032157351X ISBN-13: 978-0321573513 First time I'm using this book!
![Page 8: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/8.jpg)
You have to read the book
You are expected to read the material before class
If you're not prepared, you will be asked to leave You will not be able to lecture about the
subject You will forfeit the opportunity to take
quizzes Much more importantly, you will forfeit
the education you have paid around $100 per class meeting to get
![Page 9: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/9.jpg)
Course focuses
Java expertiseComputational
complexityRecursionSortingGraph
algorithmsA little
concurrency
Data structures Stacks Queues Binary trees Hash tables Undirected graphs Directed graphs Priority queues
![Page 10: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/10.jpg)
Ass load of content
This class is serious business
Big theoretical component
Big coding component We’ve got to catch up Competition is stiff
Students at other American universities
Students abroad People in software boot
camps
![Page 11: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/11.jpg)
Java features
Tell me about a Java feature that you didn't learn in a lecture
![Page 12: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/12.jpg)
Imagine you're given a puzzle
If you can solve the puzzle, you're given a harder one
Once you start getting puzzles so hard you can't solve it, are you: Discouraged and ready to give up? Excited and eager for more?
![Page 13: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/13.jpg)
Fixed vs. growth mindsetsPeople with fixed mindsets believe that
they are unchanging Either smart or stupid, good at CS or not
People with growth mindsets believe that they can change and improve
People who are excited by puzzles they can't solve have a growth mindset
Guess which mindset leads to greater happiness and success?
![Page 14: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/14.jpg)
Linked lists
Singly linked Doubly linked Circular Pros and cons?
![Page 15: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/15.jpg)
Stacks and queues
Stacks Queues Pros and cons?
![Page 16: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/16.jpg)
Trees
Binary search trees Red-black trees Tries B-trees
![Page 17: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/17.jpg)
Hashing tables
Hashing functions Strategies for collisions
![Page 18: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/18.jpg)
Graphs
Model for representing many problems
Traversals Shortest paths Spanning trees Eulerian tours Hamiltonian tours NP-completeness
![Page 19: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/19.jpg)
Sorting and searching
Linear search Binary search Heap sort Quicksort Merge sort Bucket sort
![Page 20: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/20.jpg)
More information
For more information, visit the webpage: http://users.etown.edu/w/wittmanb/cs221
The webpage will contain: The most current schedule Notes available for download Reminders about projects and exams Syllabus (you can request a printed copy if you like) Detailed policies and guidelines
Piazza will allow for discussion and questions about the projects: https://piazza.com/etown/fall2015/cs221
![Page 21: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/21.jpg)
Projects
![Page 22: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/22.jpg)
Four projects
32% of your grade will be four equally weighted projects
Each will focus on a different major area from the course: Arrays and memory management Stacks and queues Trees Graphs
You will work on each project in two-person teams
![Page 23: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/23.jpg)
Teams
All projects are done in teams of two You may pick your partners
But you have to have a different partner for each project!
Use the Groups tab under the People section on the Canvas page for CS221 to form teams
I will copy assignments from the leader’s class folder (J:\FA2015-2016\CS221A)
![Page 24: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/24.jpg)
Turning in projects
Projects must be turned in by saving them in your team leader’s class folder (J:\FA2015-2016\CS221A) before the deadline
Do not put projects in your public directories Late projects will not be accepted
Exception: Each team will have 3 grace days You can use these grace days together or separately as
extensions for your projects You must inform me before the deadline that you are
going to use grace days If two people in a team don't have the same number of
grace days, the number of days they will have available will be the maximum of those remaining for either teammate
![Page 25: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/25.jpg)
Assignments
![Page 26: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/26.jpg)
Weekly assignments
15% of your grade will be from assignments, given roughly once every two weeks
4 of the assignments will be probably be written, and about 3 will be coding
There will be 7 assignments total Assignments will not be due on weeks
when projects are due Each written assignment typeset in LaTeX is
worth 1% extra credit applied to your final grade
![Page 27: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/27.jpg)
Impromptu student lectures
![Page 28: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/28.jpg)
Impromptu lectures
3% of your grade will be lectures that you give You will give roughly two of these lectures at any
time during the semester, without any warning You will have 3 to 5 minutes in which you must
present the material to be read for that day Students are encouraged to ask questions
There is no better way to learn material than by teaching it
Polishing public speaking skills is never a bad thing
![Page 29: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/29.jpg)
Quizzes
![Page 30: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/30.jpg)
Pop Quizzes
5% of your grade will be pop quizzes These quizzes will be based on material
covered in the previous one or two lectures
They will be graded leniently They are useful for these reasons:
1. Informing me of your understanding2. Feedback to you about your understanding3. Easy points for you4. Attendance
![Page 31: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/31.jpg)
Exams
![Page 32: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/32.jpg)
Exams
There will be two equally weighted in-class exams totaling 30% of your final grade Exam 1: 09/25/2015 Exam 2: 11/02/2015
The final exam will be worth another 15% of your grade Final: 2:30 – 5:30pm
12/07/2015
![Page 33: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/33.jpg)
Exam format
Conceptual portion Short answer or matching questions
Programming portion Short programming problems you will
write code for
![Page 34: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/34.jpg)
Course Schedule
![Page 35: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/35.jpg)
Tentative schedule
Week Starting Topics Chapters Notes
1 08/24/15 Java, OOP, and generics Notes
2 08/31/15 Complexity 1.4 , 1.2, 1.3
3 09/07/15 Stacks and queues 1.3
4 09/14/15 Linked lists 1.3 Project 1 Due
5 09/21/15 Recursion Notes Exam 1
6 09/28/15 Recursive running time Notes, 3.1
7 10/05/15 Binary trees 3.2 Project 2 Due
8 10/12/15 Balanced binary search trees 3.3
9 10/19/15 Hash tables 3.4
10 10/26/15 Undirected graphs 4.1
11 11/02/15 Directed graphs 4.2 Exam 2, Project 3
12 11/09/15 MST and shortest paths 4.3, 4.4
13 11/16/15 Sorting 2.1, 2.2, 2.3, 2.4
14 11/23/15 Strings 5.1, 5.2 Thanksgiving
15 11/30/15 Review All Project 4 Due
![Page 36: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/36.jpg)
Project schedule
Project 1: 8%Tentatively due 09/18/2015
Project 2: 8%Tentatively due 10/09/2015
Project 3: 8%Tentatively due 11/06/2015
Project 4: 8%Tentatively due 12/04/2015
![Page 37: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/37.jpg)
Policies
![Page 38: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/38.jpg)
Grading breakdown
32% •Four projects•Equally weighted
15% •Homework assignments
3% •Impromptu student lectures
5% •Quizzes
30% •Two equally weighted midterm exams
15% •Final exam
![Page 39: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/39.jpg)
Grading scale
A 93-100 B- 80-82D+ 67-69
A- 90-92 C+ 77-79 D 63-66
B+ 87-89 C 73-76 D- 60-62
B 83-86 C- 70-72 F 0-59
![Page 40: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/40.jpg)
Attendance
You are expected to attend class You are expected to have read the
material we are going to cover before class
Missed quizzes cannot be made up If you miss a day without an excuse,
you might get a zero for a lecture you should have given that day
Exams must be made up before the scheduled time, for excused absences
![Page 41: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/41.jpg)
R-E-S-P-E-C-T
I hate having a slide like this I ask for respect for your classmates
and for me You are smart enough to figure out
what that means A few specific points:
Silence communication devices Don’t use the computers in class
unless specifically told to No food or drink in the lab
![Page 42: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/42.jpg)
Computer usage
We will be doing a lot of work on the computers together
However, students are always tempted to surf the Internet, etc.
Research shows that it is nearly impossible to do two things at the same time (e.g. use Facebook and listen to a lecture)
For your own good, I will enforce this by taking 1% of your final grade every time I catch you using your computer for anything other than course exercises
![Page 43: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/43.jpg)
Academic dishonesty
Don’t cheat First offense:
I will give you a zero for the assignment, then lower your final letter grade for the course by one full grade
Second offense: I will fail you for the course and try to kick you out of
Elizabethtown College Refer to the Student Handbook for the official policy Ask me if you have questions or concerns You are not allowed to look at another student's
code, except for group members in group projects (and after the project is turned in)
I will use tools that automatically test code for similarity
![Page 44: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/44.jpg)
Disability
Elizabethtown College welcomes otherwise qualified students with disabilities to participate in all of its courses, programs, services, and activities. If you have a documented disability and would like to request accommodations in order to access course material, activities, or requirements, please contact the Director of Disability Services, Lynne Davies, by phone (361-1227) or e-mail [email protected]. If your documentation meets the college’s documentation guidelines, you will be given a letter from Disability Services for each of your professors. Students experiencing certain documented temporary conditions, such as post-concussive symptoms, may also qualify for temporary academic accommodations and adjustments. As early as possible in the semester, set up an appointment to meet with the instructor to discuss the academic adjustments specified in your accommodations letter as they pertain to my class.
![Page 45: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/45.jpg)
Upcoming
![Page 46: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/46.jpg)
Next time…
I will do a refresher on: Java syntax Types Libraries Strings OOP Interfaces Exceptions
Read 1.1 Ignore stuff about the StdIn and StdOut
libraries the book provides
![Page 47: Algorithms and Data Structures. Dr. Barry Wittman Not Dr. Barry Whitman Education: PhD and MS in Computer Science, Purdue University BS in Computer.](https://reader035.fdocuments.net/reader035/viewer/2022062304/56649ebb5503460f94bc436d/html5/thumbnails/47.jpg)
Reminders
Read section 1.1 Brush up on Java Apply for a Shutterfly scholarship:
$5,500 for you $4,500 to your K-12 schools http://www.shutterfly.com/computer-scie
nce-scholarship/
(You have to write an essay, but it's short)