Network (Graph)

A Network is a collection of connected nodes

What is a Network (Graph) 🎆

A Network is a collection of connected nodes. nodes = elements

Earth 🌎 🌍 🌏

Viewing earth from the international space station, there is clusters of light in a sea of darkness. These pockets of light are highly connected Networks of people and things people make.

Social Network 🌐

A Social Network is groups of people connected together.

Kyle's Facebook Friend Profile: 🌐

  • Family Network:

    • âĪïļWife, Kids, parents, grandparents, cousins, aunts, uncles, inlawsâĪïļ

  • Friends Network:

    • childhood friends🍞, work friends👷‍♀ïļ, hobbie friends🏀ðŸŽŪ

  • Dank Meme & Programming Network: ðŸ’Ŋ

    • 😜weirdosðŸĪŠmore weirdosðŸĪĨ

I'm personally connected to all these people above in a Network. All of the people im connected to are also connected to their own people. and all of those people are... etc, etc, etc...

I Need a Map, A Map of the Internet! 🧠

Networks are used to represent more complicated relationships and normally used when other data structures simply will not work.

Types of Networks 🌎ïļ 🌊ïļ

Directed Networks: Connections between nodes flow in a specific direction

  • Water always flows in one direction from a higher point to a lower point

    • 🏞ïļ Water Tower -> Homes -> Sewer 🏞ïļ

  • Twitters following/follower system

    • I follow the @PresidentOfTheUnitedStates ðŸšķ

    • The President Of The United States does Not follow me ðŸšŦ

Undirected Networks: Connections between nodes flow in both directions

  • Facebooks friend system

    • I send a friend request to uncle Jim Bob and he accepts ðŸ‘Ŋ‍♂ïļ

Linked List vs Tree vs Network🍎 ðŸŒē 🌎

Linked List and Trees can be represented as simple Networks. The following example explains the differences between the 3 as different types of networks.

Example:

  • 7 Nodes = A, B, C, D, E, F, G âœīïļ âœīïļ âœīïļ âœīïļ âœīïļ âœīïļ âœīïļ âœīïļ

Linked Lists: a simple directed network where each node flows to the next node. 👉

  • (start) A -> B -> C -> D -> E -> F -> G -> END

Trees: are a directed network where the starting node flows down to multiple nodes 👈👉

  •            (start)
                  A 
                  '
          -------------------
         '                   '
         B                   C
         '                   '
     -----------         -----------
    '           '       '           '
    D           E       F           G

Networks: can be used to diagram highly connected systems👈👉👆👇ðŸĪ™

  • - = 2-way connection
    ' = 2-way connection
    x = 4-way connection
    No starting point 
    No ending point
  • A  -  B  -  C
    '  x  '  x  '
    D  -  E  -  F
    '  x  '  x  '
    ----- G -----

The key takeaway is all systems have the same number of Nodes but a different number of Connections. The Connections are what make the data structure a linked list, tree or network.

Last updated