text:
Publicité ▼

## définition - Riemann zeta function

voir la définition de Wikipedia

Wikipedia

# Riemann zeta function

Riemann zeta function ζ(s) in the complex plane. The color of a point s encodes the value of ζ(s): colors close to black denote values close to zero, while hue encodes the value's argument. The white spot at s = 1 is the pole of the zeta function; the black spots on the negative real axis and on the critical line Re(s) = 1/2 are its zeros. Values with arguments close to zero including positive reals on the real half-line are presented in red.

The Riemann zeta function or Euler-Riemann zeta function, ζ(s), is a function of a complex variable s that analytically continues the sum of the infinite series $\sum_{n=1}^\infty\frac{1}{n^s},$ which converges when the real part of s is greater than 1. More general representations of ζ(s) for all s are given below. The Riemann zeta function plays a pivotal role in analytic number theory and has applications in physics, probability theory, and applied statistics.

This function as a function of a real argument was introduced and studied by Leonhard Euler in the first half of the eighteenth century without using complex analysis, which was not available at that time. Bernhard Riemann in his memoir "On the Number of Primes Less Than a Given Magnitude" published in 1859 extended the Euler definition to a complex variable, proved its meromorphic continuation and functional equation and established a relation between its zeros and the distribution of prime numbers.[1]

The values of the Riemann zeta function at even positive integers were computed by Euler. The first of them, ζ(2), provides a solution to the Basel problem. In 1979 Apéry proved the irrationality of ζ(3). The values at negative integer points, also found by Euler, are rational numbers and play an important role in the theory of modular forms. Many generalizations of the Riemann zeta function, such as Dirichlet series, Dirichlet L-functions and L-functions, are known.

## Definition

The Riemann zeta function ζ(s) is a function of a complex variable s = σ + it (here, s, σ and t are traditional notations associated with the study of the ζ-function). The following infinite series converges for all complex numbers s with real part greater than 1, and defines ζ(s) in this case:

$\zeta(s) = \sum_{n=1}^\infty n^{-s} = \frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \cdots \;\;\;\;\;\;\; \sigma = \mathfrak{R}(s) > 1. \!$

The Riemann zeta function is defined as the analytic continuation of the function defined for σ > 1 by the sum of the preceding series.

Leonhard Euler considered the above series in 1740 for positive integer values of s, and later Chebyshev extended the definition to real s > 1.[2]

The above series is a prototypical Dirichlet series that converges absolutely to an analytic function for s such that σ > 1 and diverges for all other values of s. Riemann showed that the function defined by the series on the half-plane of convergence can be continued analytically to all complex values s ≠ 1. For s = 1 the series is the harmonic series which diverges to +∞, and

$\lim_{s\to 1}(s-1)\zeta(s)=1.$

Thus the Riemann zeta function is a meromorphic function on the whole complex s-plane, which is holomorphic everywhere except for a simple pole at s = 1 with residue 1.

## Specific values

Riemann zeta function for real s > 1

For any positive even number 2n,

$\zeta(2n) = (-1)^{n+1}\frac{B_{2n}(2\pi)^{2n}}{2(2n)!}$

where B2n is a Bernoulli number; for negative integers, one has

$\zeta(-n)=-\frac{B_{n+1}}{n+1}$

for n ≥ 1, so in particular ζ vanishes at the negative even integers because Bm = 0 for all odd m other than 1. No such simple expression is known for odd positive integers.

The values of the zeta function obtained from integral arguments are called zeta constants. The following are the most commonly used values of the Riemann zeta function.

$\zeta(0) = -\frac{1}{2},\!$
$\zeta(1) = 1 + \frac{1}{2} + \frac{1}{3} + \cdots = \infty;\!$
this is the harmonic series.
$\zeta(3/2) \approx 2.612;\!$   (sequence A078434 in OEIS)
this is employed in calculating the critical temperature for a Bose–Einstein condensate in a box with periodic boundary conditions, and for spin wave physics in magnetic systems.
$\zeta(2) = 1 + \frac{1}{2^2} + \frac{1}{3^2} + \cdots = \frac{\pi^2}{6} \approx 1.645;\!$   (sequence A013661 in OEIS)
the demonstration of this equality is known as the Basel problem. The reciprocal of this sum answers the question: What is the probability that two numbers selected at random are relatively prime?[3]
$\zeta(3) = 1 + \frac{1}{2^3} + \frac{1}{3^3} + \cdots \approx 1.202;\!$   (sequence A002117 in OEIS)
this is called Apéry's constant.
$\zeta(4) = 1 + \frac{1}{2^4} + \frac{1}{3^4} + \cdots = \frac{\pi^4}{90} \approx 1.0823;\!$   (sequence A0013662 in OEIS)
This appears when integrating Planck's Law to derive the Stefan–Boltzmann law in physics.

## Euler product formula

The connection between the zeta function and prime numbers was discovered by Leonhard Euler, who proved the identity

$\sum_{n=1}^\infty\frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}}$

where, by definition, the left hand side is ζ(s) and the infinite product on the right hand side extends over all prime numbers p (such expressions are called Euler products):

$\prod_{p \text{ prime}} \frac{1}{1-p^{-s}} = \frac{1}{1-2^{-s}}\cdot\frac{1}{1-3^{-s}}\cdot\frac{1}{1-5^{-s}}\cdot\frac{1}{1-7^{-s}}\cdot\frac{1}{1-11^{-s}} \cdots \frac{1}{1-p^{-s}} \cdots.$

Both sides of the Euler product formula converge for Re(s) > 1. The proof of Euler's identity uses only the formula for the geometric series and the fundamental theorem of arithmetic. Since the harmonic series, obtained when s = 1, diverges, Euler's formula (which becomes $\textstyle\prod_pp/(p-1)$) implies that there are infinitely many primes.[4]

The Euler product formula can be used to calculate the asymptotic probability that s randomly selected integers are set-wise coprime. Intuitively, the probability that any single number is divisible by a prime (or any integer), p is 1/p. Hence the probability that s numbers are all divisible by this prime is 1/ps, and the probability that at least one of them is not is 1 − 1/ps. Now, for distinct primes, these divisibility events are mutually independent because the candidate divisors are coprime (a number is divisible by coprime divisors n and m if and only if it is divisible by nm, an event which occurs with probability 1/(nm).) Thus the asymptotic probability that s numbers are coprime is given by a product over all primes,

$\prod_p^\infty \left(1-\frac{1}{p^s}\right) = \left( \prod_p^\infty \frac{1}{1-p^{-s}} \right)^{-1} = \frac{1}{\zeta(s)}.$

(More work is required to derive this result formally.)[5]

## The functional equation

The Riemann zeta function satisfies the functional equation (also called the Riemann('s) functional equation)

$\zeta(s) = 2^s\pi^{s-1}\ \sin\left(\frac{\pi s}{2}\right)\ \Gamma(1-s)\ \zeta(1-s) \!,$

where Γ(s) is the gamma function, which is an equality of meromorphic functions valid on the whole complex plane. This equation relates values of the Riemann zeta function at the points s and 1 − s. The functional equation (owing to the properties of sin) implies that ζ(s) has a simple zero at each even negative integer s = − 2n — these are known as the trivial zeros of ζ(s). For s an even positive integer, the product sin(πs/2)Γ(1−s) is regular and the functional equation relates the values of the Riemann zeta function at odd negative integers and even positive integers.

The functional equation was established by Riemann in his 1859 paper On the Number of Primes Less Than a Given Magnitude and used to construct the analytic continuation in the first place. An equivalent relationship had been conjectured by Euler over a hundred years earlier, in 1749, for the Dirichlet eta function (alternating zeta function)

$\eta(s)= \sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^s} = (1-{2^{1-s}})\zeta(s) .$

Incidentally, this relation is interesting also because it actually exhibits ζ(s) as a Dirichlet series (of the η-function) which is convergent (albeit non-absolutely) in the larger half-plane σ > 0 (not just σ > 1), up to an elementary factor.

Riemann also found a symmetric version of the functional equation, given by first defining

$\xi(s) = \frac{1}{2}\pi^{-s/2}s(s-1)\Gamma\left(\frac{s}{2}\right)\zeta(s).\!$

The functional equation is then given by

$\xi(s) = \xi(1 - s).\!$

(Riemann defined a similar but different function which he called ξ(t).)

## Zeros, the critical line, and the Riemann hypothesis

Apart from the trivial zeros, the Riemann zeta function doesn't have any zero on the right of σ=1 and on the left of σ=0 (neither the zeros can lie too close to those lines). Furthermore, the non-trivial zeros are symmetric about the real axis and the line σ=1/2 and, according to the Riemann Hypothesis, they all lie in the line σ=1/2.
This image shows a plot of the Riemann zeta function along the critical line for real values of t running from 0 to 34. The first five zeros in the critical strip are clearly visible as the place where the spirals pass through the origin.

The functional equation shows that the Riemann zeta function has zeros at −2, −4, ... . These are called the trivial zeros. They are trivial in the sense that their existence is relatively easy to prove, for example, from sin(πs/2) being 0 in the functional equation. The non-trivial zeros have captured far more attention because their distribution not only is far less understood but, more importantly, their study yields impressive results concerning prime numbers and related objects in number theory. It is known that any non-trivial zero lies in the open strip {sC: 0 < Re(s) < 1}, which is called the critical strip. The Riemann hypothesis, considered one of the greatest unsolved problems in mathematics, asserts that any non-trivial zero s has Re(s) = 1/2. In the theory of the Riemann zeta function, the set {sC: Re(s) = 1/2} is called the critical line. For the Riemann zeta function on the critical line, see Z-function.

### The Hardy–Littlewood conjectures

In 1914 Godfrey Harold Hardy proved that $\zeta\bigl(\tfrac{1}{2}+it\bigr)$ has infinitely many real zeros.

Let $N(T)$ be the total number of real zeros, $N_0(T)$ be the total number of zeros of odd order of the function $\zeta\bigl(\tfrac{1}{2}+it\bigr)$, lying on the interval $(0,T]$.

The next two conjectures of Hardy and John Edensor Littlewood on the distance between real zeros of $\zeta\bigl(\tfrac{1}{2}+it\bigr)$ and on the density of zeros of $\zeta\bigl(\tfrac{1}{2}+it\bigr)$ on the intervals $(T,T+H]$ for sufficiently great $T > 0$, $H = T^{a + \varepsilon}$ and with as less as possible value of $a > 0$, where $\varepsilon > 0$ is an arbitrarily small number, open two new directions in the investigation of the Riemann zeta function:

1. for any $\varepsilon > 0$ there exists such $T_0 = T_0(\varepsilon) > 0$ that for $T \geq T_0$ and $H=T^{0.25+\varepsilon}$ the interval $(T,T+H]$ contains a zero of odd order of the function $\zeta\bigl(\tfrac{1}{2}+it\bigr)$.

2. for any $\varepsilon > 0$ there exist $T_0 = T_0(\varepsilon) > 0$ and $c = c(\varepsilon) > 0$, such that for $T \geq T_0$ and $H=T^{0.5+\varepsilon}$ the inequality $N_0(T+H)-N_0(T) \geq cH$ is true.

### The Selberg conjecture

In 1942 Atle Selberg investigated the problem of Hardy–Littlewood 2 and proved that for any $\varepsilon > 0$ there exists such $T_0 = T_0(\varepsilon) > 0$ and $c = c(\varepsilon) > 0$, such that for $T \geq T_0$ and $H=T^{0.5+\varepsilon}$ the inequality $N(T+H)-N(T) \geq cH\log T$ is true.

In his turn, Selberg claimed a conjecture[6] that it's possible to decrease the value of the exponent $a = 0.5$ for $H=T^{0.5+\varepsilon}$.

In 1984 Anatolii Alexeevitch Karatsuba proved[7][8][9] that for a fixed $\varepsilon$ satisfying the condition $0<\varepsilon < 0.001$, a sufficiently large $T$ and $H = T^{a+\varepsilon}$, $a = \tfrac{27}{82} = \tfrac{1}{3} -\tfrac{1}{246}$, the interval $(T,T+H)$ contains at least $cH\ln T$ real zeros of the Riemann zeta function $\zeta\Bigl(\tfrac{1}{2}+it\Bigr)$ and therefore confirmed the Selberg conjecture.

The estimates of Atle Selberg and Karatsuba can not be improved in respect of the order of growth as $T\to +\infty$.

In 1992 A.A. Karatsuba proved,[10] that an analog of the Selberg conjecture holds for «almost all» intervals $(T,T+H]$, $H = T^{\varepsilon}$, where $\varepsilon$ is an arbitrarily small fixed positive number. The Karatsuba method permits to investigate zeros of the Riemann zeta-function on «supershort» intervals of the critical line, that is, on the intervals $(T,T+H]$, the length $H$ of which grows slower than any, even arbitrarily small degree $T$. In particular, he proved that for any given numbers $\varepsilon$, $\varepsilon_{1}$ satisfying the conditions $0<\varepsilon, \varepsilon_{1}<1$ almost all intervals $(T,T+H]$ for $H\ge\exp{\{(\ln T)^{\varepsilon}\}}$ contain at least $H(\ln T)^{1-\varepsilon_{1}}$ zeros of the function $\zeta\bigl(\tfrac{1}{2}+it\bigr)$. This estimate is quite close to the one that follows from the Riemann hypothesis.

### Other results

The location of the Riemann zeta function's zeros is of great importance in the theory of numbers. The prime number theorem is equivalent to the fact that there are no zeros of the zeta function on the Re(s) = 1 line[11]. A better result[12] is that ζ(σ + it) ≠ 0 whenever | t | ≥ 3 and

$\sigma\ge 1-\frac{1}{57.54(\log{|t|})^{2/3}(\log{\log{|t|}})^{1/3}}.\!$

The strongest result of this kind one can hope for is the truth of the Riemann hypothesis, which would have many profound consequences in the theory of numbers.

It is known that there are infinitely many zeros on the critical line. Littlewood showed that if the sequence (γn) contains the imaginary parts of all zeros in the upper half-plane in ascending order, then

$\lim_{n\rightarrow\infty}\left(\gamma_{n+1}-\gamma_n\right)=0.\!$

The critical line theorem asserts that a positive percentage of the nontrivial zeros lies on the critical line.

In the critical strip, the zero with smallest non-negative imaginary part is 1/2 + i14.13472514... Directly from the functional equation one sees that the non-trivial zeros are symmetric about the axis Re(s) = 1/2. Furthermore, the fact that ζ(s) = ζ(s*)* for all complex s ≠ 1 (* indicating complex conjugation) implies that the zeros of the Riemann zeta function are symmetric about the real axis.

The statistics of the Riemann zeta zeros are a topic of interest to mathematicians because of their connection to big problems like the Riemann hypothesis, distribution of prime numbers, etc. Through connections with random matrix theory and quantum chaos, the appeal is even broader. The fractal structure of the Riemann zeta zero distribution has been studied using rescaled range analysis.[13] The self-similarity of the zero distribution is quite remarkable, and is characterized by a large fractal dimension of 1.9. This rather large fractal dimension is found over zeros covering at least fifteen orders of magnitude, and also for the zeros of other L-functions.

## Various properties

For sums involving the zeta-function at integer and half-integer values, see rational zeta series.

### Reciprocal

The reciprocal of the zeta function may be expressed as a Dirichlet series over the Möbius function μ(n):

$\frac{1}{\zeta(s)} = \sum_{n=1}^{\infty} \frac{\mu(n)}{n^s} \!$

for every complex number s with real part > 1. There are a number of similar relations involving various well-known multiplicative functions; these are given in the article on the Dirichlet series.

The Riemann hypothesis is equivalent to the claim that this expression is valid when the real part of s is greater than 1/2.

### Universality

The critical strip of the Riemann zeta function has the remarkable property of universality. This zeta-function universality states that there exists some location on the critical strip that approximates any holomorphic function arbitrarily well. Since holomorphic functions are very general, this property is quite remarkable.

### Estimates of the maximum of the modulus of the zeta function

Let the functions $F(T;H)$ and $G(s_{0};\Delta)$ be defined by the equalities

$F(T;H) = \max_{|t-T|\le H}\bigl|\zeta\bigl(\tfrac{1}{2}+it\bigr)\bigr|,\quad G(s_{0};\Delta) = \max_{|s-s_{0}|\le\Delta}|\zeta(s)|.$

Here $T$ is a sufficiently large positive number, $0, $s_{0} = \sigma_{0}+iT$, $\tfrac{1}{2}\le\sigma_{0}\le 1$, $0<\Delta < \tfrac{1}{3}$. Estimating the values $F$ and $G$ from below shows, how large (in modulus) values $\zeta(s)$ can take on short intervals of the critical line or in small neighborhoods of points lying in the critical strip $0\le Re \ s\le 1$.

The case $H\gg \ln\ln T$ was studied by Ramachandra; the case $\Delta > c$, where $c$ is a sufficiently large constant, is trivial.

Karatsuba proved,[14][15] in particular, that if the values $H$ and $\Delta$ exceed certain sufficiently small constants, then the estimates

$F(T;H) \ge T^{- c_{1}},\quad G(s_{0}; \Delta) \ge T^{-c_{2}},$

hold, where $c_{1}, c_{2}$ are certain absolute constants.

### The argument of the Riemann zeta-function

The function $S(t) = \frac{1}{\pi}\arg{\zeta\bigl(\tfrac{1}{2}+it\bigr)}$ is called the argument of the Riemann zeta function. Here $\arg{\zeta\bigl(\tfrac{1}{2}+it\bigr)}$ is the increment of an arbitrary continuous branch of $\arg\zeta(s)$ along the broken line joining the points $2, 2+it$ and $\tfrac{1}{2}+it$ There are some theorems on properties of the function $S(t)$. Among those results[16][17] are the mean value theorems for $S(t)$ and its first integral $S_{1}(t) = \int_{0}^{t}S(u)du$ on intervals of the real line, and also the theorem claiming that every interval $(T,T+H]$ for $H \ge T^{27/82+\varepsilon}$ contains at least

$H(\ln T)^{1/3}e^{-c\sqrt{\ln\ln T}}$

points where the function $S(t)$ changes sign. Earlier similar results were obtained by Atle Selberg for the case $H\ge T^{1/2+\varepsilon}$.

## Representations

### Mellin transform

The Mellin transform of a function ƒ(x) is defined as

$\int_0^\infty f(x)x^{s-1}\, dx,$

in the region where the integral is defined. There are various expressions for the zeta-function as a Mellin transform. If the real part of s is greater than one, we have

$\Gamma(s)\zeta(s) =\int_0^\infty\frac{x^{s-1}}{e^x-1}\,dx,$

where Γ denotes the Gamma function. By modifying the contour Riemann showed that

$2\sin(\pi s)\Gamma(s)\zeta(s) =i\oint_C \frac{(-x)^{s-1}}{e^x-1}\,dx$

for all s, where the contour C starts and ends at +∞ and circles the origin once.

We can also find expressions which relate to prime numbers and the prime number theorem. If π(x) is the prime-counting function, then

$\log \zeta(s) = s \int_0^\infty \frac{\pi(x)}{x(x^s-1)}\,dx,$

for values with Re(s) > 1.

A similar Mellin transform involves the Riemann prime-counting function J(x), which counts prime powers pn with a weight of 1/n, so that

$J(x) = \sum \frac{\pi(x^{1/n})}{n}.$

Now we have

$\log \zeta(s) = s\int_0^\infty J(x)x^{-s-1}\,dx.$

These expressions can be used to prove the prime number theorem by means of the inverse Mellin transform. Riemann's prime-counting function is easier to work with, and π(x) can be recovered from it by Möbius inversion.

### Theta functions

The Riemann zeta function can be given formally by a divergent Mellin transform

$2\pi^{-s/2}\Gamma(s/2)\zeta(s) = \int_0^\infty \theta(it)t^{s/2-1}\,dt,$

in terms of Jacobi's theta function

$\theta(\tau)= \sum_{n=-\infty}^\infty \exp(\pi i n^2\tau).$

However this integral does not converge for any value of s and so needs to be regularized: this gives the following expression for the zeta function:

$\pi^{-s/2}\Gamma(s/2)\zeta(s) = \frac{1}{s-1}-\frac{1}{s} +\frac{1}{2}\int_0^1 (\theta(it)-t^{-1/2})t^{s/2-1}\,dt +\frac{1}{2}\int_1^\infty (\theta(it)-1)t^{s/2-1}\,dt.$

### Laurent series

The Riemann zeta function is meromorphic with a single pole of order one at s = 1. It can therefore be expanded as a Laurent series about s = 1; the series development then is

$\zeta(s)=\frac{1}{s-1}+\sum_{n=0}^\infty \frac{(-1)^n}{n!} \gamma_n \; (s-1)^n.$

The constants γn here are called the Stieltjes constants and can be defined by the limit

$\gamma_n = \lim_{m \rightarrow \infty} {\left(\left(\sum_{k = 1}^m \frac{(\log k)^n}{k}\right) - \frac{(\log m)^{n+1}}{n+1}\right)}.$

The constant term γ0 is the Euler–Mascheroni constant.

### Integral

For all $s\in\mathbb{C}\setminus\{1\}$ the integral relation

$\zeta(s) = \frac{2^{s-1}}{s-1}-2^s\!\int_0^{\infty}\!\!\!\frac{\sin(s\arctan t)}{(1+t^2)^\frac{s}{2}(\mathrm{e}^{\pi\,t}+1)}\,\mathrm{d}t,$

holds true, which may be used for a numerical evaluation of the Zeta-function.[18]

### Rising factorial

Another series development using the rising factorial valid for the entire complex plane is

$\zeta(s) = \frac{s}{s-1} - \sum_{n=1}^\infty (\zeta(s+n)-1)\frac{s(s+1)\cdots(s+n-1)}{(n+1)!}.\!$

This can be used recursively to extend the Dirichlet series definition to all complex numbers.

The Riemann zeta function also appears in a form similar to the Mellin transform in an integral over the Gauss–Kuzmin–Wirsing operator acting on xs−1; that context gives rise to a series expansion in terms of the falling factorial.

On the basis of Weierstrass's factorization theorem, Hadamard gave the infinite product expansion

$\zeta(s) = \frac{e^{(\log(2\pi)-1-\gamma/2)s}}{2(s-1)\Gamma(1+s/2)} \prod_\rho \left(1 - \frac{s}{\rho} \right) e^{s/\rho},\!$

where the product is over the non-trivial zeros ρ of ζ and the letter γ again denotes the Euler–Mascheroni constant. A simpler infinite product expansion is

$\zeta(s) = \pi^{s/2} \frac{\prod_\rho \left(1 - \frac{s}{\rho} \right)}{2(s-1)\Gamma(1+s/2)}.\!$

This form clearly displays the simple pole at s = 1, the trivial zeros at −2, −4, ... due to the gamma function term in the denominator, and the non-trivial zeros at s = ρ.

### Logarithmic derivative on the critical strip

${\pi \frac{dN}{dx} (x) = \frac{1}{2i}\frac{d}{dx}\bigl(\log(\zeta(1/2 + ix)) - \log(\zeta(1/2 - ix))\bigr)- \frac{2}{1+4x^2} - \sum_{n=0}^\infty \frac{2n + 1/2}{(2n + 1/2)^2 +x^2}}$

where $\frac{dN(x)}{dx} = \sum_\rho \delta (x-\rho)$ is the density of zeros of ζ on the critical strip 0 < Re(s) < 1 (δ is the Dirac delta distribution, and the sum is over the nontrivial zeros ρ of ζ).

### Globally convergent series

A globally convergent series for the zeta function, valid for all complex numbers s except s = 1 + 2πin/log(2) for some integer n, was conjectured by Konrad Knopp and proved by Helmut Hasse in 1930 (cf. Euler summation):

$\zeta(s)=\frac{1}{1-2^{1-s}} \sum_{n=0}^\infty \frac {1}{2^{n+1}} \sum_{k=0}^n (-1)^k {n \choose k} (k+1)^{-s}.\!$

The series only appeared in an Appendix to Hasse's paper, and did not become generally known until it was rediscovered more than 60 years later (see Sondow, 1994).

Peter Borwein has shown a very rapidly convergent series suitable for high precision numerical calculations. The algorithm, making use of Chebyshev polynomials, is described in the article on the Dirichlet eta function.

## Applications

The zeta function occurs in applied statistics (see Zipf's law and Zipf–Mandelbrot law).

Zeta function regularization is used as one possible means of regularization of divergent series in quantum field theory. In one notable example, the Riemann zeta-function shows up explicitly in the calculation of the Casimir effect. The zeta function is also useful for the analysis of dynamical systems, see [19].

## Generalizations

There are a number of related zeta functions that can be considered to be generalizations of the Riemann zeta function. These include the Hurwitz zeta function

$\zeta(s,q) = \sum_{k=0}^\infty (k+q)^{-s}$

(the convergent series representation was given by Helmut Hasse in 1930,[20] cf. Hurwitz zeta function), which coincides with the Riemann zeta function when q = 1 (note that the lower limit of summation in the Hurwitz zeta function is 0, not 1), the Dirichlet L-functions and the Dedekind zeta-function. For other related functions see the articles Zeta function and L-function.

The polylogarithm is given by

$\mathrm{Li}_s(z) = \sum_{k=1}^\infty {z^k \over k^s}\!$

which coincides with the Riemann zeta function when z = 1.

The Lerch transcendent is given by

$\Phi(z, s, q) = \sum_{k=0}^\infty \frac { z^k} {(k+q)^s}\!$

which coincides with the Riemann zeta function when z = 1 and q = 1 (note that the lower limit of summation in the Lerch transcendent is 0, not 1).

The Clausen function Cls(θ) that can be chosen as the real or imaginary part of Lis(e ).

The multiple zeta functions are defined by

$\zeta(s_1,s_2,\ldots,s_n) = \sum_{k_1>k_2>\cdots>k_n>0} k_1^{-s_1}k_2^{-s_2}\cdots k_n^{-s_n}.\!$

One can analytically continue these functions to the n-dimensional complex space. The special values of these functions are called multiple zeta values by number theorists and have been connected to many different branches in mathematics and physics.

## Notes

1. ^ This paper also contained the Riemann hypothesis, a conjecture about the distribution of complex zeros of the Riemann zeta function that is considered by many mathematicians to be the most important unsolved problem in pure mathematics.Bombieri, Enrico. "The Riemann Hypothesis - official problem description". Clay Mathematics Institute. Retrieved 2008-10-25.
2. ^ Devlin, Keith (2002). The Millennium Problems: The Seven Greatest Unsolved Mathematical Puzzles of Our Time. New York: Barnes & Noble. pp. 43–47. ISBN 978-0-7607-8659-8.
3. ^ C. S. Ogilvy & J. T. Anderson Excursions in Number Theory, pp. 29–35, Dover Publications Inc., 1988 ISBN 0-486-25778-9
4. ^ Charles Edward Sandifer, How Euler did it, The Mathematical Association of America, 2007, p. 193. ISBN 978-0-88385-563-8
5. ^ J. E. Nymann (1972). "On the probability that k positive integers are relatively prime". Journal of Number Theory 4 (5): 469–473. DOI:10.1016/0022-314X(72)90038-8.
6. ^ Selberg, A. (1942). "On the zeros of Riemann's zeta-function". Shr. Norske Vid. Akad. Oslo (10): 1–59.
7. ^ Karatsuba, A. A. (1984). "On the zeros of the function ζ(s) on short intervals of the critical line". Izv. Akad. Nauk SSSR, Ser. Mat. (48:3): 569–584.
8. ^ Karatsuba, A. A. (1984). "The distribution of zeros of the function ζ(1/2+it)". Izv. Akad. Nauk SSSR, Ser. Mat. (48:6): 1214–1224.
9. ^ Karatsuba, A. A. (1985). "On the zeros of the Riemann zeta-function on the critical line". Proc. Steklov Inst. Math. (167): 167–178.
10. ^ Karatsuba, A. A. (1992). "On the number of zeros of the Riemann zeta-function lying in almost all short intervals of the critical line". Izv. Ross. Akad. Nauk, Ser. Mat. (56:2): 372–397.
11. ^ Diamond, Harold G. (1982), "Elementary methods in the study of the distribution of prime numbers", Bulletin of the American Mathematical Society 7 (3): 553–89, DOI:10.1090/S0273-0979-1982-15057-1, MR 670132 .
12. ^ Ford, K. (2002). "Vinogradov's integral and bounds for the Riemann zeta function". Proc. London Math. Soc. 85 (3): 565–633. DOI:10.1112/S0024611502013655.
13. ^ O. Shanker (2006). "Random matrices, generalized zeta functions and self-similarity of zero distributions". J. Phys. A: Math. Gen. 39 (45): 13983–13997. Bibcode 2006JPhA...3913983S. DOI:10.1088/0305-4470/39/45/008.
14. ^ Karatsuba, A. A. (2001). "Lower bounds for the maximum modulus of ζ(s) in small domains of the critical strip". Mat. Zametki (70:5): 796–798.
15. ^ Karatsuba, A. A. (2004). "Lower bounds for the maximum modulus of the Riemann zeta function on short segments of the critical line". Izv. Ross. Akad. Nauk, Ser. Mat. (68:8): 99–104.
16. ^ Karatsuba, A. A. (1996). "Density theorem and the behavior of the argument of the Riemann zeta function". Mat. Zametki (60:3): 448–449.
17. ^ Karatsuba, A. A. (1996). "On the function S(t)". Izv. Ross. Akad. Nauk, Ser. Mat. (60:5): 27–56.
18. ^ Mathematik-Online-Kurs: Numerik - Numerische Integration der Riemannschen Zeta-Funktion
19. ^
20. ^ Hasse, Helmut (1930). "Ein Summierungsverfahren für die Riemannsche ζ-Reihe". Mathematische Zeitschrift 32 (1): 458–464. DOI:10.1007/BF01194645

## References

Publicité ▼

Contenu de sensagent

• définitions
• synonymes
• antonymes
• encyclopédie

• definition
• synonym

Publicité ▼

dictionnaire et traducteur pour sites web

Alexandria

Une fenêtre (pop-into) d'information (contenu principal de Sensagent) est invoquée un double-clic sur n'importe quel mot de votre page web. LA fenêtre fournit des explications et des traductions contextuelles, c'est-à-dire sans obliger votre visiteur à quitter votre page web !

Essayer ici, télécharger le code;

Solution commerce électronique

Augmenter le contenu de votre site

Ajouter de nouveaux contenus Add à votre site depuis Sensagent par XML.

Parcourir les produits et les annonces

Obtenir des informations en XML pour filtrer le meilleur contenu.

Indexer des images et définir des méta-données

Fixer la signification de chaque méta-donnée (multilingue).

Renseignements suite à un email de description de votre projet.

Jeux de lettres

Les jeux de lettre français sont :
○   Anagrammes
○   jokers, mots-croisés
○   Lettris
○   Boggle.

Lettris

Lettris est un jeu de lettres gravitationnelles proche de Tetris. Chaque lettre qui apparaît descend ; il faut placer les lettres de telle manière que des mots se forment (gauche, droit, haut et bas) et que de la place soit libérée.

boggle

Il s'agit en 3 minutes de trouver le plus grand nombre de mots possibles de trois lettres et plus dans une grille de 16 lettres. Il est aussi possible de jouer avec la grille de 25 cases. Les lettres doivent être adjacentes et les mots les plus longs sont les meilleurs. Participer au concours et enregistrer votre nom dans la liste de meilleurs joueurs ! Jouer

Dictionnaire de la langue française
Principales Références

La plupart des définitions du français sont proposées par SenseGates et comportent un approfondissement avec Littré et plusieurs auteurs techniques spécialisés.
Le dictionnaire des synonymes est surtout dérivé du dictionnaire intégral (TID).
L'encyclopédie française bénéficie de la licence Wikipedia (GNU).

Changer la langue cible pour obtenir des traductions.
Astuce: parcourir les champs sémantiques du dictionnaire analogique en plusieurs langues pour mieux apprendre avec sensagent.

3140 visiteurs en ligne

calculé en 0,063s

Je voudrais signaler :
section :
une faute d'orthographe ou de grammaire
un contenu abusif (raciste, pornographique, diffamatoire)


text:
Theorem 2.9

$T:V \to W, U: W \to Z$. $V, W, Z$ are vector spaces over $F$, then $U \circ T = UT:V \to Z$ is also a linear transformation.

Proof [expand]

$x, y \in V, a \in F$.

\begin{align*} UT(ax + y) &= U(T(ax + y)) \br &=(aT(x) + T(y)) \br &=aU(T(x)) + U(T(y)) \br &=a(UT)(x) + (UT)(y) \end{align*}

Theorem 2.10

$V$ is a vector space over a field $F$. Let $T, U_1, U_2 \in \L(V)$, then the following holds

1. $T(U_1 + U_2) = TU_1 + TU_2$
2. $(U_1 + U_2)T = U_1T + U_2T$
3. $T(U_1U_2) = (TU_1)U_2$
4. $TI = IT = T$(where $I$ is the identity linear transformation)
5. $a(U_1U_2) = (aU_1)U_2 = U_1(aU_2), \forall a \in F$
Proof [expand]

\begin{align*} &T(U_1 + U_2)(x) \br &=T((U_1+U_2)(x)) \br &=T(U_1(x)+U_2(x)) \br &=T(U_1(x))+T(U_2(x)) \br &=(TU_1)(x)+(TU_2)(x) \forall x \in V \end{align*}

$\therefore T \circ (U_1 + U_2) = TU_1 + TU_2$

Note

This is special to linear transformation and does not apply to general functions.

e.g. $f(x) = x^2, g_1(x) = x^3, g_2(x)=x^4$ does not follow this theorem.

Definition: Matrix Multiplication

Let $A$ be an $m \times n$ matrix and $B$ be an $n \times p$ matrix. We define the product of $A$ and $B$, denoted $AB$, to be the $m \times p$ matrix s.t.

$$(AB)_{ij} = \sum_{ k=1 }^{ n } A_{ik}B_{kj}, \text{ for } i \leq i \leq m, 1 \leq j \leq p$$

Proof [expand]

Analysis

$T: V \to W, U: W \to Z / F$.

Let $\alpha = \set{v_1, v_2, …, v_{n}}, \beta = \set{w_1, w_2, …, w_{m}}, \gamma = \set{z_1, z_2, …, z_{p}}$ be the ordered basis of $V, W, Z$ respectively.

Let $A = [U]^\gamma_\beta$ and $B=[T]^\beta_\alpha$.

Let $A = (a_{ij})_{p \times m}$ and $B = (b_{ij})_{m \times n}$.

We define the product of $A$ and $B$ denoted by $AB$ as the new matrix obtained from the matrix representation of $UT$ with respect to ordered basis $\alpha$ and $\gamma$, i.e. $AB:= [UT]^\gamma_\alpha$.

We want to find the matrix representation of $UT$.

$UT(v_j) = \sum_{i=1}^{v} (\cdot)_{ij}z_i$

Proof

Let $A=[U]^\gamma_\beta$ and $B=[T]^\beta_\alpha$.

$A = (a_{ij})_{p\times m},$

$B=(b_{ij})_{m \times n}.$

We want to compute the matrix representation of $UT$.

\begin{align} U(w_j) &= \sum_{i=1}^{p}a_{ij}z_i & (1)\br T(v_j) &= \sum_{i=1}^{m} b_{ij} w_i & (2) \end{align}

\begin{align*} (UT)(v_j)&=U(T(v_j)) \br &= U(\sum_{i=1}^{m}b_{ij}w_i) \br &= \sum_{i=1}^{m}b_{ij}U(w_i) \br &= \sum_{k=1}^{m}b_{kj}U(w_k) \br &= \sum_{k=1}^{m}b_{kj}(\sum_{i=1}^{p} a_{ik} z_i)\br &= \sum_{i=1}^{p} (\sum_{k=1}^{m} a_{ik}b_{kj})z_i \end{align*}

Theorem 2.11

$T:V \to W, U: W \to Z$,

$\alpha, \beta, \gamma$ are ordered basis of $V, W$ and $Z$ respectively, then

$$[UT]^\gamma_\alpha = [U]^\gamma_\beta[T]^\beta_\alpha$$

Proof [expand]

Follows from the previous computation

Corollary

Let $V$ be a finite-dimensional vector space with an ordered basis $\beta$. Let $T, U \in \L(V)$, then

$$[UT]_ \beta = [U]_ \beta [T]_ \beta$$

Theorem : 2.14

Let $V, W$ be two finite-dimensional vector spaces. $T: V \to W$. Let $\beta$ and $\gamma$ be ordered basis $V$ and $W$, respectively, then

$$[ T ]_{ \beta }^{ \gamma } [ v ]_{ \beta } = [ T(v) ]_{ \gamma }, \forall v \in V$$

Proof [expand]

Fix $v \in V$, let $f: F \to V$ and $g: F \to W$ be two linear transformation.

defined as $f(a) = av, \forall a \in F$
and $g(a) = aT(v), \forall a \in F$

$g(a) = aT(v) = T(av) = T(f(a)) = (T \circ f)(a), \forall a \in F$

$\therefore, g = T \circ f … (i)$

Let $\alpha = \set{ 1 }$ be the ordered basis over F.

$[ g ]_{ \alpha }^{ \gamma } =$

$g(1) = T(v) \implies [ g ]_{ \alpha }^{ \gamma } = [ T(v) ]_{ \gamma } … (iii)$

$f(1) = v \implies [ f ]_{ \alpha }^{ \beta } = [ v ]_{ \beta } … (ii)$

$\underset{ \alpha }{ F } \overset{f}{\to} \underset{ \beta }{ V } \overset{T}{\to} \underset{ \gamma }{ W }$

$g = T \circ f$

$[ g ]_{ \alpha }^{ \gamma } = [ T \circ f ]_{ \alpha }^{ \gamma }$

$[ T(v) ]_{ \gamma }^{ \alpha } = [ T ]_{ \beta }^{ \gamma } [ f ]_{ \alpha }^{ \beta }$

$[ T(v) ]_{ \gamma } = [ T ]_{ \beta }^{ \gamma } [ v ]_{ \beta }$

Definition: Left-Multiplication Transformation

Let $A$ be an $m \times n$ matrix with entries from a field $F$. We denote by $L_A$ the mapping $L_A: F^n \to F^m$ defined by $L_A(x) = Ax$(the matrix product of $A$ and $x$) for each column vector $x \in F^n$. We call $L_A$ a left-multiplication transformation.

Theorem 2.15

Let $A$ be an $m \times n$ matrix with entries from $F$. Then the left-multiplication transformation $L_A: F^n \to F^m$ is linear. Furthermore, if $B$ is any other $m \times n$ matrix (with entries from $F$), and $\beta$ and $\gamma$ are the standard ordered bases for $F^n$ and $F^m$, respectively, then we have the following properties.

1. $[L_A]^ \gamma _ \beta = A$
2. $L_A = L_B$ if and only if $A = B$
3. $L_{A+B} = L_A + L_B$ and $L_{aA} = a L_A$ for all $a \in F$.
4. If $T : F^n \to F^m$ is linear, then there exists a unique $m \times n$ matrix $C$ s.t. $T = L_C$. In fact, $C = [ T ]_{ \beta}^{ \gamma }$
5. If $E$ is an $n \times p$ matrix, then $L_{AE} = L_A L_E$
6. If $m = n$, then $L_{I_n} = I_{F^n}$
Theorem 2.16: Associativity of Matrix Multiplication

Let $A, B$ and $C$ be matrices s.t. $A(BC)$ is defined. Then $(AB)C$ is also defined and $A(BC) = (AB)C$; that is matrix multiplication is associative.

format: plain


text:
# Morse theory for vector-valued functions

Let $$f:\mathbb{R}^{m+k}\mapsto\mathbb{R}^k$$ be a smooth function. I have seen quite a few books for Morse theory for $$f$$ when $$k=1$$. Is there a generalization to $$k\geq2$$? When $$k=1$$, we can define a Morse function $$f$$ by checking the eigenvalues of its Hessian at its critical points. What is the corresponding concept of (non-)degeneracy of critical points when $$k\geq 2$$? Is there a normal (quadratic) form of $$f$$ near its nondengerate critical points when $$k\geq 2$$, as given in the classical Morse lemma? Any references will also be appreciated.

• I think you might want Cerf theory. May 31, 2020 at 14:28

There is a vast literature on singularities, like:

• Gibson, Christopher G.; Wirthmüller, Klaus; du Plessis, Andrew A.; Looijenga, Eduard J. N. Topological stability of smooth mappings. Lecture Notes in Mathematics, Vol. 552. Springer-Verlag, Berlin-New York, 1976

• Arnold, V. I.; Gusein-Zade, S. M.; Varchenko, A. N. Singularities of differentiable maps. Volume 1. Classification of critical points, caustics and wave fronts. Birkhäuser 1985, 2012

• Arnold, V. I.; Gusein-Zade, S. M.; Varchenko, A. N. Singularities of differentiable maps. Volume 2. Monodromy and asymptotics of integrals. Birkhäuser 1988, 2012.


text:
# zbMATH — the first resource for mathematics

##### Examples
 Geometry Search for the term Geometry in any field. Queries are case-independent. Funct* Wildcard queries are specified by * (e.g. functions, functorial, etc.). Otherwise the search is exact. "Topological group" Phrases (multi-words) should be set in "straight quotation marks". au: Bourbaki & ti: Algebra Search for author and title. The and-operator & is default and can be omitted. Chebyshev | Tschebyscheff The or-operator | allows to search for Chebyshev or Tschebyscheff. "Quasi* map*" py: 1989 The resulting documents have publication year 1989. so: Eur* J* Mat* Soc* cc: 14 Search for publications in a particular source with a Mathematics Subject Classification code (cc) in 14. "Partial diff* eq*" ! elliptic The not-operator ! eliminates all results containing the word elliptic. dt: b & au: Hilbert The document type is set to books; alternatively: j for journal articles, a for book articles. py: 2000-2015 cc: (94A | 11T) Number ranges are accepted. Terms can be grouped within (parentheses). la: chinese Find documents in a given language. ISO 639-1 language codes can also be used.

##### Operators
 a & b logic and a | b logic or !ab logic not abc* right wildcard "ab c" phrase (ab c) parentheses
##### Fields
 any anywhere an internal document identifier au author, editor ai internal author identifier ti title la language so source ab review, abstract py publication year rv reviewer cc MSC code ut uncontrolled term dt document type (j: journal article; b: book; a: book article)
Solutions to a generalized spheroidal wave equation: Teukolsky’s equations in general relativity, and the two-center problem in molecular quantum mechanics. (English) Zbl 0612.34041

From the authors’ abstract: The differential equation,

$x\left(x-{x}_{0}\right)\left({d}^{2}y/d{x}^{2}\right)+\left({B}_{1}+{B}_{2}x\right)\left(dy/dx\right)+\left[{\omega }^{2}x\left(x-{x}_{0}\right)-\left[2\eta \omega \left(x-{x}_{0}\right)+{B}_{3}\right]y=0,$

arises both in the quantum scattering theory of nonrelativistic electrons from polar molecules and ions, and, in the guise of Teukolsky’s equations, in the theory of radiation processes involving black holes. This article discusses analytic representations of solutions to this equation. Previous results of E. Hylleraas [Z. Phys. 71, 739–763 (1931; Zbl 0002.42707)], G. Jaffé [Z. Phys. 87, 535–544 (1934; Zbl 0008.28304)], W. G. Baber and H. R. Hassé [Math. Proc. Camb. Philos. Soc. 31, 564–581 (1935; Zbl 0012.42801)] and L. J. Chu and J. A. Stratton [J. Math. Phys. 20, 259–309 (1941; Zbl 0026.21403)] are reviewed, and a rigorous proof is given for the convergence of Stratton’s spherical Bessel function expansion for the ordinary spheroidal wave functions. An integral is derived that relates the eigensolutions of Hylleraas to those of Jaffé. The integral relation is shown to give an integral equation for the scalar field quasinormal modes of black holes, and to lead to irregular second solutions to the equation. New representations of the general solutions are presented as series of Coulomb wave functions and confluent hypergeometric functions. The Coulomb wave-function expansion may be regarded as a generalization of Stratton’s representation for ordinary spheroidal wave functions, and has been fully implemented and tested on a digital computer. Both solutions given by the new algorithms are analytic in the variable $x$ in the parameters ${B}_{1},{B}_{2},{B}_{3},\omega ,{x}_{0}$, and $\eta$, and are uniformly convergent on any interval bounded away from ${x}_{0}$. They are the first representations for generalized spheroidal wave functions that allow the direct evaluation of asymptotic magnitude and phase.

 34C99 Qualitative theory of solutions of ODE 33C10 Bessel and Airy functions, cylinder functions, ${}_{0}{F}_{1}$ 81V99 Applications of quantum theory to specific physical systems


text:
Browse Questions

# A parachutist after bailing out falls 50 m without friction. When parachute opens, it decelerates at $2 m/s^2$. He reaches the ground with a speed of 3 m/s. At what height, did he bail out $(g=10 m/s^2)$

$(a)\;91\;m \quad (b)\;182\; m \quad (c)\;111\;m \quad (d)\;293\;m$

during free fall
$v^2=u^2+2as$
$v^2=0+2(g)50$
$v^2=100 g$
during deceleration
$v^2=u^2+2as$
$100\;g=(3)^2+(2)(-2)s$
Therefore $s=293m$
Hence d is the correct answer.

edited Feb 10, 2014 by meena.p


text:
# Do we have an electrostatic field in a closed circuit with current?

I was wondering why the voltage drop were the same over resistors in parallel and I got the explanation that $$\nabla\times E=0$$ for the field in the circuit. This means that the field is conservative, so a closed line integral over it is zero.

I looked for a proof of this and I found a compendium that proved it for an electrostatic field. It proved it by looking at the field as point charges, and using Coloumbs law at each point charge.

What I am wondering is if we have a circuit with a battery and multiple resistors will there then be an electrostatic field over the circuit? The reason I am wondering is:

1. We have introduced a battery with chemical energy, does this change anything?
2. The electrons are moving, so I am wondering if we still have an electrostatic field. Static means something that is not moving?

And a static magnetic field, according to the Maxwell-Faraday law implies that $$\nabla \times \mathbf E = 0$$


text:
Shirley Thompson

2021-12-26

The sum of the first n odd natural numbers is equal to ${n}^{2}$

poleglit3

Step 1
Let 1, 3, 5, 7, 9, n odd numbers be the first.
It is an Arithmatic Progression, whose first term $\left(a\right)=1$, and common difference (d) is 2.
Step 2
The total of these n terms $A\cdot P=\frac{n}{2}\left[2a+\left(n-1\right)d\right]$
first n odd numbers added together $=\frac{n}{2}\left[2×1+\left(n-1\right)×2\right]$
$=\frac{n}{2}\left[2+2n-2\right]$
$=\frac{n}{2}×n={n}^{2}$
Hence, the sum of first n odd natural numbers is equal to ${n}^{2}$. Hence, proved.

nghodlokl

$S=1+3+5+\dots +\left(2n-5\right)+\left(2n-3\right)+\left(2n-1\right)$
is the sum of the first n odd numbers
We can also write
$S=\left(2n-1\right)+\left(2n-3\right)+\left(2n-5\right)+\dots +5+3+1$
$2S=\left[1+\left(2n-1\right]+\left[3+\left(2n-3\right)\right]+\left[5+\left(2n-5\right)\right]+\dots +\left[\left(2n-5\right)+5\right]+\left[\left(2n-3\right)+3\right]+\left[\left(2n-1\right)+1\right]$
$⇒2S=\left(2n\right)+\left(2n\right)+\left(2n\right)+\dots +\left(2n\right)+\left(2n\right)+\left(2n\right)$ n terms
$⇒2S=\left(2n\right)\left(n\right)$
$⇒2S=2{n}^{2}$
$⇒S={n}^{2}$
$⇒1+3+5+\dots +\left(2n-5\right)+\left(2n-3\right)+\left(2n-1\right)={n}^{2}$

user_27qwe

Proving by example
Sum of first 3 odd numbers is ${3}^{2}=9$
First 3 odd numbers are 1+3+5=9
Hence ,Sum of first n odd natural numbers is ${n}^{2}$

Do you have a similar question?


text: Poweroids andydude Long Time Fellow Posts: 509 Threads: 44 Joined: Aug 2007 12/18/2009, 08:13 AM (This post was last modified: 12/18/2009, 08:19 AM by andydude.) -- (n.b. mimeTeX sucks, use mathTeX instead, it also works with myBB) OK, so I'm done with finals, so I thought I would get back into the quasigroup thing (as Henryk started here). It took me a while to figure out how to deal with exponentiation as a quasigroup, specifically because $(\mathbb{C}, \uparrow, \log, \sqrt{?})$ does not form a quasigroup. Proof. $b^a = b^{a + \frac{2 i \pi}{\ln(b)}}$, so $\log_b(b^a)$ is not uniquely defined as a. Since $\log_b(b^a)$ must be uniquely defined for it to be a quasigroup, it follows that $\mathbb{C}$ does not form a quasigroup under exponentiation.$\qed$ $(\mathbb{R}, \uparrow, \log, \sqrt{?})$ does not form a quasigroup. Proof. $(-1) \in \mathbb{R}$ and $1/2 \in \mathbb{R}$, but $(-1)^{1/2} \not\in \mathbb{R}$, so $\mathbb{R}$ does not form a quasigroup under exponentiation.$\qed$ So I started thinking about why it didn't form a quasigroup, and what could be done about it. Then I realized that it was because the two domains were being forcefully equated. Conceptually, the base and the exponent may come from domains that do not even intersect! Consider, for example bases in the interval $(0, 1)$ and positive integer exponents. This does not form a quasigroup, but you can see that $(\uparrow)$ is at least closed over these domains. So if separating the domains is required to explain how exponentiation relates to quasigroups, then this function-with-2-domains is no longer a binary operation! However, I have heard people refer to this kind of binary function as a scalar multiplication and an external binary operation, so we can call these things external quasigroups. A related structure to quasigroups is that of a loop, but in no way, shape or form does exponentiation form a loop, since there does not exist an identity element such that $1^y = y$ for all y, granted, there does exist a function $I(y) = \sqrt[y]{y}$ such that $I(y)^y = y$, but this follows directly from the quasigroup structure. However, exponentiation does have a right-identity element that acts as $x^1 = x$ for all x. So this gives me some justification to make the following definition. A poweroid $(X, Y, \uparrow, 1)$ is an external quasigroup with right-identity. In other words, let $X, Y$ be subsets of $Z$. If $(X, Y, *, \backslash, /, 1)$ is a poweroid, then the operations $(*, \backslash, /)$ satisfy:  \begin{align} &(*)\ :\ X \times Y \to X &\text{external binary operation} \\ &(\backslash)\ :\ X \times X \to Y &\text{log, left-inverse operation} \\ &(/)\ :\ X \times Y \to X &\text{root, right-inverse operation} \\ &\exists{1 \in Y}, \forall{x \in X}, (x \backslash x) = 1 &\text{right-identity element} \end{align} For starters, poweroids do exist, namely the trivial poweroid $(\{u\},\ \{1\},\ \uparrow,\ 1)$ where $u^1 = \sqrt[1]{u} = u$ and $\log_u(u) = 1$. Some of the things that I have found recently are that $(\mathbb{R}^{+}-\{1\},\ \mathbb{R}^{+},\ \uparrow,\ 1)$ forms a poweroid. $((0, 1),\ \mathbb{R}^{+},\ \uparrow,\ 1)$ forms a poweroid. $((1, \infty),\ \mathbb{R}^{+},\ \uparrow,\ 1)$ forms a poweroid. For any complex number u such that $0 \ne |u| \ne 1$, let $Y$ be the complex unit circle, and let $X = u^Y$, then $(X,\ Y,\ \uparrow,\ 1)$ forms a poweroid. I'm starting to think that this looks a lot like iteration (semi)groups, but I don't have a clear idea of how they're related at the moment. Andrew Robbins andydude Long Time Fellow Posts: 509 Threads: 44 Joined: Aug 2007 12/19/2009, 10:55 PM The more I think about it, I think it is possible to show that: $((1, \infty), \mathbb{R}^{+}, x^{x^{y-1}}, 1)$ is a poweroid if the inverse functions are understood a bit more. $((1, \infty), \mathbb{R}^{+}, {\uparrow}{\uparrow}, 1)$ is a poweroid, regardless of the extension. The only requirement I can think of is monotonicity. $((1, \infty), \mathbb{R}^{+}, {\uparrow}{\uparrow}{\uparrow}, 1)$ is a poweroid, etc. I think there are also poweroids with these operations (lower tetration, standard tetration, etc.) over complex domains, such as the one for exponentiation with the unit circle... but I'm not sure how exactly it would work for an arbitrary tetration extension. andydude Long Time Fellow Posts: 509 Threads: 44 Joined: Aug 2007 12/19/2009, 11:01 PM (This post was last modified: 12/19/2009, 11:03 PM by andydude.) (12/18/2009, 08:13 AM)andydude Wrote: $(\mathbb{R}^{+}-\{1\},\ \mathbb{R}^{+},\ \uparrow,\ 1)$ forms a poweroid. ... Andrew Robbins SCRATCH THAT! it is false. $\{1/2,\ 2\} \subset \mathbb{R}^{+}-\{1\}$, but $\log_2(1/2) = -1$ which is not a member of the positive reals. However, with the slight modification $(\mathbb{R}^{+}-\{1\},\ \mathbb{R}-\{0\},\ \uparrow,\ 1)$ forms a poweroid. I believe the statement is true. The reason why 0 and 1 must be excluded is so that $\sqrt[y]{x}$ is uniquely defined. If we include 1, 0 in the base domain, exponent domain respectively, then roots are not uniquely defined, at which point it stops being a poweroid. « Next Oldest | Next Newest »


text:
# zbMATH — the first resource for mathematics

Lectures on groups of homotopy spheres. (English) Zbl 0576.57028
Algebraic and geometric topology, Proc. Conf., New Brunswick/USA 1983, Lect. Notes Math. 1126, 62-95 (1985).
[For the entire collection see Zbl 0553.00007.]
Kervaire and Milnor’s germinal paper, in which they used the newly discovered techniques of surgery to begin the classification of smooth closed manifolds homotopy equivalent to a sphere (homotopy-$$spheres)$$, was intended to be the first of two papers in which this classification would be essentially completed (in dimensions $$\geq 5)$$. Unfortunately, the second part never appeared. As a result, in order to extract this classification from the published literature it is necessary to submerge oneself in more far-ranging and complicated works, which cannot help but obscure the beautiful ideas contained in the more direct earlier work of Kervaire and Milnor. This is especially true for the student who is encountering the subject for the first time.
These notes cover the material which I believe would have appeared in ”Groups of homotopy spheres, II. The reader is assumed to be familiar with the papers of Kervaire-Milnor where they define the group $$\theta^ n$$ of h-cobordism classes of homotopy n-spheres and the subgroup $$bP^{n+1}$$ defined by homotopy spheres which bound parallelizable manifolds. The goal is to compute $$bP^{n+1}$$ and $$\theta^ n/bP^{n+1}$$ (adapted from the introduction).
Reviewer: Th.Bröcker

##### MSC:
 57R60 Homotopy spheres, Poincaré conjecture 57R65 Surgery and handlebodies


text:
## Elementary Statistics (12th Edition)

$\alpha=1-0.98=0.02.$ $\sigma$ is 21, hence we use the z-distribution with $df=sample \ size-1=49-1=48$ in the table. $z_{\alpha/2}=z_{0.01}=2.33.$ Margin of error:$z_{\alpha/2}\cdot\frac{\sigma}{\sqrt {n}}=2.33\cdot\frac{21}{\sqrt{49}}=6.99.$ Hence the confidence interval:$\mu$ is between 0.4-6.99=-6.59 and 0.4+6.99=7.39. The result suggests that the method is not too effective because the interval contains 0.


text:
I have a weird thing with the multiplication of command-line tools and gizmos: I forget them.

Do I want to run supercool gitlab commands? Hell yea! Do I need to install 12 utilities (or code a new one) to archive every project older than a year? I hope not...

### The setup

I am a sucker for well documented fully linted code. But the thing is, all the gizmos that help me do that have to be installed in the system or in my ~/bin and I have to remember to update them, and I have to install them on my CD machine, and on every new environment I setup, and make sure they are still compatible with the toolchain, and it freaks me out, ok?

Plus,watching the students try to do it is painful.

So, given a 100% vanilla swift-capable environment, can I manage to run documentation and linting?

### The idea

We have Swift Package Manager, which is now a first-class citizen in XCode, but it can't run shell script phases without some nasty hacks.

What if some targets were (wait for it) built to do the documentation and the linting?

### Linting

One of the most popular linters out there is swiftlint, and it supports SPM. It can also build a library instead of an executable, which means one of my targets could just run the linting and output it in the terminal.

In the Package.swift file, all I needed to do was add the right dependency, and the right product and voila!

Now, SPM is very strict with paths, so I had to put a file named main.swift in the Sources/<target>/ directory, in this case Sources/Lint.

Running the linter is fairly straightforward, and goes in the main.swift file:

Setup the .swiftlint file as usual, and run the command via swift run Lint

Sources/WonderfulPackage/main.swift
⛔ Line 15: Variable name should be between 3 and 40 characters long: 'f'
⚠ Line 13: Arguments can be omitted when matching enums with associated types if they are not used.
⚠ Line 12: Line should be 120 characters or less: currently 143 characters

### Documentation

Documentation is actually trickier, because most documentation tools out there aren't built in swift, or compatible with SPM. Doxygen and jazzy are great, but they don't fit my needs.

I found a project that was extremely promising called SourceDocs by Eneko Alonso, but it isn't a library, so I had to fork it and make it into one (while providing a second target to generate the executable if needed). One weird issue is that SPM doesn't like subtargets to bear the same name so I had to rename a couple of them to avoid conflict with Swift Argument Parser (long story).

I finally found myself in the same spot than with the linter. All I needed to do was create another target, and Bob's you're uncle. Well actually he was mine. I digress.

Another well-placed main file:

Now, the command swift run Docs generates the markdown documentation in the Documentation directory.

Parsing main.swift (1/1)
Removing reference documentation at 'WonderfulPackage/Documentation/KituraStarter'... ✔
Generating Markdown documentation...
Writing documentation file: WonderfulPackage/Documentation/WonderfulPackage/structs/WonderfulPackage.md ✔
Done 🎉
Successful run of the documentation phase

### Conclusion

✅ Vanilla swift environment
✅ No install needed
✅ Works on Linux and MacOS
✅ Integrated into SPM
⚠ When running in XCode, the current directory is always wonky for packages

Every now and again (especially when training a model), I need to have a guesstimate as to how long a "step" takes, and how long the process will take, so I wrote myself a little piece of code that does that. Because I've had the question multiple times (and because I think everyone codes their own after a while), here's mine. Feel free to use it

/// Structure that keeps track of the time it takes to complete steps, to average or estimate the remaining time
public struct TimeRecord {
/// The number of steps to keep for averaging. 5 is a decent default, increase or decrease as needed
/// Minimum for average is 2, obvioulsy
public var smoothing: Int = 5 {
didSet {
smoothing = max(smoothing, 2) // minimum 2 values
}
}
/// dates for the steps
private var dates : [Date] = []
/// formatter for debug print and/or display
private var formatter = DateComponentsFormatter()
public var formatterStyle : DateComponentsFormatter.UnitsStyle {
didSet {
formatter.allowedUnits = [.hour, .minute, .second, .nanosecond]
formatter.unitsStyle = formatterStyle
}
}

public init(smoothing s: Int = 5, style fs: DateComponentsFormatter.UnitsStyle = .positional) {
smoothing = max(s, 2)
formatterStyle = fs
formatter = DateComponentsFormatter()
// not available everywhere
// formatter.allowedUnits = [.hour, .minute, .second, .nanosecond]
formatter.allowedUnits = [.hour, .minute, .second]
formatter.unitsStyle = fs
}

/// adds the record for a step
/// - param d: the date of the step. If unspecified, current date is taken
mutating func addRecord(_ d: Date? = nil) {
if let d = d { dates.append(d) }
else { dates.append(Date()) }
while(dates.count > smoothing) { dates.remove(at: 0) }
}

/// gives the average delta between two steps (in seconds)
var averageDelta : Double {
if dates.count <= 1 { return 0.0 }
var totalTime = 0.0
for i in 1..<dates.count {
totalTime += dates[i].timeIntervalSince(dates[i-1])
}

}

/// gives the average delta between two steps in human readable form
/// - see formatterStyle for options, default is "02:46:40"
let delta = averageDelta
return formatter.string(from: delta) ?? ""
}

/// given a number of remaining steps, gives an estimate of the time left on the process (in s)
func estimatedTimeRemaining(_ steps: Int) -> Double {
return Double(steps) * averageDelta
}

/// given a number of remaining steps, gives an estimate of the time left on the process in human readable form
/// - see formatterStyle for options, default is "02:46:40"
func estimatedTimeRemainingHumanReadable(_ steps: Int) -> String {
let delta = estimatedTimeRemaining(steps)
return formatter.string(from: delta) ?? ""
}
}

When I train a model, I tend to use it that way:

// prepare model
var tt = TimeRecord()

while currentEpoch < maxEpochs {
// train the model
if currentEpoch > 0 && currentEpoch % 5 == 0 {
print(tt.averageDeltaHumanReadable + " per epoch, "
+ tt.(estimatedTimeRemainingHumanReadable(maxEpochs - currentEpoch) + " remaining"
)
}
}

UUIDs are fine, but who doesn't like a decent String instead? It's shorter and it doesn't scare the non-programmers as much!

UUIDs are 128 bits, and I want to use a 64 characters map: a to z, A-Z, and 0-9, plus - and + to round it up.

64 possibilities is equivalent to 6 bits of data, and UUIDs are made of 16 bytes (8 bits of data). What that gives me is a way to split 16 bytes into 22 sixytes (yes I invented that word. So what?)

| 8 8 8 _ | 8 8 8 _ | 8 8 8 _ | 8 8 8 _ | 8 8 8 _ | 8
| 6 6 6 6 | 6 6 6 6 | 6 6 6 6 | 6 6 6 6 | 6 6 6 6 | 6 6

Why? Because 3x8 = 6x4, same number of bits in both.

Now, we redistribute the bits around (Xs are the bits fron the bytes, Ys are the bits from the sixytes):

XXXXXX|XX XXXX|XXXX XX|XXXXXX
YYYYYY|YY YYYY|YYYY YY|YYYYYY

With some shifts and some binary or, we're down from a 36 hexadecimal character string with dashes to a 22 character with a very low probability of punctuation. Of course if you want to disambiguate the symbols like O and 0, you can change the character map, as long as your charmap stays 64 items long.

extension UUID {
static let charmap =
["a","b","c","d","e","f","g","h","i","j","k","l","m","n",
"o","p","q","r","s","t","u","v","w","x","y","z",
"A","B","C","D","E","F","G","H","I","J","K","L","M","N",
"O","P","Q","R","S","T","U","V","W","X","Y","Z",
"0","1","2","3","4","5","6","7","8","9","-","+"]
static let charmapSet =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-+"

var tinyWord : String {
let from = self.uuid
let bytes = [from.0, from.1, from.2,from.3,from.4,from.5,from.6,from.7,from.8,from.9,
from.10, from.11, from.12,from.13,from.14,from.15]

// split in 6-bits ints
var sbytes : [UInt8] = []
for i in 0..<5 {
let b1 = bytes[i*3]
let b2 = bytes[i*3+1]
let b3 = bytes[i*3+2]

let sb1 = b1 >> 2
let sb2 = (b1 & 0x03) << 4 | (b2 >> 4)
let sb3 = (b2 & 0x0f) << 2 | (b3 >> 6)
let sb4 = (b3 & 0x3f)
sbytes += [sb1,sb2,sb3,sb4]
}
// all done but the last byte
sbytes.append(bytes[15]>>2)
sbytes.append(bytes[15]&0x03)

var result = ""
for i in sbytes {
result += UUID.charmap[Int(i)]
}

return result
}
}

The reverse procedure is a bit longer, because we have to stage the values in groups of 4 sexytes for 3 bytes, and do a couple of sanity checks.

extension UUID {
init?(tinyWord: String) {
if tinyWord.count != 22 || !tinyWord.allSatisfy({ UUID.charmapSet.contains($0) }) { return nil } var current : UInt8 = 0 var bytes : [UInt8] = [] for (n,c) in tinyWord.enumerated() { guard let idx32 = UUID.charmap.firstIndex(of: String(c)) else { return nil } let idx = UInt8(idx32) if n >= 20 { // last byte if n == 20 { current = idx << 2 } else { current |= idx bytes.append(current) } } else if n % 4 == 0 { // first in cycle current = idx << 2 } else if n % 4 == 1 { // combine current |= idx >> 4 bytes.append(current) current = (idx & 0xf) << 4 } else if n % 4 == 2 { // combine current |= (idx >> 2) bytes.append(current) current = (idx & 0x3) << 6 } else { current |= idx bytes.append(current) current = 0 } } // double check if bytes.count != 16 { return nil } self.init(uuid: (bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7], bytes[8], bytes[9], bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15])) } } Let's test this! let u = UUID() let w = u.tinyWord print(u.uuidString+" : \(u.uuidString.count)") print(w+" : \(w.count)") print(UUID(tinyWord: w)!) 30A5CB6E-778F-4218-A333-3BC8B5A40B65 : 36 mkxlBNEpqHIJmZViTAqlzb : 22 30A5CB6E-778F-4218-A333-3BC8B5A40B65 Now I have a "password friendly" way to pass UUIDs around. Is it a waste of time (because I could just pass the UUIDs around, they aren't that much longer)? Who knows? It makes my shortened URLs a bit less intimidating 😁 From this list, the gist is that most languages can't process 9999999999999999.0 - 9999999999999998.0 Why do they output 2 when it should be 1? I bet most people who've never done any formal CS (a.k.a maths and information theory) are super surprised. Before you read the rest, ask yourself this: if all you have are zeroes and ones, how do you handle infinity? If we fire up an interpreter that outputs the value when it's typed (like the Swift REPL), we have the beginning of an explanation: Welcome to Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1). Type :help for assistance. 1> 9999999999999999.0 - 9999999999999998.0$R0: Double = 2
2> let a = 9999999999999999.0
a: Double = 10000000000000000
3> let b = 9999999999999998.0
b: Double = 9999999999999998
4> a-b
$R1: Double = 2 Whew, it's not that the languages can't handle a simple substraction, it's just that a is typed as 9999999999999999 but stored as 10000000000000000. If we used integers, we'd have:  5> 9999999999999999 - 9999999999999998$R2: Int = 1

Are the decimal numbers broken? 😱

##### A detour through number representations

Let's  look at a byte. This is the fundamental unit of data in a computer and  is made of 8 bits, all of which can be 0 or 1. It ranges from 00000000 to 11111111 ( 0x00 to 0xff in hexadecimal, 0 to 255 in decimal, homework as to why and how it works like that due by monday).

Put like that, I hope it's obvious that the question "yes, but how do I represent the integer 999 on a byte?" is meaningless. You can decide that 00000000 means 990 and count up from there, or you can associate arbitrary values to the 256 possible combinations and make 999 be one of them, but you can't have both the 0 - 255 range and 999. You have a finite number of possible values and that's it.

Of  course, that's on 8 bits (hence the 256 color palette on old games). On  16, 32, 64 or bigger width memory blocks, you can store up to 2ⁿ different values, and that's it.

##### The problem with decimals

While  it's relatively easy to grasp the concept of infinity by looking at  "how high can I count?", it's less intuitive to notice that there is the same amount of numbers between 0 and 1 as there are integers.

So,  if we have a finite number of possible values, how do we decide which  ones make the cut when talking decimal parts? The smallest? The most  common? Again, as a stupid example, on 8 bits:

• maybe we need 0.01 ... 0.99 because we're doing accounting stuff
• maybe we need 0.015, 0.025,..., 0.995 for rounding reasons
• We'll just encode the numeric part on 8 bits ( 0 - 255 ), and the decimal part as above

But that's already  99+99 values taken up. That leaves us 57 possible values for the rest of infinity. And that's not even mentionning the totally arbitrary nature of the  selection. This way of representing numbers is historically the first  one and is called "fixed" representation. There are many ways of  choosing how the decimal part behaves and a lot of headache when coding  how the simple operations work, not to mention the complex ones like  square roots and powers and logs.

##### Floats (IEEE 754)

To  make it simple for chips that perform the actual calculations, floating  point numbers (that's their name) have been defined using two  parameters:

• an integer n
• a power (of base b) p

Such that we can have n x bᵖ, for instance 15.3865 is 153863 x 10^(-4). The question is, how many bits can we use for the n and how many for the p.

The standard is to use 1 bit for the sign (+ or -), 23 bits for n, 8 for p, which use 32 bits total (we like powers of two), and using base 2, and n is actually 1.n.  That gives us a range of ~8 million values, and powers of 2 from -126  to +127 due to some special cases like infinity and NotANumber (NaN).

$$(-1~or~1)(2^{[-126...127]})(1.[one~of~the~8~million~values])$$

In theory, we have numbers from -10⁴⁵ to 1038 roughly, but some numbers can't be represented in that form. For  instance, if we look at the largest number smaller than 1, it's 0.9999999404. Anything between that and 1 has to be rounded. Again, infinity can't be represented by a finite number of bits.

##### Doubles

The  floats allow for "easy" calculus (by the computer at least) and are  "good enough" with a precision of 7.2 decimal places on average. So when  we needed more precision, someone said "hey, let's use 64 bits instead  of 32!". The only thing that changes is that n now uses 52 bits and p 11 bits.

Coincidentally, double has more a meaning of double size than double precision, even though the number of decimal places does jump to 15.9 on average.

We  still have 2³² more values to play with, and that does fill some  annoying gaps in the infinity, but not all. Famously (and annoyingly),  0.1 doesn't work in any precision size because of the base 2. In 32 bits  float, it's stored as 0.100000001490116119384765625, like this:

(1)(2⁻⁴)(1.600000023841858)

Conversely, after double size (aka doubles), we have quadruple size (aka quads), with 15 and 112 bits, for a total of 128 bits.

##### Back to our problem

Our value is 9999999999999999.0. The closest possible value encodable in double size floating point is actually 10000000000000000, which should now make some kind of sense. It is confirmed by Swift when separating the two sides of the calculus, too:

2> let a = 9999999999999999.0
a: Double = 10000000000000000

Our  big brain so good at maths knows that there is a difference between  these two values, and so does the computer. It's just that using  doubles, it can't store it. Using floats, a will be rounded to 10000000272564224 which isn't exactly better. Quads aren't used regularly yet, so no luck there.

It's  funny because this is an operation that we puny humans can do very  easily, even those humans who say they suck at maths, and yet those  touted computers with their billions of math operations per second can't  work it out. Fair enough.

The kicker is, there is a litteral infinity of examples such as this one, because trying to represent infinity in a finite number of digits is impossible.


text:
# 1139. First Contact (30)

400 ms

65536 kB

16000 B

Standard

CHEN, Yue

Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early years. When a boy A had a crush on a girl B, he would usually not contact her directly in the first place. Instead, he might ask another boy C, one of his close friends, to ask another girl D, who was a friend of both B and C, to send a message to B -- quite a long shot, isn't it? Girls would do analogously.

Here given a network of friendship relations, you are supposed to help a boy or a girl to list all their friends who can possibly help them making the first contact.

Input Specification:

Each input file contains one test case. For each case, the first line gives two positive integers N (1 < N <= 300) and M, being the total number of people and the number of friendship relations, respectively. Then M lines follow, each gives a pair of friends. Here a person is represented by a 4-digit ID. To tell their genders, we use a negative sign to represent girls.

After the relations, a positive integer K (<= 100) is given, which is the number of queries. Then K lines of queries follow, each gives a pair of lovers, separated by a space. It is assumed that the first one is having a crush on the second one.

Output Specification:

For each query, first print in a line the number of different pairs of friends they can find to help them, then in each line print the IDs of a pair of friends.

If the lovers A and B are of opposite genders, you must first print the friend of A who is of the same gender of A, then the friend of B, who is of the same gender of B. If they are of the same gender, then both friends must be in the same gender as theirs. It is guaranteed that each person has only one gender.

The friends must be printed in non-decreasing order of the first IDs, and for the same first ones, in increasing order of the seconds ones.

Sample Input:
10 18
-2001 1001
-2002 -2001
1004 1001
-2004 -2001
-2003 1005
1005 -2001
1001 -2003
1002 1001
1002 -2004
-2004 1001
1003 -2002
-2003 1003
1004 -2002
-2001 -2003
1001 1003
1003 -2001
1002 -2001
-2002 -2003
5
1001 -2001
-2003 1001
1005 -2001
-2002 -2004
1111 -2003

Sample Output:
4
1002 2004
1003 2002
1003 2003
1004 2002
4
2001 1002
2001 1003
2002 1003
2002 1004
0
1
2003 2001
0

#### 注意点：

（1）有一个大坑，题目按给定的4位数字前有无‘-’号作为区别男女的标志，有一个测试点包含了-0000这样的数据，如果用int读入，是不会认为它是一个负数的，于是程序自然把其代表的人视作了女性，导致了错误。所以为了保证正确，最好用char数组或者string读入，以确保前面的'-' 号不会丢失。

（2）输出结点值时要按"%04d"的形式输出，以保证输出数字有4位，不足在高位补0

（3）形成的图为无向图，边为无向边

（4）搜索过程中避免过早达到头结点或返回首节点的情况出现，即保证搜索的两个结点既不等于首节点，也不等于尾结点

#### c++代码：

#include <bits/stdc++.h>
using namespace std;
vector<int>graph[10005];//图
bool boy[10005];//下标为ID，元素表示该ID是否是男
int N,M,K,vstart,vend;
int main(){
scanf("%d%d",&N,&M);
for(int i=0;i<M;++i){//读取边的数据
string a,b;
cin>>a>>b;
int ia=abs(stoi(a)),ib=abs(stoi(b));//将字符串化为正整数
graph[ia].push_back(ib);//向图中加入边
graph[ib].push_back(ia);//向图中加入边
boy[ia]=(a[0]!='-');//表示该人性别
boy[ib]=(b[0]!='-');//表示该人性别
}
scanf("%d",&K);
while(K--){
scanf("%d%d",&vstart,&vend);//读取首尾结点
vector<pair<int,int>>result;//存储符合题目要求的两个结点
for(int i:graph[abs(vstart)])//遍历首节点的朋友
if(i!=abs(vend)&&i!=abs(vstart)&&boy[i]==boy[abs(vstart)])//找到非首尾结点且与首节点性别相同的朋友作为第一个节点
for(int j:graph[i])//遍历第一个节点的朋友
if(j!=abs(vend)&&j!=abs(vstart)&&boy[j]==boy[abs(vend)])//找到非首尾结点且与尾节点性别相同的朋友作为第二个节点
for(int k:graph[j])//遍历第二个节点的朋友
if(k==abs(vend))//尾结点是第二个节点的朋友
result.push_back({i,j});//i,j两个节点符合要求
printf("%d\n",result.size());
sort(result.begin(),result.end());//排序
for(auto&i:result)//输出
printf("%04d %04d\n",i.first,i.second);
}
return 0;
}
`

• 擅长领域：
• 算法