Graph algorithms are used in many real-world scenarios.

Here are 5 standard graph algorithms and their significant use cases:

{1/11} ↓
1. Breadth-first search

It's a traversal algorithm implemented using a queue data structure.

It starts from a node and first explores all its adjacent nodes.

Then it explores all nodes two steps away from the starting one, and so on.

{2/11}
Applications of BFS are:

● build web pages indexes in web crawlers

● discove neighbour nodes in p2p networks

● find neighboring places in GPS navigation systems

{3/11}
2. Deepth First Search

It's a traversal algorithm implemented using a stack data structure.

It starts from a node and explores as far as possible along each path.

When no more nodes exist to explore in the current path, it retraces.

{4/11}
Applications of DFS are:

● find a path between 2 nodes

● detect cycles in a graph

● topological sorting

● solve maze or sudoku puzzles

{5/11}
3. Shortest path

It's a traversal algorithm that calculates the shortest path between two nodes.

The shortest path minimizes the sum of the weights on the traveled edges.

There are two main algorithms: Dijkstra and Bellman–Ford.

{6/11}
Applications of the Shortest path are:

● find travelling paths in navigation systems

● solve the min-delay path problem in networking

● finding the best route from one point to another in video games

{7/11}
4. Topological Sorting

It's a graph theory algorithm finding an order in which visiting the nodes.

It linearly orders the nodes of a directed graph so that for each edge x -> y, vertex x precedes y.

{8/11}
Applications of the Topological sorting are:

● scheduling interdependent job

● data serialisation and sentence ordering

● compilation tasks ordering and symbols dependencies resolution

{9/11}
5. Minimum spanning tree

It's a graph theory algorithm finding a subset of the edges connecting all the nodes.

Such edges have no cycles and minimum sum of weights.

Every connected and undirected graph has at least one spanning tree.

{10/11}
Applications of the Minimum spanning tree are:

● network design

● image registration and object tracking

● analysis of graph-based data clusters

{11/11}
Thanks for reading!

If you liked it, I'd be grateful if you'd:

• like or retweet the 1st tweet

• follow @Franc0Fernand0 for more similar content

• subscribe my newsletter polymathicengineer.com

Your support encourages me to keep writing!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Fernando 🇮🇹🇨🇭

Fernando 🇮🇹🇨🇭 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Franc0Fernand0

Feb 25
Many distributed systems effectively use specialized storage like:

• time series
• blob storage
• graph databases
• spatial databases

Here is a quick introduction to them:

{1/10} ↓
Time series are a specialized storage for large amounts of data related to a specific time.

They are optimized to measure data changes over time and perform statistical computations.

They are really useful for monitoring purposes.

{2/10}
Typical use cases of time series are:

• monitoring system's parts with many simultaneous events

• collect telemetry data in IoT systems with many devices

• dealing with financial data (stock, cryptocurrencies)

Popular implementations are InfluxDB and Prometheus.

{3/10}
Read 11 tweets
Feb 22
Hash tables are one of the most used data structures.

Here is how they work under the hood:

{1/8} ↓
A hash function is a function that takes any input and converts it to an integer.

Inputs are called keys and the output integer is always less than a fixed value.

The output is deterministic. The same input is always converted to the same integer.

{2/8}
Using a hash function is possible to convert any type of key to the index of an array.

In this way, the hash function allows to map keys to values of the data type stored in the array.

A hash table is exactly this combination of hash functions and arrays.

{3/8}
Read 9 tweets
Feb 18
Netflix has 220+ M of users accessing their account from multiple devices.

This is how they make sure that all the devices that a user logs in from are in synch.

{1/9} ↓
Netflix users use their accounts with different devices.

Users can start watching a movie on their mobile and switch to their laptops.

After switching, users expect Netflix to continue playback exactly where they left off.

Also, other information needs to be synced.

{2/9}
For example, membership plans, profile updates, movie recommendations, etc.

Syncing this information for all users and devices requires a lot of communication.

At peak, 150 K+ events per second are exchanged between the Netflix backend and the devices.

{3/9}
Read 11 tweets
Feb 15
Two things helped me to progress in my career as a software engineer:

• creating optionality
• making impact

This is how: {1/8} ↓
Optionality means creating choices for yourself in your career.

The more options you can create, the more possibilities you have to get what you want.

Creating options means being free to change jobs or do anything in particular.

{2/8}
Optionality gives you more possibilities.

For example, you could not be happy with your management, work scope, or company direction.

Optionality gives the choice of leaving to join another company or find another job.

{3/8}
Read 9 tweets
Feb 11
A proxy is a server acting as intermediary between a set of clients and a set of servers.

These are the differences between forward and reverse proxies:

{1/9} ↓
A forward proxy is a server configured to act on behalf of a client.

The client's requests go to the proxy instead of the server.

The proxy forwards the requests to the server and waits for responses sending them back to the client.

{2/9}
In this way, the server doesn't know who the client is.

It only knows the source IP address of the proxy.

So a forward proxy can secure and hide the identity of the client.

VPNs work according to the same principle.

{3/9}
Read 10 tweets
Feb 8
Graphs are the most flexible data structure.

They can capture real-world data and model any relationship.

The 24 basic definitions to know about graphs: ↓ Image
• Node (or vertex): a single unit of data

• Edge: a connection between 2 nodes

• Order: number of nodes in the graph

• Size: number of edges in the graph

• Node degree: number of edges incident to the node
• Isolated node: a node not connected to any other node in the graph (0 degree)

• Adjacent nodes: 2 nodes connected by an edge

• Self-loop: an edge from a vertex to itself

• Multi-edge: an edge occurring multiple times
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(