TRED(1)

πŸ“¦
version 16.1.0 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– TRED(1) β€” transitive reduction filter for directed graphs πŸ’–

okay bestie so you know how your graphs are out here looking like a whole tangled mess of yarn? this is the manual page for tred, from the General Commands Manual, and it is literally here to declutter your life. no cap.


✨ NAME ✨

tred β€” transitive reduction filter for directed graphs πŸ¦‹


🌸 SYNOPSIS 🌸

tred [ -ovr?  ] [ files ]

πŸŽ€ DESCRIPTION πŸŽ€

so what does tred actually do, you ask? it computes the transitive reduction of directed graphs, and then prints the resulting graphs to a file or to standard output. periodt.

what even is a transitive reduction, bestie? it's the process that removes edges implied by transitivity. that's the whole vibe. Nodes and subgraphs are not otherwise affected β€” they stay exactly as they were, untouched, living their truth. πŸ’…

ngl, the ``meaning'' and validity of the reduced graphs is application dependent. so like, whether the result even makes sense for what you're doing? that's on your app, not on tred. πŸ™ˆ

but here's where it eats: tred is particularly useful as a preprocessor to dot to reduce clutter in dense layouts. dense layout? cluttered? not anymore. iconic behavior honestly. πŸ”₯

🫢 heads up: Undirected graphs are silently ignored. no warning, no drama, just... ignored. it's giving ghosting but make it graph theory. πŸ’€

⭐ OPTIONS ⭐

the following options are supported, bestie, and there aren't that many so you have zero excuse to skip them:

  • -o FILE β€” redirect output to the given file. by default, output goes to stdout. (yes bestie, default is just vibing in your terminal.) 🌈
  • -v β€” verbose output to stderr. she's chatty, she's telling you what's up, but only on stderr. πŸ’¬
  • -r β€” print information of removed edges to stderr. so you can see exactly which edges got the boot. very main character of them to announce their own exit. πŸ‘‘
  • -? β€” print usage information. the classic "how do i even" button. πŸŽ€

🧚 OPERANDS 🧚

the following operand is supported:

  • files β€” names of files containing 1 or more graphs in dot format. and if you don't specify a files operand? no worries bestie, the standard input will be used. she'll read from stdin like it's nothing. πŸ’œ

πŸ’€ BUGS πŸ’€

okay so this is the part where we keep it real:

  • using bitmaps internally would substantially decrease running time.

that's it. that's the bug note. she's just saying she could be faster and chooses not to. lowkey relatable. 😭


πŸ”₯ DIAGNOSTICS πŸ”₯

pay attention bestie, this one matters:

if a graph has cycles, its transitive reduction is not uniquely defined. in this case tred emits a warning.

so like, cycles = ambiguous answer = she's gonna tell you about it. not silently, not subtly. a warning. fr fr. ⚠️


πŸ‘‘ AUTHORS πŸ‘‘

these two legends made it happen:

  • Stephen C. North <north@research.att.com>
  • Emden R. Gansner <erg@research.att.com>

absolute icons. no notes. 🫢✨


🌈 SEE ALSO 🌈

go read these too, they're all part of the same friend group:

gc(1), dot(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), libgraph(3)


and that's the whole page, bestie πŸ’– this one's dated 21 March 2001 and it comes to you from the General Commands Manual β€” shoutout to the era that brought us this little transitive reduction icon. slay, stay transitive, and remember: remove the edges implied by transitivity, not the vibes. periodt. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from