computer science 126€¦ · computer programming books—and provide the background they need to...
TRANSCRIPT
![Page 1: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/1.jpg)
Computer Science 126Computer Science: An Interdisciplinary Approach
Spring 2020
Robert Sedgewick
![Page 2: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/2.jpg)
COS 126 Roadmap
![Page 3: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/3.jpg)
Course website
3
Need details? Go to www.princeton.edu/~cos126.
• Syllabus.
• Meetings.
• Lectures.
• Assignments.
• Precepts.
• Exams.
• Help!
Important note: We do not use Blackboard or Canvas for course content.
bookmark this page!
![Page 4: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/4.jpg)
Syllabus
4
A contract between you and us.
• Front page of website.
• Read it carefully.
• General information.
• Grading.
• Collaboration policy.
![Page 5: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/5.jpg)
Textbook
5
Our new textbook is the basis of this course.
• Full coverage of course material.
• Developed for COS 126.
• Use while learning and studying.
R O B E R T S E D G E W I C K K E V I N W A Y N E
[Sedgewick and Flajolet] are not only worldwide leaders of the !eld, they also are masters of exposition. I am sure that every serious computer scientist
will !nd this book rewarding in many ways. —From the Foreword by Donald E. Knuth
Despite growing interest, basic information on methods and models for mathematically analyzing algorithms has rarely been directly accessible to practitioners, researchers, or students. An Introduction to the Analysis of Algorithms, Second Edition, organizes and presents that knowledge, fully introducing primary techniques and results in the !eld.
Robert Sedgewick and the late Philippe Flajolet have drawn from both classical mathematics and computer science, integrating discrete mathematics, elementary real analysis, combinatorics, algorithms, and data structures. They emphasize the mathematics needed to support scienti!c studies that can serve as the basis for predicting algorithm performance and for comparing different algorithms on the basis of performance.
Techniques covered in the !rst half of the book include recurrences, generating functions, asymptotics, and analytic combinatorics. Structures studied in the second half of the book include permutations, trees, strings, tries, and mappings. Numerous examples are included throughout to illustrate applications to the analysis of algorithms that are playing a critical role in the evolution of our modern computational infrastructure.
Improvements and additions in this new edition include
Q Upgraded !gures and code Q An all-new chapter introducing analytic combinatorics Q Simpli!ed derivations via analytic combinatorics throughout
The book’s thorough, self-contained coverage will help readers appreciate the !eld’s challenges, prepare them for advanced results—covered in their monograph Analytic Combinatorics and in Donald Knuth’s Art of Computer Programming books—and provide the background they need to keep abreast of new research.
ROBERT SEDGEWICK is the William O. Baker Professor of Computer Science at Princeton University, where was founding chair of the computer science department and has been a member of the faculty since 1985. He is a Director of Adobe Systems and has served on the research staffs at Xerox PARC, IDA, and INRIA. He is the coauthor of the landmark introductory book, Algorithms, Fourth Edition. Professor Sedgewick earned his Ph.D from Stanford University under Donald E. Knuth.
The late PHILIPPE FLAJOLET was a Senior Research Director at INRIA, Rocquencourt, where he created and led the ALGO research group. He is celebrated for having opened new lines of research in the analysis of algorithms; having systematized and developed powerful new methods in the !eld of analytic combinatorics; having solved numerous dif!cult, open problems; and having lectured on the analysis of algorithms all over the world. Dr. Flajolet was a member of the French Academy of Sciences.
informit.com/aw | aofa.cs.princeton.edu
Cover design by Chuti Prasertsith Cover illustration by
Text printed on recycled paper
$79.99 U.S. | $83.99 CANADA
Com
puter ScienceA
N IN
TE
RD
ISC
IPL
INA
RY
AP
PR
OA
CH
SEDGEWICK
WAYNE
Programming | Algorithms
ComputerScience
An Interdisciplinary Approach
old version has only the first half
![Page 6: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/6.jpg)
6
Online lecture materials are on the website
• Copies of slides (.pdf and 4-up).
• Studio-produced videos.
• No more live lectures.
Video lectures
Why? Because you can
• Fit lectures into your schedule more easily.
• Slow down or rewind if you get lost.
• Speed up or skip if you get bored.
• Focus on understanding, not note-taking.
Bottom line. Online format has proven to be more effective and efficient than live lectures.
“ Lecturing is that mysterious process by means of which the contents of the note-book of the professor are transferred … to the note-book of the student without passing through the mind of either. ”
− Edwin Emery Slosson
Last Thursday was the exception
![Page 7: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/7.jpg)
21st Century
20th Century
![Page 8: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/8.jpg)
Precepts
8
Small inclass discussion groups
• Led by faculty and graduate students.
• Exercises and examples to reinforce content learned from lecture and textbook.
• Watch lecture, do reading before precept
• If everyone participates, everyone benefits.
• 50 and 80 minute options.
• All precepts cover the same content.
• Can't make a precept? Attend another.
Your preceptor is your advocate.
Need to switch into a full precept? Contact Colleen Kenny
![Page 9: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/9.jpg)
Office hours
9
Lab TAs
• Available every day in Lewis 121.
• Staffed by undergraduates who want to help you.
• Driven by a "help queue".
• Details at https://labta.cs.princeton.edu.
IMPORTANT: ask reasonable, concrete questions
• What's wrong with this 50 lines of code?
• What will happen if I run this code?
• I don't understand why this code does X and not Y
S M T W T F S
5–11 7–11 7–11 7–11 7–11 7–11 3–7
Preceptors
• Find schedule under Help tab on course website.
• Can go to any preceptor, not just your own.
✓
✗✗
and may know more about assignments
than we do!
![Page 10: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/10.jpg)
Booksite
10
The book is supported by a unique resource.
• Summary of content.
• Code, exercises, examples.
• Test data, animations
• Extra material.
• NOT the textbook.
• NOT the course website.
• For use while online.
http://introcs.cs.princeton.edu bookmark this page, too!
![Page 11: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/11.jpg)
Compass 126
A new initiative in our efforts to keep improving this course.
https://docs.google.com/presentation/d/1AEcdS9hkW1ONnbqnkmyc2bhtdrqGmcJazrpRHonzpmQ/edit?usp=sharing
11
Soohyun nam Liao Priscilla Lee
![Page 12: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/12.jpg)
Su Mo Tu We Th Fr Sa
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
MA
Y
APR
M
AR
FE
B
Class meetings
12
We often meet here Tues or Thurs at this time but not always.
• No more live lectures.
• Exams including preparation and review.
• Programming assignment guides.
• A few miscellaneous enrichment topics.
• Check Meetings tab for schedule
• No meetings next week
![Page 13: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/13.jpg)
We have many opportunities to determine your level of achievement.
• 9 programming assignments.
• 2 written exams (in class, 3/5 and 4/30).
• 2 programming exams (in class, 2/27 and 4/23).
• Final programming project (due Dean’s date − 1).
• Extra credit / staff discretion. Adjust borderline cases.
Grades
13
frequent absence hurts participation helps
We do not grade on a "curve".
you are already here
We do grade on a "curve".
grade distribution invariably looks
like this
A B C D F
![Page 14: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/14.jpg)
Programming assignments
14
You will learn to program “with a purpose”
• Weekly programming assignments.
• Interesting and informative.
• Practical application of lecture topics.
• Introduction to meaningful applications.
![Page 15: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/15.jpg)
Exams
15
We have exams in this time slot
• Two written exams.
• Two programming exams.
• Prep sessions in class meetings
• No final exam
Programming exams.
• February 27 and April 23.
• Mini in-class assignments, written by RS.
• “Have you been participating in precept?”
• “Can you write a short program?”
• Prepare by practicing with exercises in textbook and on booksite.
Written exams.
• March 5 and April 30.
• Short-answer exams. written by RS.
• “Did you watch lectures and read the book?”
• One question per lecture (roughly).
• Prepare by working old exams and rewatching lectures as necessary.
![Page 16: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/16.jpg)
Platform changes
16
We have changed from DrJava to IntelliJ
• Some slides in Lecture 1 are “deprecated”.
• No changes in textbook.
Integrated development environment
Please note. People who took COS 126 in the past may not know these platforms.
we’re learning them, too!
We have changed from Dropbox to TigerFile
• Big changes under the hood.
• You just click the Submit button.
Submission platform
![Page 17: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/17.jpg)
Ed: yet another platform change (from Piazza)
17
Dos. • Use Ed instead of e-mailing preceptors. • Take the time to provide thoughtful answers. • Point to book or website when you can.
Don’ts. • Provide a guess as an answer. • Ask a question easily answered elsewhere. • DO NOT POST CODE (EVER).
An online discussion forum for COS 126
• Try it when you have a question.
• Visit occasionally even if you have no questions.
Why a discussion forum?
• If someone else has had the same question, you get your answer immediately.
• If your question is new, others are likely to later benefit from the answer.
• We can immediately fix bugs in course materials.
• You most often will find an answer here.
![Page 18: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/18.jpg)
Where can I get help?
18
You have many resources.
• Preceptors.
• Ed.
• Office hours.
• Lab TAs.
• See Help! tab for details.
Help from others? Follow our carefully articulated collaboration policy.
• Working with others within the rules is encouraged but we strictly enforce the rules. • See the Syllabus on the website front page for details. • Only use authorized sources (example: don’t plagiarize or use GitHub) • Ignorance is no defense (read it carefully today). • Feeling stressed? Come talk to us!
![Page 19: Computer Science 126€¦ · Computer Programming books—and provide the background they need to keep abreast of new research. ROBERT SEDGEWICK is the William O. Baker Professor](https://reader033.vdocuments.site/reader033/viewer/2022060515/5f8b0e6a7edb2740095dcaf1/html5/thumbnails/19.jpg)
Questions and Answers
19