The determination of protein functions is one of the most challenging problems of the post-genomic era. The sequencing of entire genomes and the possibility to access genes co-expression patterns has moved the attention from the study of single proteins or small complexes to that of the entire proteome. In this context, the search for reliable methods for proteins function assignment is of uttermost importance. Previous approaches to deduce the unknown function of a class of proteins have exploited sequence similarities or clustering of co-regulated genes, phylogenetic profiles, protein-protein interactions, and protein complexes. We propose to assign functional classes to proteins from their network of physical interactions, by minimizing the number of interacting proteins with different categories. The function assignment is made on a global scale and depends on the entire connectivity pattern of the protein network. Multiple functional assignments are made possible as a consequence of the existence of multiple equivalent solutions. The method is applied to the yeast Saccharomices Cerevisiae protein-protein interaction network. Robustness is tested in presence of a high percentage of unclassified proteins and under deletion/insertion of interactions.