[R] help with apply, please

Adrian DUSA dusa.adrian at gmail.com
Sat Nov 19 19:23:09 CET 2005


Dear Ted,

On Saturday 19 November 2005 20:51, Ted Harding wrote:
> [...snip...]
> There is bound to be a good algorithm out there somewhere
> for finding a "minimal coveriung set" but I don't know it!
>
> Comments?
>
> Best wishes to all,
> Ted.

My case is probably a subset of your general algorithm.
Peaking in the computer science webpages for Quine-McCluskey algorithm, I 
learned that there are way to simplify a matrix (prime implicants chart) 
before trying to find the minimum solutions. 
For example:
1. Row dominance
   0 0 1 1 0 0
   0 1 1 1 0 0
The second row containes all elements that the first row contains, therefore 
the first row (dominated) can be droped

2. Column dominance
  0 1
  0 1
  1 1
  1 1
  0 0
The second column dominates the first column, therefore we can drop the second 
(dominating) column

In a Quine-McCluskey algorithm, the number of rows will always be much lower 
than the number of columns, and applying the two above principles will make 
the matrix even more simple.
There are algorithms written in other languages (like Java) freely available 
on the Internet, but I have no idea how to adapt them to R.

Best,
Adrian

-- 
Adrian DUSA
Romanian Social Data Archive
1, Schitu Magureanu Bd
050025 Bucharest sector 5
Romania
Tel./Fax: +40 21 3126618 \
          +40 21 3120210 / int.101




More information about the R-help mailing list