<｜begin▁of▁sentence｜>### Instruction:
Given the directed graph with nodes [1, 2, 3, 4, 5] and edges [(1, 2), (1, 3), (2, 4), (3, 4), (4, 5)], compute the dominance frontiers for each node starting from the entry node 1. The entry node is where the control flow starts, which is important for compiler optimizations and program analysis tasks.
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph([(1, 2), (1, 3), (2, 4), (3, 4), (4, 5)])

# Compute the dominance frontiers starting from node 1
frontiers = nx.dominance_frontiers(G, start=1)

# Display the dominance frontiers
sorted_frontiers = sorted((u, sorted(df)) for u, df in frontiers.items())
print(sorted_frontiers)
<|EOT|>
