Presented are polynomial identities which imply generalizations of Eul
er and Rogers-Ramanujan identities. Both sides of the identities can b
e interpreted as generating functions of certain restricted partitions
. We prove the identities by establishing a graphical one-to-one corre
spondence between those two kinds of restricted partitions.