# 1. Load packages
library(igraph)
library(dplyr)
# 2. Load data
# 确保你的 .rda 文件在正确的路径下
file_path <- "C:/Users/84978/Desktop/Monterey Spring 2026/intro to/Monty_Python_Holy_Grail.rda"
loaded_objects <- load(file_path)
g <- get(loaded_objects[1])
g <- upgrade_graph(g)
# 3. Process main component
comp <- components(g)
main_idx <- comp$membership == which.max(comp$csize)
g_main <- induced_subgraph(g, main_idx)
# 4. Analyze brokerage
cut_indices <- articulation_points(g_main)
cut_names <- V(g_main)$name[cut_indices]
const_val <- constraint(g_main)
inv_const <- 1.125 - const_val
# 5. Plotting (This will appear in your HTML)
V(g_main)$color <- ifelse(V(g_main)$name %in% cut_names, "tomato", "skyblue")
V(g_main)$size <- (inv_const * 18) + 4
plot(g_main,
vertex.label.cex=0.7,
vertex.label.color="black",
vertex.frame.color="white",
edge.width=1.5,
edge.color="gray85",
layout=layout_with_fr,
main="Brokerage Analysis: Monty Python and the Holy Grail",
sub="Tomato: Cutpoints | Node Size: Brokerage Potential")
# 6. Summary output
cat("Brokers identified as Cutpoints:\n")
## Brokers identified as Cutpoints:
print(cut_names)
## [1] "Robin" "Historian's Wife" "Lancelot"
## [4] "The Corpse Collector" "King Arthur"
cat("\nTop 5 Characters by Brokerage Potential:\n")
##
## Top 5 Characters by Brokerage Potential:
print(head(sort(inv_const, decreasing = TRUE), 5))
## King Arthur Lancelot Bedivere Robin Galahad
## 0.9662318 0.9441386 0.9268745 0.9227225 0.8912846
Executive Report After looking at the three movie options, I decided to focus on Monty Python and the Holy Grail. While it is famously a chaotic comedy, its episodic nature makes it a perfect laboratory for brokerage analysis. The plot feels more like a collection of bizarre, isolated vignettes than a traditional narrative, and that means the entire social structure relies on just a few characters to keep things connected.
When I ran the articulation points analysis, five names stood out as the essential glue of this universe, which are King Arthur, Lancelot, Robin, the Historian’s Wife, and the Corpse Collector. These are the cutpoints, the people whose absence would literally cause the movie’s social network to fall apart. I was especially struck by the Corpse Collector’s role. Even though he is a minor character, he is the sole link to the “Dead Body” group, which reminds me that brokerage isn’t always about being the hero, sometimes it is just about being the only one in the room with a specific connection.
To dig a bit deeper, I calculated the brokerage potential using Burt’s Constraint. Unsurprisingly, King Arthur took the top spot with a score of 0.966, followed closely by Lancelot and Bedivere. This confirms that Arthur is not just the king in name, he is the ultimate information gatekeeper. His ego-network is not redundant at all, he is constantly moving between groups that would otherwise have no reason to interact.
Ultimately, the visualization shows a world that is surprisingly fragile. I noticed a clear hub-and-spoke pattern where the eccentric sub-groups are mostly stranded on their own. It suggests that while the movie plays its power dynamics for laughs, the structural reality is quite different. The whole story is held together by an Arthurian bridge, and without that central mediation, these absurd scenes would just be disconnected fragments rather than a cohesive film.