Problems? Is your data what you think it is? PerlMonks

by hv (Prior)
 on Jun 01, 2004 at 17:14 UTC Need Help??

Given a grid of logical relationships, like:
ABCDE
100110
210111
301010
411001
501110
(where '0' means the relationship is not possible, and it is known each letter corresponds to a different number), it is possible to deduce that {A, E} must correspond to {2, 4}, and {B, C, D} to {1, 3, 5}. What algorithm would be able to determine that sort of decomposition efficiently for a larger grid? Or, what search terms would help find such an algorithm?

# --- #

```
#
# The program 'vix' I use to launch vi sessions in an xterm
#

#!/usr/bin/perl -w
my \$xterm = '/usr/X11R6/bin/xterm';
my \$vi = '/bin/vi';
my \$single = 0;
my @xopts = qw/ -cm +cn -dc -j -s +sb -sl 0 -wf -fg white -bg black /;
my @vopts = ();

while (@ARGV && \$ARGV[0] =~ /^-/) {
my \$arg = shift;
last if \$arg eq '--';
push(@xopts, '-iconic'), next if \$arg eq '-i';
push(@vopts, '-R'), next if \$arg eq '-r';
\$single = 1, next if \$arg eq '-s';
die "unknown option '\$arg'\n";
}

@ARGV = '' unless @ARGV;
for (\$single ? \@ARGV : @ARGV) {
my \$pid = fork;
die "fork: \$!\n" unless defined \$pid;

next if \$pid;
my \$name = \$single ? "vix session" : \$_;
exec \$xterm, @xopts,
-name => \$name,
-title => \$name,
-e => \$vi, @vopts, \$single ? @\$_ : \$_;
}

Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-02-25 21:26 GMT
Voting Booth?
My favourite way to spend a leap day ...

Results (24 votes). Check out past polls.