Presumming we have a table in visual foxpro, which has two fields,
named: no1 of numeric type,which contains a number of maximum 2 digits,
no2 identical with the first filed.
The demand is to find out the minimum set of digits with the following
property:
from every row from the table, at least one of the two fields is
contained in the set....
For example :
first row: | 1 | 2 |
second row: | 1 | 3 |
........ | 2 | 5 |
........ | 2 | 6 |
for this example, the minimum set is: { 1, 2 }
Another example :
| 3 | 2 |
| 5 | 6 |
| 1 | 2 |
| 2 | 3 |
| 1 | 6 |
| 2 | 5 |
| 1 | 8 |
for the example above, the minimum set is :
( 1,2,6, } or { 2,6,8 } or { 1,2,5 }
Can someone solve this problem in visual foxpro?
--
infstud
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------