3 We now turn to the discussion of our results. We set A$_{R}$ = A$_{L}$ = 1000 >> A$_{B}$ = 1, which is consistent with our experimental data and with previous reports in bulk and thin films of conducting perovskites $^{14,21,25}$. In Fig. 2 we show the results for the hysteresis loop of the total resistance R$_{T}$ . The different data curves in Fig. 2a dis- play the results in subsequent voltage cycles 5, 6, and 7. The inset of Fig. 2a, show that the hysteresis as a function of current remains qualitatively similar. We note that during the first few initial cycles the resistance shows non-repetitive memory effects that converge to a hysteresis loop with a stable shape. Interestingly, this is reminiscent of the initial “forming” that experimen- tal samples seem to require in order to start displaying reproducible switching effects. The peculiar type of hys- teresis loop that we obtain has been already reported by the Houston group 24 in experiments on (Pr,Ca)MnO$_{3}$ manganite systems, where it has been termed “table with legs”. It is evidently a non-trivial effect and we have ex- perimentally reproduced it in both, a related manganite (Pr,La,Ca)MnO$_{3}$ and a cuprate (YBa$_{2}$Cu$_{3}$O$_{7}$$_{−}$$_{x}$) sample, as shown in the bottom panels of Fig. 2. There are several features worth pointing out: During each voltage protocol loop, there is a clear variation of the resistance R$_{T}$ between a rather broad maximum for The qualitative agreement between our prediction of the “table with legs” and the experimentally observed hysteresis loops provides a significant validation for our model. Therefore, to gain physical insight into the mech- anism of the RS effect we shall discuss in detail the evolu- tion of the vacancies distribution under the applied volt- age protocol. In Fig. 3 we show successive snapshots of the oxygen vacancy concentration profile δ$_{i}$ at the be- ginning of loops 5, 6 and 7. Recalling that the initial equilibrium distribution of oxygen vacancy concentration is uniform δ$_{i}$ = δ$_{o}$ , these curves reveal that, under the action of the repetitive voltage cycling, the δ$_{i}$ evolve to- wards a new stable distribution. The salient features of the profile δ$_{i}$ are a significant depletion in the interfacial regions and a strong accumulation peaks at both internal boundaries between the bulk and the interfacial regions. The reason can be understood as follows. The largest electric fields occur at the two interfacial regions since initially their resistance is much larger than the bulk one ( A$_{L}$ , A$_{R}$ >> A$_{B}$ ). Therefore, oxygen vacancy migration is enhanced in the interfacial regions, with the ions mov- ing either towards the electrodes or the bulk, depending on the direction of the applied voltage. When the ions reach the metallic electrodes they start to pile-up $^{14}$. On the other hand, the vacancies that migrate towards the bulk eventually leave the interfacial region and enter the bulk. There, their diffusion virtually stops, since the elec- tric fields in the more conducting bulk are much smaller. Successive initial cycles yield a cumulative effect, with a depletion of the interfacial regions (and some pile-up at the edges) and a concomitant accumulation at the bulk a large range of V (ie, the “table”), and two relatively narrow minima (ie, the “legs”). These maximum and minima correspond to the high and low resistance states, R HI T and R LO T . The R$_{T}$ ( V ) loops are approximately sym- metric in V which reflects the left-right symmetry of the system. Throughout the voltage loop, the system begins in the initial R HI T state and undergoes the sequence of re- sistance changes → R LO + T → R HI + T under positive bias, and then → R LO − T → R HI − T under negative bias. The final state, at zero bias is R HI T , very close but not iden- tical to the previous initial state. Interestingly, a similar small drift is also observed in the experimental data. FIG. 3: Density concentration profiles normalized to the ini- tial uniform density value δ$_{i}$/δ$_{o}$ , at the beginning of voltage cycles number 5, 6 and 7 in the symmetric system. FIG. 2: Top panel: Resistive hysteresis loop (R$_{T}$ vs V) for the subsequent voltage cycles number 5 , 6 and 7. ( a ). Inset: the R$_{T}$ vs I hysteresis (loop number 5) shows qualitatively similar results (the vertical axis scale is the same as in the main figure). Bottom panel: experimental hysteresis loops measured in manganite ( b ) and cuprate ( c ) devices. The first one was pulsed in current control mode while the second in voltage mode. The details of the experimental procedures are described in Refs. 21 and 25, respectively. III. NUMERICAL RESULTS AND COMPARISON TO EXPERIMENTS