dataesr/scientific-paragraphs-categorization huggingface dataset:
Theorem 6. 16. There is a position-invariant accumulation operator accum h,⊕ such that POSS is NP-hard for the PosRA acc no× query Q • • = accum h,⊕ (R), even on input po-databases where R is interpreted as an unordered relation. Proof. We consider the NP-hard partition problem: given a multiset S of integers, decide whether it can be partitioned into two sets S 1 and S 2 that have the same sum. Let us reduce an instance of the partition problem with this restriction to an instance of the POSS problem, in PTIME. Let M be the monoid generated by the functions f : x → -x and g a : x → x + a for a ∈ Z under the function composition operation. We have g a • g b = g a+b for all a, b ∈ N, f • f = id , and f • g a = g -a • f , so we actually have D = {g a | a ∈ Z} ⊔ {f • g a | a ∈ Z}. Further, M is actually a group, as we can define (g a ) -1 = g -a and (f • g a ) -1 = f • g a for all a ∈ Z.
We fix D = N ⊔ {-1}. We define the position-invariant accumulation map h as mapping -1 to f and a ∈ N to g a. We encode the partition problem instance S in PTIME to an unordered po-relation Γ S with a single attribute, that contains one tuple with value s for each s ∈ S, plus one tuple with value -1. Consider the POSS instance for the query accum h,+ (Γ), on the po-database D where the relation name R is interpreted as the po-relation Γ S , and for the candidate result v := f ∈ M. We claim that this POSS instance is positive iff the partition problem has a solution. Indeed, if S has a partition, let s = i∈S 1 i = i∈S 2 i. Consider the total order on Γ S which enumerates the tuples corresponding to the elements of S 1 , then the tuple -1, then the tuples corresponding to the elements of S 2.
Using a direct construction for these problems, we can show that they are tractable. Proposition 6. 17. For any PosRA query Q, the following problems are in PTIME. • select-at-k: Given a po-database D, tuple value t, and position k ∈ N, determine whether it is possible/certain that Q(D) has value t at position k; • top-k: For any fixed k ∈ N, given a po-database D and list relation L of length k, determine whether it is possible/certain that the top-k values in Q(D) are exactly L; • tuple-level comparison: Given a po-database D and two tuple values t 1 and t 2 , determine whether it is possible/certain that the first occurrence of t 1 precedes all occurrences of t 2. Proof. To solve each problem, we first compute the po-relation Γ • • = Q(D) in PTIME by Proposition 2. 2. We then address each problem in turn.
If ν(x d ) = 0, the reasoning is symmetric. This concludes the proof in the backwards direction, so we have established correctness of the reduction, which concludes the proof. By contrast, it is not hard to see that the CERT problem for PosRA accGBy reduces to CERT for the same query without group-by, so it is no harder than the latter problem, and all CERT tractability results from Section 6 extend. Theorem 7. 3. Theorems 6. 1, 6. 12, and 6. 14 extend to the PosRA accGBy problem when imposing the same restrictions on query operators, accumulation, and input po-relations. Specifically: • CERT is in PTIME for any fixed PosRA accGBy query that performs accumulation in a cancellative monoid. • For any PosRA accGBy query not using the × DIR operator and with a finite accumulation operator, POSS and CERT are in PTIME on po-databases of bounded width.
• For any PosRA accGBy query not using any product operator and with a finite and positioninvariant accumulation operator, POSS and CERT are in PTIME on po-databases whose relations have either bounded width or bounded ia-width. To prove this, we show the following auxiliary result. Proof. To prove that, consider an instance of CERT for Q, defined by an input po-database D of D and candidate possible world L. We first evaluate Γ ′ • • = Q ′ (D) in PTIME. Now, for each tuple value t in Π P (Γ ′ ), let Γ t be the restriction of Γ ′ to the elements matching this value; note that the po-database mapping R to Γ t is indeed in the family D ′. We solve CERT for accum h,⊕ (R) on each R → Γ t in PTIME with the candidate possible world obtained from L by extracting the accumulation value for that group, and answer YES to the original CERT instance iff all these invocations answer YES.
This concludes the proof. This allows us to show Theorem 7. 3. Proof. We consider all tractability results of Section 6 in turn, and show that they extend to PosRA accGBy queries, under the same restrictions on operators, accumulation, and input po-relations. First, we consider the tractability of CERT for accumulation in a cancellative monoid (Theorem 6. 1). As this result holds for any input po-database, tractability for PosRA accGBy follows directly from Lemma 7. 4. Second, we consider the tractability of CERT for PosRA acc LEX queries with a finite accumulation operator on po-databases of bounded width (Theorem 6. 12). The result extends because, for any family D of po-databases whose po-relations have width at most k for some k ∈ N, we know by Lemma 2. 4 that the result Q ′ (D) for D ∈ D also has width depending only on Q ′ and on k, and we know that restricting to a subset of Q ′ (D) (namely, each group) does not increase the width (this is like the case of selection in the proof of Lemma 2.
4). Hence, the family D ′ also has bounded width, and we can concludes using Lemma 7. 4. Third, we consider the tractability of CERT for PosRA acc no× queries with a finite and positioninvariant accumulation operator on po-databases whose relations have either bounded width or bounded ia-width (Theorem 6. 14). The result extends because, by Lemma 5. 6 and subsequent observations, the result Q ′ (D) for D ∈ D is a union of a po-relation of bounded width and of a po-relation with bounded ia-width. Restricting to a subset (i. e. , a group), this property is preserved (as in the case of selection in the proof of Lemma 2. 4 and of Lemma 5. 7), which allows us to conclude using Lemma 7. 4.
We can also show that most of our previous tractability results Sections 4-6 still apply when the duplicate elimination operator is added. We first clarify the semantics of query evaluation when complete failure occurs: given a query Q in PosRA extended with dupElim, and given a po-database D, if complete failure occurs at any occurrence of the dupElim operator when evaluating Q(D), then we set pw (Q(D)) • • = ∅, pursuant to our choice of defining query evaluation on po-relations as yielding all possible results on all possible worlds. If Q is a PosRA acc query extended with dupElim, we likewise say that its possible accumulation results are ∅. This implies that for any PosRA query Q extended with dupElim, for any input po-database D, and for any candidate possible world v, the POSS and CERT problems for Q are vacuously false on instance (D, v) if complete failure occurs at any stage when evaluating Q(D).
The same holds for PosRA acc queries. Theorem 7. 14. Theorems 5. 1, 6. 1, 6. 12 and Proposition 6. 17 extend to PosRA and PosRA acc where we allow dupElim (but impose the same restrictions on query operators, accumulation, and input po-relations). Specifically: • For any fixed k ∈ N and fixed PosRA LEX query Q which may additionally use dupElim, the POSS problem for Q in in PTIME on po-databases of bounded width. • For any PosRA acc query Q which may additionally use dupElim and where accumulation is performed in a cancellative monoid, the CERT problem for Q is in PTIME. • For any PosRA acc LEX query Q which may additionally use dupElim and where the accumulation operator is finite, the POSS and CERT problems are in PTIME on po-databases of bounded width. • For any PosRA query which may additionally use the dupElim operator, the problems select-at-k, top-k, and tuple-level comparison are in PTIME.
Standard bag semantics. A natural desideratum for our semantics on (partially) ordered relations is that it should be a faithful extension of the bag semantics for relational algebra. certainty  [5, 43]. However, uncertainty in these settings typically focuses on whether tuples exist or on what their values are (e. g. , with nulls  [16] , including the novel approach of  [40, 41] ; with c-tables  [31] , probabilistic databases  [53]  or fuzzy numerical values as in  [49] ). To our knowledge, though, our work is the first to study possible and certain answers in the context of order-incomplete data. Combining order incompleteness with standard tuple-level uncertainty is left as a challenge for future work. Note that some works  [13, 38, 41]  use partial orders on relations to compare the informativeness of representations.
Temporal databases. Temporal databases  [14, 48]  consider order on facts, but it is usually induced by timestamps, hence total. A notable exception is  [22]  which considers that some facts may be more current than others, with constraints leading to a partial order. In particular, they study the complexity of retrieving query answers that are certainly current, for a rich query class. In contrast, we can manipulate the order via queries, and we can also ask about aspects beyond currency, as shown throughout the paper (e. g. , via accumulation). Using preference information. Order theory has been also used to handle preference information in database systems  [33, 6, 34, 2, 52] , with some operators being the same as ours, and for rank aggregation  [21, 33, 20] , i. e. , retrieving top-k query answers given multiple rankings.
However, such works typically try to resolve uncertainty by reconciling many conflicting representations (e. g. , via knowledge on the individual scores given by different sources and a function to aggregate them  [21] , or a preference function  [2] ). In contrast, we focus on maintaining a faithful model of all possible worlds without reconciling them, studying possible and certain answers in this respect. Computational social choice. The notion of preferences has been studied in the domain of computational social choice to determine the possible outcomes of an election given partial preference information expressed by voters  [36]. In this setting, the notions of possible winners and necessary winners have been introduced to summarize the possible outcomes, and they have been connected to the notion of possible and necessary answers of database queries  [35].
selection. For any constant a not in N, consider the po-database D a consisting of a single unordered po-relation with name R formed of two unary tuples 0 and a. Let Q = σ. 1 ="0" (R). Then, Q(D a ) is the po-relation consisting only of the tuple a. No PosRA query without selection has the same semantics, as no other operator than selection can create a po-relation containing the constant a for any input D a , unless it also contains the constant 0.
For any PosRA accGBy query Q • • = accumGroupBy h,⊕,P (Q ′ ) and family D of po-databases, the CERT problem for Q on input po-databases from D reduces in PTIME to the CERT problem for accum h,⊕ (R) (where R is a relation name), on the family D ′ of po-databases mapping the name R to a subset of a po-relation of {Q ′ (D) | D ∈ D}.
Acknowledgments. We are grateful to  Marzio De Biasi , to  Pálvölgyi Dömötör , and to  Mikhail Rudoy , from cstheory. stackexchange. com,for helpful suggestions. We are also grateful to the anonymous reviewers for their feedback that helped improve this paper. This research was partially supported by the  Israeli Science Foundation  (grant  1636/13 ), the  Blavatnik ICRC , and  Intel.
Lemma 7. 4. 74 For any PosRA accGBy query Q • • = accumGroupBy h,⊕,P (Q ′ ) and family D of po-databases, the CERT problem for Q on input po-databases from D reduces in PTIME to the CERT problem for accum h,⊕ (R) (where R is a relation name), on the family D ′ of po-databases mapping the name R to a subset of a po-relation of {Q ′ (D) | D ∈ D}.
This paper studies the complexity of query evaluation for databases whose relations are partially ordered; the problem commonly arises when combining or transforming ordered data from multiple sources. We focus on queries in a useful fragment of SQL, namely positive relational algebra with aggregates, whose bag semantics we extend to the partially ordered setting. Our semantics leads to the study of two main computational problems: the possibility and certainty of query answers. We show that these problems are respectively NP-complete and coNPcomplete, but identify tractable cases depending on the query operators or input partial orders. We further introduce a duplicate elimination operator and study its effect on the complexity results.
The first one is that it is used for estimating the orientation of the sensor. However in this work, we only focus on what kind of activity a person is performing, not where the person is heading for. Another reason is that magnetic field is very easily distorted by other unpredictable magnetic sources, such as buildings, electricity devices, cars. A quite large amount of methods have been used in investigating locomotion activities from IMU sensors, and we are going to only focus on works reported recently. Wu et al. [13]  investigated the performance of imbalanced dataset for human activity recognition, their method showed better results compared to the existing methods. Traditional classifiers like Support Vector Machine (SVM)  [14] , Gaussian Mixture Model (GMM)  [15]  are commonly applied in locomotion activity detection.
Except for traditional classifiers, machine learning or deep learning techniques have also been investigated to recognize activities. Hassan et al. [6]  proposed a method for activities training and recognition by using Deep Belief Network (DBN) and obtained an overall accuracy of 95. 85% among 12 activities on smartphone sensor data. Whereas Ignatov  [18]  used Convolutional Neural Networks (CNN) to recognize 6 human activities, including 3 lower limb activities, in realtime from accelerometers. This method obtained an accuracy higher than 97%, and achieved an overall accuracy of 82. 76% on a cross-dataset experiment. The four activities we consider in this paper share a similar periodic pattern: from attaching to the ground to swinging in the air and then attaching to the ground again. This periodic pattern is called gait cycle and generally there are two common ways for segmenting each gait cycle: (1) One simplest way is that one gait cycle is divided into two gait phases  [19]  , namely stance phase and swing phase.
Martinez-Hernandez et al. [11]  developed an adaptive Bayesian inference system using three sensors placed on leg to recognize walking on different road conditions, i. e. level-ground, ramp ascent and descent. They introduced gait phases and attempted to recognize activities and gait phases simultaneously. The high accuracy (99. 87%) indicates that gait phases can significantly improve the accuracy for walking activity. Inspired by the previous work, our goal is to extend the gait cycle to more general cases. Like the scheme of walking gait cycle shown in Fig. 2 , apparently similar behaviors hold for all the other three activities. The angular rates of the three sensor axes are quite different for different activities (cf. Fig. 3 ), hence providing a way to distinguish them correctly. In the off-line scenario, the entire data are acquired first, then, activities and gait phases are estimated using a parameter learning method, detailed in the next sections.
Hence, an observation y n are composed of three mean values and three standard deviations, i. e. a q = 6-dimensional vector, and the total number of histograms in TMC-HIST is therefore 96. The three axes of the sensor are correlated in the movement, while the applied histograms represent the marginal probability density of each axis. Using a 3-dimensional histogram would probably suit the application more closely. But it would need too much data to form a reliable density and drastically increase the computation time. Parameters learning needs p(v n , v n+1 ) and p(y n |v n ) to be initialized. The ground truth of activity x n can be easily obtained from the sequence of activities used in the experiment. But unfortunately, the ground truth of gait phases u n is unavailable because of the lacking of proper device to acquire it.
On-line Data Acquisition and Complete Gait Detection The data is fed to the on-line algorithm once it arrives. Then feature extraction is performed based on the new data and the stored ones, by using eq. (  8 ). The data is accumulated during the required time to obtain a complete gait with the sequence: push-up → swing → step down → stance. In order to decide whether a gait is complete, a one-step forward process of TMC-HIST model is firstly conducted to estimate current gait phase, which derives from the marginal probability of p(x n , u n |y n 1 ) over x n , using MPM method ũn = arg max un∈Λ xn∈Ψ p (x n , u n |y n 1 ). (9) Then, the current gait phase and the features are stored in a stack, which contains all the gait phases and corresponding features of the current gait cycle. Afterward, a decision is made to verify whether an entire gait is complete or not.
The ground truth of the experiment can be seen in Fig. 10. It consists of 1200m of walking and running, 32 floors of stair ascent and descent. The average time to complete one experiment is about 30 minutes. All the subjects perform the activities at their preferred speed, but are asked to keep the same speed within one experiment as much as possible. This ensures that the activity patterns and speeds vary among the subjects, but almost keep constant within one experiment. The speed ranges of the four activities among the subjects are 1. 09 -1. 68m/s , 2. 14 -3. 82m/s , 89. 79 -123. 68 stairs/min, 96. 07 -140. 97 stairs/min. The implementation of the algorithms is done in Matlab, the code is running on a 3. 2GHz CPU computer with 64-bit Win7 operating system. The average experiment time of all the subjects is 29.
e. the transition sequence of gait phases. While in our proposed algorithm, a Markov chain is established to mimic this structure. Generally, segmentation of gait cycles can only be accomplished in an off-line scenario, it is difficult to make a decision if only one sample is known. The authors of Phase Variable algorithm  [29]  stated that their method can be applied to the on-line scenario if using a small time window. However, thanks to the state transitions among the activities and gait phases, gait phase can be estimated at each sampling time with the help of previous estimation. Activity is then detected after the current gait cycle is completed, and does not need to wait for the entire data or to set a time window for segmentation. It should be noticed that the gait detection is based on the forward procedure of TMC-HIST model, which is not as reliable as the backward procedure.
Comparison of the performance w. r. t. state-of-the-art algorithms for classifying lower limb locomotion activities. SVM used 2 sensors and obtained an overall accuracy at 99. 65% for 10 daily activities. Among the 10 activities, the 5 lower limb activities had an accuracy at about 96. 46%. If looking at all the algorithms that give an accuracy higher than 99%, the proposed algorithm is the only one that uses one single sensor, besides, the proposed algorithm obtained the highest MCC value. The use of multiple sensors is very interesting and can give very high accuracy. Nevertheless, recognizing activities with only one sensor is still relevant because it is more realistic than multiple sensors for quantified-self applications. It should be noticed that the state-of-the-art works and our algorithm are tested on different datasets, consisting of different activities and different amounts of samples.
The continuity and variability of time steps does not indicate if a model is discrete or continuous, but rather the manner which their models of computation handle time. e. g. a discrete time continuous model can have a variable time step for specific solver usage, or fixed step according to user's request (e. g. in Matlab), whereas, in discrete event simulation, time advances only when an event occurs, uniformly or discretely. Definition 1. The simulation horizon of a model is defined as the subset of physical time (i. e. wall-clock or world time) that is simulated/represented by the said model. T M = {t ∈ T W t ≥ inf t m ∧ t ≤ sup t m } In other word, it is the part of physical time "represented" by the set of the model time steps. The relation between T M , t s , τ is decided by the simulator according to a particular need (i.
• The agent is developed in a plug and play manner to promote interoperability. Once an agent is disconnected or a new one joins the network, the algorithms in other agents in its neighbourhood will detect automatically and adapt themselves in the next iteration. The considered experiment involves the integration of remote CHIL. The test-case is implemented with the virtualized MAS in PRISMES (CEA, France) and the OPAL-RT simulain PREDIS, Grenoble INP (70). The considered network is given on Figure  3. The microgrid is simulated in real-time with the RT Simulator OPAL-RT in PREDIS platform. A Redis server is also hosted in PRISMES serving as real time exchange point. In this experiment setup, the agents are virtualized into python processes and are launched at CEA (France) (figure  4 ). The following scenario was considered: Load 1 connects to the microgrid at 0s, load 2 connects to the microgrid at 60s and load 1 is disconnected from the microgrid at 120s.
In this table, the dipole matrix elements are theoretically calculated values from Ref. [6]  and Alkali Rydberg Calculator (ARC) Python package  [7]. The refractive index of ordinary Sapphire is calculated from the data in Ref. [8]. Using the values in Table  I , we finally obtain the theoretical van der Waals coefficient for the shift of the 6S 1/2 → 6P 1/2 transition: C th 3 = C 3 [6P 1/2 ] -C 3 [6S 1/2 ] = 1. 10 ± 0. 03 kHz. µm 3. ( 29 ) The expression (28) used for V a (z) accounts only for the interaction of a dipole with its image in the sapphire. The interaction of dipole image with its dipole image, and higher, is neglected. The full potential would have the form  [9] : (closer to the surfaces, the suppression will be even stronger) due to the larger distance between the atom and their image.
We thank  A. Laliotis  and  J. Keaveney  for fruitful discussions. T. Peyrot is supported by the  DGA -DSTL fellowship 2015600028. N. Š. is supported by  EU Horizon 2020  ( CO-QUDDE, Marie Skłodowska-Curie fellowship  No  786702 ). We also acknowledge financial support from  EPSRC  (grant.
New developments for Run 2 4. 1 Deployment of auto-masking algorithms In LHC Run 1, the ECAL trigger system relied on human intervention whenever a problematic link or a noisy tower caused high trigger rates. This often required the stopping of a run, expert diagnosis and "on the fly masking" of the problematic regions. The whole procedure took 10 minutes at best. During LHC physics runs, this produced a loss of data taking efficiency, referred to as downtime. With increasing LHC luminosity, incidents such as this had to be mitigated with an automatic masking procedure. Two methods were developed, addressing different problems. First the "Link Swing Detector" (LSD) was developed in 2015 and integrated into the firmware of the TCCs. Its purpose was to detect defects that affect the 800 Mbps optical serial links used between the on-detector and off-detector electronics.
Auto-recovery procedure for TCC The detection of a problematic optical link results in the zeroing of the transverse energy recorded by the tower or pseudo-strip, and the masking status is maintained until a control signal from the TCDS system (termed "BgoResync") is received, or a specific instruction is executed in the TCC to remove the masks. The auto-masking decision is stored in the data stream for every TP using special TTF flags. In EB, masked towers are indicated by TTF flag 4. In EE, where the masking is performed per pseudo-strip, TTF values can be 4, 5 or 7, depending on whether the other TT channels have low, medium or high-interest data, respectively. A global monitoring of the TT masking occupancy is performed offline with CMS Data Quality Monitoring system using the TTF value.