{'fraction_non_alphanumeric': 0.03957207771297721, 'fraction_numerical': 0.01946402375755841, 'mean_word_length': 4.444098169068952, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Strange nonchaotic attractors for computation

We investigate the response of quasiperiodically driven nonlinear systems exhibiting strange non- chaotic attractors (SNAs) to deterministic input signals. We show that if one uses two square waves in aperiodic manner as input to a quasiperiodically driven double-well Duffing oscillator system, the response of the system can produce logical output controlled by such a forcing. Changing the threshold or biasing of the system changes the output to another logic operation and memory latch. The interplay of nonlinearity and quasiperiodic forcing yields logic behaviour and the emergent out- come of such a system is a logic gate. It is further shown that the logical behaviours persist even for experimental noise floor. Thus the SNA turns out to be an efficient tool for computation.

We investigate the response of quasiperiodically driven nonlinear systems exhibiting strange nonchaotic attractors (SNAs) to deterministic input signals. We show that if one uses two square waves in aperiodic manner as input to a quasiperiodically driven double-well Duffing oscillator system, the response of the system can produce logical output controlled by such a forcing. Changing the threshold or biasing of the system changes the output to another logic operation and memory latch. The interplay of nonlinearity and quasiperiodic forcing yields logic behaviour and the emergent outcome of such a system is a logic gate. It is further shown that the logical behaviours persist even for experimental noise floor. Thus the SNA turns out to be an efficient tool for computation.

I. INTRODUCTION
Strange nonchaotic attractors (SNAs) are attractors which possess fractal geometry but exhibit no sensitive dependence on initial conditions. SNAs occur in all dissipative dynamical systems when the attractors formed at the accumulation points of period-doubling cascades are fractal sets with zero Lyapunov exponent. Such attractors are however not physically observable because the set of parameter values for them to arise has Lebesgue measure zero in the parameter space. Situations where SNAs can arise typically were described by Grebogi et al. [1], who found that quasiperiodically driven dynamical systems admit SNAs in parameter regions of positive Lebesgue measure. Since then, there have been many studies on SNAs in quasiperiodically forced systems [2][3][4][5][6][7][8][9][10][11][12][13][14]. Experimental observations of SNAs have been reported in a quasiperiodically driven magnetoelastic ribbon system [2], in electronic circuits [3], in a plasma system [4], in an electrochemical cell [5] and in a system near the torus-doubling critical point [6].
Physically, SNAs are relevant to situations such as localization of quantum particles in spatially quasiperiodic potential systems [7]. These exotic attractors are also important for biological systems [8] and they may be useful for nonlinear dynamics based communication as well [9]. Recently evidence for strange nonchaotic behaviour has been identified in the pulsation of stars like KIC 5520878 [10]. Most of the works in the literature considered the process by which an SNA can be created from a regular attractor, or its disappearance in the transition to a chaotic attractor [11][12][13][14]. SNAs can also be quantitatively characterized by a variety of measures/methods including Lyapunov exponents, fractal dimension and spectral properties as well as examination of time series [10][11][12][13][14][15]. The geometric strangeness of the attractor can be measured through indices such as the phase sensitivity exponent, while the chaoticity property can be checked by examining the finite-time Lyapunov exponents [15]. Mathematical issues concerning the generation and properties of SNAs have also been addressed [16]. In this regard, if an SNA can persist under small perturbations, it is said to be robust [17]. So far robust SNAs have been identified and studied extensively in quasiperiodically driven dynamical systems [16,17].
It is well known that the approaching of physical limits on Moore's law has led to the development of alternative methods to perform more number of computations out of limited number of hardwares [18][19][20][21][22][23][24][25][26][27]. In this direction, in 1998, the important work of Sinha and Ditto paved a new avenue of using chaos for computation [18]. They have proposed a chaos-computing scheme based on the thresholding method to achieve controlled response from a chaotic system. Simultaneously, Prusha and Lindner emphasized the importance of nonlinearity over chaos using a nonlinear paramaterized map and illustrated why chaos and computation require nonlinearity [19]. Munakata et al. realized various logic operations by employing a single chaotic element, especially a 1-D chaotic dynamical system (logistic map) [23]. Murali et al. reported experimental realization of a fundamental NOR gate using chaotic systems [20].
Further Murali et al. proposed different schemes to obtain key logic structures by using synchronization [24,25] and stochastic resonance [22] of nonlinear systems. Following this, Kohar et al. have enhanced our understanding of nonlinear computing by adding either additional positive or negative asymmetric biasing to a bistable system driven by two input signals which yield logic function of two signals in an optimal window of moderate noise [27]. The phenomenon of Logical Stochastic Resonance (LSR) has been realized theoretically and experimentally in diverse systems, namely a nanoscale device [28], resonant tunnel diodes [29], a vertical cavity surface emitting laser [30], a polarization bistable laser [31], a chemical system [32], synthetic gene networks [33], and so on. Recently, two of the present authors along with Venkatesh employed coupled dynamical systems to build dynamical logic gates by altering the value of the logic inputs [34].
From a different point of view, Kia et al. demonstrated how unstable periodic orbits can be exploited to model chaos computing [35]. Later on Kia et al. have also shown how the inherent noise reduction properties in coupled systems can be used for computation [36]. Further Wang and Roychowdhury showed that self sustaining oscillators of any type can function as latches and registers if Boolean logic states are represented as the phase of oscillatory signals [37]. Borresen and Lynch have demonstrated how coupled threshold oscillators may be used as the principle components of computers [38]. It has also been pointed out that heteroclinic computing offers a paradigm for computation by collective system of nonlinear oscillators [21].
These approaches have been used to implement different types of logic operations in a single set of nonlinear systems rather than needing multiple hardwares for different types of computations [18][19][20][21][22]34]. Although, a nonlinear dynamical system can be a processor of flexibly configured and reconfigured device to emulate different logic gates, it was shown that the manufacturing non-idealities and ambient noise make it difficult to obtain different logic functions in these systems [39]. In fact chaotic systems are highly sensitive to initial perturbations and thus a small amount of noise can completely change the system dynamics. As a result, special attention needs to be paid in choosing the appropriate nonlinear dynamics based computing systems which are robust against noise [35].
In the present paper, we propose a new and simple approach to encapsulate computations and noise robustness at the dynamics level. In particular, we present a route to logical SNAs in quasiperiodically driven nonlinear oscillator systems. We show that if we use two square waves in an aperiodic manner as input to a quasiperiodically driven double-well Duffing oscillator, the response of the oscillator can produce logical output controlled by such a forcing. Changing the threshold or biasing of the system changes the output to another logic operation and memory latch. We also show how by using such robust SNAs, including even noise, one can emulate different logic functions and thereby providing a sound nonlinear dynamics basis for computation.
The plan of the paper is as follows. In sec. II we analyse the dynamics of quasiperiodically forced doublewell Duffing oscillator. In sec. III we discuss the effect of three level square waves on quasiperiodically driven Duffing oscillator, the mechanism of logical SNA and the characterization of logical SNA. In sec. IV we discuss implementation of other logic gates and SR flip flop. We also analyse the effect of noise on the logic gates. Finally in sec.V we present our conclusion.

II. DYNAMICS OF QUASIPERIODICALLY FORCED DOUBLE-WELL DUFFING OSCILLATOR
To illustrate our findings, we consider the quasiperiodically driven Duffing oscillator, The simplest experimental realization of (1), namely magnetoelastic ribbon [2], has been studied extensively for SNA [12,40]. The quantities A, ω 1 and ω 2 in (1) correspond to the amplitude and frequencies of the external two-frequency forcing. ε is an asymmetric bias input. I is the low amplitude input square wave signal. ξ(t) is a Gaussian white noise of intensity D.
The existence of logical behaviour observed in the present study of Eq.(1) suggests that there may be experimental realization of different types of logic functions which deserve further study. For this purpose, we first study the dynamics of (1) in the absence of noise and input square waves. For our numerical calculation, we fix the parameters as α = 0.5, β = 1.0, To visualize the attractor, it is convenient to use Poincaré surface of section technique. Specifically, we sample the system at time intervals corresponding to the variable θ n = ω 1 t n = 2πn, where n = 0, 1, 2.... We then examine the dynamical variables φ n (mod2π) and x n on the surface of section. This is shown in Fig.1 which clearly portrays the transition from torus to SNA as a function of A. For A=0.311, the attractor is a torus and can be seen as a single smooth strand in the Poincaré surface of section plot in its (φ−x) plane ( Fig.1(a)). As A is increased further to A=0.3112, one obtains the strand shown in Fig.1(b), which loses its smoothness and becomes a wrinkled attractor. On increasing A to A=0.311227, the nature of the attractor becomes fractal and a SNA as shown in Fig.1(c). Finally for A=0.31124, the attractor becomes a chaotic one (see Fig.1(d)). Now we examine the dynamical transition to SNA by using specific quantities, namely Lyapunov exponents [13], phase sensitivity exponent and singular continuous spectrum [15]. Fig.2 indicates the transition of the SNA into a chaotic attractor corresponding to a change in the largest Lyapunov exponent from negative to positive values at A=0.31124. To provide further evidence, we compute the phase sensitivity function Γ N which is bounded for torus region, grows with N as a power-law relation for SNA and increases exponentially with N for chaotic oscillations, as shown in Fig.3(a). Here, the phase sensitivity function is defined as In addition, from the time-dependent Fourier transform x n e i2πnΩ , for Ω = nent takes the value 1 < β < 2. This behaviour is shown in Fig.3(b) for SNA, where we observe a relatively robust power-law behaviour with β = 1.21. It was also suggested that for SNAs, the spectral trajectory in the complex plane (Re X, Im X) should exhibit a fractal behaviour. This is indeed observed for the SNA attractor in this system as shown in the inset of Fig.3(b).

III. EFFECT OF THREE-LEVEL SQUARE WAVES ON THE QUASIPERIODICALLY DRIVEN DUFFING OSCILLATOR
Next, we analyse the response of the quasiperiodically driven nonlinear system (1) to deterministic logic input signal I, consisting of two square waves in the absence of noise. Specifically, for two logic inputs, we drive the system (1) with a low/moderate amplitude signal I = I 1 + I 2 with two square waves of strengths I 1 and I 2 encoding two logic inputs. The inputs can be either 0 or 1, giving rise to four distinct logic input sets (I 1 , I 2 ) : (0, 0), (0, 1), (1, 0) and (1, 1). For a logical 0 , we set I 1 = I 2 = −δ, whereas for a 1 , we set I 1 = I 2 = +δ, where δ represents a small/moderate intensity input signal. Now the input sets (0,1) and (1,0) give rise to the same input signal I. As a result, the four distinct input combinations (I 1 , I 2 ) reduce to three distinct values of I, −2δ, 0, + 2δ, corresponding to the logic inputs (0, 0), (0, 1) or (1, 0), (1, 1), respectively. The output of the system is determined by the state x(t) of system (1); for example, if the output can be considered as logical 1 if it is one particular state and logical 0 if it is in a different state. Specifically, the output corresponding to this 2-input set (I 1 , I 2 ) for a system with the state values x > 0 is taken to be 1 and with x < 0, it is taken to be 0 . So, when the system switches between these two states, the output toggles from logical 0 to logical 1 and vice-versa.
Here we will explicitly show that one indeed observes for a given set of inputs (I 1 , I 2 ) a logical output from the above quasiperiodically driven nonlinear system (1) in accordance with the truth table of the basic logic operations as given in Table I.
To be concrete, we consider the dynamics of (1) where both the inputs I 1 and I 2 take the values −0.05 when the logic input is 0, and value 0.05 when it is 1 . The input signal I = I 1 + I 2 is thus a three level square wave form: −0.1 corresponding to the input set (0, 0), 0 corresponding to the input sets (0, 1) or (1, 0) and 0.1 corresponding to the input set (1, 1). In our numerical experiments, we choose A as the bifurcation parameter and fix the other parameters at α = 0.5, β = 1.0, ω 1 = 1.0, ω 2 = 1 2 ( √ 5−1), and ε = 0.05. Fig.4 shows that with increasing forcing amplitude A in (1), the maximal Lyapunov exponent also grows and that it changes sign (solid curve) at A = 0.383. As the parameter A is increased, we find that the transition from quasiperiodic orbit to chaos takes place in four distinct phases. In the first phase, a wrinkled torus becomes a fractal torus. The second phase corresponds to a transition from the fractal torus to the logical SNA, where the basic logic operations become valid. The third phase is a transition from the logical SNA to standard SNA, which does not exhibit logic operations. Finally a transition from SNA to a geometrically similar chaotic attractor occurs. These transitions are clearly seen in the numerical plots in the (φ − x) plane as shown in Fig 5. To confirm further, as the value of A varies, a threequasiperiodic torus is observed due to the effect of three level square waves and hence can be seen as three smooth branches in the Poincaré surface of section plot in the (φ − x) plane as shown in Fig.5(a). This torus is either in x > 0 well or x < 0 well depending on the initial conditions we choose. In Fig.5(a) we select the initial conditions such that the torus lies within the x > 0 well. On increasing further the value of A to A = 0.2232 the torus begins to wrinkle. Fig.5(b) reveals that among the three strands, one of the strands loses its smoothness and begins to wrinkle while other two stands are in the same well (x > 0). These bends tend to become actual discontinuities at A = 0.2312. At such values, the attractor loses its smoothness and becomes an SNA as the maximum Lyapunov exponent works out to be λ = −0.032.
For such values of A, it is found that instead of the attractor bounded to a single well, it switches between the two wells and can be seen in the Poincaré surface section as two strands in the x > 0 well and one strand in the x < 0 well as shown in Fig.5(c).
In particular, it is observed that the fractal torus involves a kind of sudden widening of the attractor similar to the crisis phenomenon that occurs in chaotic systems. It is seen in the (φ − x) plane as shown in Fig.5(d) for A=0.27, the orbit in the attractor spends long stretches of time in the region at which the attractor is confined to a particular well (x > 0). At the end of these long stretches, the orbit switches out of the well and spends around the other well (x < 0) due to crisis. It then returns to the old region for another stretch of time, followed by a burst and so on. This kind of widening of the attractor usually occurs in chaotic system at a crisis.
However, in the present case, we have shown the existence of such a possibility in a quasiperiodically forced system by creating SNAs. It is very clear from these transitions that the SNA created via fractalization becomes a  Table I). logical SNA through widening crisis. This kind of SNA is due to the aperiodic input signals. That is, in an optimal range of A, 0.23 < A < 0.31, the output of the system synchronizes with the aperiodic input signal. If the aperiodic input signal follows any kind of logic behaviour, the response of the system also follows the same. Therefore this kind of attractor can be called logical SNA. On further increase in the value of A, 0.311 < A < 0.3823, the logical SNA loses its synchrony with the input signal and becomes the standard SNA. This can be seen in the (φ − x) plane when all the strands lose their continuity as shown in Fig.5(e). Increasing the value further, A > 0.3824, the attractor becomes chaotic with a geometry similar to SNA [see Fig.5(f)]. Specifically, we note that when the input signals (I 1 , I 2 ) are in the (1, 1) or (0, 1)/(1, 0) states the attractor resides in the x > 0 well and when the input signal is in the (0, 0) state, the attractor is in the x < 0 well. We observe that under optimal quasiperiodic forcing strength 0.23 < A < 0.31, the state x < 0 as logic output 0 and the state x > 0 as logic output 1 yield a clean stable logical OR gate SNA with ε = 0.05 [see Fig.6 for full details]. In a completely analogous way if we interpret the state x < 0 as logic output 1 and the state x > 0 as logic output 0, one realizes a stable logic NOR gate. Similarly, AND and NAND gates can be identified for a different value of bias ε as shown in the next section.
On further increase in the value of A > 0.311 the orbits due to the (0, 0) state and due to the (1, 0)/(0, 1) state cause the attractor to wrinkle as seen in Fig.5(e) and become standard SNA, where the logic no longer works. Here both the logical SNA and standard SNA are confirmed by computation of the largest Lyapunov exponents, which show that these attractors [Figs.5(d), 5(e) & 6(d), 6(e) ] are strange and nonchaotic.

B. Mechanism for logical strange nonchaotic attractor
Let us now point out the mechanism of logical strange nonchaotic attractors. When a weak/moderate aperiodic three level square wave signal is applied to a bistable system, it serves to aperiodically modulate the potential by raising and lowering the wells. Essentially, the additive forcing changes erratically the relative depth of potential wells, thereby increasing the probability of jumps between wells. At a critical value of the quasiperiodic forcing, the particle in a well arrives at the neighboring of the barrier so that the quasiperiodic forcing is able to push it to the other well. At this junction, the system output x(t) [see

C. Characterization of logical SNA
The phase sensitivity exponent Γ N for the quasiperiodic force for A=0.27 and A=0.32 are obtained for logical and standard SNAs as shown in Fig.7(a). It grows with N with a kind of power-law relation for the SNA. The distributions of finite time Lyapunov exponents for logical SNA and standard SNA are shown in Fig.7(b). Both cases exhibit stretched exponential tails. From the spectral properties it is evident that for both logical SNA and standard SNA, the power spectrum varies as |X(Ω, N )| 2 ∼ N β , where β = 1.3 for logical SNA and β = 1.6 for standard SNA, Figs.7(c) and Figs.7(d) respectively. The insets in these figures also demonstrate the fractal walk of the trajectories in the complex (ReX, Imx) plane, as required for SNAs.
D. Transition to logical SNA : Nature of physical relationship between input and output responses Next, the parameter space of the strength of external quasiperiodically forcing A and the amplitude of the square waves δ is scanned numerically in the range A ∈ (0.0, 0.4) and δ ∈ (0.0, 1.0) to pinpoint different dynamical behaviours, and more specifically the occurrence of logical SNA, where the above discussed binary logic is valid. To start with, we demarcate the parameter space  Table I).
(A, δ) by numerically integrating Eq.(1) into quasiperiodic attractor, logical SNA, standard SNA and chaotic attractor by using Lyapunov exponents, phase sensitivity exponents and power spectral measures. A two parameter numerical phase diagram is shown in Fig.8 for A ∈ (0.0, 0.4) and δ ∈ (0.0, 1.0). The various dynamical behaviours indicated in the phase diagram and the interesting dynamical transitions are elucidated in the following. For low A and low δ values in the chosen range, the system exhibits quasiperiodic oscillations in one well, while for higher values of δ (and same low A values) it exhibits a torus behaviour encompassing both the wells. When the value of A exceeds a critical value, the quasiperiodic oscillations lose their smoothness and the attractor becomes a fractal torus/SNA. In specific ranges of parameter values of A, the system exhibits logical SNA and standard SNA for almost all δ values. However, for sufficiently large A and low values of δ, the system is forced to behave chaotically as shown in Fig.8. When considering the effect of δ, it is observed that there are two types of transitions which are predominant here as A is increased.
• Transition 2: Two well quasiperiodic oscillations → logical SNA → standard SNA. Now considering the logical SNA regions, we have already seen from Fig.6, how a low amplitude δ is sufficient to realize the logic OR gate as well as AND gate (see the following section). However from Fig.9 it is observed that for different δ values of the input square wave, we can get the logical SNA region in a rather wide range of the parameter space. In digital electronics, the physical nature of the input and output signals/values of logical gates are expected to have the same ranges of values. To test the validity that the logic gates emerge in our system irrespective of the strength of the amplitude δ of the input signals (low/moderate), we vary the amplitudes of the input square waves (I 1 , I 2 ) to 0.5 and 1.0 and we observe that the outputs of the system exhibit the same logical output values irrespective of the input values (Figs.9). In fact we do find that the logic gates emerge almost in the entire region of δ ∈ [0.03, 1.0]. This confirms that our study is suitable for designing logic gates irrespective of the input values in the given logical SNA range as long as they are of low/moderate values.

IV. IMPLEMENTATION OF OTHER LOGIC GATES AND EFFECT OF NOISE
Finally in this section, we point out how the remaining logic gates, namely AND and NAND can be identified. Also we show how the system (1) can be used as a Set-Reset (SR) flip-flop. We further point out the reliability of obtaining logic gates in a quantitative way and the persistence of gates even in the presence of noise.  Table  I).

A. AND and NAND gates
We now study studied the effect of a different constant input bias ε in (1). The results are displayed in Fig.10 . We observe that as the value of bias changes from ε = 0.05 to ε = −0.05 the response of the system morphs from OR gate SNA to AND gate SNA logic behaviour as shown in Fig.10(c). Here we notice that changing ε causes an alternation in the symmetry of potential wells which leads to emulate different logical SNA responses. Similarly, we note that when the NOR gate bias is changed from ε = 0.05 to ε = −0.05 the NAND gate logic emerges (the figures of which we do not specifically display here for brevity).    Table II, it is very obvious that two states (0, 1) and (1, 0) yield different outputs. This may be accomplished by encoding in a different way so that the first input I 1 takes the value −I when the logic is 0 and +I when the logic is +1. Similarly the second input I 2 takes the value +I when the logic input is 0 and −I when the logic is +1. This will be implemented by applying NOT operation to the second input I 2 . As a result for the 4-set of binary inputs (I 1 , I 2 ) : (0, 0), (0, 1), (1, 0), (1, 1), the input signal I takes the value 0, −1, 1,and 0 respectively. Out of these four sets, (1, 1) set is a restricted one. Hence one has only a three-set input signal, thereby a three state level signal will be given to input (Fig.11(c)). Logic response for output can be obtained as in the case of logic operations: x > 0, the logic output is taken as 1, 0 for x < 0. It is clearly evident from Fig.11(d) that low/moderate quasiperiodic forcing consistently fields the Set-Reset latch input-output operations.

C. Quantification of reliability of obtaining logic gates
We can quantify the consistency/reliability of obtaining a given logic output by calculating the probability of obtaining the desired logic output for different sets of inputs, that is the ratio of the number of successful runs to the total number of runs. Thus we define P(logic)to be 1, when the logic operation is completely obtained for all given input sets, otherwise it is 0. In the present case the system (1) was simulated by keeping the value of one input set constant over 1000 time steps and it is continued for a sequence of 500 such sets. It is evident from Fig.12(a), we obtain a window for the quasiperiodic forcing for which our system consistently gives the desired logic responses as output.

D. Effect of noise in the logic gates
Finally, we consider the behaviour of system (1) in the presence of noise. For the sake of definiteness, we choose the noise intensity to be comparable to that of a weak internal noise which originates in electronic components that may model the system (1). Such noise essentially originates in the analog components and is usually ∼ 1µV [41,42]. It is observed that the behaviour of the largest Lyapunov exponent of the forcing amplitude A in the presence of noise is found to be practically coincident with that of the noise free case. Hence, in the presence of noise, the logical SNA in the system retains its negative Lyapunov exponents and the fractal structure and that the behaviour of 'OR/AND' logic is possible for D < 0.005 [see Fig.12(b)]. Our study confirms that the logic behaviour remains when the noise strength is below mV range. Hence the logic nature in our system persists even when the noise originates due to analog electronic components of the system.

V. CONCLUSION
In this paper, we have studied the response of quasiperiodically driven double-well Duffing oscillator to deterministic input signals. We have shown that if one uses two square waves in an aperiodic manner as input signals to the oscillator system, the response of the oscillator can produce logical SNA output controlled by the quasiperiodic forcing. Changing the threshold or biasing the oscillator changes the 'OR' logical SNA output to 'AND' logical SNA output (and similarly NOR to NAND) and SR flip-flop. We have also shown that the two distinct dynamical phenomena, namely SNA and computation, commonly thought of as arising under very different contexts in the study of nonlinear systems can actually be closely related. In the present work, we have shown that with a low/moderate quasiperiodic forcing, logic operations can be obtained in nonlinear dynamics subjected to two aperiodic square waves. The dynamical behaviour in the logic operation region is SNA. Consequently the dynamics is robust under weak noise. Therefore an efficient computational process can be designed.