Top Banner
17

2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

Jan 18, 2016

Download

Documents

Lucas Hall
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:
Page 2: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

2

Office hours:MWR 4:20-5:30 inside or just outside Elliott 162-tell me in class that you would like to attend.

For those of you who cannot stay:MWR: 1:30-2:30pm. But let me know 24 hours in advance you would like me to come in early. We will meet outside Elliott 162- Please estimate the length of time you require.

I am also very happy to provide e-mail help: ([email protected]). Important note: to ensure your e-mail gets through the spam filter, use your UVic account. I answer all e-mails that I receive from my students.

Page 3: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

3

Submissions for the Project For me to have enough room for feedback, it is critical that all written project submissions should be in at least a 12 point font with 1.5 spacing. Overheads should be printed with one slide per page (not 2-4).

All project components are cumulative. This means that your written project proposal forms a starting point for the written research proposal which is then used to make the final project report. Similarly, your oral project proposal forms a starting point for the oral research proposal which is then used to create the final project report. You will be given feedback at every stage and can incorporate these suggestions to improve your next submission.

Page 4: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

4

Project Proposal(1-2 pages) The student should have chosen a project topic by this point. A short report should be turned in describing the problem the student has chosen to study. I want you to define ALL relevant terminology for your project starting from the definitions of a graph, a vertex and an edge. You do not need to include any literature review or progress on the research at this stage- just the problem defintion.

Page 5: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

5

Oral Project Proposal(1-3 slides) The student should prepare slides which describe the problem chosen, perhaps with an appropriate example. Again, include even the elementary definitions. Pictures speak louder than words- make sure you illustrate the relevant concepts using approriate pictures. If you want to use a computer to present your final talk, please print the slides onto paper (one slide per page) to hand them in. If you plan to use celluloid, you may design your slides on paper to hand in, then copy them to celluloid later (after getting feedback from me).

Page 6: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

6

An undirected graph G consists of a set V of vertices and a set E of edges where each edge in E is associated with an unordered pair of vertices from V.

The degree of a vertex v is the number of edges incident to v.

If (u, v) is in E then u and v are adjacent.

A simple graph has no loops or multiple edges.

Exercise: prove by induction that a simple graph G on n vertices has at most n(n-1)/2 edges.

Page 7: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

7

Internet taken from:

http://www.netdimes.org/asmap.png

Page 8: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

8

Travelling Salesman

From:Ehsan Moeinzadeh Guildford, Surrey, United Kingdom

Page 9: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

9

Graphs representing chemical molecules

Page 10: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

10

Page 11: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

11

Data Structures for Graphs

How can graphs be stored in the computer?

How does this affect the time complexity of algorithms for graphs?

Page 12: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

12

A cycle of a graph is an alternating sequence of vertices and edges of the form v0, (v0, v1), v1, (v1, v2), v2, (v2, v3), … ,vk-1, (vk-1, vk), vk where except for v0 = vk the vertices are distinct.

Exercise: define path, define connected.

A tree is a connected graph with no cycles.

A subgraph H of a graph G is a graph with V(H) V(G) and E(H) E(G).

H is spanning if V(H) = V(G).

Spanning tree- spanning subgraph which is a tree.

Page 13: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

13

Strange AlgorithmsInput: a graph GQuestion: does G have a spanning tree?

This can be answered by computing a determinant of a matrix and checking to see if it is zero or not.

For lower bound arguments, it is essential to not make too many assumptions about how an algorithm can solve a problem.

Page 14: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

14

Adjacency matrix:

Page 15: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

15

Adjacency list:

Page 16: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

16

Adjacency lists:

Lists can be stored:

1.sorted,

2.in arbitrary order,

3. in some other specific order- for example a rotation system has the neighbours of each vertex listed in clockwise order in some planar embedding of a graph (a picture drawn on the plane with no edges crossing).

Page 17: 2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:

17

Data structures for graphs:

n= number of vertices

m= number of edges

Adjacency matrix: Space θ(n2)

Adjacency list: Space θ(n + m)

How long does it take to do these operations:

1.Insert an edge?

2.Delete an edge?

3.Determine if an edge is present?

4.Traverse all the edges of a graph?