13
Algorithms - Lecture 1 1 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //www.info.uvt.ro/~dzaharie e-mail: [email protected] Schedule: Lecture: every Monday at 13:00 (room 045C) Seminar:Tuesday at 9:40, room 102 (Flavia Micota, [email protected]) Lab: (Flavia Micota, [email protected]) Subgroup 1: Monday, odd weeks, 9:40h, room 031 Subgroup 2: Tuesday, odd weeks, 8:00h, room F45 Subgroup 3: Tuesday, even weeks, 8:00h, room F45

Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: [email protected] Schedule:

Embed Size (px)

Citation preview

Page 1: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 1

ALGORITHMSLecturer: Daniela Zaharie

• Room: 047 (ground floor)

• http: //www.info.uvt.ro/~dzaharie

• e-mail: [email protected]

• Schedule:

Lecture: every Monday at 13:00 (room 045C)

Seminar:Tuesday at 9:40, room 102

(Flavia Micota, [email protected])

Lab:

(Flavia Micota, [email protected])

• Subgroup 1: Monday, odd weeks, 9:40h, room 031

• Subgroup 2: Tuesday, odd weeks, 8:00h, room F45

• Subgroup 3: Tuesday, even weeks, 8:00h, room F45

Page 2: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 2

What is this course about ?

• In our daily activity we :

– Use a search engine (e.g. Google)– An e-mail application which (hopefully) has a anti-spam filter– Find news about friends using a social network tool (e.g.

Facebook)

• What is behind these tools?– Algorithms for searching, keywords matching, sorting,

frequency computation, correlations identification etc.

Examples: PageRank algorithm (Google), EdgeRank algorithm (Facebook)

Page 3: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 3

What is this course about ?

PageRank – algorithm used by the Google search engine to rank the web pages [Larry Page, 1997]

Basic idea of ranking:

rank(P0)=(1-d)+d*(rank(P1)+…rank(Pk ))

P0 – current page

P1,…, Pk – pages which contain links toward P0

d in (0,1) – damping factor (models the influence of time)

Web = graph

Ranking criteria = probabilistic scores

Rank computing = iterative algorithm or algebraic compution (solving as linear system)

Page 4: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

What is this course about ?

Algorithms – Lecture 1 4

EdgeRank – algorithm used in Facebook news feed (selection of news to be posted on the wall of a user)

Basic idea:• The interaction between a user and a

facebook “object” (e.g. info, comment etc) defines an edge

• Each edge is characterized by 3 factors which influence the importance of each edge: affinity (between the user and object creator), weight, age.

• As a edge is more important the probability to be included in News is higher.

http://techcrunch.com/2010/04/22/ facebook-edgerank/

http://www.youtube.com/watch?v=kI4YIYInou0

Some of the research topics at Facebook :

- “Algorithmic game theory”- “Algorithms around social networks”- “Search algorithms”

Page 5: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 5

What is this course about ?

• This course is about: – designing and analyzing algorithms– abstract thinking and solving problems

• This course is NOT:– a programming course

(however the algorithms we design and analyze will be implemented in a programming language during the labs; the language which we shall use is Python http://www.python.org)

– a math course

(however we shall use some basic math stuff: concepts as set, function, relation; some combinatorics; some mathematical logic, proof techniques like mathematical induction or proof by contradiction)

Page 6: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 6

Why such a course could be useful for you?

• You want to become a computer scientist

• Then you should know that:

at the heart of every programming task is the – selection, – adaptation, – discovery

of algorithms.

All these need a good understanding of algorithms

Page 7: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 7

Why such a course could be useful for you?

A computer scientist must be prepared for tasks like:

” … This is the problem. Solve it ...”

In such a situation it does not suffice to know

how to code a given algorithm

You must be able to find an adequate algorithm or even

develop a new one to solve the problem

Page 8: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 8

Why such a course could be useful for you?

The future belongs to the computer scientists who have:

• Content: An up to date grasp of fundamental problems and solutions

• Method: Principles and techniques to solve the vast array of unfamiliar problems that arise in a rapidly changing field

[Jeff Edmonds, York University, Canada]

Page 9: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 9

SyllabusFourteen lectures on:

1. Introduction to algorithmic problem solving

2. Description of algorithms

3. Verification of algorithm correctness

4. Analysis of algorithm efficiency

5. Sorting and searching

6. Basic techniques in algorithm design:

a) divide and conquer, decrease and conquer

b) greedy

c) dynamic programming

d) backtracking, branch and bound

Page 10: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 10

Course materialsWeb page: http://www.info.uvt.ro/~dzaharie

Algorithmics - english

There you will find some downloadable materials:

- lectures files (PDF)

- lecture slides (PPT or PDF)

- exercises for seminar/lab (PDF)

If you find typos or other errors please let me know !

Page 11: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 11

Course materials

The course materials are based mainly on:

1. T.H. Cormen, C.E. Leiserson, R.R. Rivest - Introduction to algorithms, MIT Press 1990

2. R. Johnsonbaugh, M. Schaefer - Algorithms, Pearson Education, 2004

3. A. Levitin - The design & analysis of the algorithms, 2003

and course slides of

Jeff Edmonds (York University, Canada),

David Luebke (Virginia University, USA),

Steven Rudich (Carnegie Mellon University, USA) ...

Page 12: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 12

Grading policy

The final grade is between 1 and 10 and is based on:

Midterm written test - 20% (during the 4th seminar – weeks 7-8)

Lab practical test – 20% (during the 5th lab – weeks 9-10)

Homework & seminar/lab/course activity - 15%

Final written and practical exam - 45% (during the winter exam session)

Page 13: Algorithms - Lecture 11 ALGORITHMS Lecturer: Daniela Zaharie Room: 047 (ground floor) http: //dzaharie e-mail: dzaharie@info.uvt.ro Schedule:

Algorithms - Lecture 1 13

Some rules

• The homework should be finalized by the next seminar/lab; late homework is penalized with 0.2 points/week

• More than 2 absences at seminar/lab lead to exam failing

• Collaboration is permitted on a conceptual level only; you can discuss with your colleagues, but written solutions must always be the result of an individual effort. Plagiarism of homework or written test is punished by not considering that homework/ test contribution to the final grade or even worse ...