Optimal communication primitives and graph embeddings on hypercubes