listing all finite subsets of natural numbers

56 Views Asked by At

is there a computable algorithm which lists all the finite subsets of natural numbers ?... i know that such a set is atleast countable... but can't determine if we can list every such subset in a computable manner .....

the set of all infinite sequences of the subsets of natural numbers is obviously uncomputable

i think this problem should be computable, since any finite set is computable... but i need some sort of proof or reference , any site etc... thanks

1

There are 1 best solutions below

2
On BEST ANSWER

The following algorithm lists all finite subsets of natural numbers.

output (empty set)
for n from 0 to infinity:
    for every subset S of {0, ..., n - 1}:
        output (S union {n})

It's easy to see that every finite subset of natural numbers will be output exactly once within finitely many steps.