A Network Analysis of Dilbert’s Universe


For someone who grew up barely ever reading comic strips, I was immediately drawn to Dilbert the first time I saw it, and I take no shame in admitting that now I read it religiously every single day.

The creator, Scott Adams, has an uncanny knack for crafting the snarkiest jokes and razor-sharp punchlines that strongly resonate with whoever has had to put up with backstabbing bosses, toxic co-workers, clueless C-suite executives, dysfunctional corporate cultures, or dirty office politics.

As a long-time fanboy of Dilbert, I have always wanted to systematically analyze what really drives the action.

Therefore, this post will examine and visualize the network of relationships among the characters in Dilbert comic strips, which, in turn, may help illuminate the hilariously authentic office dynamics underpinning the strip’s enduring appeal to millions of fans around the world.

More specifically, we are interested in answering these 2 questions:

  1. What is the social network of Dilbert’s universe like?
  2. Which characters are the most essential ones in the Dilbert network?

The strips’ full range of intricacies and sarcastic overtones are probably best experienced through reading them. However, by scraping, analyzing, and visualizing the Dilbert comic strips appearing between January 1st, 2013 and April 30, 2018, we hope to present an interesting way of understanding the hidden social fabric that ties the characters together.

This article presents only the network analysis part. The full R code is available at my GitHub Pages here.

Structure of the Dilbert Network

For our network analysis, each unique character¹ that has participated in the strips’ conversations within our time frame is counted as a separate vertex,² and each pair of characters that have spoken in the same strips forms an edge.

Let’s first create an igraph object with the dataframes containing the vertices and edges.

The igraph object we have here is composed of 113 vertices and 302 edges.

We will then start with the first question raised in the Introduction section:

What is the social network of Dilbert’s universe like?

A quick visualization below shows that the vast majority of the vertices have fewer than 5 edges. In other words, notwithstanding the 113 vertices, around 80% of them are sparsely linked to other vertices.

The network’s overall sparse connectivity is also reflected in its density, which is the proportion of edges in a network that could possibly exist. The Dilbert network’s density comes in at a low 0.05.

This network sparsity is, however, not caused by too many vertices spread out too far away from each other, since the maximal distance between any two vertices in the network is but 4 edges.

Actually, only one pair of vertices (i.e. Juror and Ratbert) has that many intervening edges.

Plus, the average of the shortest distances between all pairs of vertices in the network is merely roughly 2.25 edges.

At this point, one might ask: “Is an average shortest distance of 2.25 unusually small?

To answer that, we can generate random graphs to test to what extent other network metrics are likely to occur given the properties of the Dilbert network.

As seen above, given the original density and number of vertices of the Dilbert network, the probability that we would get our observed average shortest distance of 2.25 by sheer chance is close to nil.

In other words, the Dilbert network is far more interconnected than we would expect by chance, as not even one of the 1000 random networks has a smaller average shortest distance.

For more supporting evidence, we can turn to transitivity, which is equivalent to the proportion of all theoretically possible closed triangles observed in the network. A “closed triangle” is present when any given three vertices in a network are linked to one another and thus their three edges form a triangular shape. In short, the higher the number of closed triangles within a network, the higher the network’s transitivity.

As shown below, compared with 1000 other random networks of the same size and density, the Dilbert network’s transitivity is markedly higher, which indicates the network is made up of more groups of vertices that are densely connected.

As a result, we can conclude that:

while the Dilbert network is admittedly rather sparse, the vertices are nonetheless highly connected.

OK, enough with network statistics.

A picture is worth a thousand words, so let’s draw the network graph!

The Dilbert Network

Characters other than Dilbert, Boss, and Wally employed by Dilbert’s company are in black; those outside of or not yet employed by Dilbert’s company are in orange; the rest (i.e. non-human beings) are in green.

The higher the total number of comic strips in which a character has spoken up, the bigger the size of its vertex.

The widths of the edges are weighted by the frequencies at which the pairs of characters have conversed in the same strips.

Two things stand out from the network graph:

  1. The majority of vertices are only sparsely linked to other edges, whereas a handful of “super-vertices” serve as the nexuses connecting a multitude of vertices and thus holding the network together, which confirms our earlier conclusion.
  2. Dilbert, Boss, and Wally appear to be the three most prominent characters in the Dilbert network.

To block out the noise and accentuate the core parts in the network, let’s narrow the network graph down to only the edges with frequencies higher than 15.

Filtered Version of the Dilbert Network

From this network graph, it becomes even more obvious that Dilbert, Boss, and Wally are more often than not part of the action in the strips.

The Most Essential Characters in the Dilbert Network

After getting an overall sense of the network, the second question we ask is:

Which characters are the most essential ones in the Dilbert network?

The previous graphs have more or less alluded to the apparent centrality of Dilbert, Boss, and Wally.

This is actually corroborated by many other centrality measurements.

First, Dilbert, Boss, and Wally rank as the top 3 best-connected characters among all, boasting the highest numbers of adjacent edges.

A related but slightly nuanced metric is strength, which is defined as the sum of the weights of all the adjacent edges for a given vertex.

Here, Dilbert, Boss, and Wally come out on top as well.

Another measurement of a given vertex’s importance is its betweenness, which quantifies how frequently a vertex lies on the shortest paths between any two vertices in the network.

Put differently, it shows to what extent a vertex is indispensable to the flow of information through a network, i.e. its brokerage or gate-keeping potential. Vertices with high betweenness are crucial bridges that connect different parts of a network.

With regard to betweenness, Dilbert, Boss, and Wally also take the top 3 spots.

We can also consider closeness centrality. It measures how many steps is required to access every other vertex from a given vertex.

Vertices with high closeness centrality are likely to be relatively efficient in receiving or transmitting information to/from distant parts of the network.

Again, the top 3 characters are Dilbert, Boss, and Wally.

Eigenvector centrality is a fifth measurement of a vertex’s influence.

It assigns relative scores to all vertices in the network based on the concept that connections to high-scoring vertices contribute more to the score of a given vertex than those to low-scoring vertices. Consequently, vertices that are more highly connected to other highly connected vertices receive higher eigenvector centrality scores.

Once again, Dilbert, Boss, and Wally rank the highest in this department.

In fact, when we plot the path lengths of edges linking to Dilbert or Boss, all vertices connected to either one of them lie no further than 2 edges away.

Ego Graph of Dilbert
Ego Graph of Boss

For Wally, all but one vertex are at most 2 edges away as well.

Ego Graph of Wally

No matter which centrality measurement we look at, Dilbert, Boss, and Wally consistently occupy the top 3 positions.

Therefore, in response to our second question, we answer:

the top 3 most essential characters in the Dilbert network are undoubtedly Dilbert, Boss, and Wally.

Most Popular Subjects in the Strips

Now that we know about the structure of Dilbert network and its marquee characters, what about the strips’ content?

For that, let’s look at the strips’ most frequent tags.

The Top 20 Most Frequent Tags

The top 20 most frequent tags for all the strips and just those featuring Dilbert, Boss, or Wally are almost identical, albeit in slightly different orders. In fact, the two groups share 19 out of the top 20 tags!

Hardcore Dilbert fans would most likely recognize these tags parallel the set of recurring subjects brilliantly satirized and lampooned in the strips: questionable work ethic, brazenly lazy workers (mostly Wally), unproductive conversations, sabotaging colleagues, workplace anger, thinly veiled insults, unwanted career advice, various new troubles brought by modern technologies, disingenuous marketing tactics, the threat of robots stealing human jobs, productivity-killing micromanagement, elusive pay raises, outdated and boneheaded company policies, incompetent and overpaid C-suite executives, etc.

Such a high degree of overlapping in tags also attests to the emphatically active roles Dilbert, Boss, and Wally play in driving many of the conversations forward.


In this post, we have delved into the Dilbert universe, dissecting how the characters are connected to each other in conversations and how the most pivotal characters hold the network together.

We conclude that

the Dilbert universe resembles a sparsely linked yet highly interconnected network centered around three characters of outsized preeminence contributing to nearly all of the top recurring topics in the strips.

As a matter of fact, when we examine all the evidence mentioned so far, it is perhaps not too much of a stretch to claim that:

The core of Dilbert comic strips is essentially a 3-man show.

The trio of characters represent the typical hardworking but socially inept worker (Dilbert), clueless/incompetent but over-confident middle manager (Boss), and the perennially lazy, unreliable colleague (Wally). Their contrasting personalities, skills, and work ethic, combined together, easily make for a wealth of interesting dynamics and relationships conducive to addressing the subjects highlighted in those most frequent tags.

Whether or not this has been a deliberate strategy on Scott Adams’ part is unclear, but the three-character ensemble is widely seen in all kinds of famous fiction and nonfiction,² and Dilbert certainly proves to be yet another successful example.

Finally, we’ll end this post with a good one featuring none other than the creator, Scott Adams, himself.

Happy reading!


  1. To be specific, in our analysis, we include only sentient characters capable of self-controlled, back-and-forth chatting or interactions.
  2. In this post, the term “vertex” will be used for what is sometimes called “node,” particularly in computer science.
  3. For more insights on the power of trios in character setting, this and this article are worth checking out.