2

All "nice" Complexity classes are closed under finite union and intersection. (By "nice" I mean ones with complete problems or leaf languages, e.g. P, NP, PSPACE, etc.)

But such classes are not closed under infinite union and intersection. Why?

Caleb Stanford
  • 7,068
  • 2
  • 28
  • 50
DeeDee
  • 345
  • 1
  • 9
  • https://cs.stackexchange.com/questions/93464/infinite-union-operation-of-formal-languages – D.W. Jun 20 '22 at 18:26

1 Answers1

3

Consider the "singleton" languages: $L=\{w\}$ for some fixed word $w$. (e.g., the language $L=\{00010100\}$ would be a singleton language) Most "nice" complexity classes include the singleton languages.

Every language can be written as an infinite union of singleton languages. So, if all singleton languages are in the class, and if the class is closed under infinite union, then all languages are in the class.

Thus, if there is any language at all that isn't in such a complexity class yet it does contain all the singleton languages, then the class cannot be closed under infinite union.

D.W.
  • 159,275
  • 20
  • 227
  • 470
  • 1
    Thanks! nice. What about inf intersection? that seems more difficult... – DeeDee Apr 28 '20 at 21:26
  • @RingRing, if it's closed under complement, then that follows by a similar argument... – D.W. Apr 28 '20 at 22:59
  • For intersection, even if it's not closed under complement like NP, it should contain all cofinite languages and thus closure under intersection means it contains all languages. – Caleb Stanford Apr 29 '20 at 04:33