welcome to comp 250 introduction to computer science! mathieu blanchette

11
Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

Upload: jane-simon

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

Welcome to COMP 250 Introduction to Computer Science!

Mathieu Blanchette

Page 2: 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, [email protected]• 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, [email protected] Office hours: 2:30-4:30 in Trottier 3107.Others TBA

Page 3: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

• 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. PanangadenA 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

Page 4: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

• 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 collaborationIt is OK to discuss homework questions with othersBUTYou have to write your solutions by yourselfDiscussions 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!

Course evaluation

Page 5: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

Statement on integrityMcGill 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.

Page 6: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

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

Page 7: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

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.

Page 8: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

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’

of the same radius to find C– Then AOC and BOC bisect AOB

A

O

B

A’

B’

C

Page 9: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

Problem: Butterfly Origami

INPUT: 2:1 rectangle

OUTPUT: A butterfly

Page 10: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

Problem: Chickpea cooking

INPUT: Ingredients (left)

OUTPUT: Yummy (but spicy!)

Page 11: Welcome to COMP 250 Introduction to Computer Science! Mathieu Blanchette

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