When did the Ancient Egyptian civilization begin and end?

According to the Children's Britannica ancient Egypt began in 4000 B.C and ended in 30 B.C.