COMP 250 Introduction to Computer Science! COMP250 Home Page

advertisement
12-01-10
COMP250 Home Page - Winter 2012
Key course info:
•  Instructor: Mathieu Blanchette
Welcome to COMP 250
Introduction to Computer Science!
•  Schedule: MWF 9h35-10h25 in MAASS 112
•  Web page: http://www.cs.mcgill.ca/~blanchem/250
•  Prerequisites:
–  Familiarity with a high level programming language and CEGEP level mathematics.
–  NOTE: COMP 203 and COMP 250 are considered to be equivalent from a prerequisite
point of view, and may not both be taken for credit. Computer Science Major and Honours
students are strongly advised to take COMP 250 instead of COMP 203.
Mathieu Blanchette
•  Office hours: Tuesday 11:00-12:30, Friday 10:30-12:30 in Trottier 3107.
•  Teaching assistants: TBD
•  Schedule of topics covered + All lecture notes:
http://www.cs.mcgill.ca/~blanchem/250/schedule.html
•  Bulletin board, announcements, discussions:
WebCT CE. You can log in at http://www.mcgill.ca/webct
•  Required text: Allen B. Downey
How to think like a computer scientist - Java version.
http://www.greenteapress.com/thinkapjava/thinkapjava.pdf
•  Suggested textbook:
•  Michael T. Goodrich, Roberto Tamassia
Data Structures and Algorithms in Java (Fourth Edition), John
Wiley and Sons;
NOTES: - Many students found the lecture notes sufficient.
- The 2nd/3rd editions of the same book is equally good
Integrity and French
Course evaluation
• 
• 
• 
• 
6 assignments, worth 5% each, for a total of 30%
In-class midterm exam #1, on Feb. 8th, worth 10%
In-class midterm exam #2, on March 12th, worth 10%
3-hour final exam, on December ??th, worth 50%
Policy on late homework
Unless a medical justification is given, late assignments will be
penalized by 20% per day: 0-24h late: 20%, 24h-48h late: 40%...
For some assignments, no late turn in will be accepted.
Policy on homework collaboration
It is OK to discuss homework questions with others students
BUT
Everything you take out of a discussion must IN YOUR HEAD
(nothing written)! You have to write your solutions by yourself.
Anything else is cheating!
My work as a researcher
McGill University values academic integrity. Therefore all students must
understand the meaning and consequences of cheating, plagiarism and
other academic offences under the Code of Student Conduct and
Disciplinary Procedures
(see www.mcgill.ca/integrity for more information).
In accord with McGill University’s Charter of Students’ Rights, students
in this course have the right to submit in English or in French any written
work that is to be graded.
1
12-01-10
Algorithms
•  A systematic and unambiguous procedure that
produces - in a finite number of steps - the
answer to a question or the solution of a problem.
•  Algorithms can be run on a computer, but they
don’t have to:
–  Mayas had algorithms to predict solar eclipses centuries
in advance
–  Egyptians had algorithms to build pyramids
–  Indians had algorithms for factorizing polynomials
–  Greeks had algorithms to build all kinds of geometric
construction using only a compass and straight lines.
Compass and straight-line construction
•  Problem: Angle bisection
INPUT: An angle defined by three points AOB
OUTPUT: A point C such that AOC = BOC
•  Algorithm:
–  Draw circle centered at O to find A’ and B’
–  Draw circles centered at A’ and B’
C
of the same radius to find C
–  Then AOC and BOC bisect AOB
B
B’
A
A’
O
Problem: Butterfly Origami
Problem: Chickpea cooking
INPUT: 2:1 rectangle
INPUT: Ingredients (left)
OUTPUT: A butterfly
OUTPUT: Yummy (but spicy!)
To think about…
•  Think of three different ways to solve the
following problem:
PROBLEM: LIST INTERSECTION
•  Input:
–  A long list of students taking COMP250
–  An long list of students taking MATH240
•  Output:
–  How many students are taking both classes?
•  Assume that you only have names, no ID number,
and that comparing one name to another takes
time because they are written in really small font
2
Download