Docsity

Introduction and Basic Concepts-Complexity of Algorithms-Lecture Slides, Slides of Advanced Algorithms

Partial preview of the text

Download Introduction and Basic Concepts-Complexity of Algorithms-Lecture Slides and more Slides Advanced Algorithms in PDF only on Docsity!

COMP

Complexity of Algorithms

Introductory Lectures

COMP202: Complexity of Algorithms

I (^) Lecturer: Russell Martin, Room 319 Ashton Building, email: Russell.Martin (at) liverpool.ac.uk I (^) Lectures: Monday (2pm), Thursday (11am) and Friday (3pm) I (^) Assessment: 2 class tests (20%) and final exam (80%)

I (^) Course web page: http://www.csc.liv.ac.uk/∼martin/teaching/comp202/

Module Outcomes (cont.)

More specifically, by the end of this module a student should

  1. have an appreciation of the diversity of computational fields to which algorithmics has made significant contributions;
  2. have fluency with the structure and utilization of abstract data types such as stacks, queues, lists, and trees in conjunction with classical algorithmic problems such as searching, sorting, graph algorithms, etc;
  3. have a comfortable knowledge of graphs, their role in representing various relationships, and be familiar with several of the algorithms for solving common problems such as finding minimum spanning trees, maximum flows, shortest paths, and matchings;

Module Outcomes (cont.)

  1. understand the basic concepts from number theory that are used in “public-key” cryptography, and be able to explain the concepts that underlie the RSA encryption/decryption scheme;
  2. be familiar with formal theories providing evidence that many important computational problems are inherently intractable, e.g., NP-completeness.

What is an algorithm?

I (^) An algorithm is a sequence of steps for performing a task in a finite amount of time.

What is an algorithm?

I (^) An algorithm is a sequence of steps for performing a task in a finite amount of time.

I (^) What algorithms do you already know?

What is an algorithm? (cont.)

I (^) For computational algorithms, we use data structures to store, access, and manipulate data. I (^) What data structures have you encountered in the past?

What is an algorithm? (cont.)

I (^) For computational algorithms, we use data structures to store, access, and manipulate data. I (^) What data structures have you encountered in the past?

Our fundamental interest is to design “good” algorithms which utilize efficient data structures. In this context “good” (typically) means fast in a way to be clarified during this course.

A first simple example

Suppose you have a list of some type (integers, names, etc.), and you want to search through the list to see if some element is already in the list. How can you do this search? Moreover, how can you do it efficiently?

Relevant questions I (^) How is the list stored?

A first simple example

Suppose you have a list of some type (integers, names, etc.), and you want to search through the list to see if some element is already in the list. How can you do this search? Moreover, how can you do it efficiently?

Relevant questions I (^) How is the list stored? I (^) Is it sorted or not? If the list is sorted, it’s (often) easier to perform the search.

A first simple example

Suppose you have a list of some type (integers, names, etc.), and you want to search through the list to see if some element is already in the list. How can you do this search? Moreover, how can you do it efficiently?

Relevant questions I (^) How is the list stored? I (^) Is it sorted or not? If the list is sorted, it’s (often) easier to perform the search. I (^) If it’s not sorted, should we sort it first? I (^) Are we going to be doing this search operation many times? (Then we might want to sort the list first, if necessary.)

A first simple example

Suppose you have a list of some type (integers, names, etc.), and you want to search through the list to see if some element is already in the list. How can you do this search? Moreover, how can you do it efficiently?

Relevant questions I (^) How is the list stored? I (^) Is it sorted or not? If the list is sorted, it’s (often) easier to perform the search. I (^) If it’s not sorted, should we sort it first? I (^) Are we going to be doing this search operation many times? (Then we might want to sort the list first, if necessary.) I (^) Are we going to be updating (i.e. adding/deleting items from) the list?

Algorithm Analysis

I (^) Primary interest : Running time (time-complexity) of the algorithm and the operations on data structures.

I (^) Secondary interest : Space (or “memory”) usage (space-complexity).

Algorithm Analysis

I (^) Primary interest : Running time (time-complexity) of the algorithm and the operations on data structures.

I (^) Secondary interest : Space (or “memory”) usage (space-complexity).

This course focuses on the mathematical design and analysis of algorithms and their associated data structures, utilizing relevant mathematical tools to do so.