Differential spatial modulation (DSM) was recently proposed to overcome the challenge of channel estimation in spatial modulation (SM). In this letter, we propose a gray code order of antenna index permutations for DSM. To facilitate the implementation, the well-known Trotter-Johnson ranking and unranking algorithms are adopted, which results in similar computational complexity to the existing DSM that uses the lexicographic order. The coding gain achieved by the proposed gray code order over the existing lexicographic order is also analyzed and verified via simulations, which reveals a maximum of about 1.2dB for the case of four transmit antennas. Based on the gray coding framework, we further propose a diversity-enhancing scheme named intersected gray (I-gray) code order for DSM, where the permutations of active antenna indices are selected directly from the odd (even) positions of the full permutations in the gray code order. From analysis and simulations, it is shown that the I-gray code order can harvests an additional diversity order at the expense of only one information bit loss for each transmission with respect to the gray code order.
For any integer $n\geq 1$ a middle levels Gray code is a cyclic listing of all $n$-element and $(n+1)$-element subsets of $\{1,2,\ldots,2n+1\}$ such that any two consecutive subsets differ in adding or removing a single element. The question whether such a Gray code exists for any $n\geq 1$ has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. Mütze. Proof of the middle levels conjecture. Proc. London Math. Soc., 112(4):677--713, 2016]. In a follow-up paper [T. Mütze and J. Nummenpalo. An efficient algorithm for computing a middle levels Gray code. To appear in ACM Transactions on Algorithms, 2018] this existence proof was turned into an algorithm that computes each new set in the Gray code in time $\mathcal{O}(n)$ on average. In this work we present an algorithm for computing a middle levels Gray code in optimal time and space: each new set is generated in time $\mathcal{O}(1)$ on average, and the required space is $\mathcal{O}(n)$.
We introduce GRay, a massively parallel integrator designed to trace the trajectories of billions of photons in a curved spacetime. This GPU-based integrator employs the stream processing paradigm, is implemented in CUDA C/C++, and runs on nVidia graphics cards. The peak performance of GRay using single precision floating-point arithmetic on a single GPU exceeds 300 GFLOP (or 1 nanosecond per photon per time step). For a realistic problem, where the peak performance cannot be reached, GRay is two orders of magnitude faster than existing CPU-based ray tracing codes. This performance enhancement allows more effective searches of large parameter spaces when comparing theoretical predictions of images, spectra, and lightcurves from the vicinities of compact objects to observations. GRay can also perform on-the-fly ray tracing within general relativistic magnetohydrodynamic algorithms that simulate accretion flows around compact objects. Making use of this algorithm, we calculate the properties of the shadows of Kerr black holes and the photon rings that surround them. We also provide accurate fitting formulae of their dependencies on black hole spin and observer inclination, which can