Welcome to COMP 250 Introduction to Computer Science!

advertisement
Welcome to COMP 250
Introduction to Computer Science!
Mathieu Blanchette
COMP250 Home Page - Fall 2005
• http://www.mcb.mcgill.ca/~blanchem/250
• Instructor: Mathieu Blanchette, blanchem@cs.mcgill.ca
• Schedule: MWF 13h35-14h25 in ENGTR 0100
Optional Lab: W 14:35-12:25 in ENGTR 3120
• 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.
– It is also advisable to take MATH 240 simultaneously with COMP 250.
•Office hours: Mon 14:35-16:00, Thu 10:00-12:00, or by appointment,
in DUFF 332.
•Teaching assistants:
Eric Blais, eblais@mcb.mcgill.ca Office hours: 2:30-4:30 in Trottier 3107.
Others TBA
• Schedule of topics covered + All lecture notes:
http://www.mcb.mcgill.ca/~blanchem/250/schedule.html
• Bulletin board, announcements, discussions:
WebCT CE. You can log in at http://www.mcgill.ca/webct
• Required text: F. Ahmad and P. Panangaden
A Little Book on Java, 56 pages in pdf format.
http://www.mcb.mcgill.ca/~blanchem/250/little.pdf
• Suggested textbook:
• Michael T. Goodrich, Roberto Tamassia
Data Structures and Algorithms in Java (Third Edition), John
Wiley and Sons;
NOTES: - Many students found the lecture notes sufficient.
- The Second Edition of the same book is equally good
Course evaluation
• 5 homeworks, worth 7% each, for a total of 35%
In-class midterm exam, on October 19th, worth 15%
3-hour final exam, on December ??th, worth 50%
Policy on late homeworks.
Unless a medical justification is given, late homeworks will be
penalized by 20% per day: 0-24h late: 20%, 24h-48h late: 40%...
Policy on homework collaboration
It is OK to discuss homework questions with others
BUT
You have to write your solutions by yourself
Discussions of homework solutions should take place in a
room from which no written record will come out.
Everything you take out of a discussion must IN YOUR HEAD!
Anything else is cheating!
Statement on integrity
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). I recommend that
you consult the web site mentioned in the statement, especially
the page on strategies for reducing cheating and plagiarism
http://www.mcgill.ca/integrity/strategies/. Efforts to promote
academic integrity among our students will be most effective if
we approach the matter consistently across the University.
Therefore, let's all reinforce the message that we at McGill care
about academic integrity, cheating and plagiarism, that we take
measures to prevent their occurrence, and that all students who
are caught violating the Code of Student Conduct are likely to
face appropriate consequences. One step to take in this
direction is to discuss academic integrity with your students
when you first discuss your course outline.
Optional lab
Description
Introduction to available resources, necessary skills, and
useful strategies, for taking full advantage of your
university experience. Presented from the perspective of a
student in the computer science department.
When and where are we meeting?
• Every Wednesday during the Fall semester, 2:35-3:25pm.
Starting Sept.7!
• Trottier 3120.
Coordinator
• Prof. Joelle Pineau (email: jpineau "at" cs.mcgill.ca)
Schedule
• www.cs.mcgill.ca/~jpineau/compOrientation
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
INPUT: 2:1 rectangle
OUTPUT: A butterfly
Problem: Chickpea cooking
INPUT: Ingredients (left)
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
Download