Ship of Theseus

The Ship of Theseus is a thought experiment to question identity. It describes a scenario where a ship leaves a harbor and sails the ocean, and along the way pieces of the ship are replaced. Once the ship arrives back at the harbor, all pieces have been replaced, so is it the same ship?

Theories
The mereological principle states that an object only remains the same as long as it is made of the same parts. The spatio-temporal continuity theory states that an object remains the same thing as long as remains connected through space and time. According to the mereological principle, once a part of the ship is replaced, it is no longer the same ship, since an object only remains the same as long as it is made up of all the same parts. According to the spatio-temporal continuitiy theory, the ship remains the same ship because even when the parts changed, the ship continued to retain its shape and each part had continued to remain part of the ship for some time.

Another question that could be asked is, what if all the parts of the ship were saved when they were replaced, and then reassembled into a ship once it arrives back at the harbor? The ship assembled by the original parts would be the original ship according to the mereological theory, but would be considered a different ship according to the spatio-temporal continuity theory.

Relation to consciousness
The atoms in the human body are gradually replaced, including in the brain. It is estimated that every atom in the human body at one point in time will have been replaced within five years. Humans continue to remain the same person according to the spatio-temporal continuity theory but not the mereological theory.