algorithm - Selecting Maximum Number of Choice -


we given n fruits , m choices select fruits.m lines have integers , first 1 k , each m lines follows k integers after first value (ie. k) denoting indices of fruit selected in choice. need find out maximal number of choices can selected.

note :- there 1 fruit @ particular index.

sample input:-

4 3

2 1 2

2 2 3

2 3 4

output :-

2

as can select 1st , 3rd choice.

which algorithm should use solve question ?

this variation of maximum independent set

there detailed algorithms finding maximum independent set in paper: algorithms maximum independent sets

and parallel approach has been provided in one:lecture notes on parallel algorithm generating maximal independent set

and this java implementation.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -