SlideShare a Scribd company logo
2
Most read
3
Most read
8
Most read
Introduction to Complex Networks
Saeed Rahmani
University of Zanjan
rahmanidashti@gmail.com
October 30, 2016
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 1 / 21
.
What is a network?
..
......
Network is a collection of entities that are interconnected with
links.
- Flavia Bonomo
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 2 / 21
Examples
▶ People that are friends
▶ Computers that are interconnected
▶ Web pages that point to each other
▶ Proteins that interact
In terms of graph theory, the
entities are called vertices
and the links edges.
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 3 / 21
What is a Complex Network?
Large graphs of real life are called complex networks. Some of the
main questions about them are the following:
▶ What are the statistics of real life networks?
▶ Can we explain how the networks were generated?
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 4 / 21
Some basic definitions: Degree distribution
▶ Degree d(i) of vertex i: number of edges
incident on i
▶ Degree Sequence:
[d(1), d(2), d(3), d(4), d(5)] = [2, 2, 3, 2, 1]
▶ Degree Distribution: [(1, 1); (2, 3); (3, 1)]
1
2
3
45
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 5 / 21
Some basic definitions: Diameter
▶ Diameter: the length of the longest shortest
path between two vertices of the graph
1
2
3
45
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 6 / 21
Some basic definitions: Clustering coefficient
▶ Clustering coefficient of vertex i :
• if d(i) > 1, is the number of edges between
neighbors of i divided by d(i)(d(i) − 1)/2
• if d(i) <= 1 can be defined as 0 or 1
▶ clustering coefficient of vertex 3 : 1/6
▶ clustering coefficient of vertex 1 : 1
1
2
3
4
5
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 7 / 21
Characterization of complex networks
▶ Diameter, Clustering coefficient, Degree distribution.
▶ Betweenness centrality: number of short paths going through a vertex.
▶ Communities: can one identify cliques within the network?
▶ Local motifs: What is the structure of the building blocks of complex
networks?
Motifs: Subgraphs that have a signifficantly higher density in the ob-
served network than in the randomizations of the same (ID, Adj-Matrix).
▶ Hubs: Nodes with higher degree (greater than 5, 8, 12, or 20)
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 8 / 21
.
R Programming
..
......
R is a programming language and software environment for statis-
tical computing and graphics.
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 9 / 21
.
R Package
..
......
It compiles and runs on a wide variety of UNIX platforms, Win-
dows and Mac OS. R can be downloaded and installed from CRAN
website , CRAN stands for Comprehensive R Archive Network and
Bioconductor.
- https://cran.r-project.org/
- https://www.bioconductor.org/
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 10 / 21
Install Package
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 11 / 21
Features
▶ Open Source
The source code of R program and the extensions could be examined
line by line.
▶ Integrating with other Programming Language
R is an interpreting language, can be rather slow, but could integrate
with high ecient languages such as C, C++ or Fortran.
▶ OS Independence:
UNIX, Linux, Windows, MacOS, FreeBSD.
▶ Command line Driven
You have to write Commands.
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 12 / 21
IDE
▶ R GUI
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 13 / 21
IDE - Con
▶ R Studio (- http://www.rstudio.com)
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 14 / 21
Web App Development
▶ Shiny (- http://www.rstudio.com/shiny)
Shiny makes it super simple for R users like you to turn analyses
into interactive web applications that anyone can use
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 15 / 21
iGraph
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 16 / 21
Creating and Using Graphs
▶ Manipulating graphs with R is typically done with the igraph pack-
age, so lets try it out:
First Off, install igraph and attach it with the usual code
.
install igraph
..
......
install.packages(”igraph”)
library(igraph)
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 17 / 21
Create a Random Graph
▶ For exploration sake, lets generate a random graph (An Erdos-Renyi
random graph)
.
random graph
..
......
randomGraph = erdos.renyi.game(20, 0.2)
plot(randomGraph)
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 18 / 21
Summary Statistics
.
degree
..
......hist(degree(randomGraph))
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 19 / 21
Acknowledgments: To Flavia Bonomo, for his Slide.
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 20 / 21
Questions?
Saeed Rahmani (ZNU) R and iGraph October 30, 2016 21 / 21

More Related Content

PPTX
06 Community Detection
PPTX
Complex Network Analysis
PDF
Introduction to complex networks
PPTX
Social Network Analysis power point presentation
DOC
Ch 6 final
PDF
AI local search
PPTX
WEB MINING.
PPTX
Introduction to Pig
06 Community Detection
Complex Network Analysis
Introduction to complex networks
Social Network Analysis power point presentation
Ch 6 final
AI local search
WEB MINING.
Introduction to Pig

What's hot (20)

PPTX
Community detection in social networks
PDF
Big Data Applications | Big Data Analytics Use-Cases | Big Data Tutorial for ...
PPTX
Introduction of data science
PPTX
Big Data Analytics with Hadoop
PDF
Web mining slides
PPTX
Community detection algorithms
DOCX
NE7012- SOCIAL NETWORK ANALYSIS
PPT
Recommendation system
PDF
Link Analysis
PDF
Data Science Project Lifecycle
PPTX
Large Language Models and Applications in Healthcare
PPTX
Mining Data Streams
PDF
CS6010 Social Network Analysis Unit III
PDF
Csc446: Pattern Recognition
PPTX
Web mining (structure mining)
PPTX
Data Mining
PPT
Artificial Neural Networks
PPTX
Multidimensional schema of data warehouse
PPTX
Social media mining PPT
PPTX
Data-Intensive Technologies for Cloud Computing
Community detection in social networks
Big Data Applications | Big Data Analytics Use-Cases | Big Data Tutorial for ...
Introduction of data science
Big Data Analytics with Hadoop
Web mining slides
Community detection algorithms
NE7012- SOCIAL NETWORK ANALYSIS
Recommendation system
Link Analysis
Data Science Project Lifecycle
Large Language Models and Applications in Healthcare
Mining Data Streams
CS6010 Social Network Analysis Unit III
Csc446: Pattern Recognition
Web mining (structure mining)
Data Mining
Artificial Neural Networks
Multidimensional schema of data warehouse
Social media mining PPT
Data-Intensive Technologies for Cloud Computing
Ad

Similar to Introduction to Complex Networks (20)

PPTX
Chapter10.pptx jtuffuryrufhrhrurrufudurhrhr
PDF
Complex Networks: Science, Programming, and Databases
PDF
Igraph
PDF
Visualiser et fouiller des réseaux - Méthodes et exemples dans R
PPTX
Apache Spark GraphX highlights.
PDF
Jürgens diata12-communities
PDF
Plutniak maisonobe resto atelier2-network
PDF
Introduction To Igraph and Shiny
PPTX
IGraph a tool to analyze your network
PDF
Visualizing Networks
PPT
mathematics of network science: basic definitions
PDF
MSCX2023_Sergio Gomez_PartI
PDF
Large Scale Graph Processing with Apache Giraph
PDF
Interpretation of the biological knowledge using networks approach
PPT
Socialnetworkanalysis (Tin180 Com)
PDF
Netwoks icml09
PPTX
Network Measures: Characterizing networks
PDF
TinkerPop: a story of graphs, DBs, and graph DBs
PDF
Statistical_mechanics_of_complex_network.pdf
PPTX
Análisis llamadas telefónicas con Teoría de Grafos y R
Chapter10.pptx jtuffuryrufhrhrurrufudurhrhr
Complex Networks: Science, Programming, and Databases
Igraph
Visualiser et fouiller des réseaux - Méthodes et exemples dans R
Apache Spark GraphX highlights.
Jürgens diata12-communities
Plutniak maisonobe resto atelier2-network
Introduction To Igraph and Shiny
IGraph a tool to analyze your network
Visualizing Networks
mathematics of network science: basic definitions
MSCX2023_Sergio Gomez_PartI
Large Scale Graph Processing with Apache Giraph
Interpretation of the biological knowledge using networks approach
Socialnetworkanalysis (Tin180 Com)
Netwoks icml09
Network Measures: Characterizing networks
TinkerPop: a story of graphs, DBs, and graph DBs
Statistical_mechanics_of_complex_network.pdf
Análisis llamadas telefónicas con Teoría de Grafos y R
Ad

More from Hossein A. (Saeed) Rahmani (15)

PDF
Intro to LLMs Basics and their Safety Consideration
PDF
Clarification Questions Usefulness (Slides)
PDF
TREC 2023 DL - Synthetic Data Generation (Slides)
PDF
Synthetic Test Collections for Retrieval Evaluation (Poster)
PDF
Beyond-Accuracy Provider Fairness (Slides)
PDF
ContextsPOI (Slides)
PDF
ACQSurvey (Slides)
PDF
ACQSurvey (Poster)
PDF
GeneralizibilityFairness - DEFirst Reading Group
PDF
Towards Confidence-aware Calibrated Recommendation (Poster)
PDF
Towards Confidence-aware Calibrated Recommendation (Slides)
PDF
Experiments on Generalizability of User-Oriented Fairness in Recommender Systems
PDF
CPFair: Personalized Consumer and Producer Fairness Re-ranking for Recommende...
PDF
The Unfairness of Popularity Bias in Book Recommendation (Bias@ECIR22)
PDF
The Unfairness of Active Users and Popularity Bias in Point-of-Interest Recom...
Intro to LLMs Basics and their Safety Consideration
Clarification Questions Usefulness (Slides)
TREC 2023 DL - Synthetic Data Generation (Slides)
Synthetic Test Collections for Retrieval Evaluation (Poster)
Beyond-Accuracy Provider Fairness (Slides)
ContextsPOI (Slides)
ACQSurvey (Slides)
ACQSurvey (Poster)
GeneralizibilityFairness - DEFirst Reading Group
Towards Confidence-aware Calibrated Recommendation (Poster)
Towards Confidence-aware Calibrated Recommendation (Slides)
Experiments on Generalizability of User-Oriented Fairness in Recommender Systems
CPFair: Personalized Consumer and Producer Fairness Re-ranking for Recommende...
The Unfairness of Popularity Bias in Book Recommendation (Bias@ECIR22)
The Unfairness of Active Users and Popularity Bias in Point-of-Interest Recom...

Recently uploaded (20)

PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PDF
PPT on Performance Review to get promotions
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Foundation to blockchain - A guide to Blockchain Tech
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Geodesy 1.pptx...............................................
UNIT 4 Total Quality Management .pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Operating System & Kernel Study Guide-1 - converted.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Lecture Notes Electrical Wiring System Components
PPT on Performance Review to get promotions
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026

Introduction to Complex Networks

  • 1. Introduction to Complex Networks Saeed Rahmani University of Zanjan rahmanidashti@gmail.com October 30, 2016 Saeed Rahmani (ZNU) R and iGraph October 30, 2016 1 / 21
  • 2. . What is a network? .. ...... Network is a collection of entities that are interconnected with links. - Flavia Bonomo Saeed Rahmani (ZNU) R and iGraph October 30, 2016 2 / 21
  • 3. Examples ▶ People that are friends ▶ Computers that are interconnected ▶ Web pages that point to each other ▶ Proteins that interact In terms of graph theory, the entities are called vertices and the links edges. Saeed Rahmani (ZNU) R and iGraph October 30, 2016 3 / 21
  • 4. What is a Complex Network? Large graphs of real life are called complex networks. Some of the main questions about them are the following: ▶ What are the statistics of real life networks? ▶ Can we explain how the networks were generated? Saeed Rahmani (ZNU) R and iGraph October 30, 2016 4 / 21
  • 5. Some basic definitions: Degree distribution ▶ Degree d(i) of vertex i: number of edges incident on i ▶ Degree Sequence: [d(1), d(2), d(3), d(4), d(5)] = [2, 2, 3, 2, 1] ▶ Degree Distribution: [(1, 1); (2, 3); (3, 1)] 1 2 3 45 Saeed Rahmani (ZNU) R and iGraph October 30, 2016 5 / 21
  • 6. Some basic definitions: Diameter ▶ Diameter: the length of the longest shortest path between two vertices of the graph 1 2 3 45 Saeed Rahmani (ZNU) R and iGraph October 30, 2016 6 / 21
  • 7. Some basic definitions: Clustering coefficient ▶ Clustering coefficient of vertex i : • if d(i) > 1, is the number of edges between neighbors of i divided by d(i)(d(i) − 1)/2 • if d(i) <= 1 can be defined as 0 or 1 ▶ clustering coefficient of vertex 3 : 1/6 ▶ clustering coefficient of vertex 1 : 1 1 2 3 4 5 Saeed Rahmani (ZNU) R and iGraph October 30, 2016 7 / 21
  • 8. Characterization of complex networks ▶ Diameter, Clustering coefficient, Degree distribution. ▶ Betweenness centrality: number of short paths going through a vertex. ▶ Communities: can one identify cliques within the network? ▶ Local motifs: What is the structure of the building blocks of complex networks? Motifs: Subgraphs that have a signifficantly higher density in the ob- served network than in the randomizations of the same (ID, Adj-Matrix). ▶ Hubs: Nodes with higher degree (greater than 5, 8, 12, or 20) Saeed Rahmani (ZNU) R and iGraph October 30, 2016 8 / 21
  • 9. . R Programming .. ...... R is a programming language and software environment for statis- tical computing and graphics. Saeed Rahmani (ZNU) R and iGraph October 30, 2016 9 / 21
  • 10. . R Package .. ...... It compiles and runs on a wide variety of UNIX platforms, Win- dows and Mac OS. R can be downloaded and installed from CRAN website , CRAN stands for Comprehensive R Archive Network and Bioconductor. - https://cran.r-project.org/ - https://www.bioconductor.org/ Saeed Rahmani (ZNU) R and iGraph October 30, 2016 10 / 21
  • 11. Install Package Saeed Rahmani (ZNU) R and iGraph October 30, 2016 11 / 21
  • 12. Features ▶ Open Source The source code of R program and the extensions could be examined line by line. ▶ Integrating with other Programming Language R is an interpreting language, can be rather slow, but could integrate with high ecient languages such as C, C++ or Fortran. ▶ OS Independence: UNIX, Linux, Windows, MacOS, FreeBSD. ▶ Command line Driven You have to write Commands. Saeed Rahmani (ZNU) R and iGraph October 30, 2016 12 / 21
  • 13. IDE ▶ R GUI Saeed Rahmani (ZNU) R and iGraph October 30, 2016 13 / 21
  • 14. IDE - Con ▶ R Studio (- http://www.rstudio.com) Saeed Rahmani (ZNU) R and iGraph October 30, 2016 14 / 21
  • 15. Web App Development ▶ Shiny (- http://www.rstudio.com/shiny) Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use Saeed Rahmani (ZNU) R and iGraph October 30, 2016 15 / 21
  • 16. iGraph Saeed Rahmani (ZNU) R and iGraph October 30, 2016 16 / 21
  • 17. Creating and Using Graphs ▶ Manipulating graphs with R is typically done with the igraph pack- age, so lets try it out: First Off, install igraph and attach it with the usual code . install igraph .. ...... install.packages(”igraph”) library(igraph) Saeed Rahmani (ZNU) R and iGraph October 30, 2016 17 / 21
  • 18. Create a Random Graph ▶ For exploration sake, lets generate a random graph (An Erdos-Renyi random graph) . random graph .. ...... randomGraph = erdos.renyi.game(20, 0.2) plot(randomGraph) Saeed Rahmani (ZNU) R and iGraph October 30, 2016 18 / 21
  • 20. Acknowledgments: To Flavia Bonomo, for his Slide. Saeed Rahmani (ZNU) R and iGraph October 30, 2016 20 / 21
  • 21. Questions? Saeed Rahmani (ZNU) R and iGraph October 30, 2016 21 / 21