V.A.Vassiliev On combinatorial formulas for cohomology of spaces of knots 25-Sep-2000 Abstract We develop homological techniques for finding explicit combinatorial formulas for finite-type cohomology classes of spaces of knots in $\R^n, n\ge 3,$ generalizing Polyak--Viro formulas for invariants (i.e. 0-dimensional cohomology classes) of knots in $\R^3$. As the first applications we give such formulas for the (reduced mod 2) generalized Teiblum--Turchin cocycle of order 3 (which is the simplest cohomology class of long knots $\R^1 \hookrightarrow \R^n$ not reducible to knot invariants or their natural stabilizations), and for all integral cohomology classes of orders 1 and 2 of spaces of {\em compact knots} $S^1 \hookrightarrow \R^n$. As a corollary, we prove nontriviality of all these cohomology classes in spaces of knots in $\R^3.$