Preprints are manuscripts made publicly available before they have been submitted for formal peer review and publication. They might contain new research findings or data. Preprints can be a draft or final version of an author's research but must not have been accepted for publication at the time of submission.
In this paper, we investigate the two-way communication between two users assisted by a re-configurable intelligent surface (RIS). The scheme that two users communicate simultaneously in the same time slot over Rayleigh fading channels is considered. The channels between the two users and RIS can either be reciprocal or non-reciprocal. For reciprocal channels, we determine the optimal phases at the RIS to maximize the signal-to-interference-plus-noise ratio (SINR). We then derive exact closed-form expressions for the outage probability and spectral efficiency for single-element RIS. By capitalizing the insights obtained from the single-element analysis, we introduce a gamma approximation to model the product of Rayleigh random variables which is useful for the evaluation of the performance metrics in multiple-element RIS. Asymptotic analysis shows that the outage decreases at $\left(\log(\rho)/\rho\right)^L$ rate where $L$ is the number of elements, whereas the spectral efficiency increases at $\log(\rho)$ rate at large average SINR $\rho$. For non-reciprocal channels, the minimum user SINR is targeted to be maximized. For single-element RIS, closed-form solutions are derived whereas for multiple-element RIS the problem turns out to be non-convex. The latter is relaxed to be a semidefinite programming problem, whose optimal solution is achievable and serves as a sub-optimal solution.