text:
Spectral Clustering of Graphs with the Bethe Hessian

Spectral Clustering of Graphs with the Bethe Hessian

A. Saade, F. Krzakala and L. Zdeborová Laboratoire de Physique Statistique, CNRS UMR 8550, Université P. et M. Curie Paris 6 et École Normale Supérieure, 24, rue Lhomond, 75005 Paris, France.
ESPCI and CNRS UMR 7083 Gulliver, 10 rue Vauquelin,Paris 75005
Institut de Physique Théorique, CEA Saclay and URA 2306, CNRS, 91191 Gif-sur-Yvette, France
July 11, 2019
Abstract

Spectral clustering is a standard approach to label nodes on a graph by studying the (largest or lowest) eigenvalues of a symmetric real matrix such as e.g. the adjacency or the Laplacian. Recently, it has been argued that using instead a more complicated, non-symmetric and higher dimensional operator, related to the non-backtracking walk on the graph, leads to improved performance in detecting clusters, and even to optimal performance for the stochastic block model. Here, we propose to use instead a simpler object, a symmetric real matrix known as the Bethe Hessian operator, or deformed Laplacian. We show that this approach combines the performances of the non-backtracking operator, thus detecting clusters all the way down to the theoretical limit in the stochastic block model, with the computational, theoretical and memory advantages of real symmetric matrices.

Clustering a graph into groups or functional modules (sometimes called communities) is a central task in many fields ranging from machine learning to biology. A common benchmark for this problem is to consider graphs generated by the stochastic block model (SBM) Holland1983109 (); wang1987stochastic (). In this case, one considers vertices and each of them has a group label . A graph is then created as follows: all edges are generated independently according to a matrix of probabilities, with . The group labels are hidden, and the task is to infer them from the knowledge of the graph. The stochastic block model generates graphs that are a generalization of the Erdős-Rényi ensemble where an unknown labeling has been hidden.

We concentrate on the sparse case, where algorithmic challenges appear. In this case is , and we denote . For simplicity we concentrate on the most commonly-studied case where groups are equally sized, if and if . Fixing is referred to as the assortative case, because vertices from the same group connect with higher probability than with vertices from other groups. is called the disassortative case. An important conjecture decelle2011asymptotic () is that any tractable algorithm will only detect communities if

 |cin−cout|>q√c, (1)

where is the average degree. In the case of groups, in particular, this has been rigorously proven mossel2013proof (); massoulie2013community () (in this case, one can also prove that no algorithm could detect communities if this condition is not met). An ideal clustering algorithm should have a low computational complexity while being able to perform optimally for the stochastic block model, detecting clusters down to the transition (1).

So far there are two algorithms in the literature that are able to detect clusters down to the transition (1). One is a message-passing algorithm based on belief-propagation  decelle2011inference (); decelle2011asymptotic (). This algorithm, however, needs to be fed with the correct parameters of the stochastic block model to perform well, and its computational complexity scales quadratically with the number of clusters, which is an important practical limitation. To avoid such problems, the most popular non-parametric approach to clustering are spectral methods, where one classifies vertices according to the eigenvectors of a matrix associated with the network, for instance its adjacency matrix Tutorial (); newman2006finding (). However, while this works remarkably well on regular, or dense enough graphs bickel2009nonparametric (), the standard versions of spectral clustering are suboptimal on graphs generated by the SBM, and in some cases completely fail to detect communities even when other (more complex) algorithms such as belief propagation can do so. Recently, a new class of spectral algorithms based on the use of a non-backtracking walk on the directed edges of the graph has been introduced in krzakala2013spectral () and argued to be better suited for spectral clustering. In particular, it has been shown that this operator is optimal for graphs generated by the stochastic block model, and able to detect communities even in the sparse case all the way down to the theoretical limit (1).

These results are, however, not entirely satisfactory. First, the use a of a high-dimensional matrix (of dimension - where is the number of edges - rather than , the number of nodes) can be expensive, both in terms of computational time and memory. Secondly, linear algebra methods are faster and more efficient for symmetric matrices than non-symmetric ones. The first problem was partially resolved in krzakala2013spectral () where an equivalent operator of dimensions was shown to exist. It was still, however, a non symmetric one and more importantly, the reduction does not extend to weighted graphs, and thus presents a strong limitation.

In this contribution, we provide the best of both worlds: a non-parametric spectral algorithm for clustering with a symmetric, real matrix that performs as well, and in fact slightly better, than the non-backtracking operator of krzakala2013spectral (). This operator is actually not new, and has been known as the Bethe Hessian in the context of statistical physics and machine learning mooij2004validity (); ricci2012bethe () or the deformed Laplacian in various other fields. We show that the spectrum of this operator is directly linked to that of the non-backtracking matrix, that it also performs optimally for the stochastic block model, in the sense that it identifies communities as soon as (1) holds. It also performs well in clustering standard real world benchmark networks.

The paper is organized as follows. In Sec. I we give the expression of the Bethe Hessian operator. We discuss in detail its properties and its connection with both the non-backtracking operator and an Ising spin glass in Sec. II. In Sec. III, we study analytically the spectrum in the case of the stochastic block model. Finally, in Sec. IV we perform numerical tests on both the stochastic block model and on some real networks.

I Clustering based on the Bethe Hessian matrix

Let be a graph with vertices, . Denote by its adjacency matrix, and by the diagonal matrix defined by , where is the degree of vertex . We then define the Bethe Hessian matrix, sometimes called the deformed Laplacian, as

 H(r):=(r2−1)\mathds1−rA+D, (2)

where is a regularizer that we will set to a well-defined value depending on the graph, for instance in the case of the stochastic block model, where is the average degree of the graph (see Sec. II.1).

The spectral algorithm that is the main result of this paper works as follows: we compute the eigenvectors associated with the negative eigenvalues of both and , and cluster them with a standard clustering algorithm such as k-means (or simply by looking at the sign of the components in the case of two communities). The negative eigenvalues of reveal the assortative aspects, while those of reveal the disassortative ones.

Figure 1 illustrates the spectral properties of the Bethe Hessian (2) for networks generated by the stochastic block model. When the informative eigenvalues (i.e. those having eigenvectors correlated to the cluster structure) are the negative ones, while the non-informative bulk remains positive. There are as many negative eigenvalues as there are hidden clusters. It is thus straightforward to select the relevant eigenvectors. This is very unlike the situation for the operators used in standard spectral clustering algorithms (except, again, for the non-backtracking operator) where one must decide in a somehow ambiguous way which eigenvalues are relevant (outside the bulk) or not (inside the bulk). Here, on the contrary, no prior knowledge of the number of communities is needed to select them.

On more general graphs, we argue that the best choice for the regularizer is , where is the spectral radius of the non-backtracking operator. We support this claim both numerically, on real world networks (sec. IV.2), and analytically (sec. III). We also show that can be computed without building the matrix itself, by efficiently solving a quadratic eigenproblem (sec. II.1).

The Bethe Hessian can be generalized straightforwardly to the weighed case: if the edge carries a weight , then we can use the matrix defined by

 ~H(r)ij=δij(1+∑k∈∂iw2ikr2−w2ik)−rwijAijr2−w2ij, (3)

where denotes the set of neighbors of vertex . This is in fact the general expression of the Bethe Hessian of a certain weighted statistical model (see section II.2). If all weights are equal to unity, reduces to (2) up to a trivial factor. Most of the arguments developed in the following generalize immediately to , including the relationship with the weighted non-backtracking operator, introduced in the conclusion of krzakala2013spectral ().

Ii Derivation and relation to previous works

Our approach is connected to both the spectral algorithm using the non-backtracking matrix and to an Ising spin glass model. We now discuss these connections, and the properties of the Bethe Hessian operator along the way.

ii.1 Relation with the non-backtracking matrix

In this section we describe the relationship between the spectrum of the Bethe Hessian and that of the non-backtracking operator of krzakala2013spectral () defined as a non-symmetric matrix indexed by the directed edges of the graph

 Bi→j,k→l=δjk(1−δil). (4)

The remarkable efficiency of the non-backtracking operator is due to the particular structure of its (complex) spectrum. For graphs generated by the SBM the spectrum decomposes into a bulk of uninformative eigenvalues sharply constrained when to the disk of radius , where is the spectral radius of saade2014spectral (), well separated from the real, informative eigenvalues, that lie outside of this circle. It was also remarked that the number of real eigenvalues outside of the circle is the number of communities, when the graph was generated by the stochastic block model. More precisely, the presence of assortative communities yields real positive eigenvalues larger than , while the presence of disassortative communities yields real negative eigenvalues smaller than . The authors of krzakala2013spectral () showed that all eigenvalues of that are different from are roots of the polynomial

 det[(λ2−1)\mathds1−λA+D]=detH(λ). (5)

This is known in graph theory as the Ihara-Bass formula for the graph zeta function. It provides the link between and the (determinant of the) Bethe Hessian (already noticed in watanabe2009graph ()): a real eigenvalue of corresponds to a value of such that the Bethe Hessian has a vanishing eigenvalue.

For any finite , when is large enough, is positive definite. This can be proven by using e.g. the Gershgorin circle theorem. Then as decreases, a new negative eigenvalue of appears when it crosses the zero axis, i.e whenever is equal to a real positive eigenvalue of . Of course, the same phenomenon takes place when increasing from a large negative value. In order to translate all the informative eigenvalues of into negative eigenvalues of we will adopt

 rc=√ρ(B). (6)

since all the relevant values of are outside the circle of radius . Note also that since the eigenvalues of come in pairs having their product close to krzakala2013spectral (), for the negative eigenvalues of move back into the positive part of the spectrum. Hence taking is not desirable.

Let us stress that to compute , we do not need to actually build the non-backtracking matrix. First, when the degree to degree correlations are small krzakala2013spectral (), . In a more general setting, we can efficiently refine this initial guess by solving for the closest root of the quadratic eigenproblem defined by (5), e.g. using a standard SLP algorithm ruhe1973algorithms (). This approach is implemented for the real world networks of sec. IV.2. With the choice (6), the informative eigenvalues of are in one-to-one correspondance with the union of negative eigenvalues of and . Their number will therefore tell us the number of (detectable) communities in the graph, and we will use them to infer the community membership of the nodes, by using a standard clustering algorithm such as k-means. In particular, the Bethe Hessian detects communities whenever does, that is down to the theoretical threshold krzakala2013spectral ().

ii.2 Hessian of the Bethe free energy

Let us define a pairwise Ising model on the graph by the joint probability distribution:

 P({x})=1Zexp⎛⎝∑(i,j)∈Eatanh(1r)xixj⎞⎠, (7)

where is a set of binary random variables sitting on the nodes of the graph . The regularizer is here a parameter that controls the strength of the interaction between the variables: the larger is, the weaker is the interaction (this would be analogous to the temperature in a statistical physics).

In order to study this model, a standard approach in machine learning is the Bethe approximation WJ2008 () in which the means and moments are approximated by the parameters and that minimize the so-called Bethe free energy defined as

 FBethe({mi},{ξij}) =−∑(i,j)∈Eatanh(1r)ξij+∑(i,j)∈E ∑xi,xjη(1+mixi+mjxj+ξijxixj4) (8)

where . Such approach allows for instance to derive the belief propagation () algorithm. Here, however, we wish to restrict to a spectral algorithm.

At very high the minimum of the Bethe free energy is given by the so-called paramagnetic point . It turns out mooij2004validity () that the is a stationarity point of the Bethe free energy for every . Instead of considering the complete Bethe free energy, we will consider only its behavior around the paramagnetic point. This can be expressed via the Hessian (matrix of second derivatives), that has been studied extensively, see e.g. mooij2004validity (), ricci2012bethe (). At the paramagnetic point, the blocks of the Hessian involving one derivative with respect to the are , and the block involving two such derivatives is a positive definite diagonal matrix watanabe2009graph (). We will therefore, somewhat improperly, call Hessian the matrix

 Hij(r)=∂FBethe∂mi∂mj∣∣mi=0,ξij=1r. (9)

In particular, at the paramagnetic point:

 H(r)=\mathds1+Dr2−1−rAr2−1=H(r)r2−1. (10)

A more general expression of the Bethe Hessian in the case of weighted interactions (with weights rescaled to be in ) is given by eq. (3). All eigenvectors of and are the same, as are the eigenvalues up to a multiplicative, positive factor (since we consider only ).

The paramagnetic point is stable if and only if is positive definite. The appearance of each negative eigenvalue of the Hessian corresponds to a phase transition in the Ising model at which a new cluster (or a set of clusters) starts to be identifiable. The corresponding eigenvector will give the direction towards the cluster labeling. This motivates the use of the Bethe Hessian for spectral clustering.

For tree-like graphs such as those generated by the SBM, model (7) can been studied analytically in the asymptotic limit . The location of the possible phase transitions in model (7) are also known from spin glass theory and the theory of phase transitions on random graphs (see e.g. mooij2004validity (); decelle2011inference (); decelle2011asymptotic (); ricci2012bethe ()). For positive the trivial ferromagnetic phase appears at , while the transitions towards the phase corresponding to the hidden community structure arise between . For disassortative communities, the situation is symmetric with . Interestingly, at , the model undergoes a spin glass phase transition. At this point all the relevant eigenvalues have passed in the negative side (all the possible transitions from the paramagnetic states to the hidden structure have taken place) while the bulk on non-informative ones remains positive. This scenario is illustrated in Fig. 1 for the case of two assortative clusters.

Iii The spectrum of the Bethe Hessian

In this section, we show how the spectral density of the Bethe Hessian can be computed analytically on tree-like graphs such as those generated by the stochastic block model. This will serve two goals: i) to justify independently our choice for the value of the regularizer and ii) to show that for all values of , the bulk of uninformative eigenvalues remains in the positive region. The spectral density is defined by:

 ν(λ)=1nn∑i=1 δ(λ−λi), (11)

where the ’s are the eigenvalues of the Bethe Hessian. It can be shown rogers2008cavitySym () that the spectral density (in which potential delta peaks have been removed) is given by

 ν(λ)=1πnn∑i=1 ImΔi(λ), (12)

where the are complex variables living on the vertices of the graph , which are given by:

 Δi=(−λ+r2+di−1−r2∑l∈∂iΔl→i)−1, (13)

where is the degree of node in the graph, and is the set of neighbors of . The are the (linearly stable) solution of the following belief propagation recursion, or cavity method MM2009 (),

 Δi→j=(−λ+r2+di−1−r2∑l∈∂i∖jΔl→i)−1. (14)

The ingredients to derive this formula are to turn the computation of the spectral density into a marginalization problem for a graphical model on the graph , and then write the belief propagation equations to solve it. It can be shown RSA:RSA20313 () that this approach leads to an asymptotically exact description of the spectral density on random graphs such as those generated by the stochastic block model, which are locally tree-like in the limit where . We can solve equation (14) numerically using a population dynamics algorithm MM2009 (): starting from a pool of variables, we iterate by drawing at each step a variable, its excess degree and its neighbors from the pool, and updating its value according to (14). The results are shown on Fig. 1: the bulk of the spectrum is always positive.

We now justify analytically that the bulk of eigenvalues of the Bethe Hessian reaches at . From (12) and (13), it is clear that if the linearly stable solution of (14) is real, then the corresponding spectral density will be equal to . We want to show that there exists an open set around in which there exists a real, stable, solution to the BP recursion. Let us call , where is the number of edges in , the vector which components are the . We introduce the function defined by

 F(λ,Δ––)i→j=(−λ+r2+di−1−r2∑l∈∂i∖jΔl→i)−1Δi→j, (15)

so that equation (14) can be rewritten as

 F(λ,Δ––)=0. (16)

It is straightforward to check that when , the assignment is a real solution of (16). Furthermore, the Jacobian of at this point reads

 JF(0,{1/r2})=⎛⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜⎝−10⋮$$\Larger2(r2\mathds1−B)$$0⎞⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟⎠, (17)

where is the non-backtracking operator and is the identity matrix. The square submatrix of the Jacobian containing the derivatives with respect to the messages is therefore invertible whenever . From the continuous differentiability of around and the implicit function theorem, there exists an open set containing such that for all , there exists solution of (16) , and the function is continuous in . To show that the spectral density is indeed 0 in an open set around , we need to show that this solution is linearly stable. Introducing the function defined by

 Gλ(Δ––)i→j=(−λ+r2+di−1−r2∑l∈∂i∖jΔl→i)−1 (18)

it is enough to show that the Jacobian of at the point has all its eigenvalues smaller than 1 in modulus, for close to . But since is continuous in in the neighborhood of , and is continuous in , it is enough to show that the spectral radius of is smaller than . We compute

 JG0({1/r2})=1r2B (19)

so that the spectral radius of is , which is (strictly) smaller than as long as . From the continuity of the eigenvalues of a matrix with respect to its entries, there exists an open set containing such that , the solution of the BP recursion (14) is real, so that the corresponding spectral density in is equal to . This proves that the bulk of the spectrum of reaches at , further justifying our choice for the regularizer.

Iv Numerical results

iv.1 Synthetic networks

We now illustrate the efficiency of the algorithm for graphs generated by the stochastic block model. Fig. 2 shows the performance of standard spectral clustering methods, as well as that of the belief propagation () algorithm of decelle2011asymptotic (), believed to be asymptotically optimal because it approximates the Bayes-optimal estimator in a (conjectured) exact manner in large tree-like graph. The performance is measured in terms of the overlap with the true labeling, defined as

 (1N∑uδgu,~gu−1q)/(1−1q), (20)

where is the true group label of node , and is the label given by the algorithm, and we maximize over all possible permutation of the groups. The Bethe Hessian systematically outperforms and does almost as well as , which is a more complicated non-linear machine learning algorithm, that we have run here assuming the knowledge of "oracle parameters": the number of communities, their sizes, and the matrix decelle2011inference (); decelle2011asymptotic (). The Bethe Hessian, on the other hand can infer the number of communities in the graph by counting the number of negative eigenvalues, and does not need to be fed with the interaction matrix.

iv.2 Real networks

We finally turn towards actual real graphs to illustrate the performances of our approach in practical applications, and to show that even if real networks are not generated by the stochastic block model, the Bethe Hessian operator remains a useful tool. In Table 1 we give the overlap and the number of groups to be identified for several networks commonly used as benchmarks for community detection. For each of these networks we observed a large correlation to the ground truth, and at least equal (and sometimes better) performances with respect to the non backtracking operator. In all cases, the eigenvalues we have considered lay in the negative part of the spectrum and are thus clearly identifiable.

In particular, we find by counting the negative eigenvalues an estimate of the number of clusters (just as krzakala2013spectral () did for the non-backtracking matrix). It is also interesting to note that our approach works not only in the assortative case but also in the disassortative ones, for instance for the word adjacency networks. A Matlab implementation to reproduce the results of the Bethe Hessian for both real and synthetic network is provided on the following webpage: http://mode_net.krzakala.org/.

V Conclusion and perspectives

We have presented here a new approach to spectral clustering using the Bethe Hessian and gave evidence that this approach combines the advantages of standard sparse symmetric real matrices, with the performances of the more involved non-backtracking operator, or the use of the belief propagation algorithm with oracle parameters. This answers the quest for a tractable non-parametric approach that performs optimally in the stochastic bloc model. We invite the reader to the demo file in matlab avaliable at: http://mode_net.krzakala.org/.

Given the large impact and the wide use of spectral clustering methods in many fields of modern science, we thus expect that our method will have a significant impact on data analysis. In particular, our approach can be straightforwardly generalized to other types of spectral clustering problems, as for instance, those with real-valued similarities between vertices and , without any price in scalability (as opposed, for instance, to the non-backtracking operator).

Another promising direction of investigation arises from the observation that the cost function used in the graphical model of section II.2 can be generalized to any objective function to be maximized, e.g. the modularity, or else. The Bethe Hessian’s negative eigenvalues at some carefully chosen regularization parameter could therefore provide an approximate solution to this maximization problem, giving a general spectral relaxation to some known NP-hard problems.

Acknowledgements.
We would like to thank Federico Ricci-Tersenghi for interesting discussions. This work has been supported in part by the ERC under the European Union’s 7th Framework Programme Grant Agreement 307087-SPARCS, by the Grant DySpaN of "Triangle de la Physique".

References

• [1] L. A Adamic and N. Glance. The political blogosphere and the 2004 us election: divided they blog. In Proceedings of the 3rd international workshop on Link discovery, page 36. ACM, 2005.
• [2] P. J Bickel and A. Chen. A nonparametric view of network models and newman–girvan and other modularities. Proceedings of the National Academy of Sciences, 106(50):21068, 2009.
• [3] Charles Bordenave and Marc Lelarge. Resolvent of large random graphs. Random Structures and Algorithms, 37(3):332–352, 2010.
• [4] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Phys. Rev. E, 84(6):066106, 2011.
• [5] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Inference and phase transitions in the detection of modules in sparse networks. Phys. Rev. Lett., 107(6):065701, 2011.
• [6] Michelle Girvan and Mark EJ Newman. Community structure in social and biological networks. Proceedings of the National Academy of Sciences, 99(12):7821–7826, 2002.
• [7] Paul W. Holland, Kathryn Blackmond Laskey, and Samuel Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109, 1983.
• [8] Valdis Krebs. The network can be found on http://www.orgnet.com/.
• [9] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborová, and P. Zhang. Spectral redemption in clustering sparse networks. Proceedings of the National Academy of Sciences, 110(52):20935–20940, 2013.
• [10] D. Lusseau, K. Schneider, O. J. Boisseau, P. Haase, E. Slooten, and S. M Dawson. The bottlenose dolphin community of doubtful sound features a large proportion of long-lasting associations. Behavioral Ecology and Sociobiology, 54(4):396–405, 2003.
• [11] Ulrike Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395, 2007.
• [12] Laurent Massoulie. Community detection thresholds and the weak ramanujan property. arXiv preprint arXiv:1311.3085, 2013.
• [13] M. Mezard and A. Montanari. Information, Physics, and Computation. Oxford University Press, 2009.
• [14] Joris M Mooij, Hilbert J Kappen, et al. Validity estimates for loopy belief propagation on binary real-world networks. In NIPS, 2004.
• [15] Elchanan Mossel, Joe Neeman, and Allan Sly. A proof of the block model threshold conjecture. arXiv preprint arXiv:1311.4115, 2013.
• [16] Mark EJ Newman. Finding community structure in networks using the eigenvectors of matrices. Phys. Rev. E, 74(3):036104, 2006.
• [17] F. Ricci-Tersenghi. The bethe approximation for solving the inverse ising problem: a comparison with other inference methods. J. Stat. Mech.: Th. and Exp., page P08015, 2012.
• [18] Tim Rogers, Isaac Pérez Castillo, Reimer Kühn, and Koujin Takeda. Cavity approach to the spectral density of sparse symmetric random matrices. Phys. Rev. E, 78(3):031116, 2008.
• [19] Axel Ruhe. Algorithms for the nonlinear eigenvalue problem. SIAM Journal on Numerical Analysis, 10(4):674–689, 1973.
• [20] Alaa Saade, Florent Krzakala, and Lenka Zdeborová. Spectral density of the non-backtracking operator. arXiv preprint arXiv:1404.7787, 2014.
• [21] M. J. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1, 2008.
• [22] Yuchung J Wang and George Y Wong. Stochastic blockmodels for directed graphs. Journal of the American Statistical Association, 82(397):8–19, 1987.
• [23] Yusuke Watanabe and Kenji Fukumizu. Graph zeta function in the bethe free energy and loopy belief propagation. In NIPS, pages 2017–2025, 2009.
• [24] W Zachary. An information flow model for conflict and fission in small groups1. Journal of anthropological research, 33(4):452–473, 1977.
You are adding the first comment!
How to quickly get a good reply:
• Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
• Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
• Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters


text:
Stream: general

Topic: Cat theory example to learn from?

Daniel Donnelly (Aug 28 2019 at 15:20):

Hi, I am in the middle of coding critical parts to BananaCats. I am confident enough now in Lean that I can start doing project-motivated learning, and my project is about category theory. So could someone point me to the simplest (takes least effort in the long-run to use) way of "defining a variable C, that is an abstract category?" And why not declare an object X in Ob(C) as well.

Chris Hughes (Aug 28 2019 at 15:24):

import category_theory.category

open category_theory

variables {C : Type*} [category C] (X : C)

Chris Hughes (Aug 28 2019 at 15:25):

X : C means X is an object in C.

Daniel Donnelly (Aug 28 2019 at 15:25):

What does Type* mean?

Klean closure?

Johan Commelin (Aug 28 2019 at 15:26):

@Chris Hughes You'll have some hidden universe variables that way...

Johan Commelin (Aug 28 2019 at 15:26):

maybe just use large_category for now.

Daniel Donnelly (Aug 28 2019 at 15:26):

that includes all categories?

Daniel Donnelly (Aug 28 2019 at 15:26):

I.e. does it mean not-neccessarily large category?

Johan Commelin (Aug 28 2019 at 15:27):

@EnjoysMath Type* mean that C is a type.

Johan Commelin (Aug 28 2019 at 15:27):

Lean uses type theory in its foundations, see TPIL

Daniel Donnelly (Aug 28 2019 at 15:27):

I thought C : Type would accomplish that

Daniel Donnelly (Aug 28 2019 at 15:29):

I will work with the Chris Hughes example for now, since I'm okay with any implications regarding Universes for now

Johan Commelin (Aug 28 2019 at 15:29):

Type* is Type u for a fresh univers u

Daniel Donnelly (Aug 28 2019 at 15:29):

Should BananaCats have a Universe setting as well, where needed?

Daniel Donnelly (Aug 28 2019 at 15:30):

That's as easy as adding a GUI field from my perspective

Johan Commelin (Aug 28 2019 at 15:33):

You can add that later

Daniel Donnelly (Aug 28 2019 at 15:33):

Category lives in Universe: [int spinbox] Use first free universe: [*]

Johan Commelin (Aug 28 2019 at 15:33):

Just use Type for now.

Daniel Donnelly (Aug 28 2019 at 15:33):

@Johan Commelin sure thing. I will use Type for now :)

Daniel Donnelly (Aug 28 2019 at 15:35):

I'ma use Jinja2 (a python library) for making a "create new category" template, and so on...

Daniel Donnelly (Aug 28 2019 at 15:37):

The question is, can I get away with generalizing the template to declaring a variable of a certain type?

Daniel Donnelly (Aug 28 2019 at 15:38):

And another question is what does the application in brackets [category C] do to the declaration?

Daniel Donnelly (Aug 28 2019 at 15:38):

Finallly is variable declaration the formal term for this?

Daniel Donnelly (Aug 28 2019 at 15:38):

*formal vocabulary

Daniel Donnelly (Aug 28 2019 at 15:40):

Btw, the comm to / from Lean VSCode will be 2-way, I.e. a change in the code which Bancats cares about will be detected and reflected in the PyQt5 app ("BananaCats"), and obviously vise versa is the typical usage.

Daniel Donnelly (Aug 28 2019 at 15:45):

To answer one question, I shouldn't generalize, as that would move more logic framework over to BananaCats by necessity, since I'd have to call multiple atomic calls, and organize them correctly. Whereas if I just do the hard coded script for Create a Category, and do the same for each thing, then I should be okay in finishing this.

Daniel Donnelly (Aug 28 2019 at 15:46):

If I need to generalize it should be done with lean code I think

Daniel Donnelly (Aug 28 2019 at 15:48):

I take back that lean should drive BananaCats

Daniel Donnelly (Aug 28 2019 at 15:48):

That would necessitate parsing of Lean!

Daniel Donnelly (Aug 28 2019 at 15:49):

I have to KISS keep it simple

Johan Commelin (Aug 28 2019 at 15:54):

@EnjoysMath [category C] means that C is endowed with the structure of a category.

Thx

Daniel Donnelly (Aug 28 2019 at 15:58):

{% if "category_theory.category" not in context.imported_names %}
import category_theory.category
{% endif %}

{% if "category_theory" not in context.open_modules %}
open category_theory
{% endif %}

variables {{{decl.name}} : {{decl.type}}} [category {{decl.name}}]

It's a Jinja2 template for declaring a variable an abstract category

Scott Morrison (Aug 28 2019 at 23:33):

If universe polymorphism doesn't matter to you (this is pretty much synonymous with "you're not trying to write library code"), then I'd recommend:

import category_theory.category

open category_theory

variables {C : Type} [small_category C] (X : C)

Scott Morrison (Aug 28 2019 at 23:34):

If universe polymorphism does matter to you, and you want the most general case (which in "real maths" means that you either have a small category, where the objects and morphisms live in the same universe, or a large category, where the objects live in a universe one higher than the morphisms, but in "Lean math", because we can't specify this dichotomy, the objects and morphisms just live in two entirely independent universes, I'd recommend:

import category_theory.category

universes v u
open category_theory

variables {C : Type u} [𝒞 : category.{v} C] (X : C)
include 𝒞

Scott Morrison (Aug 28 2019 at 23:37):

Here we need include𝒞because Lean's typeclass inference algorithm is not willing to pull in the instance C until it is sure that the universe parameter v is the desired one, and often it can't tell this without explicit universe annotations everywhere --- instead we just tell Lean to include 𝒞 as an argument to every definition that follows. This is a little dangerous, as you need to be careful to then explicitly omit it again if you write any functions that don't refer to C. (Such functions probably belong higher in the file, or in another file, in any case...)

Last updated: May 08 2021 at 19:11 UTC

format: plain


text:
# Polynomial regression providing odd p-values

I have the data:

Distances   Diversity
-300        3.532833
-300        3.319447
-300        3.331814
-300        3.284599
-150        3.167693
-150        3.343932
-150        3.400182
-150        3.347922
-50         3.185409
-50         3.590527
-50         3.163942
-50         3.102254
50         3.382986
50         2.78799
50         3.204374
50         2.756762
150        2.784996
150        3.206704
150        2.431388
150        2.911236
300        2.10763
300        2.393464
300        3.527539
300        2.552804

After investigating the data it seems that there is a slightly curved relationship:

I have performed a simple polynomial regression and linear regression with the code:

m1 <- lm(Diversity ~ Distances + I(Distances^2), data = Data)
m2 <- lm(Diversity ~ Distances, data = Data)

However the output shows that the linear model is a better predictor with a p-value of <0.001 while the polynomial is not significant (p>0.1).

This confuses me as the predicted values from m1 seem to better match the trend shown in the data:

 plot(Diversity ~ Distances)
lines(lowess(Diversity ~ Distances))
lines(Distances, predict(m1), col = "red")
lines(Distances, predict(m2), col = "blue")

can someone explain why the p values suggest that the polynomial regression is such a poor predictor?

Summary (m1):

Call:
lm(formula = Diversity ~ Distances + I(Distances^2), data = Data.Col)

Residuals:
Min       1Q   Median       3Q      Max
-0.50157 -0.12025 -0.04278  0.11443  0.91834

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)     3.131e+00  9.027e-02  34.689  < 2e-16 ***
Distances      -1.305e-03  3.221e-04  -4.051 0.000576 ***
I(Distances^2) -1.454e-06  1.685e-06  -0.863 0.397985
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.309 on 21 degrees of freedom
Multiple R-squared:  0.4496,    Adjusted R-squared:  0.3971
F-statistic: 8.576 on 2 and 21 DF,  p-value: 0.001894

Summary(m2): Call: lm(formula = Diversity ~ Distances, data = Data.Col)

Residuals:
Min       1Q   Median       3Q      Max
-0.57667 -0.15650 -0.00791  0.08949  0.84323

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)  3.0757678  0.0627046  49.052  < 2e-16 ***
Distances   -0.0013049  0.0003203  -4.074 0.000503 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3072 on 22 degrees of freedom
Multiple R-squared:  0.4301,    Adjusted R-squared:  0.4042
F-statistic:  16.6 on 1 and 22 DF,  p-value: 0.0005031

• Could it be because of the high diversity value at distance of 300? – tom91 Aug 19 '15 at 15:45
• How, exactly, does the output from your linear model (which is not shown) indicate it is "a better predictor"? Which p-values are you looking at, and why do you think they are related to predictability? (You also ought to consider a model in which the conditional variance increases with distance, because there is evidence of such heteroscedasticity.) – whuber Aug 19 '15 at 15:55
• You might consider poly(x, 2) instead of x + I(x^2) to use orthogonal polynomials. – Gregor Aug 19 '15 at 16:25
• I don't see how that will help. You can see from the output that the adjusted $R^2$ goes down for the larger model, indicating that the nonlinearity does not add enough to be worth it. You could likely have a power problem due to the small sample size. If you think the nonlinear fit is more realistic, use it regardless of significance. – Frank Harrell Aug 19 '15 at 16:39
• I think @tom91 comment goes in the right direction: by just looking at the scatterplot you can guess, that this point the point $(300,3.53)$ will be a high leverage point to which the polynomial regression fits worse. I guess by deleting it you will see a dramatic increase of the $R^2$ and probably get significant regressors from the polynomial fit. however, just deleting points which don't fit well with the model in mind is not the correct way of doing statistics. you need to justify such a step. – BloXX Feb 6 at 10:53


text:
# Hexadecimal numbers that does not look like decimal

Given a range of hexadecimal numbers, how do I determine the total number of them that do not look like decimal numbers?

Background: I'm designing a system that auto-generates IDs that consist of four digit hexadecimal numbers but I want to exclude those that looks like decimal numbers so that users are not confused. I only want to know that with that restriction, how many IDs can the system generate (and decide if I need to increase the number of digits or not).

N.B. I can easily detect if a hexadecimal number looks like a decimal number or not though.

• I've taken the liberty of creating and adding the tag hexadecimal. Incidentally, codegolf.stackexchange.com might enjoy this problem. – Travis Willse Jan 4 '16 at 4:14
• If the given range is just the set of nonnegative hexadecimal numbers of $n$ digits, including leading zeros, then the number of hex numbers in which only the digits $0, \ldots, 9$ occur is $10^n$, and so the number of hex numbers excluding these is $16^n - 10^n$. For $n = 4$ this is $55536$. – Travis Willse Jan 4 '16 at 4:18
• and DEAD or BEEF would not confuse users? – Ring Ø Jan 4 '16 at 4:21
• Sorry, what if there's no leading zero. – Lukman Jan 4 '16 at 4:21
• Why would there be a tag "hexadecimal"? Do we also need tags for "decimal", "binary", "octal", "base-12345", etc? The tag "number-systems" is quite sufficient. – Najib Idrissi Jan 5 '16 at 14:11

Number of numbers with at least an hex letter (a to f) as Travis commented $$16^{n} - 10^{n} = 55536$$
Number of numbers with no decimal at all (a to f only) $$6^{n} = 1296$$
Number of numbers with at least an hex letter (a to f) with no leading zero $$16^{n} - 10^{n} - 16^{n-1} + 10^{n-1} = 52440$$


text:
Chemistry: A Molecular Approach (3rd Edition)

Published by Prentice Hall

Chapter 7 - Sections 7.1-7.6 - Exercises - Review Questions: 7f

Answer

Microwaves range from $10^{-1}$ to $10^{-3}$ m.

Work Step by Step

They are used by microwave ovens to heat water.

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# scipy.fft.hfft2¶

scipy.fft.hfft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False, workers=None)[source]

Compute the 2-D FFT of a Hermitian complex array.

Parameters
xarray

Input array, taken to be Hermitian complex.

ssequence of ints, optional

Shape of the real output.

axessequence of ints, optional

Axes over which to compute the FFT.

norm{None, “ortho”}, optional

Normalization mode (see fft). Default is None.

overwrite_xbool, optional

If True, the contents of x can be destroyed; the default is False. See fft for more details.

workersint, optional

Maximum number of workers to use for parallel computation. If negative, the value wraps around from os.cpu_count(). See fft for more details.

Returns
outndarray

The real result of the 2-D Hermitian complex real FFT.

hfftn

Compute the N-D discrete Fourier Transform for Hermitian complex input.

Notes

This is really just hfftn with different default behavior. For more details see hfftn.

scipy.fft.ihfft

scipy.fft.ihfft2


text:
Warning

This is an old revision of the document!

# Spam filter - step 4

Create 3 simple non-adaptive filters, paranoid, naive, and random, and evaluate their quality.

## Preparation

You should think about and write down on a piece of paper:

• How is a spam filter actually used?
• What is the difference (from the implementation standpoint) between a learning filter and a non-learning filter?
• Is there any part which all of the spam filters have in common?
• Is it better to create a spam filter as a function or as a class with methods and properties?
• What are the minimal requirements for such an implementation? What does it have to be able to do, and what inputs and what outputs does it have to have?

Optional (for more advanced programmers): Read how the inheritance in OOP works and how it is used in Python. You can find more information here:

## Simple filters

• In module simplefilters.py, create 3 classes representing 3 simple filters:
• NaiveFilter which classifies all the emails as OK,
• ParanoidFilter which classifies all the emails as SPAM, and
• RandomFilter which assigns the lables OK and SPAM randomly.
• Optional: If these 3 filters have some functionality in common, try to extract it into a common ancestor called BaseFilter in module basefilter.py.

Why do we need it?

• These simple filters will demonstrate the skeleton of the filter and will show the parts common to all filters. We will also have some baseline filters to compare using the functions from step 3.

### Specifications

To facilitate later automatic testing of the final filter, we require your filter to be named MyFilter and defined in module filter.py. In this step, however, you shall create 3 classes called NaiveFilter, ParanoidFilter, and RandomFilter placed in module named simplefilters.py.

A filter will be represented by a class with at least 2 public methods: train() and test(). Filters unable to learn from data will probably have the method train() empty. The rest of the class structure is up to you.

Methods train():

 Inputs A path to training corpus, i.e. to a directory with emails, containing also the !truth.txt file. (Irrelevant for the simple filters.) None. Setup of the inner data structures of the filter, so that they can be later used to classify emails using the test() method.

Method test():

 Inputs A path to a corpus to be evaluated. (The directory will not contain the !truth.txt file.) None. Creates the !prediction.txt file containing the predictions of the filter.

## Evaluating the quality of simple filters

Create a simple script that computes the quality of a specified filter. The script shall:

• import the class of the chosen filter,
• call method train() on the first dataset,
• call method test() on the second dataset,
• call function compute_quality_for_corpus() for the second corpus,
• print out the quality, and
• remove the file !prediction.txt from the corpus.


text:
4

# Volume OT uie SUUUOIFinding the concentration of substance B in data set 1,2,and 3: To perform the "First Reaction" (for Data Set #1)- you measured out 10...

## Question

###### Volume OT uie SUUUOIFinding the concentration of substance B in data set 1,2,and 3: To perform the "First Reaction" (for Data Set #1)- you measured out 10.0 mL of stock A and mixed it with 10.0 mL of Stock B Calculate the concentration of B in Data Set #1.b To perform the Second Reaction for Data Set #2, you chose different volumes of A and B to mix Calculate the concentration of B in Data Set #2.To perform the Third Reaction for Data Set #3,you chose different volumes of A and B to mi

volume OT uie SUUUOI Finding the concentration of substance B in data set 1,2,and 3: To perform the "First Reaction" (for Data Set #1)- you measured out 10.0 mL of stock A and mixed it with 10.0 mL of Stock B Calculate the concentration of B in Data Set #1. b To perform the Second Reaction for Data Set #2, you chose different volumes of A and B to mix Calculate the concentration of B in Data Set #2. To perform the Third Reaction for Data Set #3,you chose different volumes of A and B to mix Calculate the concentration of B in Data Set #3.

#### Similar Solved Questions

##### IqUCOls â‚¬rly solutiou electrolyzed Ider Ulm pressut HSIE platinumelectrodes.Write the half-reactions expected tv occut; conditions On Ihe eleetrode uking potentinls into HCCQt Ihe elfect 0f the Hon-slandard Half-reaction ut anode:Half-reaction calhoce:(h) Whal the expected decomposition polential?Submit Answer
IqUCOls â‚¬rly solutiou electrolyzed Ider Ulm pressut HSIE platinum electrodes. Write the half-reactions expected tv occut; conditions On Ihe eleetrode uking potentinls into HCCQt Ihe elfect 0f the Hon-slandard Half-reaction ut anode: Half-reaction calhoce: (h) Whal the expected decomposition po...
##### Consider the fimction f(x,y) = 6y2 + 4x2 12xy 4y. Then:(1,2/3) is a critical point and f has a local minimum at (-1,2/3)None of these(1,1) is a critical point and f has a local maximum at (1,1)(-1,2/3) is a critical point and f has a saddle point at (-1,-2/3)
Consider the fimction f(x,y) = 6y2 + 4x2 12xy 4y. Then: (1,2/3) is a critical point and f has a local minimum at (-1,2/3) None of these (1,1) is a critical point and f has a local maximum at (1,1) (-1,2/3) is a critical point and f has a saddle point at (-1,-2/3)...
##### 1.hydrolysis of 1-chlorotoane in water is a very slow reaction. it can be speeded up by that addition of a small quantity of sodium iodide. the iodide is a true catalyst; it is neither consumed nor destroyed in the course of the reaction: Explain in detail how sodium iodide catalyzes this process CH3CHZCHZCI_ >CHBCHZCHZOH+H+Cl
1.hydrolysis of 1-chlorotoane in water is a very slow reaction. it can be speeded up by that addition of a small quantity of sodium iodide. the iodide is a true catalyst; it is neither consumed nor destroyed in the course of the reaction: Explain in detail how sodium iodide catalyzes this process CH...
##### 2' + 35 + 2 Evaluate the limit: lim I + 2
2' + 35 + 2 Evaluate the limit: lim I + 2...
##### What is electroconvulsive therapy? What is psychosurgery?
What is electroconvulsive therapy? What is psychosurgery?...
##### Fill in the blank: It is now generally thought that billions, or even trillions, of tailless comets surround the Solar System in a spherical shell nearly one light-year in radius called the ________.
Fill in the blank: It is now generally thought that billions, or even trillions, of tailless comets surround the Solar System in a spherical shell nearly one light-year in radius called the ________....
##### Solve the initial value problem:30y 18yy(-1) = 1 Y(-3) = 1.Give your answer aS yUse t as the independent variable:Answer:
Solve the initial value problem: 30y 18y y(-1) = 1 Y(-3) = 1. Give your answer aS y Use t as the independent variable: Answer:...
##### Sketch the graphs of the functions $f$ and $g,$ and find the area of the region enclosed by these graphs and the vertical lines $x=a$ and $x=b$.$$f(x)=x^{2}, g(x)= rac{1}{x^{2}} ; a=1, b=3$$
Sketch the graphs of the functions $f$ and $g,$ and find the area of the region enclosed by these graphs and the vertical lines $x=a$ and $x=b$. $$f(x)=x^{2}, g(x)=\frac{1}{x^{2}} ; a=1, b=3$$...
##### Chapter 2, SectionExercise 204Use StatKey other technology to find the regression line to predict Y from X using the following dataX 3 5 Y 15 456 3.5Click here to access StatKey.Round your answers to three decimal places:The regression equation is
Chapter 2, Section Exercise 204 Use StatKey other technology to find the regression line to predict Y from X using the following data X 3 5 Y 15 45 6 3.5 Click here to access StatKey. Round your answers to three decimal places: The regression equation is...
##### Let $f(x)-2 x-3$ and $g(x)=-x+3 .$ Find each function value. $$(f \circ g)(2)$$
Let $f(x)-2 x-3$ and $g(x)=-x+3 .$ Find each function value. $$(f \circ g)(2)$$...
##### Solve each equation by first clearing fractions or decimals.$$0.04 s+0.03(s+200)=27$$
Solve each equation by first clearing fractions or decimals. $$0.04 s+0.03(s+200)=27$$...
##### Math IFO3 Assignment Due on December 5 Question I: Recall that a function f is even if f(-x) f(z); and odd if f(-x) =-f(z)_ Using the chain rule, show that the derivative of an odd function is an even function. (b) Using first principles (and a change of variables) , show that the derivative of an even function is an odd function
Math IFO3 Assignment Due on December 5 Question I: Recall that a function f is even if f(-x) f(z); and odd if f(-x) =-f(z)_ Using the chain rule, show that the derivative of an odd function is an even function. (b) Using first principles (and a change of variables) , show that the derivative of an e...
##### MMhichiof Ithe following is a linear second order nonhomogenous PDE Kial u;=uxx+uxx"u2 IDlb uxxtu ut= sin U Dllc u,u +Ux"x2t=0 d: Ux"(uu=tug x ux-ux=tun"1
MMhichiof Ithe following is a linear second order nonhomogenous PDE Kial u;=uxx+uxx"u2 IDlb uxxtu ut= sin U Dllc u,u +Ux"x2t=0 d: Ux"(uu=tug x ux-ux=tun"1...
##### Let G be a group. Suppose xâˆˆG has (finite) order n. Let sâˆˆZ.Prove that x^s=e if and only if n divides s. (Prove it directlywithout citing related general theorems.)
Let G be a group. Suppose xâˆˆG has (finite) order n. Let sâˆˆZ. Prove that x^s=e if and only if n divides s. (Prove it directly without citing related general theorems.)...
##### Use the definition of a Taylor series to find the first four nonzero terms of the series for $f(x)$ centered at the given value of $a$ . $$f(x)=\sin x, \quad a=\pi / 6$$
Use the definition of a Taylor series to find the first four nonzero terms of the series for $f(x)$ centered at the given value of $a$ . $$f(x)=\sin x, \quad a=\pi / 6$$...
##### Use the Shell Method to answer the followingquestions. When finding the volume of the solid of rotation formedwhen the portion of y= kx-x^2 (for k > 0) found in thefirst-quadrant is rotated around the y -axisa) Describe the direction of the representativerectangle. How do you know it should be this way? Based on thisrectangle, will the integral use dx or dy b) How do you determine the functions rx ( or r(y))and h(x) (or h(y) ? What are those functions for thisproblem?C) Write the integral tha
Use the Shell Method to answer the following questions. When finding the volume of the solid of rotation formed when the portion of y= kx-x^2 (for k > 0) found in the first-quadrant is rotated around the y -axis a) Describe the direction of the representative rectangle. How do you know it should...


text:
# Question d17b5

Mar 11, 2017

The Reqd. both Co-effs. are ""_12C_4=495=_12C_8.

#### Explanation:

The General ${\left(r + 1\right)}^{t h}$ Term, ${T}_{r = 1}$ in the Expansion of

${\left(a + b\right)}^{n}$ is, T_(r+1)=""_nC_ra^(n-r)b^r, r=0,1,2,...,n.

Since, n=12, T_(r+1)=""_12C_ra^(12-r)b^r, r=0,1,2,...,12......(star).

To find the co-eff. of ${a}^{8} {b}^{4}$, we compare this with, $\left(\star\right) .$

We find that,12-r=8,r=4; i.e., r=4.

This means that ${a}^{8} {b}^{4}$ is ${T}_{r + 1} = {T}_{5}$ in ${\left(a + b\right)}^{12.}$

Hence, the co-eff. of ${a}^{8} {b}^{4}$ is ""_12C_4=(12!)/{(4!)(12-4)!}

=(12!)/{(4!)(8!)}={cancel(12)(11)(10)(9)cancel(8!)}/{(1)(2)cancel(3)cancel(4)cancel(8!)}=(11)(5)(9)=495.#

Similarly, we can find the co-eff. of ${a}^{4} {b}^{8} ,$ which is,

${\text{_12C_8=}}_{12} {C}_{4} = 495.$

The later follows from the fact that,

$\text{_nC_r""=""_nC_(n-r)} .$

Enjoy Maths.!


text:
# 3.5 Relations and Functions

Topics covered in this section are:

## 3.5.1 Find the Domain and Range of a Relation

As we go about our daily lives, we have many data items or quantities that are paired to our names. Our social security number, student ID number, email address, phone number and our birthday are matched to our name. There is a relationship between our name and each of those items.

When your professor gets her class roster, the names of all the students in the class are listed in one column and then the student ID number is likely to be in the next column. If we think of the correspondence as a set of ordered pairs, where the first element is a student name and the second element is that student’s ID number, we call this a relation.

(Student name, Student ID #)

The set of all the names of the students in the class is called the domain of the relation and the set of all student ID numbers paired with these students is the range of the relation.

There are many similar situations where one variable is paired or matched with another. The set of ordered pairs that records this matching is a relation.

### RELATION

relation is any set of ordered pairs, $(x, y)$. All the $x$-values in the ordered pairs together make up the domain. All the $y$-values in the ordered pairs together make up the range.

#### Example 1

For the relation $\{(1, 1), (2, 4), (3, 9), (4, 16), (5, 25)\}$:

• Find the domain of the relation.
• Find the range of the relation.
Solution
 $\{(1, 1), (2,4), (3, 9), (4, 16), (5, 25) \}$ The domain is the set of all $x$-values of the relation. $\{1, 2, 3, 4, 5\}$ The range is the set of all $y$-values of the relation. $\{1, 4, 9, 16, 25\}$

### MAPPING

mapping is sometimes used to show a relation. The arrows show the pairing of the elements of the domain with the elements of the range.

#### Example 2

Use the mapping of the relation shown to:

• list the ordered pairs of the relation
• find the domain of the relation
• find the range of the relation
Solution
• The arrow shows the matching of the person to their birthday. We create ordered pairs with the person’s name as the $x$-value and their birthday as the $y$-value.

{(Alison, April 25), (Penelope, May 23), (June, August 2), (Gregory, September 15), (Geoffrey, January 12), (Lauren, May 10), (Stephen, July 24), (Alice, February 3), (Liz, August 2), (Danny, July 24)}
• The domain is the set of all $x$-values of the relation.

{Alison, Penelope, June, Gregory, Geoffrey, Lauren, Stephen, Alice, Liz, Danny}
• The range is the set of all $y$-values of the relation.

{January 12, February 3, April 25, May 10, May 23, July 24, August 2, September 15}

A graph is yet another way that a relation can be represented. The set of ordered pairs of all the points plotted is the relation. The set of all $x$-coordinates is the domain of the relation and the set of all $y$-coordinates is the range. Generally we write the numbers in ascending order for both the domain and range.

#### Example 3

Use the graph of the relation to:

• list the ordered pairs of the relation
• find the domain of the relation
• find the range of the relation
Solution
• The ordered pairs of the relation are: $\{(1, 5), (-3, -1), (4, -2), (0, 3), (2, -2), (-3, 4)\}$.
• The domain is the set of all $x$-values of the relation: $\{-3, 0, 1, 2, 4\}$.
Notice that while $-3$ repeats, it is only listed once.
• The range is the set of all $y$-values of the relation: $\{-2, -1, 3, 4, 5\}$.
Notice that while $-2$ repeats, it is only listed once.

## 3.5.2 Determine if a Relation is a Function

A special type of relation, called a function, occurs extensively in mathematics. A function is a relation that assigns to each element in its domain exactly one element in the range. For each ordered pair in the relation, each $x$-value is matched with only one $y$-value.

### FUNCTION

function is a relation that assigns to each element in its domain exactly one element in the range.

The birthday example from Example 2 helps us understand this definition. Every person has a birthday but no one has two birthdays. It is okay for two people to share a birthday. It is okay that Danny and Stephen share July 24th as their birthday and that June and Liz share August 2nd. Since each person has exactly one birthday, the relation in Example 2 is a function.

The relation shown by the graph in Example 3 includes the ordered pairs $(-3, -1)$ and $(-3, 4)$. Is that okay in a function? No, as this is like one person have two different birthdays.

#### Example 4

Use the set of ordered pairs to (i) determine whether the relation is a function (ii) find the domain of the relation (iii) find the range of the relation.

• $\{(−3, 27), (−2, 8), (−1, 1), (0, 0), (1, 1), (2, 8), (3, 27)\}$
• $\{(9, −3), (4, −2), (1, −1), (0, 0), (1, 1), (4, 2), (9, 3)\}$
Solution
• $\{(−3, 27), (−2, 8), (−1, 1), (0, 0), (1, 1), (2, 8), (3, 27)\}$
(i) Each $x$-value is matched with only one $y$-value. So this relation is a function.
(ii) The domain is the set of all $x$-values in the relation. The domain is: $\{−3, −2, −1, 0, 1, 2, 3\}$.
(iii) The range is the set of all $y$-values in the relation. Notice we do not list range values twice. The range is $\{27, 8, 1, 0\}$.
• $\{(9, −3), (4, −2), (1, −1), (0, 0), (1, 1), (4, 2), (9, 3)\}$
(i) The $x$-value $9$ is matched with two $y$-values, both $3$ and $−3$. So this relation is not a function.
(ii) The domain is the set of all $x$-values in the relation. Notice we do not list domain values twice. The domain is: $\{0, 1, 2, 4, 9\}$.
(iii) The range is the set of all $y$-values in the relation. The range is: $\{−3, −2, −1, 0, 1, 2, 3\}$.

#### Example 5

Use the mapping to:

• determine whether the relation is a function
• find the domain of the relation
• find the range of the relation
Solution
• Both Lydia and Marty have two phone numbers. So each $x$-value is not matched with only one $y$-value. So this relation is not a function.
• The domain is the set of all $x$-values in the relation. The domain is: {Lydia, Eugene, Janet, Rick, Marty}
• The range is the set of all $y$-values in the relation. The range is: $\{321-549-3327, 427-658-2314, 321-964-7324, 684-358-7961,6 84-369-7231, 798-367-8541\}$.

In algebra, more often than not, functions will be represented by an equation. It is easiest to see if the equation is a function when it is solved for $y$. If each value of $x$ results in only one value of $y$, then the equation defines a function.

#### Example 6

Determine whether each equation is a function. Assume $x$ is the independent variable.

• $2x+y=7$
• $y=x^{2}+1$
• $x+y^2=3$
Solution
• $2x+y=7$
For each value of $x$, we multiply by $-2$ and then add $7$ to get the $y$-value.

We have that when $x=3$, then $y=1$. It would work similarly for any value of $x$. Since each value of $x$, corresponds to only one value of $y$ the equation defines a function.

• $y=x^{2}+1$
For each value of $x$, we square it and then add $1$ to get the $y$-value.

We have that when $x=2$, then $y=5$. It would work similarly for any value of $x$. Since each value of $x$, corresponds to only one value of y the equation defines a function.

• $x+y^{2}=3$

We have shown that when $x=2$, then $y=1$ and $y=−1$. It would work similarly for any value of $x$. Since each value of $x$ does not corresponds to only one value of $y$ the equation does not define a function.

## 3.5.3 Find the Value of a Function

It is very convenient to name a function and most often we name it $f, g, h, F, G$, or $H$. In any function, for each $x$-value from the domain we get a corresponding $y$-value in the range. For the function $f$, we write this range value $y$ as $f(x)$. This is called function notation and is read $f$ of $x$ or the value of $f$ at $x$. In this case the parentheses does not indicate multiplication.

### FUNCTION NOTATION

For the function $y=f(x)$
$\ \ \ \ \ \ \ \ \ \ f$ is the name of the function
$\ \ \ \ \ \ \ \ \ \ x$ is the domain value
$\ \ \ \ \ \ \ \ \ \ f(x)$ is the range value $y$ corresponding to the value $x$
We read $f(x)$ as $f$ of $x$ or the value of $f$ at $x$.

We call $x$ the independent variable as it can be any value in the domain. We call $y$ the dependent variable as its value depends on $x$.

### INDEPENDENT AND DEPENDENT VARIABLES

For the function $y=f(x)$,
$\ \ \ \ \ x$ is the independent variable as it can be any value in the domain
$\ \ \ \ \ y$ is the dependent variable as its value depends on $x$

Much as when you first encountered the variable $x$, function notation may be rather unsettling. It seems strange because it is new. You will feel more comfortable with the notation as you use it.

Let’s look at the equation $y=4x−5$. To find the value of $y$ when $x=2$, we know to substitute $x=2$ into the equation and then simplify.

The value of the function at $x=2$ is $3$.

We do the same thing using function notation, the equation $y=4x−5$ can be written as $f(x)=4x−5$. To find the value when $x=2$, we write:

The value of the function at $x=2$ is $3$.

This process of finding the value of $f(x)$ for a given value of $x$ is called evaluating the function.

#### Example 7

For the function $f(x)=2x^{2}+3x-1$, evaluate the function.

• $f(3)$
• $f(-2)$
• $f(a)$
Solution

Part 1

Part 2

Part 3

In the last example, we found $f(x$) for a constant value of $x$. In the next example, we are asked to find $g(x)$ with values of $x$ that are variables. We still follow the same procedure and substitute the variables in for the $x$.

#### Example 8

For the function $g(x)=3x-5$, evaluate the function.

• $g(h^{2})$
• $g(x+2)$
• $g(x)+g(2)$
Solution

Part 1

Part 2

Part 3

Notice the difference between part 2 and part 3. We get $g(x+2)=3x+1$ and $g(x)+g(2)=3x-4$. So we see that $g(x+2)≠g(x)+g(2)$.

Many everyday situations can be modeled using functions.

#### Example 9

The number of unread emails in Sylvia’s account is $75$. This number grows by $10$ unread emails a day. The function $N(t)=75+10t$ represents the relation between the number of emails, $N$, and the time, $t$, measured in days.

• Determine the independent and dependent variable.
• Find $N(5)$. Explain what this result means.
Solution
• The number of unread emails is a function of the number of days. The number of unread emails, $N$, depends on the number of days, $t$. Therefore, the variable $N$, is the dependent variable and the variable $t$ is the independent variable.
• Find $N(5)$. Explain what this result means.

Since $5$ is the number of days, $N(5)$, is the number of unread emails after $5$ days. After $5$ days, there are $125$ unread emails in the account.


text:
# Which $N$ are multiples of $2020$ with all distinct digits where swapping any two of them makes $N$ not a multiple of $2020$?

## The question

I have attempted problem 3 from the Senior O-level Tournament of Towns paper, Fall 2020. The question is as follows:

A positive integer number N is divisible by 2020. All its digits are different and if any two of them are swapped, the resulting number is not divisible by 2020. How many digits can such a number N have?

Sergey Tokarev

## My attempt

Let $$n$$ be the number of digits of $$N$$. I initially noticed that $$4 \leq n \leq 10$$, since for all digits of $$N$$ to be distinct we can have at most $$10$$ digits. This gave me the impression that this problem could be solved by investigating each of these cases.

Let us first write $$N$$ as $$2020k = 2000k + 20k$$. Let $$2k$$ have digits $$d_1d_2\cdots d_m$$, then $$N = (d_1d_2\cdots d_m)000 + (d_1d_2\cdots d_m)0$$.

Case n = 4: Then $$2k = d_1$$ and $$N = d_1000 + d_10 = d_10d_10$$, so $$N$$ must have a repeating digit.

Case n = 5: Then $$2k = d_1d_2$$ and $$N =d_1d_1000 + d_1d_20 = d_1d_2d_1d_20$$, so $$N$$ must have a repeating digit.

Case n = 6: Then $$2k = d_1d_2d_3$$ and $$N = d_1d_2d_3000 + d_1d_2d_30 = d_1d_2(d_3 + d_1)d_2d_30$$, so $$N$$ must have a repeating digit.

This argument no longer works for $$n \geq 7$$. But we do know that

1. $$d_m \in \{0, 2, 4, 6, 8\}$$ since $$2k = d_1d_2\cdots d_m$$, and
2. $$N$$ must end in $$0$$.

I used this to find numbers for $$n = 7, 8, 9$$ and $$10$$ with all distinct digits that are also divisible by $$2020$$ because they satisfy the observations listed above.

$$\begin{array}{|c|c|c|c|} \hline n & 7 & 8 & 9 & 10\ \\ \hline N & 4981320 & 64975320 & 869753420 & 2537618940 \\ \hline \end{array}$$

Claim: If $$N$$ is a multiple of $$2020$$ and has all distinct digits, then swapping any two digits results in a number $$N'$$ where $$2020 \not \mid N'$$.

proof. Let $$N = a_na_{n-1}\cdots a_j\cdots a_i\cdots a_1$$ and $$N' = a_na_{n-1}\cdots a_i\cdots a_j\cdots a_1$$ for any $$i < j$$. If $$2020 \mid (N' - N)$$ then $$2020 \mid N'$$. Suppose, WLOG, that $$a_i > a_j$$ so that $$N' > N$$, then $$N' - N = 10^{j - 1}(a_i - a_j) - 10^{i - 1}(a_i - a_j) = (a_i - a_j)(10^{j - 1} - 10^{i - 1})$$

So $$N' - N$$ must be a multiple of $$10$$. Therefore, for the claim to hold, $$N'$$ must not be a multiple of $$4$$ or $$101$$, since $$2020 = 2^2 \times 5 \times 101$$. We know that $$1 \leq a_i - a_j \leq 9$$, thus we can safely conclude that $$N' - N$$ is never a multiple of $$101$$. Therefore, $$2020 \not \mid (N' - N)$$.

Therefore, $$N$$ can have $$7, 8, 9$$ or $$10$$ digits and we are done.

I think my solution is correct, but I don't like that I had to manually find $$N$$'s for $$7 \leq n \leq 10$$. Is there a different way to argue for those cases or a more systematic way to find $$N$$'s for those cases? Or if you have a different way to solve the problem, I would also like to see it.

• Note that $3981420$ is still a multiple of 2020, so your claim isn't true. Where it fails is that $10^4 - 10^0 = 9999$ is a multiple of 101, contradicting "$N' - N$ is never a multiple of 101". – Calvin Lin Mar 4 at 23:52
• Your argument for $n=6$ doesn't write hold. $d_2$ need not be a repeating digit if $d_3 + d_1 \geq 10$. EG $2020\times 377 = 761540$ has distinct digits. – Calvin Lin Mar 5 at 0:06

The error in your logic is that $$N' - N = (a_i - a_j) (10^{i-1} ) ( 10^{j-i } - 1 )$$ could be a multiple of 101 when $$j-i = 4, 8$$.

This yields a multiple of 2020 if $$(a_i - a_j) (10^{i-1} )$$ is a multiple of 20.

If the number has 7 or more digits, then swapping the 1st and 5th digit yields a difference of $$(a_n - a_{n-4}) \times 9999 \times 10^{n-5}$$, which is a multiple of 2020.

Hence there are no solutions with 7 or more digits.

Your arguments for $$n = 4, 5$$ are correct.
However, it fails for $$n=6$$ in the event that $$d_3 + d_1 \geq 10$$, as the carry over makes the second digit $$d_2 + 1$$, so it need not be a repeated digit with the other $$d_2$$. (It could still repeat with another digit though).
As an explicit example, $$2020 \times 377 = 761540$$ has distinct digits. I found it through trial and error.

If remains to find an example for $$n=6$$. If no such example can be found, then the answer to the question is "no digits" (which seems unlikely as an answer).

Suppose $$N = a_6a_5a_4a_3a_2a_1$$. Then, to ensure that the swap doesn't yield a difference that is a multiple of 2020,

• In order to be a multiple of 101, we just need to concern ourselves with terms that are 4 apart.
• We then need to check that $$(a_6 - a_2)10$$ and $$(a_5 - a_1)$$ are not multiples of 20.

These are satisfied by $$761540$$, so it is a valid example.

Hence the number must have 6 digits.

To find the counterexample without excessive trial and error, since (using OP's notation) $$\overline{d_1d_2d_3} \times 1010 = \overline{d_1d_2(d_3+d_1)d_2d_30}$$, then the conditions that we need are (I might have missed some):

• $$0, d_1, d_2, d_3$$ are distinct digits
• $$d_3$$ is a multiple of 2
• $$d_1 - d_3$$ is not a multiple of 2.
• $$d_2$$ is not a multiple of 20.
• $$d_1 + d_3 \geq 11$$ (cannot be 10 which leaves the digit of 0)
• $$d_2 + 1 \neq d_1, d_3, 10$$
• $$d_1 + d_3 - 10 \neq d_2$$

These are satisfied by $$754 = 377 \times 2$$, which is why the example works. Smaller values include $$348$$, which yields $$351480$$.


text:
# Conical Pendulum with varying string length

Consider a conical pendulum like that shown in the figure. A ball of mass, m, attached to a string of length, L, is rotating in a circle of radius, r, with angular velocity, ω. The faster we spin the ball (i.e., the greater the ω), the greater the angle, θ, will be, and thus, the smaller the height, h will be.

But now imagine that instead of suspending the ball from a string, we use something like a rubber band that can stretch. Then the faster and faster we spin the ball, the more the rubber band stretches. So we expect L will increase, θ will increase, and h will decrease.

Now let's take a set of different rubber bands. The original lengths of all the rubber bands, with the mass, m, suspended from them vertically, are all identical. However, with a given amount of force, each rubber band stretches a different amount. In other words, say we can model a rubber band as if it were a spring. Then different rubber bands have different spring constants. But remember that they all have the same length, L, when the mass, m, is suspended vertically, before anything starts to spin.

So why is it that regardless of which rubber band you use, as long as you keep ω the same, h remains the same? I mean I worked out the equations and found this to be true. However, I found it to be an unexpected result. Can anybody give me some intuitive insight as to why this should be so?

By the way, this is totally independent of exactly what the nature of the force is that the rubber band exerts, as long as the force is a function of the amount the rubber band stretches.

So why is it that regardless of which rubber band you use, as long as you keep ω the same, h remains the same? I mean I worked out the equations and found this to be true. However, I found it to be an unexpected result. Can anybody give me some intuitive insight as to why this should be so?
Consider the constraints for steady state at different r:
- the vertical component of T is constant
- the horizontal component of T is proportional to r
This is exactly what you get, if h is held constant.

vanhees71
There are a lot of unexpected things. For example, imagine that you have a ring in the vertical plane. Take any point A on the ring and connect this point with the lowest point O by a thin smooth pipe OA. Put a small ball into the pipe at the end A. The ball will roll down to the point O inside the pipe . The time of rolling down does not depend on which point A on the ring you take.

#### Attachments

• Screenshot from 2020-12-12 13-20-23.png
3.4 KB · Views: 66
Gold Member
Can anybody give me some intuitive insight as to why this should be so?
I always try to find an Energy Based argument for this sort of question. In the steady state, energy stored due to the modulus of the elastic is not relevant and you can replace it with a string.
The gravitational Potential Energy will be mg(L-h) and the Kinetic Energy will be L m sin(θ)ω2/2.

I equated the two and expressed it all in terms of L,θ and ω and ended up with:
2 = 2gL(1-cosθ)/cosθ and the L cancels out on either side and the angle is just a function of the angular velocity.

I think that's ok but the usual caveats apply with my algebra.

Alternatively, you can replace a conical pendulum with two superimposed plane pendulums in phase quadrature and in orthogonal planes. The Energy of each individual pendulum will be exchanging KE and PE during their cycles and the sums of the KEs and PEs will be constant.


text:
Browse Questions

(a) $N_2$

(b) $SO_2$

(c) $H_2$

(d) $O_2$

Toolbox:
• A gas which is easy to liquify, is most readily adsorbed.

Answer: $SO_2$

A gas which is easy to liquify, is most readily adsorbed. Thus, out of the given four choices $SO_2$ will be most readily adsorbed.


text:
how to find boundary points in statistics

# how to find boundary points in statistics

Class Boundaries Because of rounding, the stated class limits do not correspond to the actual ranges of data falling in them. A Bayesian formulation, based on this prior knowledge and the edge information of the input image, is employed to find the object boundary with its subset points in correspondence with boundaries in the training set or the mean boundary.

Learners who do not pass all the required units shown in the structure will not achieve the qualification. Then any closed subset of $$X$$ is the disjoint union of its interior and its boundary, in the sense that it contains these sets, they are disjoint, and it is their union. When you think of the word boundary, what comes to mind? The set of all boundary points of a set A is called the boundary of A or the frontier of A. The first derivative of f(x) = x2 + 2 = x2, and (plugging in the boundary values): How is it done for an open-ended interval, such as <50? Statistics: Grouped Frequency Distributions. With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. The frequency f of each class is just the number of data points it has. We find the boundaries of the outer fence in the same fashion as before: 71.5 + 4.5 = 76; 70 - 4.5 = 65.5; The boundaries of our outer fence are 65.5 and 76. Powers, D. Boundary Value Problems: And Partial Differential Equations. In is common, if not standard, to interpret the results of statistical hypothesis tests using a p-value. For simply visualizing the decision boundary and decision regions, it is often satisfactory to brute-force test your whole domain of interest. In may seem counter-intuitive, but instead of using an overlay function to do point-in-polygon analysis, use a proximity function. The reason for such changes is rarely recorded and can lead to disputes, especially if the owner has lost the right to move the boundary line back to its original position. You need to know the class limits for your data in order to calculate the midpoint. There should be between 5 and 20 classes. ), you are looking at just a few numbers that give you a picture of what’s going on in the big list. 1 month ago 1 month ago [email protected] As a result, one should be careful when â¦ Think of them as mathematical shorthand. Lower and upper fence calculator For lower and upper fence calculation, please enter numerical data separated with comma (or space, tab, semicolon, or newline). Global shape parameters derived from the statistical variation of object boundary points in a training set are used to model the object. An example output is here (blue lines are roughly what I need): The test statistic is based on sample point to event distances. Guidelines for classes. Often, outliers in a data set can alert statisticians to experimental abnormalities or errors in the measurements taken, which may cause them to omit the outliers from the data set. You might see the class mark defined as the average of theclass boundariesas well. Statistics: Frequency Distributions & Graphs.
In this section weâll define boundary conditions (as opposed to initial conditions which we should already be familiar with at this point) and the boundary value problem. Outliers make statistical analyses difficult. Dear Student, Subsequent class)/2 = (19 + 20)/2 = 19.5 Upper class boundary = (upper class limit of the concerned class + lower class limit of the. • Let $$X$$ be a topological space. NCERT Solutions; Board Paper Solutions; Ask & Answer; School Talk; Login; GET APP; Login Create Account. To find the lower, you subtract 0.5 and to find the upper, you add 0.5. If $0 < \beta \le 1$, $\beta$ is a boundary point that is not simple. (2006). Youâ¦ The function f(x) = x2 + 2 satisfies the differential equation and the given boundary values. The lower class boundary is found by subtracting 0.5 units from the lower class limit and the upper class boundary is found by adding 0.5 units to the upper class limit. k = boundary(x,y) returns a vector of point indices representing a single conforming 2-D boundary around the points (x,y). Generate a sample data set containing 20% outliers. Share 1. In ArcGIS, the proximity tools (such as Near and Generate Near Table) have a unique (but not unexpected) behavior: when two or more nearby features are equal-distant from the target feature, one of the nearby features is chosen at random. I find that when you have this in-depth knowledge, itâs best to use the more straightforward, visual methods. Your first 30 minutes with a Chegg tutor is free! counts of households, proportion of males:females etc. It has O(nh) time complexity, where n is the number of points in the set, and h is the number of points in the hull. Really appreciate it. Class Width Calculator Histogram Generator. Otherwise, keep at least two significant digits after the decimal point until the very end. In statistics, an outlier is a data point that significantly differs from the other data points in a sample. or >131? Instead of looking a big list of numbers (way too unwieldy! 753-787 and 829-833, 1992. Here is a simple online outlier calculator which is used to find lower and upper class boundaries from the given set of numbers with ease. Definitions Raw Data Data collected in original form. Tally up the number of values in the data set that fall into each group (in other words, make a frequency table). the dataset has a smallest and largest value.Class boundary is the midpoint of the upper class limit of one class and the lower class limit of the subsequent class.Each class thus has an upper and a lower class boundary. • The boundary of a closed set is nowhere dense in a topological space. Example question: Find a function that satisfies the equation f′(x) = 2x for any x-values between 0 and 1. Finding boundary points. Other statistics, like range and standard deviation, tell us something about the spread of the data values. Then tried to use the boundary function again to get the inner boundary. Example question: Find a function that satisfies the equation f′(x) = 2x for any x-values between 0 and 1.The function has a boundary value of 3 when x = 1. The Practically Cheating Calculus Handbook, The Practically Cheating Statistics Handbook. Do this by finding the area to the left of the number, and multiplying the answer by 100. hi all I am new to OpenFOAM programming and I want to get the distance between a specific point on the wall and the boundary-line of the wall.Related operations should be conducted in nutUspalding Wall Function file. To achieve this, it is obviously that (1) I should get the point coordinate (x,y,z) and in .C file (2) get the 3D coordinate of the boundary-line. The global statistics provide a big picture estimate of number of lanes that missed detection. Delete a Point - remove a point from the chart and from control limit calculations Recalculate UCL/LCL - recalculate control limits after adding new data There are also options to easily re-run stability analysis after changing data or control limit calculations. The Spatial selection method is “touch the boundary of … You can also use the normal distribution calculator to find the percentile rank of a number. The points (x(k),y(k)) form the boundary. A boundary can change over time for many reasons, like a re-planting or positioning of a hedgerow or a fence that moves slightly every time it is replaced. Your email address will not be published. To find the inner and outer fences of a set of data, we first need a few other descriptive statistics. If a data point falls on the boundary, make a decision as to which group to put it into, making sure you stay consistent (always pâ¦ The limiting points of each class are called the lower class limit and the upper class limit, and the class width is the distance â¦ Point layers are summarized using only points located within the boundary layer. Don’t let basic math and statistical formulas get in your way. If the index is 525.5, we need to find the numbers in the 525th spot and the 526th spot, and average them together. When a point falls on a polygon boundaryâ¦ Is it as simple as plotting a line from (0,0) to the point (w1,w2) (since W is the weight "vector") if so, how do I extend this like in both directions if I need to? I need to find the inner and outer boundary of the points. One is the point on the x-axis where the graph balances, taking the actual values of the data into account.This point is called the average, and you can find it by locating the balancing point (imagine the data are on a teeter-totter). A frequency distribution is a table that includes intervals of data points, called classes, and the total number of entries in each class. In some cases, you must use alternatives, such as critical values. In statistics the class boundaries are numbers that separate classes without forming gaps. Global shape parameters derived from the statistical variation of object boundary points in a training set are used to model the object. Example question: Find a function that satisfies the equation fâ²(x) = 2x for any x-values between 0 and 1.The function has a boundary value of 3 when x = 1. Unlike the convex hull, the boundary can shrink towards the interior of the hull to envelop the points. Academic Press. Add together the points â¦ Interior, closure, isolated points and boundary of a set of a normed vector space 1 For a finite set in $\mathbb{R}$, the interior is empty and the closure and boundary â¦ The set of all boundary points of a set $$A$$ is called the boundary of $$A$$ or the frontier of $$A$$. Since every point of the entire space is an interior point, there can be no boundary points. It is denoted by F r ( A). the dataset has a smallest and largest value.Class boundary is the midpoint of the upper class limit of one class and the lower class limit of the subsequent class.Each class thus has an upper and a lower class boundary. The frequency of an element in a set refers to how many of that element there are in the set. Given a set of N-dimensional point D (each point is represented by an N-dimensional coordinate), are there any ways to find a boundary surface that enclose these points? Quartiles are used to summarize a group of numbers. Simple Example of a Boundary Value Problem. Therefore, we start with the y-axis, finding 0.6, and then move along the x-axis until we find 0.07, before finally reading off the appropriate number; in this case, 0.2514. One way calculate the midpoint is to remember that this midpoint is half of the distance between points. Consequently, Iâll often use boxplots, histograms, and good old-fashioned data sorting! I want to measure distance between one point to other more than ten points, what i mean is like i have ten markers on one line and i want to compute distance from the ist marker with other 9 markers. One can expect 2/3 of all data points to be within 1 SD of the mean and ~95% to be within 2 SD. The average of the class limits is (180 + 199) / 2 = 189.5. The lower class boundary is found by subtracting 0.5 units from the lower class limit and the upper class boundary is found by adding 0.5 units to the upper class limit. SVC aims to maximise the gap between the two classes, and we end up with a gap as shown below (red area) and a decision boundary as shown in blue. The starting point plus the number of classes times the class width must be greater than the maximum value. The Population field was used to calculate the statistics (Sum, Minimum, Maximum, Average, and Std Deviation) for the layer. We will begin by calculating quartiles. Published by Zach. Well, if you consider all of the land in Georgia as the points belonging to the set called Georgia, then the boundary points of that set are exactly those points on the state lines, where Georgia transitions to Alabama or to South Carolina or Florida, etc. Example problem: Find the midpoint for class limits of 180 & 199. The test statistic follows a normal distribution with mean 1 and variance 1/n. One way calculate the midpoint is to remember that this midpoint is half of the distance between points. Remember that an outlier is an extremely high, or extremely low value. At a glance, data points that are potential outliers will pop out under your knowledgeable gaze. Calculates the nearest neighbor test statistic for a spatial point process based on that proposed by Pielou (1959). What is Class Boundary?When we have different classes of data, there is always an upper and a lower class limit for it i.e. These problems are similar to initial value problems, which have conditions specified for the lowest end of the domain (the “initial” values). It is equal to sum from i=1 to n of [ (pi*lambda* (x_i)^2)/ (n)], where x_i is equal to the point-to-event distance, lambda is equal to the intensity of the point process, and n is equal to the number of sample point-to-event distances. previous class)/2 = (10 + 9)/2 = 9.5 . Some statistics only tell us about the center of the data, or a typical value. Additional Resources. â¦ Lund: Studentlitteratur, 1996. Graham scan â O(n log n): Slightly more sophisticated, but much more efficient algorithm. I am trying to test for a normal distribution, but I'm stuck at trying to find a midpoint for all each class! Intuiâ¦ Maybe the clearest real-world examples are the state lines as you cross from one state to the next. = 2x for any x-values between 0 and 1 considered major outliers a training set are to. Is defined as a running total of frequencies decision regions, it is known counter-intuitive... Extremely low value found all the data, or extremely low value get the inner.... In your data the hull to envelop the points ( x ) = 12 = 1 more straightforward visual... At a glance, data points to be within 1 SD of class! State lines as you cross from one state to the next calculate zone dataset, based on proposed! When you think of the loss of neighbors in analyses that depend on values. Set of all data points on the values of the neighbors shown the... 30 minutes with a Chegg tutor is free it contains its boundary tutor is!. Stated class limits do not correspond to the actual ranges of data falling them! Old-Fashioned data sorting training set are used to model the object, to interpret the results of statistical hypothesis using!, its derivatives, or a typical value raster and then calculate the statistics in... Of each class is just the number of groups of equal length the spread of the to. Piecewise distribution with Pareto tails to the next ( Districts ) is often to! Of 180 & 199 domain of interest word boundary, subtracted them the. And table below explain the statistical variation of object boundary points between segments in training. More efficient algorithm on a graph object by using the object function boundary the Select by Location tool in. In some cases, you must use alternatives, such as < 50 class ) /2 = 9.5 more. + 199 ) / 2 = 189.5 shooting method is that it takes advantage of the space... Objects with a Chegg tutor is free both how to find boundary points in statistics and closed satisfies Differential... Make a frequency distribution table that this midpoint is to remember that midpoint... That belong to 2 or more points, lines, areas ) which make up these census geographies available. $0 < \beta \le 1$, $\beta$ is a statistic function calculate.: the Art of Scientific Computing, 2nd ed of groups of equal length, first! Not standard, to interpret the results of statistical hypothesis tests using a p-value Differential... Regions, it is denoted by f r ( a ) ( end ) data! Layer within a hypothetical boundary dense in a sample data set containing 20 % outliers boundary... The center of a do this by finding the area to the of! Derived from the data, or extremely low value as you cross from one state the... Digitised boundary datasets statistic follows a normal distribution with Pareto tails to the next coordinate points on values. Hull to envelop the points and outer fences of a f of each class is the. Calculus Handbook, the stated class limits, see the class Boundaries because the. The Select by Location tool found in the initial guess structure solinit > Learners who do not all... Distribution with mean 1 and variance 1/n where the boundary points of class Share! Frequency is defined as the average of the loss how to find boundary points in statistics neighbors in analyses that on. The areal representation 'buckets ' against which various census statistics e.g step-by-step Solutions to your questions from an in! Cheating statistics Handbook do not correspond to the generated data, areas ) make! In some cases, you can get step-by-step Solutions to your questions from an in! Way to solve this Johnson, C. Computational Differential Equations s horizontal axis x  x $... Decision boundary and decision regions, it is denoted by f r ( a \right )$ x...


text:
Mathematics 25 Online
OpenStudy (anonymous):

I can't figure out how to set up this problem...can anyone help me? A thief steals a number of rare plants from a nursery. On the way out, the thief meets 3 security guards, one after another. To each security guard, the thief is forced to give one-half the plants that he still has, plus 2 more. Finally, the thief leaves the nursery with 1 lone palm. How many plants were originally stolen?

OpenStudy (anonymous):

OK N = the number of original plants. Let w,x,y,z equal the thief and security guard number of plants in each's possession. The theif has 1 plant so w=1. Now our equation is: 1+ x +y + z = N Let's do the # of plants that the first guard, x, gets: 'To each security guard, the thief is forced to give one-half the plants that he still has, plus 2 more. ' So I read this as... x = N/2 + 2 Now our equation is 1 + (N/2+2) + y + z = N Create a second equation for y...(it get's uglier)... $y=\Bigg [ \frac {N-\big ( \frac {N} {2} + 2 \big )} {2} + 2\Bigg ]$

OpenStudy (anonymous):

$z= \bigg (\frac {N-y} {2}+2\bigg )$

OpenStudy (anonymous):

How did it go? Did you get it. Looks ugly doesn't it. BTW I worked backwards to check the answer N=36.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Tbone: Edits ^-^
14 minutes ago 5 Replies 3 Medals
rose12345: look
5 hours ago 11 Replies 3 Medals
jessii: What are the pros and cons of being a flight attendant?
3 hours ago 4 Replies 1 Medal
SamRoman: What do y'all think of my Cover photo for my next YouTube video?
1 minute ago 12 Replies 1 Medal
lovelygirl13: i made a collage of the color green
3 hours ago 4 Replies 1 Medal
chrishale13840: would this be a good tattoo
9 hours ago 18 Replies 5 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!


text:
An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

# Lennard-Jones Fluid Reference Calculations: Non-cuboid Cell

## Share

In this section, we provide sample configurations of Lennard-Jones atoms in non-cuboid cells and report the internal energy and pair virial for those configurations. These sample configurations and reference calculations can be used to validate the energy and force routines for an existing or new molecular simulation code.

## 1. Sample Configurations of Lennard-Jones Atoms

Four sample configurations of Lennard-Jones atoms are available for download as a gzipped tarball archive. This archive contains five files: the four sample configuration files and one metadata file that explains the format of the sample configurations. These configurations should be converted to the configuration file format native to a user's simulation software. Two of the configurations are triclinic, i.e. none of the lattice angles α,β,γ are 90°, and two configurations are monoclinic, i.e., α=γ=90° and β \= 90°. The lattice angles are given in the header of each sample configuration as described in the metadata file; the user can use the cell side lengths and lattice angles to generate either a lattice matrix or the "tilt" factors often used molecular simulation.

## 2. Periodic Boundary Conditions in Non-cuboid Cells

Application of periodic boundary conditions (minimum image convention) for non-cuboid simulation cells differs from that used for cuboid simulation cells. For description of the technique, consult the classic tutorial by W.R. Smith [1] or documentation of the LAMMPS molecular dynamics software [2].

## 3. Reference Calculations for the Internal Energy and Pair Virial

The following table contains calculations of the pair internal energy (Upair), the instantaneous pair virial (Wpair), and the appropriate tail correction to the internal energy (ULRC) for the four sample configurations in Section 1, where periodic boundary conditions [3,4] (also known as the minimum-image convention) were applied to all three Cartesian directions. The definition of these energetic terms are given below in Section 3. The reference calculations are for three truncation schemes: (1) potential truncation at a cutoff radius (rc) of 3σ (σ is the Lennard-Jones diameter), with long-range corrections (LRC), (2) potential truncation at rc=4σ, with long-range corrections, and (3) potential truncation at rc=3σ, with the linear-force shift applied at the cutoff radius (LFS). All sample energies and distances are given in appropriate Lennard-Jones reduced units, denoted by the superscript "*".

 LRC, rc*=3.0 LRC, rc*=4.0 LFS, rc*=3.0 Configuration Cell Upair* Wpair* ULRC* Upair* Wpair* ULRC* Upair* Wpair* ULRC* 1 Triclinic -4.23138E+02 1.8088E+04 -8.1589E+01 -4.7011E+02 1.7806E+04 -3.4433E+01 -2.2534E+02 1.8454E+04 0.0000E0 2 Monoclinic -2.1435E+02 4.3744E+01 -1.1892E+01 -2.2132E+02 1.9153E+00 -5.0188E+00 -1.8556E+02 9.7173E+01 0.0000E0 3 Triclinic -5.0579E+02 5.5753E+02 -2.9372E+01 -5.2276E+02 4.5575E+02 -1.2396E+01 -4.3502E+02 6.8970E+02 0.0000E0 4 Monoclinic -3.7943E+01 6.8656E+00 -2.0724E+00 -3.9126E+01 -2.2966E-01 -8.7464E-01 -3.3033E+01 1.5862E+01 0.0000E0

## 4. Definitions

For the reference calculations given here, the following definitions are relevant:

A. The traditional Lennard-Jones Potential is given by:

$$\Large V_{LJ}\left(r\right)=4\epsilon\left[\left(\dfrac{\sigma}{r}\right)^{12}-\left(\dfrac{\sigma}{r}\right)^6\right]$$

B. When the "Long-Range Correction" (LRC) is applied to the tail of the Lennard-Jones Potential, the actual potential in a molecular simulation is given by:

$$\Large V\left(r\right) = \begin{cases} V_{LJ} \left( r \right) & r \leq r_c \\ 0 & r > r_c \end{cases}$$

C. When the "Linear-Force Shift" is applied to the tail of the Lennard-Jones Potential, the actual potential in a molecular simulation is given by:

$$\Large V\left( r \right) = \begin{cases} V_{LJ} \left( r \right) - V_{LJ} \left(r_c\right) - \left. \dfrac{\partial V_{LJ}}{\partial r}\right|_{r_c} \left(r-r_c\right) & r \leq r_c \\ 0 & r > r_c \end{cases}$$

D. The pair internal energy is given by the following equation, where V(r) is the simulated pair potential:

$$\Large U_{pair} = \sum_{i=1}^{N-1} \sum_{j=i+1}^N V\left(r_{ij}\right)$$

E. The Long-Range correction to the Lennard-Jones potential, per particle, is given by [3,4]:

$$\Large U_{LRC} = \dfrac{1}{2} 4 \pi \rho \int _{r_c} ^{\infty} dr~r^2~V_{LJ} \left( r \right)$$

F. The instantaneous pair virial is given by:

$$\Large W_{pair} = -\sum_{i=1}^{N-1} \sum_{j=i+1}^N r_{ij} \left.\dfrac{\partial V}{\partial r}\right|_{r_{ij}}$$

References

1. W. R. Smith, "The Minimum Image Convention in Non-Cubic MD Cells," (1989).
2. LAMMPS Documentation, Section 8.2.2. "Triclinic (non-orthogonal) simulation boxes." Accessed October 29, 2021.
3. M. P. Allen and D. J. Tildesley, Computer Simulation of Liquids (Oxford University Press, New York, 1989).
4. D. Frenkel and B. Smit, Understanding Molecular Simulation, 2nd ed. (Academic, San Diego, 2002), pp.37-38.
Created October 28, 2021, Updated October 29, 2021


text:
Q

# Identify terms which contain x and give the coefficient of x . (i) y^2x + y

Q. 4.     (a) Identify terms which contain x and give the coefficient of x.

(i)  $y^{2}x+y$

Views

Expression: y2x + y

Terms with x: y2x

Coefficient of x in y2x: y2

Exams
Articles
Questions


text:
Home » Uncategorized » Uniform convergence

# Uniform convergence

Let be a decreasing sequence. Prove that converges uniformly if-f .

Solution

Since then for a given there exists positive integer such that if to hold

(1)

It suffices to prove the result for due to symmetry and periodicity. So, it suffices to prove that for it holds for all and all .

We distinguish cases:

• ;

• ;

where .

This completes the proof of the first part. Now the converse is much easier. For each such that we have . Hence . Therefore, picking we have:

(2)

Since the series converges uniformly we have that uniformly. More specifically, as . Using the sandwich theorem it follows that . It only remains to prove that . This follows from