#!/usr/bin/perl -w

use strict;
use Graph::Directed;

my $input = Graph::Directed->new;

foreach my $e (qw(
		  A-C
		  A-NOTA
		  B-A
		  B-C
		  B-NOTA
		)) {
  my ($x,$y) = split /-/, $e;
  $input->add_edge($x,$y); 
}

$input->delete_vertex('C');

print "input: $input\n";

my $output = $input->transitive_closure();
print "output: $output\n";

foreach my $x (qw(A B C N)) {
  $output->delete_edge($x,$x);
}
print "output: $output\n";
