SlideShare a Scribd company logo
1 of 29
Download to read offline
Computer Science Division: CS304
Course CS304, Part:
“ALGORITHMIC COMBINATORICS 2 ”
( 3rd
Year Students )
Prepared by:
Dr. Ahmed AshryAhmed AshryAhmed Ashryhttp://www.researchgate.net/profile/Ahmed_Abdel-Fattah
Lecture #1
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 1 (of 25)
Computer Science Division: CS304
Course Description:
Algorithmic Combinatorics 2 consists of 2 subjects:
1 an introductory course on “graph theory” to make the students
familiar with graphs and basic theorems that give well-known,
important characterizations of famous graph types.
(Needed in many courses such as DS, DB, compilers design, parallel algorithms, etc.)
2 “constructive algorithmic combinaorics”, in which we study those
“algorithms” for listing fundamental objects in combinatorics.
(Theoretical study should have been given in 301Comp).
Course Material/References:
1 Text: Chapters 10 and 11 of Rosen, K. (2012) [Rosen, 2012]:
Discrete Mathematics and Its Applications (7th edition). McGraw-Hill.
2 Text: [Tucker, 2012, Bender and Williamson, 2013]
3 Lecture slides, practice assignments, and other supplementary material:
Disseminated over the internet.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 2 (of 25)
Computer Science Division: CS304
Organizational Remarks1
1Image source: http://plus.google.com/+GawishElwarka/posts
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 3 (of 25)
Computer Science Division: CS304
Assessment: “Algorithmic Combinatorics 2” is worth 50% of CS304
Oral Examination (4% of CS304) [≡ 5 Marks]
Class Work (a.k.a. “Mid-term”) (16% of CS304) [≡ 20 Marks]
Final Examination (30% of CS304) [≡ 37.5 Marks]
Total (50% of CS304) [≡ 62.5 Marks]
Class Work is the new “Mid-Term”:
You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!
1 Form teams of 2 to 4 students.
2 Select as many programs from the list in [Rosen, 2012, Pages 742 and 808].
Deadlines & Constraints:
Fri., 19-Feb.-2016 (between 10:00pm and 10:59pm CLT) Team formations &
program selections/assignments. Each 10 minutes of earlier
suggestions decrease 0.5 mark of your expected total.
Fri., 01-April-2016 (11:59pm CLT) Delivery of codes. Each 180 minutes of later
submissions decrease 0.5 mark of your expected total.
As usual, you can still earn bonus marks from HWs (6% max.) [≡ 7.5 Marks]
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 4 (of 25)
Computer Science Division: CS304
Codes of Honor
I, Ahmed Ashry, pledge my honor that I will:
1 Present the course material as correctly and completely as possible.
2 Answer all questions to the best of my knowledge.
3 Assess students fairly.
4 Treat everyone with respect.
5 Be there for everyone with academic support and experience
sharing.
6 Be always on time or apologize in advance, if I physically can.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 6 (of 25)
Computer Science Division: CS304
Codes of Honor
I, 3rd Year Student: Your Name, pledge my honor that I will:
1 Do my best to learn the material presented in class.
2 Help myself by attempting to solve (additional) homework.
3 Help my fellow students with course material as much as I can.
4 Not receive nor give unauthorized assistance to fellow students in
exams.
5 Treat everyone with respect.
6 Be always on time (or apologize in advance, if I physically can).
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 6 (of 25)
Computer Science Division: CS304
“Graphs”: A Motivational Question
The Problem of Supplying 3 Houses with 3 Utilities.2
2For this and other motivational questions in graph theory, see next lectures.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 7 (of 25)
Computer Science Division: CS304
“Graphs”: Meet the Concept
Conceptually, a graph consists of “points” and their connecting “links”.
The One Mathematical/Abstract Aspect that is:
indispensable in studying discrete mathematical structures,
linked to a plethora of disciplines in a variety of fundamental fields,
behind the modelling of many, many real-world situations,
used for developing many computer scientific applications,
easily representable and analysable by computers,
both extremely classical and very modern, and
. . . more!
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 8 (of 25)
Computer Science Division: CS304
Basics of Graph Theory:
(Finite) Graphs: a formal definition
1 A graph G is a pair G = ⟨V , E⟩ consisting of:
1 a finite set V ̸= ∅, called the vertex set of G, and
2 a set E of two-element subsets of V called the edge set of G.
2 v ∈ V is called a node (or vertex).
3 e = {u, v} ∈ E is an edge (u ̸= v), with end vertices u and v.
4 For an edge e = {u, v} ∈ E:
the end nodes u and v are incident with the edge e in G.
the end nodes u and v are adjacent in G.
We may use e = uv (short for e = {u, v}) if the context is clear.
5 The notations V (G) and E(G) are used to denote the vertex set
and the edge set of a graph G, respectively.
Graph Drawings:
Depictions (visualisations) of graphs using curves and points (in Rm
).
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 9 (of 25)
Computer Science Division: CS304
Drawings:
Let G = ⟨V , E⟩ be a graph, such that:3
V = {p, q, r, s, t, u}, and
E = {{p, q}, {p, s}, {q, r}, {q, t}, {s, u}}.
Here is one drawing of G:
p
q
r
s
t
u
Here is another (identical):
p
q
r
s
t
u
. . . and there can be many other (isomorphic) drawings for G!
3It is important to note that G can be directly given in the form:
G = ⟨{p, q, r, s, t, u}, {{p, q}, {p, s}, {q, r}, {q, t}, {s, u}}⟩.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 10 (of 25)
Computer Science Division: CS304
(Concrete) Examples:
Shipping routes: Vertices are shipping hubs
Edges are routes between hubs.
Social networks: Vertices are people
Edges are social connections.
(e.g., e = {u, v} means u is a “friend” of v).
Telecommunications networks: Vertices are computers (on a network)
Edges are network connections between computers.
Disease transmission: Vertices are organisms (that carry the disease)
Edges represent one organism spreading it to another.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 11 (of 25)
Computer Science Division: CS304
More (and yet More) Basics: Pseudographs
In a Multi-set . . .
elements can occur more than once, and each element has a multiplicity
to give the number of times it appears in the multi-set.
(Multiple) Parallel Edges and Multi-graphs:
Edges that have the same end vertices are parallel.
A graph is called a multi-graph if its edge set is a multi-set.
(i.e., if its edge set has parallel edges connecting the same 2 nodes)
Loops:
A loop is a self-connecting edge.
(That’s, an edge connecting a node to itself in the form {v, v}.)
Loop Graphs:
A loop graph is a graph with at least one loop.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 12 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Example:
A Graph G = ⟨V , E⟩ is called:
Null: if it has no vertices (V = ∅).
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Example:
q
A Graph G = ⟨V , E⟩ is called:
Null: if it has no vertices (V = ∅).
Trivial: if it has only one node (|V | = 1).
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Example:
p
q
r
s
t
u
A Graph G = ⟨V , E⟩ is called:
Null: if it has no vertices (V = ∅).
Trivial: if it has only one node (|V | = 1).
Empty: if it has no edges (E = ∅).
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Example:
p
q
r
s
t
u
A Graph G = ⟨V , E⟩ is called:
Null: if it has no vertices (V = ∅).
Trivial: if it has only one node (|V | = 1).
Empty: if it has no edges (E = ∅).
Simple: if it has NEITHER a parallel edge NOR a loop.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Example:
p
q
r
s
t
u
A Graph G = ⟨V , E⟩ is called:
Null: if it has no vertices (V = ∅).
Trivial: if it has only one node (|V | = 1).
Empty: if it has no edges (E = ∅).
Simple: if it has NEITHER a parallel edge NOR a loop.
Pseudograph: if it has BOTH parallel edges AND a loop.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
Vertex Degree:
The degree of a vertex counts the number of edges incident with it.
N.B. degG (v) denotes the degree of v ∈ V (G), for G = ⟨V , E⟩.
An isolated vertex v is a vertex with deg(v) = 0.
A pendant vertex v is a vertex with deg(v) = 1.
A loop is counted twice and parallel edges contribute separately.
Example:
p
q
rs
t
u
deg(u) = 1 (us is a pendant edge).
deg(p) = 2 (= deg(r) = deg(s)).
deg(t) = 3 (ACHTUNG!).
deg(q) = 4.
v∈V
deg(v) = 14 = 2 × |E|.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 14 (of 25)
Computer Science Division: CS304
More (and yet More) Basics:
(p, q)-Graphs:
If G = ⟨V , E⟩ with |V | = p and |E| = q, the G is called a (p, q)-graph.
Order & Size:
The number p is called the order of G, and the number q is called the
size of G.
The symbols p(G) and q(G) denotes the order and the size of G,
respectively.
Regular Graphs:
A graph G is regular of degree n, if all its nodes have the same degree n.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 15 (of 25)
Computer Science Division: CS304
Representations for Computer Programs
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 16 (of 25)
Computer Science Division: CS304
Graphs and Matrices: Part 0 – “The Adjacency Graph”
Assume that G = ⟨V , E⟩ is a graph with n = |V | vertices.
W.L.O.G., assume further that V (G) can be written as V = {vi }n
i=1.
The adjacency graph of G is the n × n square matrix [aij ]1≤i,j≤n
aij =
1 if {vi , vj } ∈ E(G)
0 if {vi , vj } ̸∈ E(G)
Example:
v1
v2
v3
v4
v5
v6
=⇒
⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣
0 1 0 1 0 0
1 0 1 0 1 0
0 1 0 0 0 0
1 0 0 0 0 1
0 1 0 0 0 0
0 0 0 1 0 0
⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 17 (of 25)
Computer Science Division: CS304
Special (Simple) Graphs
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 18 (of 25)
Computer Science Division: CS304
Special Simple Graphs: Cycle Graphs
A simple graph G = ⟨V , E⟩ is a cycle if V can be written as
{v1, v2, · · · , vn}, and E = {{v1, v2} , {v2, v3} , · · · , {vn−1, vn} , {vn, v1}},
where n ≥ 3.
The cycle graph with n ≥ 3 nodes is denoted by Cn.
Examples:
Questions:
1 What is the degree of each vertex in Cn?
2 How many edges are there in Cn?
3 How does Cn’s adjacency matrix look like?
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 19 (of 25)
Computer Science Division: CS304
Special Simple Graphs: Path Graphs
A simple graph G = ⟨V , E⟩ is a path if V can be written as
{v1, v2, · · · , vn}, and E = {{v1, v2} , {v2, v3} , · · · , {vn−1, vn}}, where
n ≥ 2 (it can be drawn so that all vertices and edges lie on a single straight line).
The path graph with n ≥ 2 nodes is denoted by Pn.
Examples: Pn consists of 2 pendant nodes & n − 2 nodes of degree 2 .
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 20 (of 25)
Computer Science Division: CS304
Special Simple Graphs: Complete Graphs
A simple graph G = ⟨V , E⟩ is complete if it contains every possible edge
between all the vertices.
The complete graph with n ≥ 1 nodes is denoted by Kn.
Example:
K5
Questions:
1 What is the degree of each vertex in Kn?
2 How many edges are there in Kn?
3 How does Kn’s adjacency matrix look like?
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 21 (of 25)
Computer Science Division: CS304
Special Simple Graphs: Star Graphs
The star graph of order n is the complete bipartite graph K1,n.
The star graph of order n is denoted by Sn.
Example:
Here are the four star graphs, Si , for 3 ≤ i ≤ 6.
True or False?
Sn has exactly n pendant vertices, for n ≥ 1.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 22 (of 25)
Computer Science Division: CS304
Special Simple Graphs: Wheels
A wheel on n ≥ 3 vertices is a simple graph with n + 1 vertices
v1, v2, . . . , vn, vn+1, where the first n vertices form the cycle Cn and the
(n + 1)st
vertex is connected by an edge to each of the first n vertices.
The wheel graph on n ≥ 3 nodes has a total of n + 1 nodes and is
denoted by Wn.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 23 (of 25)
Computer Science Division: CS304
Assignment #1: (deadline: 19-February-2015, 11:59:59pm CLT)
Answer ALL the following:
(a)-Identify 2 Mistakes (according to the current lecture)
State why the following is NOT a well-defined graph G = ⟨E, V ⟩:
nodes: E = {m ∈ N − {0}}. (i.e., the set of all positive integers)
edges: V = {⟨m1, m2⟩ : m1 is odd and m2 is even}.
(i.e., two nodes are adjacent if the first is odd and the second is even)
(b)-Understanding Representations:
Let G = ⟨V , E⟩ be a graph given by the adjacency matrix [aij ]1≤i,j≤5,
where 1 ≤ i, j ≤ 5 and:
aij =
1 if i ̸= j
0 otherwise.
Give V (G), E(G), and a drawing of G.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 24 (of 25)
Computer Science Division: CS304
References:
Bender, E. A. and Williamson, S. G. (2013).
Foundations of Combinatorics with Applications.
Dover Books on Mathematics. Dover Publications.
Rosen, K. (2012).
Discrete Mathematics and Its Applications (7th edition).
McGraw-Hill Education.
Tucker, A. (2012).
Applied Combinatorics, 6th Edition.
Wiley Global Education.
Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 25 (of 25)

More Related Content

What's hot

Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theoryNilaNila16
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRAmathsjournal
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Ib mathematics hl
Ib mathematics hlIb mathematics hl
Ib mathematics hlRoss
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applicationsManikanta satyala
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug designReihaneh Safavi
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetrygraphhoc
 
Fractional Derivatives of Some Fractional Functions and Their Applications
Fractional Derivatives of Some Fractional Functions and Their ApplicationsFractional Derivatives of Some Fractional Functions and Their Applications
Fractional Derivatives of Some Fractional Functions and Their ApplicationsAssociate Professor in VSB Coimbatore
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)sobia1122
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network systemManikanta satyala
 

What's hot (20)

Graph
GraphGraph
Graph
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
 
18 Basic Graph Algorithms
18 Basic Graph Algorithms18 Basic Graph Algorithms
18 Basic Graph Algorithms
 
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRARETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
RETOOLING OF COLOR IMAGING IN THE QUATERNION ALGEBRA
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Ib mathematics hl
Ib mathematics hlIb mathematics hl
Ib mathematics hl
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Graph
GraphGraph
Graph
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug design
 
Engineering mathematics 1
Engineering mathematics 1Engineering mathematics 1
Engineering mathematics 1
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
 
Fractional Derivatives of Some Fractional Functions and Their Applications
Fractional Derivatives of Some Fractional Functions and Their ApplicationsFractional Derivatives of Some Fractional Functions and Their Applications
Fractional Derivatives of Some Fractional Functions and Their Applications
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)
 
Basics on Graph Theory
Basics on Graph TheoryBasics on Graph Theory
Basics on Graph Theory
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network system
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph theory
Graph theory Graph theory
Graph theory
 

Viewers also liked

ATXPUG Meetup 11/11/14 - Managing complexity in Puppet Code
ATXPUG Meetup 11/11/14 - Managing complexity in Puppet CodeATXPUG Meetup 11/11/14 - Managing complexity in Puppet Code
ATXPUG Meetup 11/11/14 - Managing complexity in Puppet CodeByron Miller
 
June 25, busy day at the SEC
June 25, busy day at the SECJune 25, busy day at the SEC
June 25, busy day at the SECtiresomerat7000
 
Los mejores amigos.
Los mejores amigos.Los mejores amigos.
Los mejores amigos.Melaaah
 
Trabajo práctico informatica
Trabajo práctico informaticaTrabajo práctico informatica
Trabajo práctico informaticaMelaaah
 
Programacion de la unidad didactica nº 1 aplica normas de atenc...
Programacion de la unidad didactica  nº  1             aplica normas de atenc...Programacion de la unidad didactica  nº  1             aplica normas de atenc...
Programacion de la unidad didactica nº 1 aplica normas de atenc...Xana Ramos Nieto
 
La evolución de los sistemas operativos
La evolución de los sistemas operativosLa evolución de los sistemas operativos
La evolución de los sistemas operativosXiomara Rodriguez
 
Open Sourcing the Public Library
Open Sourcing the Public LibraryOpen Sourcing the Public Library
Open Sourcing the Public LibraryAll Things Open
 
Get out there and give a shit.
Get out there and give a shit. Get out there and give a shit.
Get out there and give a shit. The Butler Bros
 
Mapa conceptual maestria i modulo.docx
Mapa conceptual maestria i modulo.docxMapa conceptual maestria i modulo.docx
Mapa conceptual maestria i modulo.docxpatricia50rosero
 

Viewers also liked (20)

Gen 499 week 5 dq 2
Gen 499 week 5 dq 2Gen 499 week 5 dq 2
Gen 499 week 5 dq 2
 
Tedxamb
TedxambTedxamb
Tedxamb
 
Presentación1
Presentación1Presentación1
Presentación1
 
Presentación1
Presentación1Presentación1
Presentación1
 
REINOS DE LA NATURALEZA
REINOS DE LA NATURALEZAREINOS DE LA NATURALEZA
REINOS DE LA NATURALEZA
 
ATXPUG Meetup 11/11/14 - Managing complexity in Puppet Code
ATXPUG Meetup 11/11/14 - Managing complexity in Puppet CodeATXPUG Meetup 11/11/14 - Managing complexity in Puppet Code
ATXPUG Meetup 11/11/14 - Managing complexity in Puppet Code
 
C#
C#C#
C#
 
June 25, busy day at the SEC
June 25, busy day at the SECJune 25, busy day at the SEC
June 25, busy day at the SEC
 
AVON Ukraine 2/2015 (Holodyk)
AVON Ukraine 2/2015 (Holodyk)AVON Ukraine 2/2015 (Holodyk)
AVON Ukraine 2/2015 (Holodyk)
 
Wfdfwffff
WfdfwffffWfdfwffff
Wfdfwffff
 
Los mejores amigos.
Los mejores amigos.Los mejores amigos.
Los mejores amigos.
 
Trabajo práctico informatica
Trabajo práctico informaticaTrabajo práctico informatica
Trabajo práctico informatica
 
Programacion de la unidad didactica nº 1 aplica normas de atenc...
Programacion de la unidad didactica  nº  1             aplica normas de atenc...Programacion de la unidad didactica  nº  1             aplica normas de atenc...
Programacion de la unidad didactica nº 1 aplica normas de atenc...
 
La evolución de los sistemas operativos
La evolución de los sistemas operativosLa evolución de los sistemas operativos
La evolución de los sistemas operativos
 
Open Sourcing the Public Library
Open Sourcing the Public LibraryOpen Sourcing the Public Library
Open Sourcing the Public Library
 
AVON Ukraine 2/2015 (Tamara)
AVON Ukraine 2/2015 (Tamara)AVON Ukraine 2/2015 (Tamara)
AVON Ukraine 2/2015 (Tamara)
 
Get out there and give a shit.
Get out there and give a shit. Get out there and give a shit.
Get out there and give a shit.
 
Mapa conceptual maestria i modulo.docx
Mapa conceptual maestria i modulo.docxMapa conceptual maestria i modulo.docx
Mapa conceptual maestria i modulo.docx
 
The magical thanks
The magical thanksThe magical thanks
The magical thanks
 
Autoclave midmark m9 m11
Autoclave midmark m9  m11Autoclave midmark m9  m11
Autoclave midmark m9 m11
 

Similar to Graphs-LeX12016

Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"Ahmed M. H. Abdel-Fattah
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 018threspecter
 
Course - Discrete Mathematics
Course - Discrete MathematicsCourse - Discrete Mathematics
Course - Discrete Mathematicsmetamath
 
A New Method To Solve Assignment Models
A New Method To Solve Assignment ModelsA New Method To Solve Assignment Models
A New Method To Solve Assignment ModelsAndrea Porter
 
Grds international conference on pure and applied science (9)
Grds international conference on pure and applied science (9)Grds international conference on pure and applied science (9)
Grds international conference on pure and applied science (9)Global R & D Services
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Suddhasheel GHOSH, PhD
 
Benefits Of Innovative 3d Graph Techniques In Construction Industry
Benefits Of Innovative 3d Graph Techniques In Construction IndustryBenefits Of Innovative 3d Graph Techniques In Construction Industry
Benefits Of Innovative 3d Graph Techniques In Construction IndustryA Makwana
 
Graph Summarization with Quality Guarantees
Graph Summarization with Quality GuaranteesGraph Summarization with Quality Guarantees
Graph Summarization with Quality GuaranteesTwo Sigma
 
lecture 17
lecture 17lecture 17
lecture 17sajinsc
 
Algebra-H-Equation-of-a-Straight-Line-v3.pdf
Algebra-H-Equation-of-a-Straight-Line-v3.pdfAlgebra-H-Equation-of-a-Straight-Line-v3.pdf
Algebra-H-Equation-of-a-Straight-Line-v3.pdfPraba Karan
 
Comparative Analysis of Algorithms for Single Source Shortest Path Problem
Comparative Analysis of Algorithms for Single Source Shortest Path ProblemComparative Analysis of Algorithms for Single Source Shortest Path Problem
Comparative Analysis of Algorithms for Single Source Shortest Path ProblemCSCJournals
 
An analysis between exact and approximate algorithms for the k-center proble...
An analysis between exact and approximate algorithms for the  k-center proble...An analysis between exact and approximate algorithms for the  k-center proble...
An analysis between exact and approximate algorithms for the k-center proble...IJECEIAES
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEijscmcj
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEijscmc
 
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"Lecture #3: Algorithmic Combinatorics I "#FOSCS301"
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"Ahmed M. H. Abdel-Fattah
 

Similar to Graphs-LeX12016 (20)

Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
Lecture #2: Algorithmic Combinatorics I "#FOSCS301"
 
theory of computation lecture 01
theory of computation lecture 01theory of computation lecture 01
theory of computation lecture 01
 
Course - Discrete Mathematics
Course - Discrete MathematicsCourse - Discrete Mathematics
Course - Discrete Mathematics
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
A New Method To Solve Assignment Models
A New Method To Solve Assignment ModelsA New Method To Solve Assignment Models
A New Method To Solve Assignment Models
 
Theory of computation Lec1
Theory of computation Lec1Theory of computation Lec1
Theory of computation Lec1
 
Presentation1
Presentation1Presentation1
Presentation1
 
Grds international conference on pure and applied science (9)
Grds international conference on pure and applied science (9)Grds international conference on pure and applied science (9)
Grds international conference on pure and applied science (9)
 
Planted Clique Research Paper
Planted Clique Research PaperPlanted Clique Research Paper
Planted Clique Research Paper
 
Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1Introduction to LaTeX - Workshop Day 1
Introduction to LaTeX - Workshop Day 1
 
Benefits Of Innovative 3d Graph Techniques In Construction Industry
Benefits Of Innovative 3d Graph Techniques In Construction IndustryBenefits Of Innovative 3d Graph Techniques In Construction Industry
Benefits Of Innovative 3d Graph Techniques In Construction Industry
 
Graph Summarization with Quality Guarantees
Graph Summarization with Quality GuaranteesGraph Summarization with Quality Guarantees
Graph Summarization with Quality Guarantees
 
lecture 17
lecture 17lecture 17
lecture 17
 
Algebra-H-Equation-of-a-Straight-Line-v3.pdf
Algebra-H-Equation-of-a-Straight-Line-v3.pdfAlgebra-H-Equation-of-a-Straight-Line-v3.pdf
Algebra-H-Equation-of-a-Straight-Line-v3.pdf
 
Comparative Analysis of Algorithms for Single Source Shortest Path Problem
Comparative Analysis of Algorithms for Single Source Shortest Path ProblemComparative Analysis of Algorithms for Single Source Shortest Path Problem
Comparative Analysis of Algorithms for Single Source Shortest Path Problem
 
An analysis between exact and approximate algorithms for the k-center proble...
An analysis between exact and approximate algorithms for the  k-center proble...An analysis between exact and approximate algorithms for the  k-center proble...
An analysis between exact and approximate algorithms for the k-center proble...
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
 
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"Lecture #3: Algorithmic Combinatorics I "#FOSCS301"
Lecture #3: Algorithmic Combinatorics I "#FOSCS301"
 
algo1
algo1algo1
algo1
 

Graphs-LeX12016

  • 1. Computer Science Division: CS304 Course CS304, Part: “ALGORITHMIC COMBINATORICS 2 ” ( 3rd Year Students ) Prepared by: Dr. Ahmed AshryAhmed AshryAhmed Ashryhttp://www.researchgate.net/profile/Ahmed_Abdel-Fattah Lecture #1 Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 1 (of 25)
  • 2. Computer Science Division: CS304 Course Description: Algorithmic Combinatorics 2 consists of 2 subjects: 1 an introductory course on “graph theory” to make the students familiar with graphs and basic theorems that give well-known, important characterizations of famous graph types. (Needed in many courses such as DS, DB, compilers design, parallel algorithms, etc.) 2 “constructive algorithmic combinaorics”, in which we study those “algorithms” for listing fundamental objects in combinatorics. (Theoretical study should have been given in 301Comp). Course Material/References: 1 Text: Chapters 10 and 11 of Rosen, K. (2012) [Rosen, 2012]: Discrete Mathematics and Its Applications (7th edition). McGraw-Hill. 2 Text: [Tucker, 2012, Bender and Williamson, 2013] 3 Lecture slides, practice assignments, and other supplementary material: Disseminated over the internet. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 2 (of 25)
  • 3. Computer Science Division: CS304 Organizational Remarks1 1Image source: http://plus.google.com/+GawishElwarka/posts Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 3 (of 25)
  • 4. Computer Science Division: CS304 Assessment: “Algorithmic Combinatorics 2” is worth 50% of CS304 Oral Examination (4% of CS304) [≡ 5 Marks] Class Work (a.k.a. “Mid-term”) (16% of CS304) [≡ 20 Marks] Final Examination (30% of CS304) [≡ 37.5 Marks] Total (50% of CS304) [≡ 62.5 Marks] Class Work is the new “Mid-Term”: You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs!You will end up writing THREE computer programs! 1 Form teams of 2 to 4 students. 2 Select as many programs from the list in [Rosen, 2012, Pages 742 and 808]. Deadlines & Constraints: Fri., 19-Feb.-2016 (between 10:00pm and 10:59pm CLT) Team formations & program selections/assignments. Each 10 minutes of earlier suggestions decrease 0.5 mark of your expected total. Fri., 01-April-2016 (11:59pm CLT) Delivery of codes. Each 180 minutes of later submissions decrease 0.5 mark of your expected total. As usual, you can still earn bonus marks from HWs (6% max.) [≡ 7.5 Marks] Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 4 (of 25)
  • 5. Computer Science Division: CS304 Codes of Honor I, Ahmed Ashry, pledge my honor that I will: 1 Present the course material as correctly and completely as possible. 2 Answer all questions to the best of my knowledge. 3 Assess students fairly. 4 Treat everyone with respect. 5 Be there for everyone with academic support and experience sharing. 6 Be always on time or apologize in advance, if I physically can. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 6 (of 25)
  • 6. Computer Science Division: CS304 Codes of Honor I, 3rd Year Student: Your Name, pledge my honor that I will: 1 Do my best to learn the material presented in class. 2 Help myself by attempting to solve (additional) homework. 3 Help my fellow students with course material as much as I can. 4 Not receive nor give unauthorized assistance to fellow students in exams. 5 Treat everyone with respect. 6 Be always on time (or apologize in advance, if I physically can). Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 6 (of 25)
  • 7. Computer Science Division: CS304 “Graphs”: A Motivational Question The Problem of Supplying 3 Houses with 3 Utilities.2 2For this and other motivational questions in graph theory, see next lectures. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 7 (of 25)
  • 8. Computer Science Division: CS304 “Graphs”: Meet the Concept Conceptually, a graph consists of “points” and their connecting “links”. The One Mathematical/Abstract Aspect that is: indispensable in studying discrete mathematical structures, linked to a plethora of disciplines in a variety of fundamental fields, behind the modelling of many, many real-world situations, used for developing many computer scientific applications, easily representable and analysable by computers, both extremely classical and very modern, and . . . more! Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 8 (of 25)
  • 9. Computer Science Division: CS304 Basics of Graph Theory: (Finite) Graphs: a formal definition 1 A graph G is a pair G = ⟨V , E⟩ consisting of: 1 a finite set V ̸= ∅, called the vertex set of G, and 2 a set E of two-element subsets of V called the edge set of G. 2 v ∈ V is called a node (or vertex). 3 e = {u, v} ∈ E is an edge (u ̸= v), with end vertices u and v. 4 For an edge e = {u, v} ∈ E: the end nodes u and v are incident with the edge e in G. the end nodes u and v are adjacent in G. We may use e = uv (short for e = {u, v}) if the context is clear. 5 The notations V (G) and E(G) are used to denote the vertex set and the edge set of a graph G, respectively. Graph Drawings: Depictions (visualisations) of graphs using curves and points (in Rm ). Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 9 (of 25)
  • 10. Computer Science Division: CS304 Drawings: Let G = ⟨V , E⟩ be a graph, such that:3 V = {p, q, r, s, t, u}, and E = {{p, q}, {p, s}, {q, r}, {q, t}, {s, u}}. Here is one drawing of G: p q r s t u Here is another (identical): p q r s t u . . . and there can be many other (isomorphic) drawings for G! 3It is important to note that G can be directly given in the form: G = ⟨{p, q, r, s, t, u}, {{p, q}, {p, s}, {q, r}, {q, t}, {s, u}}⟩. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 10 (of 25)
  • 11. Computer Science Division: CS304 (Concrete) Examples: Shipping routes: Vertices are shipping hubs Edges are routes between hubs. Social networks: Vertices are people Edges are social connections. (e.g., e = {u, v} means u is a “friend” of v). Telecommunications networks: Vertices are computers (on a network) Edges are network connections between computers. Disease transmission: Vertices are organisms (that carry the disease) Edges represent one organism spreading it to another. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 11 (of 25)
  • 12. Computer Science Division: CS304 More (and yet More) Basics: Pseudographs In a Multi-set . . . elements can occur more than once, and each element has a multiplicity to give the number of times it appears in the multi-set. (Multiple) Parallel Edges and Multi-graphs: Edges that have the same end vertices are parallel. A graph is called a multi-graph if its edge set is a multi-set. (i.e., if its edge set has parallel edges connecting the same 2 nodes) Loops: A loop is a self-connecting edge. (That’s, an edge connecting a node to itself in the form {v, v}.) Loop Graphs: A loop graph is a graph with at least one loop. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 12 (of 25)
  • 13. Computer Science Division: CS304 More (and yet More) Basics: Example: A Graph G = ⟨V , E⟩ is called: Null: if it has no vertices (V = ∅). Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
  • 14. Computer Science Division: CS304 More (and yet More) Basics: Example: q A Graph G = ⟨V , E⟩ is called: Null: if it has no vertices (V = ∅). Trivial: if it has only one node (|V | = 1). Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
  • 15. Computer Science Division: CS304 More (and yet More) Basics: Example: p q r s t u A Graph G = ⟨V , E⟩ is called: Null: if it has no vertices (V = ∅). Trivial: if it has only one node (|V | = 1). Empty: if it has no edges (E = ∅). Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
  • 16. Computer Science Division: CS304 More (and yet More) Basics: Example: p q r s t u A Graph G = ⟨V , E⟩ is called: Null: if it has no vertices (V = ∅). Trivial: if it has only one node (|V | = 1). Empty: if it has no edges (E = ∅). Simple: if it has NEITHER a parallel edge NOR a loop. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
  • 17. Computer Science Division: CS304 More (and yet More) Basics: Example: p q r s t u A Graph G = ⟨V , E⟩ is called: Null: if it has no vertices (V = ∅). Trivial: if it has only one node (|V | = 1). Empty: if it has no edges (E = ∅). Simple: if it has NEITHER a parallel edge NOR a loop. Pseudograph: if it has BOTH parallel edges AND a loop. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 13 (of 25)
  • 18. Computer Science Division: CS304 More (and yet More) Basics: Vertex Degree: The degree of a vertex counts the number of edges incident with it. N.B. degG (v) denotes the degree of v ∈ V (G), for G = ⟨V , E⟩. An isolated vertex v is a vertex with deg(v) = 0. A pendant vertex v is a vertex with deg(v) = 1. A loop is counted twice and parallel edges contribute separately. Example: p q rs t u deg(u) = 1 (us is a pendant edge). deg(p) = 2 (= deg(r) = deg(s)). deg(t) = 3 (ACHTUNG!). deg(q) = 4. v∈V deg(v) = 14 = 2 × |E|. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 14 (of 25)
  • 19. Computer Science Division: CS304 More (and yet More) Basics: (p, q)-Graphs: If G = ⟨V , E⟩ with |V | = p and |E| = q, the G is called a (p, q)-graph. Order & Size: The number p is called the order of G, and the number q is called the size of G. The symbols p(G) and q(G) denotes the order and the size of G, respectively. Regular Graphs: A graph G is regular of degree n, if all its nodes have the same degree n. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 15 (of 25)
  • 20. Computer Science Division: CS304 Representations for Computer Programs Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 16 (of 25)
  • 21. Computer Science Division: CS304 Graphs and Matrices: Part 0 – “The Adjacency Graph” Assume that G = ⟨V , E⟩ is a graph with n = |V | vertices. W.L.O.G., assume further that V (G) can be written as V = {vi }n i=1. The adjacency graph of G is the n × n square matrix [aij ]1≤i,j≤n aij = 1 if {vi , vj } ∈ E(G) 0 if {vi , vj } ̸∈ E(G) Example: v1 v2 v3 v4 v5 v6 =⇒ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 17 (of 25)
  • 22. Computer Science Division: CS304 Special (Simple) Graphs Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 18 (of 25)
  • 23. Computer Science Division: CS304 Special Simple Graphs: Cycle Graphs A simple graph G = ⟨V , E⟩ is a cycle if V can be written as {v1, v2, · · · , vn}, and E = {{v1, v2} , {v2, v3} , · · · , {vn−1, vn} , {vn, v1}}, where n ≥ 3. The cycle graph with n ≥ 3 nodes is denoted by Cn. Examples: Questions: 1 What is the degree of each vertex in Cn? 2 How many edges are there in Cn? 3 How does Cn’s adjacency matrix look like? Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 19 (of 25)
  • 24. Computer Science Division: CS304 Special Simple Graphs: Path Graphs A simple graph G = ⟨V , E⟩ is a path if V can be written as {v1, v2, · · · , vn}, and E = {{v1, v2} , {v2, v3} , · · · , {vn−1, vn}}, where n ≥ 2 (it can be drawn so that all vertices and edges lie on a single straight line). The path graph with n ≥ 2 nodes is denoted by Pn. Examples: Pn consists of 2 pendant nodes & n − 2 nodes of degree 2 . Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 20 (of 25)
  • 25. Computer Science Division: CS304 Special Simple Graphs: Complete Graphs A simple graph G = ⟨V , E⟩ is complete if it contains every possible edge between all the vertices. The complete graph with n ≥ 1 nodes is denoted by Kn. Example: K5 Questions: 1 What is the degree of each vertex in Kn? 2 How many edges are there in Kn? 3 How does Kn’s adjacency matrix look like? Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 21 (of 25)
  • 26. Computer Science Division: CS304 Special Simple Graphs: Star Graphs The star graph of order n is the complete bipartite graph K1,n. The star graph of order n is denoted by Sn. Example: Here are the four star graphs, Si , for 3 ≤ i ≤ 6. True or False? Sn has exactly n pendant vertices, for n ≥ 1. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 22 (of 25)
  • 27. Computer Science Division: CS304 Special Simple Graphs: Wheels A wheel on n ≥ 3 vertices is a simple graph with n + 1 vertices v1, v2, . . . , vn, vn+1, where the first n vertices form the cycle Cn and the (n + 1)st vertex is connected by an edge to each of the first n vertices. The wheel graph on n ≥ 3 nodes has a total of n + 1 nodes and is denoted by Wn. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 23 (of 25)
  • 28. Computer Science Division: CS304 Assignment #1: (deadline: 19-February-2015, 11:59:59pm CLT) Answer ALL the following: (a)-Identify 2 Mistakes (according to the current lecture) State why the following is NOT a well-defined graph G = ⟨E, V ⟩: nodes: E = {m ∈ N − {0}}. (i.e., the set of all positive integers) edges: V = {⟨m1, m2⟩ : m1 is odd and m2 is even}. (i.e., two nodes are adjacent if the first is odd and the second is even) (b)-Understanding Representations: Let G = ⟨V , E⟩ be a graph given by the adjacency matrix [aij ]1≤i,j≤5, where 1 ≤ i, j ≤ 5 and: aij = 1 if i ̸= j 0 otherwise. Give V (G), E(G), and a drawing of G. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 24 (of 25)
  • 29. Computer Science Division: CS304 References: Bender, E. A. and Williamson, S. G. (2013). Foundations of Combinatorics with Applications. Dover Books on Mathematics. Dover Publications. Rosen, K. (2012). Discrete Mathematics and Its Applications (7th edition). McGraw-Hill Education. Tucker, A. (2012). Applied Combinatorics, 6th Edition. Wiley Global Education. Dr. Ahmed Ashry “Algorithmic Combinatorics 2 ” for 3rd Year Students — Lecture #1 25 (of 25)