Mathematical modeling of genetic and cultural traits