We study two variants of the following question: "Given two finitely generated C-subalgebras R1, R2 of C[x1, . . . , xn], is their intersection also finitely generated?" We show that the smallest value of n for which there is a counterexample is 2 in the general case, and 3 in the case that R1 and R2 are integrally closed. We also explain the relation of this question to the problem of constructing algebraic compactifications of C n and to the moment problem on semialgebraic subsets of R n . The counterexample for the general case is a simple modification of a construction of Neena Gupta, whereas the counterexample for the case of integrally closed subalgebras uses the theory of normal analytic compactifications of C 2 via key forms of valuations centered at infinity.2010 Mathematics Subject Classification. 13F20 (primary); 13A18, 16W70, 14M27, 44A60 (secondary).