text:
# N-dimensional pyramid numbers [duplicate]

Given two inputs, a number n and a dimension d, generate the nth d-dimensional pyramid number.

That was confusing, let me try again.

For d = 1, the numbers start 1,2,3,4,5 and is the number of points in a line n points long.

For d = 2, the numbers start 1,3,6,10,15 and is the number of points in a triangle with side length n, also known as the triangle numbers e.g.

     0
0 0
0 0 0
0 0 0 0

For d=3, the numbers start 1,4,10,20,35 and is the number of points in a pyramid of side n. For d=4, it's a 4-d pyramid, and so on.

Beyond this, visualization gets a bit tricky so you will have to use the fact that the nth d-dimensional pyramid number is equal to the sum of the first n d-1-dimensional pyramid numbers.

For example, the number of dots in a 3-d pyramid of side 5 is the sum of the first 5 triangle numbers: 1+3+6+10+15 = 35.

You can expect reasonable input (within your languages boundaries), although Standard loopholes apply. No builtins explicitly for this purpose (looking at you, Mathematica)

Numbers are 1-indexed, unless you specify otherwise.

Example recursive code in Javascript:

function pyramid(dim,num){                          //declare function
if(dim == 0){                                     //any 0-dimensional is a single point, so return 1
return 1;
} else {                                          //otherwise
function numbersUpTo(x){                        //helper function to get the numbers up to x
if(x==0){                                     //no numbers up to 0
return [];
} else {                                      //otherwise recurse
return [x].concat(numbersUpTo(x-1));
}
}
var upto = numbersUpTo(num).map(function(each){ //for each number up to num
return pyramid(dim-1,each);                   //replace in array with pyramid(dimension - 1,the number)
});
return upto.reduce((a,b)=>a+b);                 //get sum of array
}
}

This is code-golf, so fewest bytes wins.

• Welcome to Code Golf! As it is, this seems like a reasonably well-written challenge. However, in future, I'd recommend posting in the Sandbox to get feedback first. Feb 18 '21 at 9:44
• Isn't it the same as nCr(n+d, d)? If so, I'm afraid it's a duplicate of existing nCr challenges. Feb 18 '21 at 10:04
• @Bubbler it's actually nCr(n+d, d-1) Feb 18 '21 at 10:14
• If you index n from 0 and d from 1, then @Bubbler's formula is correct. Feb 18 '21 at 13:01
• @pxeger xigoi is indeed correct: it's nCr(n+d-1, d). Feb 18 '21 at 13:55

# JavaScript (ES6), 24 bytes

Expects (n)(d).

n=>g=d=>d?n++/d*g(d-1):1

Try it online!

• For posterity, since Arnauld's edits fell within the grace period: 36 34 Feb 18 '21 at 10:08
• @pxeger The 34-byte version was really silly since k is not used anymore. :-p Feb 18 '21 at 10:10

# APL(Dyalog Unicode), 7 6 bytes SBCS

⊢!1-⍨+

-1 from rak1507.

A train submission which takes n on the left and d on the right.

Uses the combination based formula mentioned in the question comments.

1-indexed.

## Explanation

⊢!1-⍨+
+ n + d
1-⍨  - 1
!     choose
⊢      d

• ⊢!1-⍨+ is 6 bytes Feb 18 '21 at 13:13

# Jelly, 3 bytes

+’c

Try it online!

Accepts n as the first argument and d as the second argument. Uses the formula $$n+d-1 \choose d$$

## Explanation

+’c   Main dyadic link
+     Sum
’    Decrement
c   Combinations with the right argument

# Jelly, 8 bytes

’çⱮSɗṛ’?

Try it online!

Accepts d as the first argument and n as the second argument. Uses the algorithm described in the challenge.

## Explanation

’çⱮSɗṛ’?   Main dyadic link
?   If
’    d-1 ≠ 0
ɗ      then (
’            d-1
ç           Apply this link
Ɱ            with each [1..n] as the right argument
S         Sum
ɗ      )
ṛ     else n

For some reason, this does not work with ß instead of ç. It would be nice if someone explained why.

# J, 6 bytes

[!<:@+

Try it online!

# Whispers v2, 52 49 bytes

> Input
> Input
>> 1+2
>> ≺3
>> 4C2
>> Output 5

Try it online!

Inputs the numbers from STDIN.

-3 bytes from Michael Chatiskatzi.

If floating point output is not allowed, then 63 bytes.

• 49 bytes if you use ≺ for decrementing. Feb 21 '21 at 9:25

# Perl 5, 41 bytes

sub f{($n,$d)=@_;$d?$n/$d*f($n+1,$d-1):1}  Try it online! Influenced by Arnaulds javascript answer. $D=$_,print"d=$D:   ".join(" ",map f($_,$D), 1..10)."\n" for 1..4;

d=1:   1 2 3 4 5 6 7 8 9 10
d=2:   1 3 6 10 15 21 28 36 45 55
d=3:   1 4 10 20 35 56 84 120 165 220
d=4:   1 5 15 35 70 126 210 330 495 715

• You can save 4 bytes by using named parameters tio.run/… Feb 20 '21 at 18:29
• Nice tip. But not sure if the 20 bytes in -Mfeature+signatures should be added. Maybe the Perl7 initiative will make such signatures available by default. perl.com/article/announcing-perl-7 Feb 21 '21 at 20:59

# Wolfram Language (Mathematica), 17 bytes

Binomial[##-1,#]&

Try it online!

The boring answer. Input [d, n].

### 29 bytes

Nest[Tr@*Array~Curry~2,1&,#]&

Try it online!

Input [d][n].

Returns the d-pyramid function, constructed using the given recursive definition. Call it on n for the nth d-pyramid number.

# Haskell, 25 bytes

0#n=1
d#n=(d-1)#(n+1)*n/d

Try it online!

This was my old solution, same idea, but much longer, 37 bytes

a%b=product[a+1..b-1]
d#n=d%(n+d)/0%n

Try it online!

# Julia, 26 22 bytes

d>n=d<1||sum(~-d.>1:n)

Try it online!

# MathGolf, 8 bytes

r+k╒m╠ε*

First input $$\d\$$ as an integer, second input $$\n\$$ as a float.

Port of my 05AB1E answer.

Try it online.

Explanation:

r         # Push a list in the range [0, first (implicit) input d)
+        # Add the second (implicit) input n to each: [n,n+1,...,n+d-1]
k       # Push the first input d again
╒      # Pop and push a list in the range [1,d]
m╠    # Divide the values at the same positions from one another:
#  [n/1,(n+1)/2,...,(n+d-1)/d]
ε*  # Take the product (reduce by multiplying)

# Python 3, 56 55 51 bytes

Saved a byte thanks to Kevin Cruijssen!!!
Saved 4 bytes thanks to ovs!!!

f=lambda n,d:d<1or sum(f(i+1,d-1)for i in range(n))

Try it online!

• 51 bytes
– ovs
Feb 18 '21 at 11:42
• @ovs You took my brains to another dimension - thanks! :D Feb 18 '21 at 12:05

# 05AB1E, 97 4 bytes

+<Ic

$$\a(n,d) = {n+d-1\choose d}\$$

The inputs are in the order $$\n,d\$$.

Previous 7 bytes answers:

L©<+®/P

The inputs are in the order $$\d,n\$$ and the output is a float.

Equal-bytes alternative by porting @Razetime's APL answer:

LIGηO}θ

The inputs are in the order $$\n,d\$$.

Explanation:

+        # Add the two (implicit) inputs together
<       # Decrease it by 1
I      # Push the second input d
c     # Get the number of combinations / the binomial coefficient: n+d-1 choose d
# (after which it is output implicitly as result)

L        # Push a list in the range [1, first (implicit) input d]
©       # Store it in variable ® (without popping)
<      # Decrease each by 1 to make the range [0,d)
+     # Add the second (implicit) input-integer n to each: [n,n+1,...,n+d-1]
®    # Push list [1,d] from variable ® again
/   # Divide the items at the same positions in the two lists:
#  [n/1,(n+1)/2,...,(n+d-1)/d]
P  # Take the product of this list
# (after which it is output implicitly as result)

L        # Push a list in the range [1, first (implicit) input n]
IG      # Loop the second input d - 1 amount of times:
η     #  Get the prefixes of the current list
O    #  And sum each prefix together
}θ     # After the loop: pop and leave just the last item
# (after which it is output implicitly as result)

# Haskell, 44 39 bytes

d#n=sum\$iterate(scanl(+)0)[1..n]!!(d-1)

Try it online!

# Rust, 63 58 bytes

|n,d|(n..=n+d-1).product::<u32>()/(1..=d).product::<u32>()

Try it online! (with calling code)

# Wolfram Language (Mathematica), 36 35 bytes

-1 byte thanks to att!

Last@Nest[Accumulate,1~Table~#,#2]&

Try it online!

Just to prove that Mathematica can do things without builtins! One nice thing about this function is that it calculates the pyramidal numbers exactly according to the definition, by summing (using Accumulate) over pyramidal numbers of one dimension less (hence recursively starting from the 0-dimensional pyramidal numbers, here generated as an array of 1s of the correct length, using 1&~Array~#).

• Nice! Mathematica has bultins for practically every purpose, so nice job not using them! Feb 19 '21 at 8:08
• 35 bytes
– att
Feb 20 '21 at 3:33
• Ah yes, I forget that Table can do this, thanks :) Feb 20 '21 at 7:54

# Python 3, 33 bytes

f=lambda n,d:d<1or n/d*f(n+1,d-1)

Try it online!

# R, 33 28 bytes

function(n,d)choose(n+d-1,d)

Try it online!

5 bytes saved by Dominic van Essen.

• Same approach but shorter: 28 bytes... Feb 21 '21 at 0:13

# Husk, 5 bytes

→!¡∫ḣ

Try it online!

Same idea as my APL answer. Takes n and k, both 1 indexed, as command line args.

# Charcoal, 18 13 bytes

≔…¹ＮθＩ÷Π⁺ＮθΠθ

Try it online! Link is to verbose version of code. Explanation: Now inspired by @KevinCruijssen's 05AB1E answer.

≔…¹Ｎθ

Input n and generate an exclusive range from 1 to n.

Ｉ÷Π⁺ＮθΠθ

Input d and vectorised add it to the range, then divide the product of that range by the product of the original range.

# Java (JDK), 48 bytes

int f(int n,int d){return d<1?1:f(n+1,d-1)*n/d;}

Try it online!

# Groovy, 27 bytes

f={n,d->d?f(n+1,d-1)*n/d:1}

Try it online!


text:
# Research

#### Working Papers

  We argue that adjustment frictions for durable goods generate a powerful amplification channel from fluctuations in unemployment risk to aggregate consumption demand.
First, we use Italian household survey data to document that durable expenditures react strongly to increased unemployment risk (with a semi-elasticity of around 3), while the effect on nondurable expenditures is indistinguishable from zero. Second, we propose and calibrate a buffer-stock savings model that includes adjustment frictions for durable goods. Households optimally employ an (S, s)-type decision rule, in which the value of postponing purchases of durables increases if unemployment risk is temporarily high. Although not targeted in the calibration, we find that the model reproduces the semi-elasticities of expenditures to unemployment risk estimated in the data.
Using the model, we find that the inclusion of adjustment frictions raises the aggregate demand response for durable goods to fluctuations in perceived unemployment risk by approximately 250 percent. Moreover, upon experiencing an adverse risk shock, the same frictions dampen the responsiveness of aggregate demand for durable goods to the interest rate and transitory income shocks, constraining monetary and fiscal transfer policies in stabilizing consumption in recessions.

  We use Danish administrative data 1980-2013 to study the underlying mechanisms generating fluctuations in income risk. We partition the population into 37 narrowly defined educational categories and document the cyclicality of income risk for each category separately. For the individual educational categories, mean income growth is strongly correlated with income growth skewness, with an average correlation of 0.87-0.88. We show that the connection between income growth skewness and mean income growth is not only strong in the time dimension, but also in the cross section. Across the 37 educational categories, the correlation between mean income growth and income growth skewness is 0.93-0.96.
We show that labor-market frictions together with variations in productivity growth generate the relationship between mean income growth and income growth skewness. In a quantitative job-ladder model, variations in productivity growth quantitatively capture both the time-series and cross-sectional relationship. In contrast, variations in the job-finding rate, the job-separation rate and the offer-arrival rate for employed fail to generate the relationship between mean income growth and income growth skewness in our framework.

#### Work in Progress

Gender Differences in Danish Top Income Mobility (with Niels-Jakob Harbo Hansen, Hans Henrik Sievertsen, and Erik Öberg)

Durable Expenditure Dynamics: Evidence from Denmark (with Mikael Carlsson, Jeppe Druedahl, and Erik Öberg )

format: plain


text:
On some general almost periodic optimal control problems : links with periodic problems and necessary conditions
ESAIM: Control, Optimisation and Calculus of Variations, Tome 14 (2008) no. 3, pp. 590-603.

In this paper, we are concerned with periodic, quasi-periodic (q.p.) and almost periodic (a.p.) Optimal Control problems. After defining these problems and setting them in an abstract setting by using Abstract Harmonic Analysis, we give some structure results of the set of solutions, and study the relations between periodic and a.p. problems. We prove for instance that for an autonomous concave problem, the a.p. problem has a solution if and only if all problems (periodic with fixed or variable period, q.p. or a.p.) have a constant solution. After that, we give some first order necessary conditions (weak Pontryagin) in the space of Harmonic Synthesis and we also give in this space an existence result.

DOI : https://doi.org/10.1051/cocv:2007065
Classification : 43A60,  49K27,  49J27
Mots clés : almost periodic optimal control, periodic optimal control, Pontryagin theorem, almost periodicity on groups
@article{COCV_2008__14_3_590_0,
author = {Pennequin, Denis},
title = {On some general almost periodic optimal control problems : links with periodic problems and necessary conditions},
journal = {ESAIM: Control, Optimisation and Calculus of Variations},
pages = {590--603},
publisher = {EDP-Sciences},
volume = {14},
number = {3},
year = {2008},
doi = {10.1051/cocv:2007065},
zbl = {1142.49012},
mrnumber = {2434068},
language = {en},
url = {http://www.numdam.org/articles/10.1051/cocv:2007065/}
}
TY  - JOUR
AU  - Pennequin, Denis
TI  - On some general almost periodic optimal control problems : links with periodic problems and necessary conditions
JO  - ESAIM: Control, Optimisation and Calculus of Variations
PY  - 2008
DA  - 2008///
SP  - 590
EP  - 603
VL  - 14
IS  - 3
PB  - EDP-Sciences
UR  - http://www.numdam.org/articles/10.1051/cocv:2007065/
UR  - https://zbmath.org/?q=an%3A1142.49012
UR  - https://www.ams.org/mathscinet-getitem?mr=2434068
UR  - https://doi.org/10.1051/cocv:2007065
DO  - 10.1051/cocv:2007065
LA  - en
ID  - COCV_2008__14_3_590_0
ER  -
Pennequin, Denis. On some general almost periodic optimal control problems : links with periodic problems and necessary conditions. ESAIM: Control, Optimisation and Calculus of Variations, Tome 14 (2008) no. 3, pp. 590-603. doi : 10.1051/cocv:2007065. http://www.numdam.org/articles/10.1051/cocv:2007065/

[1] J.-P. Aubin, Optima and Equilibria: an introduction to Nonlinear Analysis. Springer, 2nd Edn. (1988). | MR 1729758 | Zbl 0930.91001

[2] A.S. Besicovitch, Almost Periodic Functions. Cambridge University Press, Cambridge (1932) (and Dover, 1954). | JFM 58.0264.02 | MR 68029 | Zbl 0004.25303

[3] J. Blot, Le théorème de Markov-Kakutani et la presque-périodicité, Fixed Point Theory and Applications, M. Théra and J.B. Baillon Eds., Pitman Research Notes in Mathematical Series 252, Longman, London (1991) 45-56. | MR 1122817 | Zbl 0757.47027

[4] J. Blot, Oscillations presque-périodiques forcées d'équations d'Euler-Lagrange. Bull. Soc. Math. France 122 (1994) 285-304. | Numdam | MR 1273905 | Zbl 0801.34043

[5] J. Blot, Variational Methods for the Almost Periodic Lagrangian Oscillations. Preprint, Cahiers Eco et Maths No. 96.44 (1996).

[6] J. Blot and D. Pennequin, Spaces of quasi-periodic functions and oscillations in dynamical systems. Acta Appl. Math. 65 (2001) 83-113. | MR 1843787 | Zbl 1010.42003

[7] J. Blot and D. Pennequin, Existence and structure results on Almost Periodic solutions of Difference Equations. J. Diff. Equa. Appl. 7 (2001) 383-402. | MR 1939590 | Zbl 1005.39011

[8] H. Bohr, Almost Periodic Functions. Julius Springer, Berlin (1933) (Chelsea Publishing Company, N.Y., 1947). | MR 20163

[9] F. Colonius, Optimal Periodic Control, in Lect. Notes Math. 1313, Springer, Berlin (1988). | MR 947339 | Zbl 0663.49011

[10] C. Corduneanu, Almost Periodic Functions. Chelsea (1989). | Zbl 0672.42008

[11] G. Da Prato and A. Ichikawa, Optimal control of linear systems with a.p. inputs. SIAM J. Control Optim. 25 (1987) 1007-1019. | MR 893995 | Zbl 0626.93030

[12] D.G. De Figueiredo, Lectures on the Ekeland Variational Principle with Applications and Detours. Tata Institute of Fundamental Research, Bombay (1989). | MR 1019559 | Zbl 0688.49011

[13] J. Favard, Leçons sur les fonctions presque-périodiques. Gauthiers-Villars, Paris (1933). | JFM 59.0996.01 | Zbl 0007.34303

[14] A. Halanay, Optimal Control of Periodic solutions. Rev. Rouman. Mat. Pure Appl. 19 (1974) 3-16. | MR 344968 | Zbl 0276.49012

[15] V.P. Havin and N.K. Nikolski Eds., Commutative Harmonic Analysis II. Springer, Berlin (1991). | MR 1622489 | Zbl 0892.00021

[16] E. Hewitt, K.A. Ross, Abstract Harmonic Analysis I & II. Springer, Berlin, 2nd Edn. (1979) (and 1970). | Zbl 0416.43001

[17] F.J.M. Horn and J.E. Bailey, An application of the theorem of relaxed control to the problem of increasing catalyst selectivity. J. Opt. Theory Appl. 2 (1968) 441-449. | MR 1551295

[18] A. Kovaleva, Optimal Control of Mechanical Oscillations. Springer, Berlin (1999). | MR 1692110 | Zbl 0939.74002

[19] J.L. Mauclaire, Intégration et Théorie des Nombres. Travaux en Cours, Hermann, Paris (1986). | MR 860561 | Zbl 0628.10058

[20] G.M. N'Guérékata, Almost automorphic and almost periodic functions in abstract spaces. Kluwer Academic Publishers (2001) | Zbl 1001.43001

[21] P. Nistri, Periodic Control Problems for a class of nonlinear periodic differential systems. Nonlinear Anal. Theor. Meth. Appl. 7 (1983) 79-90. | MR 687032 | Zbl 0502.49004

[22] D. Pennequin, Existence results on almost periodic solutions of discrete time equations. Discrete Cont. Dynam. Syst. 7 (2001) 51-60. | MR 1806372 | Zbl 1012.39012

[23] I.C. Percival, Variational principles for the invariant toroids of classical dynamics. J. Phys. A: Math. Nucl. Gen. 7 (1974) 794-802. | MR 363071 | Zbl 0304.70022

[24] I.C. Percival, Variational principles for invariant tori and cantori. A.I.P. Conf. Proc. 57 (1979) 302-310. | MR 624989

[25] L. Pontryagin, Topological Groups. N.Y. Gordon and Breach (1966). | MR 201557

[26] J.L. Speyer, Periodic optimal flight. J. Guid. Control Dynam. 61 (1996) 745-754. | Zbl 0854.93107

[27] W. Rudin, Fourier Analysis on Groups. Interscience Publishers, N.Y. (1962). | MR 152834 | Zbl 0107.09603

[28] A. Weil, L'intégration dans les Groupes Topologiques. Hermann, Paris (1940). | JFM 66.1205.02 | Zbl 0063.08195

Cité par Sources :


text:
## Physics for Scientists and Engineers: A Strategic Approach with Modern Physics (3rd Edition)

The pressure at the bottom of the water layer is $1.17\times 10^5~N/m^2$
$P = P_0 + \rho~g~h$ $P$ is the pressure $P_0$ is the atmospheric pressure $\rho$ is the density of the liquid $h$ is the depth below the surface We can find the pressure $P_1$ at the bottom of the oil layer. $P_1 = P_0 + \rho_o~g~h_1$ $P_1 = (1.013\times 10^5~N/m^2) + (900~kg/m^3)(9.80~m/s^2)(0.50~m)$ $P_1 = 1.057\times 10^5~N/m^2$ We can find the pressure $P_2$ at the bottom of the water layer. $P_2 = P_1 + \rho_w~g~h_2$ $P_2 = (1.057\times 10^5~N/m^2) + (1000~kg/m^3)(9.80~m/s^2)(1.20~m)$ $P_2 = 1.17\times 10^5~N/m^2$ The pressure at the bottom of the water layer is $1.17\times 10^5~N/m^2$


text:
💬 👋 We’re always here. Join our Discord to connect with other students 24/7, any time, night or day.Join Here!

# Find the critical numbers of the function.$F(x) = x^\frac{4}{5} (x - 4)^2$

## \begin{aligned}F(x) &=x^{4 / 5}(x-4)^{2} \Rightarrow \\F^{\prime}(x) &=x^{4 / 5} \cdot 2(x-4)+(x-4)^{2} \cdot \frac{4}{5} x^{-1 / 5}=\frac{1}{5} x^{-1 / 3}(x-4)[5 \cdot x \cdot 2+(x-4) \cdot 4] \\&=\frac{(x-4)(14 x-16)}{5 x^{1 / 5}}=\frac{2(x-4)(7 x-8)}{5 x^{1 / 5}}\end{aligned}

Derivatives

Differentiation

Volume

### Discussion

You must be signed in to discuss.

Lectures

Join Bootcamp

### Video Transcript

Okay. We know that we can use the product. Roll off one GPAs FT one to find the derivative were fracturing out the two, as you can see. Okay, Now we have X minus form parentheses. Their first set, X Honest four equals to zero on the end, up with one of our critical numbers. X equals four. Next, we know that we can set seven x months. Eight equal to zero and we end up with X equals eight over seven as our second critical number. And then lastly, don't forget that we have zero as our third critical number because of the denominator.


text:
## Euler Number

The Euler numbers, also called the Secant Numbers or Zig Numbers, are defined for by

 (1)

 (2)

where sech is the Hyperbolic Secant and sec is the Secant. Euler numbers give the number of Odd Alternating Permutations and are related to Genocchi Numbers. The base e of the Natural Logarithm is sometimes known as Euler's number.

Some values of the Euler numbers are

(Sloane's A000364). The first few Prime Euler numbers occur for , 3, 19, 227, 255, ... (Sloane's A014547) up to a search limit of .

The slightly different convention defined by

 (3) (4)

is frequently used. These are, for example, the Euler numbers computed by the Mathematica (Wolfram Research, Champaign, IL) function EulerE[n]. This definition has the particularly simple series definition
 (5)

and is equivalent to
 (6)

where is an Euler Polynomial.

To confuse matters further, the Euler Characteristic is sometimes also called the Euler number.''

See also Bernoulli Number, Eulerian Number, Euler Polynomial, Euler Zigzag Number, Genocchi Number

References

Abramowitz, M. and Stegun, C. A. (Eds.). Bernoulli and Euler Polynomials and the Euler-Maclaurin Formula.'' §23.1 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 804-806, 1972.

Conway, J. H. and Guy, R. K. In The Book of Numbers. New York: Springer-Verlag, pp. 110-111, 1996.

Guy, R. K. Euler Numbers.'' §B45 in Unsolved Problems in Number Theory, 2nd ed. New York: Springer-Verlag, p. 101, 1994.

Knuth, D. E. and Buckholtz, T. J. Computation of Tangent, Euler, and Bernoulli Numbers.'' Math. Comput. 21, 663-688, 1967.

Sloane, N. J. A. Sequences A014547 and A000364/M4019 in An On-Line Version of the Encyclopedia of Integer Sequences.'' http://www.research.att.com/~njas/sequences/eisonline.html and Sloane, N. J. A. and Plouffe, S. The Encyclopedia of Integer Sequences. San Diego: Academic Press, 1995.

Spanier, J. and Oldham, K. B. The Euler Numbers, .'' Ch. 5 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 39-42, 1987.


text:
# Connected simple cubic graph

I am trying to understand this problem and yes this is from my assignment and I should be doing it myself, but I have been staring at it for 2 hours and not getting anywhere, so decided to post it here.

Let G be a connected cubic simple graph that contains 2 edge-disjoint spanning trees show that |G| = 4.

-
Thanks for all the answers guys! When I was reading the problem, I was understanding "2 edge-disjoint spanning tree" as two trees with all edges same but only two different and thats why I had hard time in visualizing but as soon as I realized that it was 2 "edge-disjoint spanning trees", it all started making sense. –  user634 Aug 6 '10 at 14:36

Let $G$ be a simple cubic graph, with two edge-disjoint spanning trees, that has $n$ vertices and $m$ edges. Since $G$ is regular of degree 3, we have

$3n = 2m.$

Now any spanning tree has $n-1$ edges, and $G$ has two disjoint spanning trees. So we have

$m \ge 2n - 2.$

Combining the first equation and the second inequality, we get

$n \le 4$.

Now there are no cubic simple graphs on 1, 2 or 3 vertices, so the result follows. (It is debatable whether there is one on 0 vertices.)

-
+1 Very clean :-) The final inequality should be the other way around: $n \leq 4$. –  tttppp Sep 22 '10 at 8:52
@tttppp: inequality corrected. Thanks! –  Emil May 17 '11 at 10:44

Express the number of edges in a connected cubic simple graph in terms of the number of vertices. Then do the same for a graph that contains 2 edge-disjoint spanning trees. Solve this equation for the number of vertices.

-
I think that this is precisely the kind of hint that we should be giving to homework questions –  Casebash Aug 4 '10 at 2:27


text:
# Math Help - How do i solve this system of differential equations?

1. ## How do i solve this system of differential equations?

$\frac{dx}{dt}=x^2+t$, x(0)=2

$\frac{dy}{dt}=xy-2$, y(0)=1 ?

The methods i have tried don't seem to apply,D-operator,elimination etc.

Would appreciate any help!

2. Oi. That's a de-coupled system (at least, the first equation is independent of y). The solution to the first equation is quite nasty: it involves Airy functions and gamma functions. Or, alternatively, you could write the solution in terms of Bessel functions. Here's WolframAlpha's solution.

Once you have that, you can plug that into your other DE and try to solve that. (Good luck.)

My recommendation: solve it numerically.


text:
Structure of $x^2 + xy + y^2 = z^2$ integer quadratic form

The pythagorean triples $$x^2 + y^2 = z^2$$ can be solved in integers using rational parameterization of solutions to $$x^2 + y^2 = 1$$.

It goes through $$(1,0)$$, then consider the line $$y = -k (x - 1)$$ so that $$x^2 + k^2(x-1)^2 = 1$$

We get $$(1+ k^2 )x^2 - 2k^2 x + k^2 = 1$$ or $$x = \frac{k^2-1}{k^2+1}$$ and $$y=\frac{-2k}{k^2+1}$$ and $$z=1$$

Then set $$k= m/n$$, for $$(x,y,z) = (k^2-1,2k,k^2+1)=(m^2-n^2,2mn,m^2+n^2)$$

What happens for 60-degree angle triangles $$x^2+xy+y^2 = z^2$$ ? We could look for rational solutions to

$$x^2 + xy + y^2 = 1$$ and $$(1,0)$$ works again. Intersect with the line $$y= k (x-1)$$ ...

get integer solutions: $$(m^2-n^2, -m^2+2mn, m^2 - m n + n^2)$$ A similar derivation was obtained earlier on math.StackExchange

In the case of pythagorean triple we can build new solutions $$(m^2-n^2,2mn,m^2+n^2)$$ from old using the maps

$$(m,n) \mapsto (2m-n,m) \text{ or } (2m+n,m) \text{ or } (m+2n,n)$$

Can I find something similar to the Pythagorean triple tree for this quadratic form, $$x^2 + xy + y^2 = z^2$$?

Sure, you're just looking for generators of $O(f,\mathbb{Z})$, where $f(x,y,z)=x^2+xy+y^2-z^2$ is a quadratic form in 3 variables. Since $f$ is isotropic, this will be a non-uniform arithmetic fuchsian group, commensurable with $PSL_2(\mathbb{Z})$. One can start looking for generators by finding vectors $(x,y,z)\in \mathbb{Z}^3$ such that $f(x,y,z)=1, 2$. Reflections in such vectors will generate a reflective subgroup, which one can find by Vinberg's algorithm. If this subgroup is finite-index, then you'll have found something analogous to the Pythagorean triple generators. If not, then you'll have to look for some other generators. Usually, you can also include reflections in vectors of the form $f(x,y,z)=-1,-2$ as well, which give rotations of the hyperbolic plane $f(x,y,z)=-1$ up to $\pm 1$. If this group is reflective, then it will appear somewhere in Daniel Allcock's list.

Generally speaking, this equation has a lot of formulas for the solution. Because it is symmetrical.

Write the formula can someone come in handy. the equation:

$Y^2+aXY+X^2=Z^2$

Has a solution:

$X=as^2-2ps$

$Y=p^2-s^2$

$Z=p^2-aps+s^2$

more:

$X=(4a+3a^2)s^2-2(2+a)ps-p^2$

$Y=(a^3-8a-8)s^2+2(a^2-2)ps+ap^2$

$Z=(2a^3+a^2-8a-8)s^2+2(a^2-2)ps-p^2$

more:

$X=(a+4)p^2-2ps$

$Y=3p^2-4ps+s^2$

$Z=(2a+5)p^2-(a+4)ps+s^2$

more:

$X=8s^2-4ps$

$Y=p^2-(4-2a)ps+a(a-4)s^2$

$Z=-p^2+4ps+(a^2-8)s^2$

For the particular case: $Y^2+XY+X^2=Z^2$ You can draw more formulas.

$X=3s^2+2ps$

$Y=p^2+2ps$

$Z=p^2+3ps+3s^2$

more:

$X=3s^2+2ps-p^2$

$Y=p^2+2ps-3s^2$

$Z=p^2+3s^2$

In the equation: $X^2+aXY+bY^2=Z^2$ there is always a solution and one of them is quite simple.

$X=s^2-bp^2$

$Y=ap^2+2ps$

$Z=bp^2+aps+s^2$

$p,s$ - integers asked us.


text:
## Calculus: Early Transcendentals 8th Edition

Sketch $f(x,y)=x^2 + 9y^2$. We know $f(x,y)=z$ so $z = x^2 + 9y^2$ When looking at this function we know that it will be parabolic. To find the coordinate where the graph crosses the $z$-axis, fill in x = 0 and y = 0. This gives: $z = 0^2 + 9*0^2=0$ So it crosses at $z=0$ Make $x$ and $y$ clear: $x= \sqrt{z-9y^2}$ $y=\sqrt{ \frac{z-x^2}{9}}$ Plugging in 0 for z and y gives $x= \sqrt{0-9\times 0^2}=\sqrt0=0$ Plugging in 0 for z and x gives $y=\sqrt{ \frac{0-0^2}{9}} = \sqrt 0 = 0$ The graph crosses the origin! By filling in more numbers for $x$, $y$, and $z$, you could plot the whole graph. The final graph looks like this:


text:
MathSciNet bibliographic data MR1134625 (93i:05011) 05A30 (11B65) Friedman, Jane; Zeilberger, Doron A generalization of Odlyzko's conjecture: the coefficients of \$(1-q)\sp j/((1-q\sp {2n})\cdots(1-q\sp {2n+2j}))\$$(1-q)\sp j/((1-q\sp {2n})\cdots(1-q\sp {2n+2j}))$ alternate in sign. Proc. Amer. Math. Soc. 118 (1993), no. 3, 1013. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.


text:
# Measurement of the $t\overline{t}$ production cross section in $p\overline{p}$ collisions at $\sqrt{s}=1.96\text{\,}\text{\,}\mathrm{TeV}$ using events with large missing transverse energy and jets

### Cited Authors

• Aaltonen, ; T, ; al, E

• August 2011

• Phys. Rev. D

• 84 /

• 032003 -


text:
# Compacting the Reduced Model

Developing Models for Kalman Filters

In the previous installment, we identified states that were contributing nothing of significance to the state transition model, and cleared them away using a near-diagonal transformation of the system equations. While this reduced the order of the model, it left a state equation system of the original size. In this session, we will apply some numerical operations to clean out the redundancy, reducing the equation system to a minimal size.

## The model deflation process

Start with the state equation systems in reduced order, as described in the previous installments, but still original size.

${x}^{{1}^{\phantom{\rule{1.0em}{0ex}}}}=\phantom{\rule{1.0em}{0ex}}A\phantom{\rule{0.3em}{0ex}}{x}^{0}\phantom{\rule{1.0em}{0ex}}+\phantom{\rule{1.0em}{0ex}}B\phantom{\rule{0.3em}{0ex}}{u}^{0}$ ${y}^{1}\phantom{\rule{1.0em}{0ex}}=\phantom{\rule{1.0em}{0ex}}C\phantom{\rule{0.3em}{0ex}}{x}^{1}\phantom{\rule{1.0em}{0ex}}$

The value of the state vector `x` can be obtained by some linear combination of eigenvectors, since the set of eigenvectors is full rank. Let this particular combination of eigenvectors be described by vector `q`. Thus, we can define this particular decomposition as

$x\phantom{\rule{1em}{0ex}}\equiv \phantom{\rule{1em}{0ex}}E\phantom{\rule{0.3em}{0ex}}q$

From the work that preceded, we know that the eigenvectors can be partitioned into two groups, the ones that have the original values, and the ones that are now associated with 0 eigenvalues (which is to say, they are orthogonal to all rows in the reduced `A` matrix). To help keep things organized, permute your variables (swap rows and columns in the eigenvalue and eigenvector matrices) to push all of the zero eigenvalues to the lower right, which correspondingly pushes the associated eigenvectors to the right.

After this reorganization, it is possible to partition the `E` matrix of eigenvectors to distinguish those having an influence on the system (the group `E1`) and those that do not (the group `E0`).

$x\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}\right]$

We can perform a similar analysis of the input coupling matrix `B`. This matrix can also be represented as a combination of the eigenvector terms. The particular combination that makes this happen can be defined as matrix `V`.

$B\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}E\phantom{\rule{0.3em}{0ex}}V$

As before, we can partition the `V` vector into the part `V1` that the system state transitions responds to, and the part `V0` that the state transition matrix does not respond to.

$B\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{V}_{1}\\ {V}_{0}\end{array}\right]$

We can then observe that the next-state output can use the same eigenvector decomposition that was applied to the state vector within the state update formula. Applying all of these notation changes to the original state equations yields the following.

$\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}{\right]}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}A\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}{\right]}^{0}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{V}_{1}\\ {V}_{0}\end{array}\right]{u}^{0}$

Now we can apply some of the things we know about the state transition matrix and eigenvector properties to simplify. First, we know that when inputs produce new effects via the `V0` matrix, these effects will go into the next state, but after that they will disappear in the very next state update, because the `A` matrix does not respond to them. This one-sample disturbance from input directly to output and then gone, is not a desirable feature to keep in the model. Set the `V0` matrix terms to zero. (You might find that your previous order reduction steps have already forced the `V0` matrix terms to zero, and if so, so much the better, because the disturbances are already gone!) In so doing, there is no longer any point in keeping the `E0` matrix around, so the input coupling simplifies.

$\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}{\right]}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}A\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}{\right]}^{0}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{V}_{1}\phantom{\rule{0.3em}{0ex}}{u}^{0}$

The result of multiplying the vectors in `E0` times state transition matrix `A` yields only 0 vectors. Since these have no influence on next state, there is no point in keeping this vector or the corresponding `q0` state terms around, so simplify again.

$\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{E}_{1}\phantom{\rule{1em}{0ex}}{E}_{0}\end{array}\right]\phantom{\rule{1em}{0ex}}\left[\begin{array}{c}{q}_{1}\\ {q}_{0}\end{array}{\right]}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}A\phantom{\rule{0.3em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{{q}_{1}}^{0}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{V}_{1}\phantom{\rule{0.3em}{0ex}}{u}^{0}$

Once the simplifications to the input coupling and the state transition terms are made, there is no remaining way for the `q0` terms for next-state to have any value besides zero. There is no point in keeping these terms around. At this point, all of the `E0` and `q0` terms are gone from the reduced model.

$\phantom{\rule{1em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{{q}_{1}}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}A\phantom{\rule{0.3em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{q}_{1}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{V}_{1}\phantom{\rule{0.3em}{0ex}}{u}^{0}$

We have gotten rid of a lot of unnecessary terms, but not all of them. Believe it or not, we still have the same inflated number of state equations that we had originally. It is time to apply a surprising operator "out of the air." Define the following matrix.[1]

$M\phantom{\rule{1em}{0ex}}\equiv \phantom{\rule{1em}{0ex}}{\left({{E}_{1}}^{T}\phantom{\rule{0.3em}{0ex}}{E}_{1}\right)}^{-1}\phantom{\rule{0.3em}{0ex}}{{E}_{1}}^{T}$

As strange as this might seem, it should not be completely unfamiliar. If you take a look at the classic Normal Equations[2] solution to an overdetermined set of constraint equations for linear model coefficients, you will see a similar matrix combination in that context.

To see the motivation for this, take this unusual matrix and left-multiply every term in the state transition equation system.

${\left({{E}_{1}}^{T}\phantom{\rule{0.2em}{0ex}}{E}_{1}\right)}^{-1}\phantom{\rule{0.2em}{0ex}}{{E}_{1}}^{T}\phantom{\rule{0.2em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{{q}_{1}}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}{\left({{E}_{1}}^{T}\phantom{\rule{0.3em}{0ex}}{E}_{1}\right)}^{-1}\phantom{\rule{0.2em}{0ex}}{{E}_{1}}^{T}\phantom{\rule{0.2em}{0ex}}A\phantom{\rule{0.3em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{q}_{1}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}{\left({{E}_{1}}^{T}\phantom{\rule{0.2em}{0ex}}{E}_{1}\right)}^{-1}\phantom{\rule{0.2em}{0ex}}{{E}_{1}}^{T}\phantom{\rule{0.2em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{V}_{1}\phantom{\rule{0.3em}{0ex}}{u}^{0}$

That is really awful, but most of the terms result in inverse matrix terms that reduce to an identity, and can be removed.

$\phantom{\rule{1em}{0ex}}{{q}_{1}}^{1}\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}{\left({{E}_{1}}^{T}\phantom{\rule{0.3em}{0ex}}{E}_{1}\right)}^{-1}\phantom{\rule{0.3em}{0ex}}{{E}_{1}}^{T}\phantom{\rule{0.3em}{0ex}}A\phantom{\rule{0.3em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{q}_{1}\phantom{\rule{1em}{0ex}}+\phantom{\rule{1em}{0ex}}{V}_{1}\phantom{\rule{0.3em}{0ex}}{u}^{0}$

One term remains messy, but since it involves only the matrix terms `E1` and `A`, it is really not particularly difficult to compute.

One more detail. The original state vector `x` can be expressed in terms of the eigenvectors as it was in the state transition equations.

$y\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}C\phantom{\rule{1em}{0ex}}x\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}C\phantom{\rule{1em}{0ex}}E\phantom{\rule{1em}{0ex}}q$

Since the `q0` terms are zero and play no role anywhere else, we can make the corresponding simplification here. So this completes the reduced model.

$y\phantom{\rule{1em}{0ex}}=\phantom{\rule{1em}{0ex}}C\phantom{\rule{0.3em}{0ex}}{E}_{1}\phantom{\rule{0.3em}{0ex}}{q}_{1}$

## The test

Let us apply these equations, starting from the reduced order but oversize model that we had previously. Observe that the two zero-valued eigenvalues are located at the lower right.

```redA =
7.8003e-01   4.6840e-01  -4.2817e-01   4.4327e-01
-1.3154e-17   7.8000e-01  -2.4131e-17   1.9392e-17
-6.7964e-01   8.5388e-01   3.7307e-01  -3.8622e-01
-3.1662e-01   3.8693e-01   1.7380e-01  -1.7993e-01

redB =
0.37488
1.00000
1.29131
0.58764

redC =
0.88789  -0.65062  -0.48738   0.50456

eigval =
0.97317   0.00000   0.00000   0.00000
0.00000   0.78000   0.00000   0.00000
0.00000   0.00000  -0.00000   0.00000
0.00000   0.00000   0.00000   0.00000
```

The active eigenvectors are then easily extracted from the leftmost columns of the eigenvector matrix.

```E1 =
0.72095  -0.20947
0.00000   0.39068
-0.62816   0.81460
-0.29264   0.37405
```

The reduced system is calculated according to the methods described above.

```   E1 = eigvec(:,1:2)
VV = eigvec^-1 * redB;
V1 = VV(1:2)
MINV = (E1' * E1)^-1;
Qmat = (E1' * redA * E1);
Ra = MINV*Qmat
Rb = V1
Rc = redC*E1
```
```
V1 =
1.2637
2.5597

Ra =
9.7317e-01   3.0293e-16
3.2960e-17   7.8000e-01

Rb =
1.2637
2.5597

Rc =
0.79863  -0.64846
```

As a sanity check, the eigenvalues of the final reduced matrix are checked.

```eigenvalues =
0.97317
0.78000
```

This all looks pretty good, but let's see if the system behaves the same when driven with random data.

```stato = zeros(4,1);
statn = zeros(2,1);
for istep=1:nsteps
inp = rand-rand;
yold(istep) = redC*stato;
ynew(istep) = Rc*statn;
stato = redA*stato + redB*inp;
statn = Ra*statn + Rb*inp;
end
```

Actually, I had to cheat. Without fudging the graphics by shifting the red curve a couple of pixels, the tracking was so perfect that the two traces were completely indistinguishable.

## A retrospective

Let's briefly review how far we have come. If you have followed this series from the beginning:

1. You can apply Linear Least Squares or Total Least Squares methods to fit the parameters of a linear state transition model.
2. You can compare how your model predictions perform compared to actual system outputs by simulation.
3. You can restructure models that require multiple steps of past history into models requiring only one step of past history and multiple state variables using shift register techniques.
4. You can transform ARMA models developed using statistical methods into equivalent state transition models.
5. You can improve your models numerically, using LMS gradient learning techniques.
6. You can apply scaling, transposition, restructuring, and eigenvalue transformations to change the form of the state transition matrix without changing its performance.
7. You can use correlation analysis to check whether your model captures all of the important behaviors of the system and to deduce an appropriate model order.
8. You can adjust your model order by learning new response characteristics or removing insignificant ones.

All of these techniques take an adaptive systems approach to modeling. That is: assume that your system model needs to be improved to make it match the real system more closely. That is surely the case when you start with no model at all!

When you reach the point that your state transition equations give rather credible but imperfect tracking of the real system behavior, it is time to change gears and consider the Kalman Filter approach. We know that the model results are going to be imperfect, because the real system has noise disturbances that the model does not and cannot know about. The random disturbances propagate in the state variables to send the system along a different trajectory than the model predicts.

We can't be completely sure at any individual point what the noise effects are, but over a longer period, we can start to see systematic trajectory changes. When we see those, we can be increasingly confident that they resulted from random effects, and we can take action to restore accurate tracking. We begin this new direction next time.

Footnotes:

[1] You can find out more about Wikipedia at Generalized Inverses at wikipedia.org. And be sure to contribute your \$5 to keep Wikipedia going.

[2] See the review of Linear Least Squares in this series.

Contents of the "Developing Models for Kalman Filters" section of the ridgerat-tech.us website, including this page, are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License unless otherwise specifically noted. For complete information about the terms of this license, see http://creativecommons.org/licenses/by-sa/4.0/. The license allows usage and derivative works for individual or commercial purposes under certain restrictions. For permissions beyond the scope of this license, see the contact information page for this site.


text:
# 16.8 Waves

 Page 1 / 7
• State the characteristics of a wave.
• Calculate the velocity of wave propagation.

What do we mean when we say something is a wave? The most intuitive and easiest wave to imagine is the familiar water wave. More precisely, a wave    is a disturbance that propagates, or moves from the place it was created. For water waves, the disturbance is in the surface of the water, perhaps created by a rock thrown into a pond or by a swimmer splashing the surface repeatedly. For sound waves, the disturbance is a change in air pressure, perhaps created by the oscillating cone inside a speaker. For earthquakes, there are several types of disturbances, including disturbance of Earth’s surface and pressure disturbances under the surface. Even radio waves are most easily understood using an analogy with water waves. Visualizing water waves is useful because there is more to it than just a mental image. Water waves exhibit characteristics common to all waves, such as amplitude, period, frequency and energy. All wave characteristics can be described by a small set of underlying principles.

A wave is a disturbance that propagates, or moves from the place it was created. The simplest waves repeat themselves for several cycles and are associated with simple harmonic motion. Let us start by considering the simplified water wave in [link] . The wave is an up and down disturbance of the water surface. It causes a sea gull to move up and down in simple harmonic motion as the wave crests and troughs (peaks and valleys) pass under the bird. The time for one complete up and down motion is the wave’s period $T$ . The wave’s frequency is $f=1/T$ , as usual. The wave itself moves to the right in the figure. This movement of the wave is actually the disturbance moving to the right, not the water itself (or the bird would move to the right). We define wave velocity     ${v}_{\text{w}}$ to be the speed at which the disturbance moves. Wave velocity is sometimes also called the propagation velocity or propagation speed , because the disturbance propagates from one location to another.

Many people think that water waves push water from one direction to another. In fact, the particles of water tend to stay in one location, save for moving up and down due to the energy in the wave. The energy moves forward through the water, but the water stays in one place. If you feel yourself pushed in an ocean, what you feel is the energy of the wave, not a rush of water.

The water wave in the figure also has a length associated with it, called its wavelength     $\lambda$ , the distance between adjacent identical parts of a wave. ( $\lambda$ is the distance parallel to the direction of propagation.) The speed of propagation ${v}_{\text{w}}$ is the distance the wave travels in a given time, which is one wavelength in the time of one period. In equation form, that is

Do somebody tell me a best nano engineering book for beginners?
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
what is the Synthesis, properties,and applications of carbon nano chemistry
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!


text:
Please use this identifier to cite or link to this item: http://hdl.handle.net/2381/26221
 Title: RX J0042.3+4115: A stellar mass black hole binary identified in M 31 Authors: Barnard, R.Osborne, J. P.Kolb, U.Borozdin, K. N. First Published: 1-Jul-2003 Publisher: EDP Sciences for European Southern Observatory (ESO) Citation: Astronomy & Astrophysics, 2003, 405 (2), pp. 505-511 Abstract: Four XMM-Newton X-ray observations of the central region of the Andromeda Galaxy (M 31) have revealed an X-ray source that varies in luminosity over ~ $1{-}3\times 10^{38}$ erg s -1 between observations and also displays significant variability over time-scales of a few hundred seconds. The power density spectra of lightcurves obtained in the 0.3-10 keV energy band from the three EPIC instruments on board XMM-Newton are typical of disc-accreting X-ray binaries at low accretion rates, observed in neutron star binaries only at much lower luminosities (~ 1036 erg s -1). However X-ray binaries with massive black hole primaries have exhibited such power spectra for luminosities >10 38 erg s -1. We discuss alternative possibilities where RX J0042.3+4115 may be a background AGN or foreground object in the field of view, but conclude that it is located within M 31 and hence use the observed power spectra and X-ray luminosities to identify the primary as a black hole candidate. DOI Link: 10.1051/0004-6361:20030638 ISSN: 0004-6361 Links: http://hdl.handle.net/2381/26221http://www.aanda.org/articles/aa/abs/2003/26/aah4296/aah4296.html Version: Publisher Version Status: Peer-reviewed Type: Journal Article Rights: Copyright © 2003 ESO. Reproduced with permission from Astronomy & Astrophysics, © ESO. Description: Erratum available at doi: 10.1051/0004-6361:20035661e Appears in Collections: Published Articles, Dept. of Physics and Astronomy

Files in This Item:
File Description SizeFormat


text:
# writing down the minimal discriminant of an elliptic curve

Let $j$ be an integer.

Does there exist an elliptic curve $E_j$ over $\mathbf{Q}$ with $j$-invariant equal to $j$ whose minimal discriminant we can write down in a practical way?

For example, can we write down an elliptic curve $E_j$ as above for which we know the reduction over $\mathbf{Z}$ and we know a number field $K$ such that $E_j$ obtains semi-stable reduction over $K$.

-
For a give $j\in\mathbb Z$, there is not a unique $E$ over $\mathbb Q$ with $j$ as $j$-invariant. So you formulate differently your question. –  user18119 Oct 15 '12 at 11:41
I forgot that every twist of an elliptic curve has the same j-invariant. I accordingly changed the formulation of the question. –  Harry Oct 15 '12 at 16:46

If by "practical way" you mean a fast algorithm, I think that's possible. In $char \neq 2,3$ $$j=1728 \frac{c_4^3}{c_4^3-c_6^2}$$ (see http://en.wikipedia.org/wiki/J-invariant#Algebraic_definition ) Therefore given a $j$-invariant we can solve for $c_4$ and $c_6$, and if they can be chosen to be rational, we already have a curve $E$ over $\mathbb Q$ to start with. I assume for convenience that $j \neq 0,1728$.

Given $E$, we can use the process Stein and Watkins applied to construct their table, see http://modular.math.washington.edu/papers/stein-watkins/

The relevant part is

For each $(c_4 , c_6 )$ pair (again with $c_4 \le 1.44 \cdot 10^{12}$ ) which satisfies the $|\Delta| \le 10^{12}$ condition, we then determine whether this curve is minimal —not only in the traditional sense for its minimal discriminant, but also whether it is has the minimal discriminant in its family of quadratic twists. For $p \ge 5$, this is rather easy to determine; unless $p^6 | \Delta$ and $p | c_4$, the curve is minimal for quadratic twists (the only difference between this and the standard notion of minimality is that the exponent here is 6 instead of 12). If both the above conditions hold, then we throw the curve out, as $E_\tilde{p}$ where $\tilde{p} = \left( \frac{-1}{p} \right)p$, is a curve with lesser discriminant.

Here $E_\tilde{p}$ refers to the quadratic twist by $\tilde{p}$. It appears to me you could twist by $\tilde{p}$ and repeat this process until you arrive at a twist of minimal conductor (apart from $2,3$), then you can find its minimal discriminant.

For $2$ and $3$ there are possibly more complications, but you can just do trial and error among the finitely many possible twists.

p.s. When $E$ has nontrivial $p$-torsion over a number field $K$, reduction at all places of $K$ not lying over $p$ must be semistable. (e.g. see the paper "Abelian varieties having purely additive reduction") You can construct many fields this way where the curve becomes semistable.

-


text:
# cbook¶

## matplotlib.cbook¶

A collection of utility functions and classes. Originally, many (but not all) were from the Python Cookbook -- hence the name cbook.

This module is safe to import from anywhere within matplotlib; it imports matplotlib only at runtime.

class matplotlib.cbook.Bunch(**kwargs)[source]

Deprecated since version 3.0: The Bunch class was deprecated in Matplotlib 3.0 and will be removed in 3.2. Use types.SimpleNamespace instead.

Often we want to just collect a bunch of stuff together, naming each item of the bunch; a dictionary's OK for that, but a small do- nothing class is even handier, and prettier to use. Whenever you want to group a few variables:

>>> point = Bunch(datum=2, squared=4, coord=12)
>>> point.datum

class matplotlib.cbook.CallbackRegistry(exception_handler=<function _exception_printer>)[source]

Bases: object

Handle registering and disconnecting for a set of signals and callbacks:

>>> def oneat(x):
...    print('eat', x)
>>> def ondrink(x):
...    print('drink', x)

>>> from matplotlib.cbook import CallbackRegistry
>>> callbacks = CallbackRegistry()

>>> id_eat = callbacks.connect('eat', oneat)
>>> id_drink = callbacks.connect('drink', ondrink)

>>> callbacks.process('drink', 123)
drink 123
>>> callbacks.process('eat', 456)
eat 456
>>> callbacks.process('be merry', 456) # nothing will be called
>>> callbacks.disconnect(id_eat)
>>> callbacks.process('eat', 456)      # nothing will be called

In practice, one should always disconnect all callbacks when they are no longer needed to avoid dangling references (and thus memory leaks). However, real code in Matplotlib rarely does so, and due to its design, it is rather difficult to place this kind of code. To get around this, and prevent this class of memory leaks, we instead store weak references to bound methods only, so when the destination object needs to die, the CallbackRegistry won't keep it alive.

Parameters: exception_handler : callable, optional If provided must have signature def handler(exc: Exception) -> None:  If not None this function will be called with any Exception subclass raised by the callbacks in CallbackRegistry.process. The handler may either consume the exception or re-raise. The callable must be pickle-able. The default handler is def h(exc): traceback.print_exc()
connect(s, func)[source]

Register func to be called when signal s is generated.

disconnect(cid)[source]

Disconnect the callback registered with callback id cid.

process(s, *args, **kwargs)[source]

Process signal s.

All of the functions registered to receive callbacks on s will be called with *args and **kwargs.

class matplotlib.cbook.GetRealpathAndStat(**kwargs)[source]

Bases: object

Deprecated since version 3.0: The GetRealpathAndStat class was deprecated in Matplotlib 3.0 and will be removed in 3.2.

class matplotlib.cbook.Grouper(init=())[source]

Bases: object

This class provides a lightweight way to group arbitrary objects together into disjoint sets when a full-blown graph data structure would be overkill.

Objects can be joined using join(), tested for connectedness using joined(), and all disjoint sets can be retrieved by using the object as an iterator.

The objects being joined must be hashable and weak-referenceable.

For example:

>>> from matplotlib.cbook import Grouper
>>> class Foo(object):
...     def __init__(self, s):
...         self.s = s
...     def __repr__(self):
...         return self.s
...
>>> a, b, c, d, e, f = [Foo(x) for x in 'abcdef']
>>> grp = Grouper()
>>> grp.join(a, b)
>>> grp.join(b, c)
>>> grp.join(d, e)
>>> sorted(map(tuple, grp))
[(a, b, c), (d, e)]
>>> grp.joined(a, b)
True
>>> grp.joined(a, c)
True
>>> grp.joined(a, d)
False

clean()[source]

Clean dead weak references from the dictionary.

get_siblings(a)[source]

Returns all of the items joined with a, including itself.

join(a, *args)[source]

Join given arguments into the same set. Accepts one or more arguments.

joined(a, b)[source]

Returns True if a and b are members of the same set.

remove(a)[source]
exception matplotlib.cbook.IgnoredKeywordWarning[source]

Bases: UserWarning

A class for issuing warnings about keyword arguments that will be ignored by matplotlib

class matplotlib.cbook.Locked(**kwargs)[source]

Bases: object

Deprecated since version 3.0: The Locked class was deprecated in Matplotlib 3.0 and will be removed in 3.2.

Context manager to handle locks.

Based on code from conda.

LOCKFN = '.matplotlib_lock'
exception TimeoutError[source]

Bases: RuntimeError

class matplotlib.cbook.Stack(default=None)[source]

Bases: object

Stack of elements with a movable cursor.

Mimics home/back/forward in a web browser.

back()[source]

Move the position back and return the current element.

bubble(o)[source]

Raise o to the top of the stack. o must be present in the stack.

o is returned.

clear()[source]

Empty the stack.

empty()[source]

Return whether the stack is empty.

forward()[source]

Move the position forward and return the current element.

home()[source]

Push the first element onto the top of the stack.

The first element is returned.

push(o)[source]

Push o to the stack at current position. Discard all later elements.

o is returned.

remove(o)[source]

Remove o from the stack.

matplotlib.cbook.align_iterators(func, *iterables)[source]

Deprecated since version 2.2: The align_iterators function was deprecated in Matplotlib 2.2 and will be removed in 3.1.

This generator takes a bunch of iterables that are ordered by func It sends out ordered tuples:

(func(row), [rows from all iterators matching func(row)])

It is used by matplotlib.mlab.recs_join() to join record arrays

matplotlib.cbook.boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, autorange=False)[source]

Returns list of dictionaries of statistics used to draw a series of box and whisker plots. The Returns section enumerates the required keys of the dictionary. Users can skip this function and pass a user-defined set of dictionaries to the new axes.bxp method instead of relying on MPL to do the calculations.

Parameters:
X : array-like

Data that will be represented in the boxplots. Should have 2 or fewer dimensions.

whis : float, string, or sequence (default = 1.5)

As a float, determines the reach of the whiskers to the beyond the first and third quartiles. In other words, where IQR is the interquartile range (Q3-Q1), the upper whisker will extend to last datum less than Q3 + whis*IQR). Similarly, the lower whisker will extend to the first datum greater than Q1 - whis*IQR. Beyond the whiskers, data are considered outliers and are plotted as individual points. This can be set this to an ascending sequence of percentile (e.g., [5, 95]) to set the whiskers at specific percentiles of the data. Finally, whis can be the string 'range' to force the whiskers to the minimum and maximum of the data. In the edge case that the 25th and 75th percentiles are equivalent, whis can be automatically set to 'range' via the autorange option.

bootstrap : int, optional

Number of times the confidence intervals around the median should be bootstrapped (percentile method).

labels : array-like, optional

Labels for each dataset. Length must be compatible with dimensions of X.

autorange : bool, optional (False)

When True and the data are distributed such that the 25th and 75th percentiles are equal, whis is set to 'range' such that the whisker ends are at the minimum and maximum of the data.

Returns:
bxpstats : list of dict

A list of dictionaries containing the results for each column of data. Keys of each dictionary are the following:

Key Value Description
label tick label for the boxplot
mean arithemetic mean value
med 50th percentile
q1 first quartile (25th percentile)
q3 third quartile (75th percentile)
cilo lower notch around the median
cihi upper notch around the median
whislo end of the lower whisker
whishi end of the upper whisker
fliers outliers

Notes

Non-bootstrapping approach to confidence interval uses Gaussian- based asymptotic approximation:

$\mathrm{med} \pm 1.57 \times \frac{\mathrm{iqr}}{\sqrt{N}}$

General approach from: McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of Boxplots", The American Statistician, 32:12-16.

matplotlib.cbook.contiguous_regions(mask)[source]

Return a list of (ind0, ind1) such that mask[ind0:ind1].all() is True and we cover all such regions

matplotlib.cbook.dedent(s)[source]

Remove excess indentation from docstring s.

Discards any leading blank lines, then removes up to n whitespace characters from each line, where n is the number of leading whitespace characters in the first line. It differs from textwrap.dedent in its deletion of leading blank lines and its use of the first non-blank line to determine the indentation.

It is also faster in most cases.

matplotlib.cbook.delete_masked_points(*args)[source]

Find all masked and/or non-finite points in a set of arguments, and return the arguments with only the unmasked points remaining.

Arguments can be in any of 5 categories:

2. 1-D ndarrays
3. ndarrays with more than one dimension
4. other non-string iterables
5. anything else

The first argument must be in one of the first four categories; any argument with a length differing from that of the first argument (and hence anything in category 5) then will be passed through unchanged.

Masks are obtained from all arguments of the correct length in categories 1, 2, and 4; a point is bad if masked in a masked array or if it is a nan or inf. No attempt is made to extract a mask from categories 2, 3, and 4 if np.isfinite() does not yield a Boolean array.

All input arguments that are not passed unchanged are returned as ndarrays after removing the points or rows corresponding to masks in any of the arguments.

A vastly simpler version of this function was originally written as a helper for Axes.scatter().

matplotlib.cbook.file_requires_unicode(x)[source]

Returns True if the given writable file-like object requires Unicode to be written to it.

matplotlib.cbook.flatten(seq, scalarp=<function is_scalar_or_string>)[source]

Returns a generator of flattened nested containers

For example:

>>> from matplotlib.cbook import flatten
>>> l = (('John', ['Hunter']), (1, 23), [[([42, (5, 23)], )]])
>>> print(list(flatten(l)))
['John', 'Hunter', 1, 23, 42, 5, 23]

By: Composite of Holger Krekel and Luther Blissett From: https://code.activestate.com/recipes/121294/ and Recipe 1.12 in cookbook

matplotlib.cbook.get_label(y, default_name)[source]
matplotlib.cbook.get_realpath_and_stat[source]
matplotlib.cbook.get_sample_data(fname, asfileobj=True)[source]

Return a sample data file. fname is a path relative to the mpl-data/sample_data directory. If asfileobj is True return a file object, otherwise just a file path.

Set the rc parameter examples.directory to the directory where we should look, if sample_data files are stored in a location different than default (which is 'mpl-data/sample_data at the same level of 'matplotlib Python module files).

If the filename ends in .gz, the file is implicitly ungzipped.

matplotlib.cbook.index_of(y)[source]

A helper function to get the index of an input to plot against if x values are not explicitly given.

Tries to get y.index (works if this is a pd.Series), if that fails, return np.arange(y.shape[0]).

This will be extended in the future to deal with more types of labeled data.

Parameters: y : scalar or array-like The proposed y-value x, y : ndarray The x and y values to plot.
matplotlib.cbook.is_hashable(obj)[source]

Returns true if obj can be hashed

matplotlib.cbook.is_math_text(s)[source]
matplotlib.cbook.is_numlike(obj)[source]

Deprecated since version 3.0: isinstance(..., numbers.Number)

return true if obj looks like a number

matplotlib.cbook.is_scalar_or_string(val)[source]

Return whether the given object is a scalar or string like.

matplotlib.cbook.is_writable_file_like(obj)[source]

return true if obj looks like a file object with a write method

matplotlib.cbook.iterable(obj)[source]

return true if obj is iterable

matplotlib.cbook.listFiles(root, patterns='*', recurse=1, return_folders=0)[source]

Deprecated since version 3.0: The listFiles function was deprecated in Matplotlib 3.0 and will be removed in 3.2.

Recursively list files

from Parmar and Martelli in the Python Cookbook

matplotlib.cbook.local_over_kwdict(local_var, kwargs, *keys)[source]

Enforces the priority of a local variable over potentially conflicting argument(s) from a kwargs dict. The following possible output values are considered in order of priority:

local_var > kwargs[keys[0]] > ... > kwargs[keys[-1]]

The first of these whose value is not None will be returned. If all are None then None will be returned. Each key in keys will be removed from the kwargs dict in place.

Parameters: local_var: any object The local variable (highest priority) kwargs: dict Dictionary of keyword arguments; modified in place keys: str(s) Name(s) of keyword arguments to process, in descending order of priority out: any object Either local_var or one of kwargs[key] for key in keys IgnoredKeywordWarning For each key in keys that is removed from kwargs but not used as the output value
class matplotlib.cbook.maxdict(maxsize)[source]

Bases: dict

A dictionary with a maximum size; this doesn't override all the relevant methods to constrain the size, just setitem, so use with caution

matplotlib.cbook.mkdirs(newdir, mode=511)[source]

Deprecated since version 3.0: The mkdirs function was deprecated in Matplotlib 3.0 and will be removed in 3.2.

make directory newdir recursively, and set mode. Equivalent to

> mkdir -p NEWDIR
> chmod MODE NEWDIR

matplotlib.cbook.normalize_kwargs(kw, alias_mapping=None, required=(), forbidden=(), allowed=None)[source]

Helper function to normalize kwarg inputs

The order they are resolved are:

1. aliasing
2. required
3. forbidden
4. allowed

This order means that only the canonical names need appear in allowed, forbidden, required

Parameters: alias_mapping, dict, optional A mapping between a canonical name to a list of aliases, in order of precedence from lowest to highest. If the canonical value is not in the list it is assumed to have the highest priority. required : iterable, optional A tuple of fields that must be in kwargs. forbidden : iterable, optional A list of keys which may not be in kwargs allowed : tuple, optional A tuple of allowed fields. If this not None, then raise if kw contains any keys not in the union of required and allowed. To allow only the required fields pass in () for allowed TypeError To match what python raises if invalid args/kwargs are passed to a callable.
matplotlib.cbook.open_file_cm(path_or_file, mode='r', encoding=None)[source]

Pass through file objects and context-manage PathLikes.

matplotlib.cbook.print_cycles(objects, outstream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, show_progress=False)[source]
objects
A list of objects to find cycles in. It is often useful to pass in gc.garbage to find the cycles that are preventing some objects from being garbage collected.
outstream
The stream for output.
show_progress
If True, print the number of objects reached as they are found.
matplotlib.cbook.pts_to_midstep(x, *args)[source]

Convert continuous line to mid-steps.

Given a set of N points convert to 2N points which when connected linearly give a step function which changes values at the middle of the intervals.

Parameters: x : array The x location of the steps. May be empty. y1, ..., yp : array y arrays to be turned into steps; all must be the same length as x. out : array The x and y values converted to steps in the same order as the input; can be unpacked as x_out, y1_out, ..., yp_out. If the input is length N, each of these arrays will be length 2N.

Examples

>> x_s, y1_s, y2_s = pts_to_midstep(x, y1, y2)

matplotlib.cbook.pts_to_poststep(x, *args)[source]

Convert continuous line to post-steps.

Given a set of N points convert to 2N + 1 points, which when connected linearly give a step function which changes values at the end of the intervals.

Parameters: x : array The x location of the steps. May be empty. y1, ..., yp : array y arrays to be turned into steps; all must be the same length as x. out : array The x and y values converted to steps in the same order as the input; can be unpacked as x_out, y1_out, ..., yp_out. If the input is length N, each of these arrays will be length 2N + 1. For N=0, the length will be 0.

Examples

>> x_s, y1_s, y2_s = pts_to_poststep(x, y1, y2)

matplotlib.cbook.pts_to_prestep(x, *args)[source]

Convert continuous line to pre-steps.

Given a set of N points, convert to 2N - 1 points, which when connected linearly give a step function which changes values at the beginning of the intervals.

Parameters: x : array The x location of the steps. May be empty. y1, ..., yp : array y arrays to be turned into steps; all must be the same length as x. out : array The x and y values converted to steps in the same order as the input; can be unpacked as x_out, y1_out, ..., yp_out. If the input is length N, each of these arrays will be length 2N + 1. For N=0, the length will be 0.

Examples

>> x_s, y1_s, y2_s = pts_to_prestep(x, y1, y2)

matplotlib.cbook.report_memory(i=0)[source]

return the memory consumed by process

matplotlib.cbook.safe_first_element(obj)[source]
matplotlib.cbook.safe_masked_invalid(x, copy=False)[source]
matplotlib.cbook.safezip(*args)[source]

make sure args are equal len before zipping

matplotlib.cbook.sanitize_sequence(data)[source]

Converts dictview object to list

class matplotlib.cbook.silent_list(type, seq=None)[source]

Bases: list

override repr when returning a list of matplotlib artists to prevent long, meaningless output. This is meant to be used for a homogeneous list of a given type

matplotlib.cbook.simple_linear_interpolation(a, steps)[source]

Resample an array with steps - 1 points between original point pairs.

Parameters: a : array, shape (n, ...) steps : int array, shape ((n - 1) * steps + 1, ...) Along each column of *a*, (steps - 1) points are introduced between each original values; the values are linearly interpolated.
matplotlib.cbook.strip_math(s)[source]

remove latex formatting from mathtext

matplotlib.cbook.to_filehandle(fname, flag='rU', return_opened=False, encoding=None)[source]

fname can be an os.PathLike or a file handle. Support for gzipped files is automatic, if the filename ends in .gz. flag is a read/write flag for file()

matplotlib.cbook.unicode_safe(s)[source]

Deprecated since version 3.0: The unicode_safe function was deprecated in Matplotlib 3.0 and will be removed in 3.2.

matplotlib.cbook.violin_stats(X, method, points=100)[source]

Returns a list of dictionaries of data which can be used to draw a series of violin plots. See the Returns section below to view the required keys of the dictionary. Users can skip this function and pass a user-defined set of dictionaries to the axes.vplot method instead of using MPL to do the calculations.

Parameters: X : array-like Sample data that will be used to produce the gaussian kernel density estimates. Must have 2 or fewer dimensions. method : callable The method used to calculate the kernel density estimate for each column of data. When called via method(v, coords), it should return a vector of the values of the KDE evaluated at the values specified in coords. points : scalar, default = 100 Defines the number of points to evaluate each of the gaussian kernel density estimates at. A list of dictionaries containing the results for each column of data. The dictionaries contain at least the following: coords: A list of scalars containing the coordinates this particular kernel density estimate was evaluated at. vals: A list of scalars containing the values of the kernel density estimate at each of the coordinates given in coords. mean: The mean value for this column of data. median: The median value for this column of data. min: The minimum value for this column of data. max: The maximum value for this column of data.


text:
Chapter 5 - Exponents and Polynomials - Chapter 5 Review Problem Set: 67

$\dfrac{x^{2}}{y}$

Work Step by Step

Using the laws of exponents, the given expression, $(x^{-2}y)^{-1} ,$ simplifies to \begin{array}{l}\require{cancel} x^{-2(-1)}y^{1(-1)} \\\\= x^{2}y^{-1} \\\\= \dfrac{x^{2}}{y^1} \\\\= \dfrac{x^{2}}{y} .\end{array}

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:
# zone interface tolerance-contact command

Syntax

zone interface <s > tolerance-contact f keyword <range>

Primary keywords:

Sets the maximum depth of penetration (of faces that contact an interface) for which a contact is detected. If this depth (or overlap) is greater than value, then no contact is detected. By default, the value is determined from zone dimensions and is updated if deformation occurs during a simulation.

The parameter may be used to force contact detection if a large initial overlap exists between two bodies. Use with caution, because large geometrical overlaps maybe physically unrealistic. The current values of contact-tolerance can be displayed with zone.interface s list information. If the interface name is not given then the command operates on all interfaces.

If an interface name s is given the command is applied only to nodes of that interface, otherwise the command is applied to nodes in all interfaces in the optional range.

Add the specified value to the existing value.


text:
# Pi (ATAN four terms) Calculator

## Calculates circular constant Pi using arc tangent (ATAN) series with four terms..

 rm method C.F. Gauss 1863 F.C.M. Stormer 1896 E.B. Escott 1896 K. Takano 1982 T. Murata 1982 A. Sibata 1983 6digit10digit14digit18digit22digit26digit30digit34digit38digit42digit46digit50digit
 The calculation ends when two consecutive results are the same.The accuracy of π improves by increasing the number of digits for calculation.Since the discovery of calculus in the 17th century, many mathematicians attempted to calculate Pi using the method of ATAN series expansion.$\normal Gregory\ series\hspace{10}tan^{\tiny-1}x=x-{\normal\frac{1}{3}}x^3+{\normal\frac{1}{5}}x^5-{\normal\frac{1}{7}}x^7+\cdot\cdot\cdot\\\vspace{5}(1)\ Gauss\ 1863\\\hspace{10}{\small{\normal\frac{\pi}{4}}=12tan^{\tiny-1}{\normal\frac{1}{38}}+20tan^{\tiny-1}{\normal\frac{1}{57}}+7tan^{\tiny-1}{\normal\frac{1}{239}}+24tan^{\tiny-1}{\normal\frac{1}{268}}}\\\vspace{5}(2)\ Stormer\ 1896\\\hspace{10}{\small{\normal\frac{\pi}{4}}=44tan^{\tiny-1}{\normal\frac{1}{57}}+7tan^{\tiny-1}{\normal\frac{1}{239}}-12tan^{\tiny-1}{\normal\frac{1}{682}}+24tan^{\tiny-1}{\normal\frac{1}{12943}}}\\\vspace{5}(3)\ Escott\ 1896\\\hspace{10}{\small{\normal\frac{\pi}{4}}=22tan^{\tiny-1}{\normal\frac{1}{28}}+2tan^{\tiny-1}{\normal\frac{1}{443}}-5tan^{\tiny-1}{\normal\frac{1}{1393}}-10tan^{\tiny-1}{\normal\frac{1}{11018}}}\\\vspace{5}(4)\ K.\ Takano\ 1982\\\hspace{10} {\small{\normal\frac{\pi}{4}}=12tan^{\tiny-1}{\normal\frac{1}{49}}+32tan^{\tiny-1}{\normal\frac{1}{57}}-5tan^{\tiny-1}{\normal\frac{1}{239}}+12tan^{\tiny-1}{\normal\frac{1}{110443}}}\\\vspace{5}(5)\ T.\ Murata\ 1982\\\hspace{10}{\small{\normal\frac{\pi}{4}}=24tan^{\tiny-1}{\normal\frac{1}{36}}+8tan^{\tiny-1}{\normal\frac{1}{57}}-5tan^{\tiny-1}{\normal\frac{1}{239}}-12tan^{\tiny-1}{\normal\frac{1}{23382}}}\\\vspace{5}(6)\ A.\ Shibata\ 1983\\\hspace{10}{\small{\normal\frac{\pi}{4}}=24tan^{\tiny-1}{\normal\frac{1}{43}}+20tan^{\tiny-1}{\normal\frac{1}{57}}-12tan^{\tiny-1}{\normal\frac{1}{117}}-5tan^{\tiny-1}{\normal\frac{1}{239}}}\\$
Pi (ATAN four terms)
 [0-0] / 0 Disp-Num5103050100200
The message is not registered.

Sending completion

To improve this 'Pi (ATAN four terms) Calculator', please fill in questionnaire.
Male or Female ?
Male Female
Age
Under 20 years old 20 years old level 30 years old level
40 years old level 50 years old level 60 years old level or over
Occupation
Elementary school/ Junior high-school student
High-school/ University/ Grad student A homemaker An office worker / A public employee
Self-employed people An engineer A teacher / A researcher
A retired person Others
Useful?
Very Useful A little Not at All
Purpose of use?


text:
# Rate limit service¶

## config.ratelimit.v3.RateLimitServiceConfig¶

[config.ratelimit.v3.RateLimitServiceConfig proto]

Rate limit configuration overview.

{
"grpc_service": "{...}",
"transport_api_version": "..."
}

grpc_service

(config.core.v3.GrpcService, REQUIRED) Specifies the gRPC service that hosts the rate limit service. The client will connect to this cluster when it needs to make rate limit service requests.

transport_api_version

(config.core.v3.ApiVersion) API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and version of messages used on the wire.


text:
Article Contents
Article Contents

# Finite dimensional attractors for reaction-diffusion equations in $R^n$ with a strong nonlinearity

• Our aim in this article is to study the long time behavior of a class of reaction-diffusion equations in the whole space for which the nonlinearity depends explicitly on the gradient of the unknown function. We prove the existence of the global attractor and of exponential attractors for the semigroup associated with the equation. We also consider the nonautonomous case, and when the forcing term depends quasiperiodically on the time, we prove the existence of uniform and uniform exponential attractors.
Mathematics Subject Classification: 35B40, 35B45.

 Citation:


text:
How do you plot rational numbers on a number line?

Apr 4, 2016

The process to plot a rational number on a number line is as below.

Explanation:

Let the rational number be $\frac{p}{q}$, where $p$ may be any integer (positive or negative) and $q$ be a positive integer.

To plot $\frac{p}{q}$, draw a line of $q$ units at an angle to real number line from $0$ and join it to $p$ units on real number line. Also mark a point one unit away from $0$ on the line of length $q$.

Now draw a line from the point denoting one unit, parallel to the line joining $q$ and $p$ so that it cuts real number line at a point.

This point denotes the rational number $\frac{p}{q}$.

See figure below for details.


text:
# Confidence bands for model averaged predictions of GLMMs

I use R with the MuMIn package for Multimodel inference. My global Model is

M.global <- glmer(y ~ c1 + I(c1^2) + c2 + c3 + c4 + (1|subject),data, family =poisson(link="log))

After that I use

M.dredge <- dredge(M.global, m.max=3, subset = dc(cpl,I(cpl^2)))

To calculate all possible models from the global model and rank them by AICc. m.max limits the number of predictor to 3 and dc is a dependency chain, so the function takes the squared c1 only if unsquared c1 is included. m.max is used since the total sample size is 30, and according to Harrels 10:1 rule of thumb there is amximum of 3 predictors to avoid overfitting.

The I use

M.avg <- model.avg(M.dredge, subset= delta < 4, fit=TRUE))

to get the model average across a subset of candidate models with a maximum difference of 4 AICc points to the "best" model having the lowest AICc. fit = TRUE refits every model in the subset.

Now I can use M.avg to get the averaged (full and conditional) coefficients for all predictors included in the subset as well as for the confdidence intervals:

Coef <- coef(M.avg, full=TRUE)
CI <- confint(M.avg, full=TRUE)

Now my question: Using poisson GLMMs and model averaging, how can I calculate model predictions and according confidence intervals for these predictions, to be used in a graph showing the regression line and confidence bands for that line?

Here they fill in the coefficients in the Model formula by hand and calculate point estimates for a given value (0, and 0.25) for the predictor f. Afterwards they repeat the procedure with the lower and the upper value of the confidence interval for the coefficients. However, I repeated that and I got something like this:

• how about predict(se.fit = TRUE)? – Kamil Bartoń Apr 8 '16 at 8:16
• This causes the following error: Error in predict.averaging(ls.avgModels[[1]], se.fit = TRUE) : 'predict' for models '21', '23', '29', '19', '17', '53', '31', '51', '49', '55', '61' and '63' caused errors In addition: There were 12 warnings (use warnings() to see them) – Pharcyde Apr 8 '16 at 12:08
• And this is the Warning: 1: In predict.merMod(object = <S4 object of class structure("lmerMod", package = "lme4")>, ... : cannot calculate predictions with both standard errors and random effects – Pharcyde Apr 8 '16 at 12:09
• ?predict.merMod says: re.form argument - "if NA or ~0, include no random effects." – Kamil Bartoń Apr 8 '16 at 12:50
• Aaaaahhh Oh my god, I'm sorry I did not looked good enough in the help file. Thank you very much. – Pharcyde Apr 8 '16 at 14:47

Hi thanks to lots of hints by Kamil Bartón, i ended up with the following procedure:

M.global <- glmer(y ~ c1 + I(c1^2) + c2 + c3 + c4 + (1|subject),data, family =poisson(link="log))
M.dredge <- dredge(M.global, m.max=3, subset = dc(cpl,I(cpl^2)))
M.avg <- model.avg(M.dredge, subset= delta < 4, fit=TRUE))

newdata <- expand.grid(c1= with(data, seq(min(c1), max(c1), length.out=50)),
c2 = mean(data$c2), c3 = mean(data$c3),
c4 = mean(data$c4)) # No random effects variable is needed! # Calculate Predicitons with stnadard errors, and confidence intervals subsequently pred.se <- predict(M.avg, type="response", se.fit=TRUE, re.form=NA, full=T, newdata) newdata$fit <- pred.se$fit newdata$SE <- pred.se$se newdata$upr=newdata$fit+1.96*newdata$SE
newdata$lwr=newdata$fit-1.96*newdata$SE # full=T defines the use of full model-averaged coefficients see [here][1] # (full=F would not work either, due to mixed models); type= "response" # calculates predictions on the response scale (i.e. uses the inverse link # function, exp() in poisson); re.form = NA avoids the use of random factors # (inclusion is not possible with se.fit=TRUE).  Note: when using glmmadmb(family="nbinom2") the use of type="response" is not possible, but type="link" is. You could take the exp() of fit, SE, lwr, and upr, afterwards in the newdata frame. The plots can be produced by: p1 <- ggplot(newdata, aes(x=c1, y=fit)) + geom_ribbon(aes(ymin = lwr, ymax = upr), alpha = .25) + geom_line(size = 2) + labs(x = "c1 continous variable (restandardized)", y = "y response variable on original scale") print(p1)  Don't foget to re-standadize z transformed predictor variables in the final newdata frame. i.e.: x <- attr(data, 'scaled:scale') scale <- data.frame(t(x)) x <- attr(data, 'scaled:center') center <- data.frame(t(x)) newdata$c1 <- newdata$c1 * scale$c1 + center$c1 newdata$c2 <- newdata$c2 * scale$c2 + center$c2 newdata$c3 <- newdata$c3 * scale$c3 + center$c3 newdata$c4 <- newdata$c4 * scale$c4 + center\$c4

Now I am just wondering, why calculation of confidence intervals from single general linear mixed models (GLMMs) are so intensively discussed. Often you hear that you need complicated bootstrap methods or MarkovChainMonteCarlo (MCMC) algorithms to produce confidence intervals. Very, very complex for non-mathematicians. And even the function confint() takes much longer to calculate profile confidence intervals from a single mixed models than does from type=averaging model objects. Probably this is a Question of Accuracy and the se.fit = TRUE method is the least accurate? Furthermore i don't know if a correction method for Confidence intervals is included in the procedure presented here.

• I am currently doing some research on this very topic. And I came across some ressources stating that the here-mentioned approach is not correct. See for example fromthebottomoftheheap.net/2018/12/10/…, where Gavin Simpson explains that doing these calculations on the response scale is wrong (and if I understand it right, this exactly what it is presented in this answer). Unfortunatly, I cannot point towards a better solution - I am still in search by myself. – yenats Oct 7 '20 at 14:02


text:
# gmx h2order¶

## Synopsis¶

gmx h2order [-f [<.xtc/.trr/...>]] [-n [<.ndx>]] [-nm [<.ndx>]]
[-s [<.tpr>]] [-o [<.xvg>]] [-b <time>] [-e <time>]
[-dt <time>] [-[no]w] [-xvg <enum>] [-d <string>]
[-sl <int>]

## Description¶

gmx h2order computes the orientation of water molecules with respect to the normal of the box. The program determines the average cosine of the angle between the dipole moment of water and an axis of the box. The box is divided in slices and the average orientation per slice is printed. Each water molecule is assigned to a slice, per time frame, based on the position of the oxygen. When -nm is used, the angle between the water dipole and the axis from the center of mass to the oxygen is calculated instead of the angle between the dipole and a box axis.

## Options¶

Options to specify input files:

-f [<.xtc/.trr/…>] (traj.xtc)
Trajectory: xtc trr cpt gro g96 pdb tng
-n [<.ndx>] (index.ndx)
Index file
-nm [<.ndx>] (index.ndx) (Optional)
Index file
-s [<.tpr>] (topol.tpr)
Portable xdr run input file

Options to specify output files:

-o [<.xvg>] (order.xvg)
xvgr/xmgr file

Other options:

-b <time> (0)
Time of first frame to read from trajectory (default unit ps)
-e <time> (0)
Time of last frame to read from trajectory (default unit ps)
-dt <time> (0)
Only use frame when t MOD dt = first time (default unit ps)
-[no]w (no)
View output .xvg, .xpm, .eps and .pdb files
-xvg <enum> (xmgrace)
xvg plot formatting: xmgrace, xmgr, none
-d <string> (Z)
Take the normal on the membrane in direction X, Y or Z.
-sl <int> (0)
Calculate order parameter as function of boxlength, dividing the box in this number of slices.

## Known Issues¶

• The program assigns whole water molecules to a slice, based on the first atom of three in the index file group. It assumes an order O,H,H. Name is not important, but the order is. If this demand is not met, assigning molecules to slices is different.


text:
# [Tex/LaTex] Labels in tikzcd

arrowstikz-cd

For some reason the tikzcd documentation that comes with TeXLive says nothing about the following:

1. How do I specify whether or not a label is below/above an arrow?

2. How do I specify the size of diagrams (e.g. if I need a longer arrow to fit a large label)?

3. How can I specify multiple labels (e.g. both above and below) an arrow?

The package documentation contains examples of most of this. Section 1.1 gives examples for placing of labels, Section 2 provides ways to adjust the appearence of the diagram and control spacing. However, the package documentation is easiest to understand in conjunction with the manual for tikz and its underlying language pgf: see http://www.ctan.org/pkg/pgf in particular section 16.8 Placing Nodes on a Line or Curve Explicitly.

By default labels on arrows are to the left of the direction of travel. This my be changed by prefixing the label with [swap], so you can write \arrow{r}{a}[swap]{b} to get an arrow to the right with label a above and b below.

[Code at end.]

Diagrams are set on a grid, so you can't make more space for a single arrow. However, you can open up the grid horizontally and vertically (if necessary with different factors).

Basic tikz options such as for placing labels along the arrow are [pos=0.7] for 0.7 of the way along the length and [near start]/[near end] for near to the beginning or the end.

Labels may be turned with [rotate=90], or some other angle. Doing this you will often need to shift the label with the options xshift or yshift, as in the example above, where one could write

\arrow{d}[anchor=center,rotate=-90,yshift=1ex]{\text{arrow name}}

However, as Qrrbrbrilbel points out it is easier to use sloped together with above or below as in the code below (swap no longer has an effect).

\documentclass{article}

\usepackage{tikz-cd}
\usepackage{mathtools}

\begin{document}
\begin{displaymath}
\begin{tikzcd}
x \arrow{r}{a} \arrow{d}[swap]{b} &y \arrow{d}{d} \\
z \arrow{r}{e}[swap]{c} &w \\
\end{tikzcd}
\end{displaymath}

\begin{displaymath}
\begin{tikzcd}[column sep=6em,row sep=6em]
x \arrow{r}{\text{arrow name}}
\arrow{d} &y \arrow{d}[sloped,above]{\text{arrow
name}} \\
z \arrow{r} &w \\
\end{tikzcd}
\end{displaymath}

\end{document}

If you need a non-grid layout then as in section 3.3 of the manual, you need to resort to basic tikz to place elements.


text:
## Cryptology ePrint Archive: Report 2019/597

A Candidate Access Structure for Super-polynomial Lower Bound on Information Ratio

Shahram Khazaei

Abstract: The contribution vector (convec) of a secret sharing scheme is the vector of all share sizes divided by the secret size. A measure on the convec (e.g., its maximum or average) is considered as a criterion of efficiency of secret sharing schemes, which is referred to as the information ratio.

It is generally believed that there exists a family of access structures such that the information ratio of any secret sharing scheme realizing it is $2^{\mathrm{\Omega}(n)}$, where the parameter $n$ stands for the number of participants. The best known lower bound, due to Csirmaz (1994), is $\mathrm{\Omega}(n/\log n)$. Closing this gap is a long-standing open problem in cryptology.

Using a technique called \emph{substitution}, we recursively construct a family of access structures by starting from that of Csirmaz, which might be a candidate for super-polynomial information ratio. We provide support for this possibility by showing that our family has information ratio ${n^{\mathrm{\Omega}(\frac{\log n}{\log \log n})}}$, assuming the truth of a well-stated information-theoretic conjecture, called the \emph{substitution conjecture}. The substitution method is a technique for composition of access structures, similar to the so called block composition of Boolean functions, and the substitution conjecture is reminiscent of the Karchmer-Raz-Wigderson conjecture on depth complexity of Boolean functions. It emerges after introducing the notion of convec set for an access structure, a subset of $n$-dimensional real space, which includes all achievable convecs. We prove some topological properties about convec sets and raise several open problems.

Category / Keywords: foundations / secret sharing, general access structures, information ratio, communication complexity

Date: received 29 May 2019

Contact author: shahram khazaei at gmail com

Available format(s): PDF | BibTeX Citation

Short URL: ia.cr/2019/597

[ Cryptology ePrint archive ]


text:
# Provable Algorithms for training ReLU networks

We propose and analyze algorithms for training ReLU networks with skipped connections. Skipped connections are the key feature of residual networks (or ResNets) which have been shown to provide superior performance in deep learning applications. We analyze two approaches for training such networks, gradient descent and alternating minimization, and compare convergence criteria of both methods. We show that under typical (Gaussianity) assumptions on the ddimensional input data, both gradient descent and alternating minimization provably converge in a linearly convergent fashion, assuming any good enough initialization; moreover, we show that a simple "identity" initialization suffices. Furthermore, we provide statistical upper bounds which indicate that $n = O(d^3)$ suffice to achieve this convergence rate. To our knowledge, these constitute the first global parameter recovery guarantees for shallow ResNet-type networks with ReLU activations.

Publications
1. G. Jagatap and C. Hegde, “Linearly Convergent Algorithms for Learning Shallow Residual Networks”, January 2018. [Paper / Code.]

## People

##### Chinmay Hegde
Assistant Professor, ECPE


text:
# How can I make the Camera move around my Object

## Recommended Posts

Hi all, I have a problem, and I really don't know how to solve it. I'm using C++ to buil the Camera. I can make it move around the origin, but I don't know how to make it move around the object. I'm using D3DXMatrixRotationAxis but the problem is the vector used in this function. (0,1,0) ---> RotationY. I really don't get it. PlZ give me any advice.

##### Share on other sites
Moomin    332
PositionVector -= ViewVector;RotatedMatrix = MaxtrixRotation(x,y,z);PositionVector = RotatedMatrix * PositionVector;PositionVector += ViewVector;


text:
### Author Topic: LEC 0201 question (W2L2)  (Read 677 times)

#### Shujun Fan

• Jr. Member
• Posts: 8
• Karma: 0
##### LEC 0201 question (W2L2)
« on: September 18, 2020, 10:42:46 PM »
For another question, I've calculated this problem by using another method, which I think it makes sense,
but when I compared it to the slides, this is completely wrong, can somebody help me with it?

Any help would be appreciated.

#### kavinkandiah

• Jr. Member
• Posts: 11
• Karma: 0
##### Re: LEC 0201 question (W2L2)
« Reply #1 on: September 19, 2020, 12:34:36 PM »
I think you didn't do the partial fraction decomposition correctly, 1/y(y-1) = -1/y + 1/(y-1). I got 1/(1-ce^x) as my general solution

#### Shujun Fan

• Jr. Member
• Posts: 8
• Karma: 0
##### Re: LEC 0201 question (W2L2)
« Reply #2 on: September 19, 2020, 04:23:48 PM »
Yeah, I didn't do the partial fraction decomposition correctly, but the step after that is correct.
I still got the same answer again and again, but not the given one in the lecture slides:(