Is there a way to eliminate the noise heard when plugged into an amplifier?

When you plug an electric guitar or electric bass into a device such as an amplifier or computer and play it, you may hear a humming noise when your hands are not touching a metal part on the guitar. Unfortunately it is theoretically impossible to eliminate this noise, because the pickup on the electric guitar/bass picks up a variety of noise in the room in addition to the vibration of the strings.
Even if there is a slight difference in the structure of the circuitry, one side of the wiring from the pickup is connected to the signal wire side of the output, while the other side is normally connected to the spring bearing under the bridge or to the tremolo unit. In other words, the strings are electrically connected through these metal parts.
This is so that the noise portion of the signal is grounded. When someone plays a guitar and touches the strings, his or her body acts as the ground circuit for the noise. When a string or other metallic part of the guitar is not being touched there is no ground circuit, so noise is introduced from the guitar to the signal wire.