1 of 59

Chapter 4

Characteristics of Special Networks

2 of 59

Acyclic Directed Networks

0

6

1

2

3

4

5

Uses directed links

Not undirected

No Cycles

0

1

2

3 of 59

Acyclic Directed Networks

0

6

1

2

3

4

5

Uses directed links

Not undirected

No Cycles

0

1

2

Is this graph acyclic??

4 of 59

Cycles in networks

In some networks, cycles will not make sense!

Descendent of relationship

Teacher student network

Rick

Shiv

Rahat

Griffin

Khan

Esteban

Dahal

Jack

John

advised

advised

advised

Khaled

Mike

advised

advised

advised

advises

advises

advises

advises

5 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

6 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Cannot find any node here! Graph has cycles

7 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

8 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

9 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

10 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

11 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

12 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

Select 1

13 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

Select 1

14 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

Select 1

15 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

0

6

1

2

3

4

5

Another graph. Restart the process

Select 6

Select 1

No node can be selected that has no outgoing links and the graph is not empty

There is a cycle here!

16 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

17 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

18 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

19 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

20 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

21 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

22 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

23 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

24 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

25 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

26 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

27 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

28 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

29 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

30 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

31 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

32 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

33 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

34 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

35 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

36 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

37 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

38 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

39 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

40 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

41 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

42 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

43 of 59

Determine if a graph has cycles

  1. Search for and select a node with no out-going links
  2. If there are no nodes left, the graph is cyclic.

Otherwise, remove the selected node and all of is incoming links

  • If all vertices have been removed, the network is acyclic otherwise go back to step 1.

Another graph. Restart the process

0

6

1

2

3

4

5

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Acyclic!!!!

Finally Node 5

44 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Lets Redraw! Take the nodes that we selected first

45 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

Always take the outgoing edges

46 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

Always take the outgoing edges

47 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

0

Always take the outgoing edges

48 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

0

Always take the outgoing edges

3

49 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

0

Always take the outgoing edges

3

4

50 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

0

Always take the outgoing edges

3

4

5

2

51 of 59

Determine if a graph has cycles

Select node 6

Select Node 1

Select Node 0

Select Node 3

Select Node 4

Select node 2

Finally Node 5

0

6

1

2

3

4

5

Let’s Redraw! Take the nodes that we selected first

6

1

0

Always take the outgoing edges

3

4

5

2

All edges point downwards sort of

Nicer visualization

52 of 59

Bipartite and hypergraphs

jack

Janice

Rahat

Alice

John

neighbors

Best

friends

Project

mates

teaches

teaches

teaches

teaches

Different type of links

53 of 59

Bipartite and hypergraphs

Different type of nodes

Also called bipartite graph

Or two mode network, affiliation network

Two type of nodes are present

No edges between between nodes of same type

Only across

Disjoint sets

People

Sports

Jon

Alice

Kate

Football

Hockey

Basketball

54 of 59

Bipartite and hypergraphs

Hypergraph represents the graph as

nodes being part of groups

Easy to convert a two-mode network to a one mode network

People

Sports

Jon

Alice

Kate

Football

Hockey

Basketball

55 of 59

Bipartite and hypergraphs

People

Sports

Jon

Alice

Kate

Football

Hockey

Basketball

Keep only one set of nodes

Jon

Alice

Kate

Only people

Create subsets based on the common nodes

Hockey liked by jon and alice

Basketball liked by jon and kate

Football is liked by jon only

This is a hypergraph network

56 of 59

Tree

Special kind of graphs with no loops

Example

57 of 59

Tree

Special kind of graphs with no loops

Example

58 of 59

Tree

0

1

2

3

4

5

6

Root is a single node at the top 🡪 node 0

Nodes with no children 🡪 leaves

Trees never have any cycles!

59 of 59

Minimum Spanning Tree (MST)

A

B

C

D

E

You have an undirected graph, possibly even have cycles

Suppose the edges have weights

1

7

5

9

2

4

3

MST is a subgraph that includes all the nodes in that graph

And sum of those edges is the lowest

And it’s a tree, so no cycles

A

B

C

D

E

1

5

2

3

1+3+5+2 = 11