  We calculate the resistivity and Giant Magnetoresistance (GMR) of a segmented
nanowire consisting of two ferromagnetic segments separated by a thin
paramagnetic spacer. The quantization of the electron motion due to the small
nanowire cross-section is taken into account; s-d electron scattering gives
rise to different mean free paths for spin-up and spin-down s-electrons. The
calculated resistivity and GMR oscillate as a function of nanowire
cross-section due to the difference in Fermi momenta of d-electrons with
opposite spins. The GMR can reach values much higher than those which are
obtained for "wires" of infinite cross-section (i.e., a multilayer). Similarly
we have calculated the Tunneling Magnetoresistance (TMR) by replacing the
paramagnetic spacer with an insulator spacer.
