text:
# How do find the vertex and axis of symmetry, and intercepts for a quadratic equation y= -2x^2?

Aug 21, 2015

vertex at $\left(0 , 0\right)$
axis of symmetry: $x = 0$
y-intercept: $0$
x-intercept: $0$

#### Explanation:

General vertex form for a quadratic is
$\textcolor{w h i t e}{\text{XXXX}} y = m \left(x - a\right) + b$
$\textcolor{w h i t e}{\text{XXXXXXXX}}$with the vertex at $\left(a , b\right)$

$y = - 2 {x}^{2}$ can be written in vertex form as
$\textcolor{w h i t e}{\text{XXXX}} y = \left(- 2\right) {\left(x - 0\right)}^{2} + 0$
$\textcolor{w h i t e}{\text{XXXXXXX}}$with vertex at $\left(0 , 0\right)$

The equation is that of a standard parabola (opening downward)
so the axis of symmetry is a vertical line passing through the vertex
i.e. $x = 0$

The y-intercept is the value of $y$ when $x = 0$

The x-intercept(s) is/are the value of $x$ when $y = 0$ (in this case there is only one solution to $0 = - 2 {x}^{2}$)


text:
## The dynamics of perturbations of the contracting Lorenz attractor.(English)Zbl 0797.58051

The author considers the Lorenz equation where the eigenvalues $$\lambda_ 2 < \lambda_ 3 < 0 < \lambda_ 1$$ are modified by replacing the usual expanding condition $$\lambda_ 3+ \lambda_ 1 > 0$$ with a contracting condition $$\lambda_ 3 + \lambda_ 1 < 0$$. Denoting by $$X^ t$$ the flow of diffeomorphisms generated by a vector field $$X$$ and defining the notion of $$k$$-dimensionally almost persistent attractor, he proves the following result:
Theorem. There exists a $$C^ \infty$$ vector field $$X_ 0$$ in $$\mathbb{R}^ 3$$ having an attractor $$\Lambda$$ containing a singularity, and satisfying the following properties:
(a) There exist a local basin $$U$$ of $$\Lambda$$, a neighbourhood $$\mathcal U$$ of $$X_ 0$$, and an open and dense subset $${\mathcal U}_ 1$$ of $$\mathcal U$$, such that for all $$X \in {\mathcal U}_ 1$$, $$\Lambda_ X = \bigcap_{t \geq 0} X^ t(U)$$ consists of the union of one or at most two attracting periodic orbits, a hyperbolic set of topological dimension one, a singularity, and wandering orbits linking them.
(b) $$\Lambda$$ is 2-dimensionally almost persistent in the $$C^ 3$$ topology.
The paper is close to the paper of J. Guckenheimer and R. F. W. Williams [Publ. Math. Inst. Hautes Étud. Sci. 50, 59-72 (1979; Zbl 0436.58018)], where a $$C^ \infty$$ vector field $$X_ 0$$ on $$\mathbb{R}^ 3$$ is produced such that it has a $$C^ 1$$ persistent attractor $$\Lambda$$ containing a singularity with eigenvalues $$\lambda_ 2 < \lambda_ 3 < 0 < \lambda_ 1$$, $$\lambda_ 3 + \lambda_ 1 > 0$$.
Reviewer: J.Kalas (Brno)

### MSC:

 37C70 Attractors and repellers of smooth dynamical systems and their topological structure 34D45 Attractors of solutions to ordinary differential equations 34D10 Perturbations of ordinary differential equations

### Keywords:

perturbations; persistence; Lorenz attractor

Zbl 0436.58018
Full Text:

### References:

 [1] [ACT] Arneodo, A., Coullet, P., Tresser, C. (1981),A. possible new mechanism for the onset of turbulence. Physics Letter, 81A/4. · Zbl 0485.58013 [2] [BC1] Benedicks, M., Carleson, L. (1985)On iterations of 1?ax 2 on (?1,1). Ann. Math., 122. · Zbl 0597.58016 [3] [BC2] Benedicks, M., Carleson, L. (1991),The dynamics of the Hénon map. Ann. Math., 133. · Zbl 0724.58042 [4] [G] Guckenheimer (1979),On sensitive dependence on initial conditions for one dimensional maps. Comm. in Math. Phys., 70. · Zbl 0429.58012 [5] [GW] Guckenheimer, Williams (1979),Structural stability of Lorenz attractors. Publ. Math. IHES, 50. · Zbl 0436.58018 [6] [HPS] Hirsch, Pugh, Schub (1977),Invariant manifold. Springer Lecture notes, 583. [7] [L] Lorenz (1963),Deterministic non-periodic flow. Journal of Atmosphere Sciences, 20. [8] [MV] Mora, L., Viana, M.,Abundance of strange attractors. To appear in Acta Mathematica. · Zbl 0815.58016 [9] [M1] Mañé, R. (1978),Persistent manifolds are normally hyperbolic. Trans. A.M.S., 246. [10] [M2] Mañé, R. (1985), (1987),Hyperbolicity, sinks and measure in one dimensional dynamics. Comm. in Math. Phys., 100 495-524 and Erratum-Comm. in Math. Phys., 112. · Zbl 0583.58016 [11] [R] Richlik, M. R. (1990),Lorenz attractor through Sil’nikov-type bifurcation. Part I. Erg. th. and Dyn. Syst., 10. [12] [S] Singer (1978),Stable orbits and bifurcations of maps of the internal. SIAM. J. Appl. Math., 35. · Zbl 0391.58014
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.

format: plain


text:
# How to horizontally align child nodes with the graphdrawing library of TikZ 3.0?

I want to left align the "2222" node with the other nodes on the same level (see MWE below). Is this possible using the graphdrawing library of TikZ 3.0? I could not work it out so far.

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{graphdrawing}
\usetikzlibrary{graphs}
\usegdlibrary{trees}
\begin{document}
\begin{tikzpicture}[>=stealth,every node={align=left}]
\graph [tree layout, grow'=right, fresh nodes, level distance=0.5in,
sibling distance=0.1in]
{
4 -> {
3 -> { 1 -> { 5, " " }, 2,2 },
3 -> { 1, 2, 2 },
3 -> { 1, 2, 2222 }
}
};
\end{tikzpicture}
\end{document}

• You should rather put a solution in an answer rather than a question to keep things tidy and make it easy for people to find things. It is fine to answer your own question. – cfr Jan 12 '16 at 21:43

## 2 Answers

Instead every node={align=left} in tikzpicture parameters you should say:

every node/.style={anchor=west}

Result:

Upgrade: To my taste, regarding to you edited questions, the following solution looks nicer:

\graph [tree layout, grow'=right,
fresh nodes, level distance=0.5in,
sibling distance=0.1in
]
{
4 -> {
3 -> { 1 -> { 5, " " }, 2,2 },
3 -> { 1, 2, 2 },
3 -> [head anchor=west]{ 1, 2, 2222}
}
};

It gives:

• Thank you very much for your solution. I should have known this! Now I have got a new problem: How can I align the arrow from "3" to "2222" to point to this anchor instead of the node's center? – Simon Schälli Jan 12 '16 at 20:46
• @SimonSchälli, I'm not sure, if >I understand you correctly. Arrow to node 2222 has different outgoing angle as at nodes 2. This can be compensated by use of 3 -> { 1, 2, 2222[nudge=(up:-2mm)] } instead 3 -> { 1, 2, 2222 }. Try if this gives what you looking for. – Zarko Jan 12 '16 at 21:10
• You did understand me correctly. Thanks again for your solution. I did just find another possibility. Adding "head anchor=west" to the graph parameters does what I want. I will add this to my original post. – Simon Schälli Jan 12 '16 at 21:30
• @SimonSchälli, I'm glad that you find solution you liked. I still learn graphs and graphsdriwing ... – Zarko Jan 12 '16 at 21:45
• @SimonSchälli Your upgraded solution does not work for me only every node/.style={anchor=west}. I am on TeXLive 2018: pgf 2015/08/07 v3.0.1a (rcs-revision 1.15), tikzlibrarygraphs.code.tex 2015/06/05 v3.0.1a (rcs-revision 1.44). Can you confirm your local style adjustment 3 -> [head anchor=west]{ 1, 2, 2222} still works? – Hotschke May 19 '18 at 16:01

Thanks to Zarko I was able to get a working solution:

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{graphdrawing}
\usetikzlibrary{graphs}
\usegdlibrary{trees}
\begin{document}
\begin{tikzpicture}[>=stealth,every node/.style={anchor=west}]
\graph [tree layout, grow'=right, fresh nodes, level distance=3cm,
sibling distance=2ex, head anchor=west]
{
4 -> {
3 -> { 1 -> { 5, " " }, 2,2 },
3 -> { 1, 2, 2 },
3 -> { 1, 2, 2222 }
}
};
\end{tikzpicture}
\end{document}

gives


text:
Math Insight

Image: Height of one dimensional cross section of mount

The function $f(x)$ describes the height a mountain along a one-dimensional cross section.

Image file: mountain_height_1d.png


text:
# Solved: On the average, there are 500 mg of aspirin in an “Extra Strength” aspirin tablet. Suppose the random variable assigning amount of aspirin

#### ByDr. Raju Chaudhari

Oct 13, 2020

On the average, there are 500 mg of aspirin in an "Extra Strength" aspirin tablet. Suppose the random variable assigning amount of aspirin in a tablet is normally distributed with standard deviation 30 mg.

What proportion of extra strength aspirin tablets can be expected to contain between 475 and 525 mg of aspirin?

If you purchase a 100-tablet bottle of extra strength aspirin, about how many of them would contain more than 530 mg of aspirin?

How much aspirin would a tablet have to contain to be in the top 5% of the aspirin content range?

### Solution

Given that Suppose the random variable assigning amount of aspirin in a tablet is normally distributed with standard deviation 30 mg..

That is mean $\mu=500$ and standard deviation $=\sigma = 30$.

The proportion of extra strength aspirin tablets can be expected to contain between 475 and 525 mg of aspirin is

 \begin{aligned} P(475 < X < 525) &= P(X < 525) - P(X < 475)\\ &= P\bigg(\frac{X-\mu}{\sigma} < \frac{525-500}{30}\bigg)-P\bigg(\frac{X-\mu}{\sigma} < \frac{475-500}{30}\bigg)\\ &=P\bigg(Z < 0.833\bigg)-P\bigg(Z < -0.833\bigg)\\ &=0.7977-0.2023\\ &= 0.5953 \end{aligned}

The probability that an extra strength aspirin tablets contains more than $530$ is

 \begin{aligned} P(X>530) &= 1-P(X\leq530)\\ &= 1- P\bigg(\frac{X-\mu}{\sigma} \leq \frac{530-500}{30}\bigg)\\ &=1- P\bigg(Z \leq 1\bigg)\\ &=1-0.8413\\ &= 0.1587 \end{aligned}

Thus if you purchase a 100-tablet bottle of extra strength aspirin, about $100* 0.1587=16$ of them would contain more than 530 mg of aspirin.

Let the top 5% percentile of aspirin content range be "a" or more. Then we have

 \begin{aligned} & P(X > a)=0.05\\ &\Rightarrow P(X < a) =0.95\\ &\Rightarrow P\big(\frac{X-\mu}{\sigma} < \frac{a-500}{30}\big)=0.95\\ &\Rightarrow P(Z < \frac{a-500}{30}\big)=0.95\\ &\Rightarrow \frac{a-500}{30}= 1.645\\ &\Rightarrow a = 500 + 1.645* 30\\ &\Rightarrow a = 549.35 \end{aligned}

Thus the tablet would have to contain $549.35$ of aspirin to be in the top 5% of the apsirin content range.


text:
Help with Volcano plot
0
0
Entering edit mode
4 months ago
mshubham • 0

Hi, I am having difficulty in plotting the volcano plot. I used ggplot to plot the graph, but my graph is blank at the center across Log2Fc=0. I am not able to understand why there is no dots at centre whereI do have some genes being expressed in this region. Please do help.

threshold_OE <- As.response$p_val < 0.05 As.response$threshold <- threshold_OE
P24 <- ggplot(As.response) +
geom_point(aes(x=avg_log2FC, y=-log10(p_val), color = threshold)) +
ggtitle("Astrocyte response") +
xlab("log2 fold change") +
ylab("-log10 p-value") +
#scale_y_continuous(limits = c(0,50)) +
theme(legend.position = "none",
plot.title = element_text(size = rel(1.5), hjust = 0.5),
axis.title = element_text(size = rel(1.25)))
P25 <- LabelPoints(plot = P24, points = genes.to.label.As.new, xnudge = 0, ynudge = 0, repel = TRUE)

Volcano r plot ggplot • 968 views
1
Entering edit mode

what code did you use to generate As.response? It looks like genes with a |log2 fold change| < 0.25 were potentially filtered out of the data.

0
Entering edit mode

Yes, probably used the Seurat default

0
Entering edit mode

Hi, Yes, possibly due to As.response was generated by using FindMarker() with 0.25 as a cutoff. Please let me know if there is a better way to plot the differential expression data generated by Seurat.

0
Entering edit mode

Please change the threshold to 0.0. This will mean, however, that FindMarkers() takes longer to complete.

0
Entering edit mode

Tried. However, the plot does not look well volcanic.

0
Entering edit mode

That looks like a normal volcano plot. What problem do you see with it?

0
Entering edit mode

I thought it's too much merged at the center and in a proper volcano shape. This is my first experience with these plots.

0
Entering edit mode

How can I annotate the pathways associated with the genes labeled above? Since they are very small set of genes, I only want to annotate the pathway, not perform enrichment analysis.

0
Entering edit mode

Please use KEGGprofile (I just posted an answer here: https://support.bioconductor.org/p/9138854/), or some other pathway analysis program. Anyway, this is a new question that is very much unrelated to the original [question].


text:
Strange results from Diffbind-Deseq2 differential peak binding of cfChip-seq with blocking
1
0
Entering edit mode
13 days ago
Oladele • 0

Hi All,

I am working on cfChip-seq with the goal of comparing differentially bound peaks between two timepoints. Please note that same patients (n = 9) donated samples on the two occasions. Our quick PCA analysis showed a lot of variation coming from patient (i.e samples from the same patients seem to cluster together). So we decided to perform the diffbind (v2, Deseq2) analysis with/without blocking with hopes of removing patient-specific significant peaks.

However, I surprisingly observed a drastic increase in diffbound peaks (fdr<0.05, FC≥2) when I blocked on patient (~9000 peaks) vs without blocking (~2000 peaks). This is difficult to explain and I wonder if anyone had similar experience previously. Any suggestion on how to handle this will be appreciated.

Here is a section of my code:

DBdatacontrast <- dba.contrast(DBdataCounts, minMembers=2, categories = DBA_CONDITION, block=DBA_TREATMENT)
DBAnalysisDeseq2 <- dba.analyze(DBdatacontrast, method = DBA_DESEQ2)

Thanks!

Diffbind cfChip-seq Blocking Deseq2 • 213 views
ADD COMMENT
1
Entering edit mode
13 days ago
Rory Stark ★ 1.6k

It is certainly possible to see a substantial increase in confidentially identifying binding changes when applying the "correct" model. In your case, when you do not include the matched samples in the model, you are seeing many fewer significantly differentially bound sites because of the unmodeled similarities between the matched samples in different conditions. When you do include this factor in the model, more consistent changes between timepoints are identified once the sources of variation due to matched patient samples is accounted for. The increase in confidences score (lower FDRs) is an indication that the two-factor model is a better fit for your experimental setup.

Can I ask why you are using such an old version of DiffBind? DiffBind_2.x.y is several years out of date at this point. More recent versions are more likely to accurately model your data. In addition, instead of using the block feature, you can now set up the exact model you want explicitly. In your case, something like:

DBdatacontrast < dba.contrast(DBdataCounts, design="~Treatment + Condition",
contrast=c("Condition","Latertime", "Earliertime") )

ADD COMMENT
0
Entering edit mode

Hi Rory, Thanks for the prompt and detailed response. Yes, our lab has been using V2 for a while and have been reluctant changing to V3. But thank you so much for bringing this up as we will definely be exploring V3 now.

ADD REPLY

Login before adding your answer.

Traffic: 2006 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6


text:
# How do I interpolate sparse data with a spline?

I have this data:

data =
{{0.2, 103}, {2, 13.9}, {20, 2.72}, {200, 0.8}, {2000, 0.401}, {20000, 0.433}}

Is there any way of finding value at $x=5$ using splines and not an interpolating polynomial?

• Interpolation[data, Method -> "Spline", InterpolationOrder -> 3][5] Dec 15, 2017 at 20:03
• recommend InterpolationOrder -> 1 here. With that data the higher order interpolation oscillates pretty wildly. Dec 15, 2017 at 20:31
• Interpolation and SplineFit are not the same : Interpolation[...,Method-> "Spline"...] returns a piecewise polynomial function x->y. SplineFit returns a parametric function t->{x,y}. This last function can represent a curve that goes in every directions, like a circle for example (x get greater, then smaller etc...). For one x there may be several y. Dec 15, 2017 at 20:47

I think I would rescale the domain (logarithmically) to get better spacing between nodes:

ifn = Evaluate[
Interpolation[
Transpose[{Log@data[[All, 1]], data[[All, 2]]}],
Method -> "Spline"
][Log@#]
] &;

LogLogPlot[{ifn[x]}, {x, 0.2, 20000},
Epilog -> {Red, PointSize[Medium], Point@Log@data}, PlotRange -> All]

ifn[5]
(*  4.83159  *)

• For me, it is still unclear if the OP wants piecewise interpolation or if he wants to interpolate the whole region with one function. Nowadays the questions are so vague and incomplete... +1 Dec 16, 2017 at 13:04
• @halirutan Thanks. I assumed "spline" meant spline and the original Q said "not InterpolatingPolynomial". I took it that the OP possibly didn't know the spline option to Interpolation. But if the question is a real problem, then probably what is wanted is linear interpolation, suggested by george2079, or splines with tension, which I don't think is built in M. The inflection points in my answer suggest the interpolation is not very accurate much past the point at $x=2$. Dec 16, 2017 at 15:30


text:
# Can a $M$-augmenting path consist of three vertices along with two unmatched edges?

Given a matching, a $M$-augmenting path is a path that alternates between edges in $M$ and edges not in $M$ where endpoints are unmatched.

Can a $M$-augmenting path consist of three vertices along with two unmatched edges? (Think: $K_{1,2}$)

## 1 Answer

No, it can't. We can in fact say something more precise about the structure of augmenting paths: an $M$-augmenting paths is a path that alternates between edges in $M$ and edges not in $M$ where only the endpoint are unmatched.

The idea is that we construct an augmenting path by starting at an unmatched vertex, and building until we get to another unmatched vertex. So, in your example, if we started with an unmatched vertex $v_1$ and took an edge (which is, by assumption, not in $M$) to get to another unmatched vertex $v_2$, we'd stop there! That's the simplest kind of $M$-augmenting path: an edge between two unmatched vertices, which we can just add to our matching.

The only reason we'd keep going is if the second vertex $v_2$ were matched to something. Then we extend the path by going to $v_3$, the vertex such that $v_2 v_3 \in M$, and keep going from there. This also does not produce a path of two unmatched edges.

• Thanks. If you have access to youtube, youtube.com/watch?v=C9c8zEZXboA, at 1:45 mark, the person talks about T-to-R path being an M-augmenting path, even though no other path connecting a vertex reachable from T contains an alternating path. Is this the same as what you are talking about? – Olórin Oct 3 '17 at 2:10
• Exactly. If the path gets any longer, it's only by being alternating. – Misha Lavrov Oct 3 '17 at 2:18


text:
# Is the property “being a derivative” preserved under multiplication and composition?

Since differentiation is linear, we therefore have that if $f, g: I\to \mathbb{R}$ is a derivative (where $I\subset \mathbb{R}$ is an interval), then so does their linear combination. What if we consider their multiplication and composition?

Due to the forms of the product rule of differentiation of product function and chain rule of differentiation of composition, I highly doubt their product or composition necessarily is still a derivative, but I cannot construct counterexamples.

• Hint for a complete answer for closed-form antiderivatives: J. Liouville's theorem on integration in finite terms solves the problem for antiderivatives which are elementary functions. One can apply Liouville's method to generalize this to arbitrary classes of closed-form functions. One has to apply Liouville's theorem and method to the product and composition of functions. The case of infinite terms (infinite series, products, fractions, ...) still remains. – IV_ Dec 30 '16 at 23:16
• To clarify, does " $f$ has an antiderivative" mean that $\int f(x)\;dx$ exists, or that it can be written in closed form? – MPW Jan 3 '17 at 21:40
• @MPW Those of us who write on such subjects prefer the phrase "$f$ is a derivative'' rather than "$f$ has an antiderivative." Both mean that there exists a function $F$ with $F'(x)=f(x)$ at every point $x$ in some interval (that really should be specified). A "closed form" or formula is not an issue in such discussions. Usually words like "antiderivative" or "indefinite integral" [in this sense] and notation like $\int f(x)\,dx$ are found only in calculus classes, not real analysis research. – B. S. Thomson Jan 6 '17 at 17:38

Problem. Suppose that $f$ and $g$ are both derivatives. Under what conditions can we assert that the product $fg$ is also a derivative?

The short answer is that this is not true in general. In fact even if we assume that $f$ is continuous and $g$ is a derivative the product need not be a derivative. However if we strengthen that to assuming that $f$ is not merely continuous but also of bounded variation, then indeed the product with any derivative would be a derivative.

This is an interesting problem and leads to interesting ideas.

For references to the statements here and an in depth look at the problem here are some references:

Bruckner, A. M.; Mařík, J.; Weil, C. E. Some aspects of products of derivatives. Amer. Math. Monthly 99 (1992), no. 2, 134–145.

Fleissner, Richard J. Distant bounded variation and products of derivatives . Fund. Math. 94 (1977), no. 1, 1–11.

Fleissner, Richard J. On the product of derivatives. Fund. Math. 88 (1975), no. 2, 173–178.

Fleissner, Richard J. Multiplication and the fundamental theorem of calculus—a survey. Real Anal. Exchange 2 (1976/77), no. 1, 7–34.

Foran, James On the product of derivatives, Fund. Math. 80 (1973), no. 3, 293–294.

I will edit in some links when I find them. Foran and Fleissner were close childhood friends who ended up pursuing their PhD at the same time in Milwaukee. Fleissner died in an automobile accident in 1983.

NOTE ADDED. Elementary students are not going to want to pursue this topic to quite this depth. But here is an exercise aimed at this level that they might find entertaining.

Exercise. Consider the function $$f(x)=\begin{cases} \cos \frac1x, & x\not=0 \\ 0 &x=0 \end{cases}$$ Show that the function $f$ is a derivative but that its square $f^2$ is not.

• The second problem is less interesting and I haven't mentioned it. But in order for $\phi(f(x))$ to be a derivative whenever $f$ is a derivative it is only possible if $\phi$ is a linear function (as one likely would guess). – B. S. Thomson Dec 12 '15 at 18:13
• I noticed your comment only after I placed the bounty! If you add a proof of what you said in your comment to your answer, I will gladly give you the +250. – MathematicsStudent1122 Dec 28 '16 at 22:42
• Here are a couple of papers of A M Bruckner where such problems are discussed: A M Monthly, 85, 1978, 554-562 and Quart J Math Oxford 29, 1978, 1-10. Andy gives Choquet credit for the observation, but Choquet did not supply a proof. Don't need a bounty, but would accept a bottle of wine. – B. S. Thomson Dec 30 '16 at 21:17
• @MathematicsStudent1122 Next time you offer a bounty, please make it clear what is required in the answer to be awarded the bounty (or a part thereof). I'm not an expert in this area like our contributor B.S.Thomson, but I spent some time on the problem, prodded on by your bounty, and thought I came up with something of interest, leading to a nice example addressing the composition question. Bounty awarded: $0.$ Weird. – zhw. Jan 9 '17 at 23:57
• @zhw. That was really a mistake. I actually forgot about this question, and it seems I must have missed the bounty-expiring notification. Sorry. I've +1'd your answer. – MathematicsStudent1122 Jan 10 '17 at 0:44

Let $X$ be the set of functions from $\mathbb R$ to $\mathbb R$ that have antiderivatives on all of $\mathbb R.$

Claim: There exists $f\in X$ such that $f^n\notin X$ for $n=2,3,\cdots.$ (Here $f^n$ is the $n$th power of $f,$ not the $n$th iterate.) This addresses both the product question and the composition question. If the claim is true, then $f\in X$ but the product $f\cdot f \notin X.$ Also, with $g_n(x) = x^n, n = 2,3, \dots,$ we see $g_n\circ f\notin X$ even though the $g_n$'s are very nice and $f\in X.$

The following lemma will be helpful:

Lemma: Suppose $f:\mathbb R\to \mathbb R,$ with $f=0$ on $(-\infty,0]$ and $f$ continuous on $(0,\infty).$ Then $f\in X$ iff $\int_0^x f$ converges for all $x>0$ and

$$\lim_{x\to 0^+}\frac{1}{x} \int_0^x f = 0.$$

Here the convergence of $\int_0^x f$ is in the improper integral sense, meaning $\int_0^x f = \lim_{a\to 0^+}\int_a^xf$ assuming the limit is finite.

Proof: $\implies:$ Let $f\in X,$ with $F'=f$ on $\mathbb R.$ Let $x>0.$ For any $a\in (0,x),$ $F\in C^1[a,x].$ Thus

$$\tag 1 F(x)-F(a) = \int_a^x f.$$

As $a\to 0^+,$ the left side of $(1)$ $\to F(x) - F(0)$ by the continuity of $F.$ It follows that the right side has a finite limit, hence $\int_0^x f$ converges. Note that we have shown

$$F(x)-F(0) = \int_0^x f.$$

Now $F'(0) = f(0)= 0.$ It follows that

$$0 = \lim_{x\to 0+}\frac{F(x)-F(0)}{x-0}= \lim_{x\to 0+} \frac{\int_0^x f}{x}$$

as desired.

$\impliedby:$ Simply define $F(x) = \int_0^x f.$ By the continuity of $f$ on $\mathbb R\setminus \{0\},$ we have $F'(x) = f(x)$ for $x\ne 0.$ At $0,$ we easily see the derivative from the left of $F$ at $0$ is $0.$ From the right we have

$$\lim_{x\to 0+}\frac{F(x)-F(0)}{x-0}= \lim_{x\to 0+} \frac{\int_0^x f}{x} = 0.$$

This shows $f\in X$ and the proof of the lemma is complete.

Proof of the claim: We build a slightly crazy $f\in X.$ For $n=2,3,\dots$ let $a_n = 1/n, b_n = 1/n + 1/2^n.$ Then the intervals $[a_n,b_n]$ are pairwise disjoint.

On each $[a_n,b_n]$ let $f$ be an isoceles triangular spike from the end points of height $2^n/n^3.$ Define $f =0$ everywhere else. Then $f$ satisfies the hypotheses of the lemma. Now

$$\int_0^1 f = \sum_{n=2}^{\infty} \frac{1}{2}\cdot \frac{1}{2^{n+1}}\cdot \frac{2^n}{n^3} = \sum_{n=2}^{\infty} \frac{1}{4n^3} <\infty.$$

To show $(1/x)\int_0^x f \to 0,$ suppose $x\in [a_n,a_{n-1}].$ Then

$$\tag 2 \frac{1}{x}\int_0^x f \le \frac{1}{a_n}\int_0^{a_{n-1}}f = n \sum_{k=n}^{\infty}\frac{1}{4n^3}.$$

The last sum is $O(1/n^2).$ So $(2)$ is no more than $nO(1/n^2) = O(1/n) \to 0.$ Thus the left side of $(2)\to 0$ as $x\to 0^+.$ The lemma now shows $f\in X.$

The easy part of the claim is showing higher powers of $f$ are not in $X.$ By the lemma, all we need to show is that $\int_0^1 f^2 = \infty.$ It will then follow that $\int_0^1 f^n = \infty, n=3,4,\dots$

Here's what I get (but the reader should check):

$$\int_{a_n}^{b_n} f^2 = \frac{2^n}{3n^6} .$$

Thus $\int_0^1 f^2 =\infty,$ by a mile. The proof of the claim is complete.

• I believe the following generalization is true: Let $p>1.$ Suppose $g$ is continuous on $\mathbb R,$ with $|g(x)|>x^p$ for large $x>0,$ then $g\circ f \notin X.$ (Here $f\in X$ is the function constructed in my answer.) Example: if $P$ is any nonlinear polynomial, then $P\circ f \notin X.$ – zhw. Dec 31 '16 at 19:36

From the product rule of differentiation or from the rule of partial integration, one obtains the following less known product rules:

$$\int f(x)g(x)dx=f(x)G(x)-\int f'(x)G(x)dx\hspace{1.5cm}[Borman], [Goldstein], [Kowalk]$$ $$\int f(x)g(x)dx=F(x)g(x)-\int F(x)g'(x)dx\hspace{3.9cm}[Mercer], [Reinsch]$$

$F(z)=\int f(z)dz$; $G(z)=\int g(z)dz$; $\gamma$: compositional inverse of the function $g$

From the chain rule of differentiation, the inverse rule of differentiation and the rule of partial integration, one obtains the following less known chain rules: $$\int f(g(x))dx=\int f(t)\gamma'(t)dt;\ t=g(x)$$ $$\int f(g(x))dx=xf(g(x))-\int f'(t)\gamma(t)dt;\ t=g(x)$$ $$\int f(g(x))dx=\left(\frac{d}{dx}F(g(x))\right)\int\frac{1}{g'(x)}dx-\int \left(\frac{d^{2}}{dx^{2}}F(g(x))\right)\int\frac{1}{g'(x)}dx\ dx$$ $$\int f(g(x))dx=\frac{F(g(x))}{g'(x)}+\int F(g(x))\frac{g''(x)}{g'(x)^{2}}dx$$

This formulas show that integration rules for products and compositions of functions are possible only for some special kinds of component functions $f$ and $g$.


text:
# A comparison of medium-sized basis sets for the prediction of geometries, vibrational frequencies, infrared intensities and raman activities of water

CCP2018 Poster, UC Davis, 2018

This was my poster for the 30th annual Conference on Computational Physics (CCP).


text:
trkshspo

2023-03-11

What is the derivative of ${e}^{x\mathrm{ln}2}$?

Nhluvukoj6m

This can be done either by the Chain Rule ($\frac{d}{dx}\left(f\left(g\left(x\right)\right)\right)=f\prime \left(g\left(x\right)\right)\cdot g\prime \left(x\right)$) or by recognizing that ${e}^{x\cdot \mathrm{ln}\left(2\right)}={e}^{\mathrm{ln}\left({2}^{x}\right)}={2}^{x}$ and recalling that $\frac{d}{dx}\left({b}^{x}\right)=\mathrm{ln}\left(b\right)\cdot {b}^{x}$ when $b>0$.

Do you have a similar question?


text:
Edit Article

# How to Find Surface Area of a Triangular Prism

Finding the surface area of a three-dimensional shape can be intimidating if you've never done it before, but the formulas for many of these shapes are fairly straight forward. When finding the surface area of a triangular prism, you simply need to calculate the area of each side and add the values together. If you still aren't sure about how to do it, though, keep reading for a step-by-step explanation.

### Part 1 Understanding the Formula

1. 1
Understand what a triangular prism is. A triangular prism is a three-dimensional shape consisting of two triangular bases connected by three square or rectangular sides.
• When finding surface area for the triangular prism, you will need to add together the area of all five sides.
• Note that a three-dimensional shape with four triangular sides and one square base is called a pyramid, not a triangular prism.
2. 2
Know the most basic formula. The most basic formula to use for calculating the surface area of a prism is: SA = L + 2*B[1]
• SA refers to "surface area."
• L refers to "lateral area." The lateral area is the area of all three rectangular sides combined.
• B refers to "base area." The base area is the area of one triangular base. For the equation, you need to multiply this area by 2.
3. 3
Expand the formula. A more detailed version of the same equation can be written as: SA = ah + bh + ch + 2*(1/2 * A * b)
• The A refers to the altitude of the triangular base.
• The b refers to the base measurement of the triangular base.
• The h refers to the height measurement of the prism.
• The a, b, and c refer to the sides of the triangular base. Note that a and A in the equation stand for two separate measurements, but the b variable is the same for both parts of the equation.
• The equation for the lateral surface area is ah + bh + ch
• The addition of the two areas for the bases is written as: 2*(1/2 * A * b)
4. 4
Break it down further. The equation typically used for surface area is written as: SA = h*(a + b + c) + (A * b)
• For the ah + bh + ch portion of the equation, the common h is removed and placed outside of parentheses, indicating that it needs to be distributed to each of the variables inside.
• For the 2*(1/2 * A * b) portion of the equation, the 2 and 1/2 cancel each other out when they are multiplied, simply leaving A * b.

### Part 2 Finding the Surface Area of Each Base

1. 1
Look at the part of the equation for triangular base area. Following the final version of the equation as described above, the equation for the triangular base areas combined is simply: A * b.
• A refers to the altitude of the triangle and b refers to the triangle's base.
• Example:
• A = 2 centimeter (0.8 in)
• b = 4 centimeter (1.6 in)
2. 2
Multiply the altitude of the triangle by the length of the base. In essence, this would find the area of a rectangle with the same length and width, represented here by base and altitude. It is a necessary part of the equation, though.
• Example: A * b = 2 * 4 = 8 centimeter (3.1 in) squared
3. 3
Understand why this area equation does not match that of a standard triangle. When aiming to find the surface area of the equation, you should stop here. This functions as the measurement of both triangular bases.
• When finding the area of a triangle, you would usually use the formula: 1/2 * A * b[2]
• By cutting the product of altitude and base in half, you can find the area of a triangle instead of that of a rectangle.
• In this case, however, you need to add two of these triangular base areas together. You could go through the effort of cutting the triangular area in half, but since you will only double that result immediately afterward, it is an unnecessary step.

### Part 3 Finding the Lateral Surface Area

1. 1
Examine the portion of the equation relating to lateral area. In the final version of the equation, described above, finding the lateral area can be done with the following solution: h*(a + b + c)
• The h refers to the height of the prism, or the long side of the rectangular sides.
• The b refers to the base of the triangle. It is the same b used in the other half of the equation.
• The a and c refer to the other two sides of the triangular bases.
• Example:
• h = 7 centimeter (2.8 in)
• b = 4 centimeter (1.6 in)
• a = 6 centimeter (2.4 in)
• c = 5 centimeter (2.0 in)
2. 2
Add the three sides of the triangular base together. For the first part of this equation half, you need to add together a, b, and c.
• Example: a + b + c = 6 + 4 + 5 = 15 centimeter (5.9 in)
3. 3
Multiply this value by the height of the prism. Multiply the sum of the three outer sides of the triangle by the height of the rectangular portion of the prism, h.
• Note that the value resulting from this step is the lateral area for the rectangular prism.
• Example: h*(a + b + c) = 7 * (6 + 4 + 5) = 7 * 15 = 105 centimeter (41.3 in) squared
4. 4
Get a clearer understanding of what this signifies. In summary, the lateral area is the addition of the area for all three triangular sides of the prism.
• The standard equation for an ordinary rectangle is length multiplied by width.
• Here, each rectangle shares a common length. In terms of this equation, though, length translates into height, or h. Hence, the equation for each rectangle must include the same h value.
• The width of each rectangle here differs, but it each rectangle has a width that corresponds to one outer side of the triangle, a, b, and c. Hence, the a, b, and c replace the width measurement in a standard equation for rectangular area.

### Part 4 Putting it Together

1. 1
Take another look at the formula for surface area. Remember that the surface area of a triangular prism is the addition of the area for two triangular bases to the lateral area of the prism: SA = L + 2*B
• Written in a more extended manner, the surface area can be looked at as: SA = h*(a + b + c) + (A * b)
2. 2
Plug the values you calculated into the equation. Since you have already calculated the lateral area of the triangular prism and the doubled base area of the triangular base, all you need to do is plug the values into the equation.
• Example: SA = L + 2*B = 105 + 8
• Example: SA = h*(a + b + c) + (A * b) = 7 * (6 + 4 + 5) + 2 * 4 = 7 * 15 + 2 * 4 = 105 + 8
3. 3
Add the lateral area plus the doubled base area to complete the problem. Once you add these values together, you have successfully found the surface area of the triangular prism in your problem.
• Example: SA = L + 2*B = 105 + 8 = 113 centimeter (44.5 in) squared

• Calculator
• Pencil
• Paper
• Ruler

## Article Info

Categories: Calculating Volume and Area

In other languages:

Thanks to all authors for creating a page that has been read 126,980 times.


text:
# Sums of Variances of Independent Trials

## Theorem

Let $\mathcal E_1, \mathcal E_2, \ldots, \mathcal E_n$ be a sequence of experiments whose outcomes are independent of each other.

Let $X_1, X_2, \ldots, X_n$ be discrete random variables on $\mathcal E_1, \mathcal E_2, \ldots, \mathcal E_n$ respectively.

Let $\operatorname{var} \left({X_j}\right)$ be the variance of $X_j$ for $j \in \left\{{1, 2, \ldots, n}\right\}$.

Then:

$\displaystyle \operatorname{var} \left({\sum_{j \mathop = 1}^n X_j}\right) = \sum_{j \mathop = 1}^n \operatorname{var} \left({X_j}\right)$

That is, the sum of the variances equals the variance of the sum.


text:
# Triple integral over a sphere in rectangular coordinates

1. Apr 1, 2008

### Batmaniac

1. The problem statement, all variables and given/known data

Evaluate the following integral:

$$\iiint \,x\,y\,z\,dV$$

Where the boundaries are given by a sphere in the first octant with radius 2.

The question asks for this to be done using rectangular, spherical, and cylindrical coordinates.

I did this fairly easily in spherical and rectangular coordinates, except for the fact that I got two different answers and I can't figure out where I went wrong! That's not a problem though because I can fix that.

3. The attempt at a solution

How would I do this problem in rectangular coordinates? My integral would look like this:

$$\int_{0}^{{\sqrt{4-x^2-y^2}}}\int_{0}^{{\sqrt{4-x^2-z^2}}}\int_{0}^{{\sqrt{4-z^2-y^2}}}xyz\,dz\,dy\,dx$$

Which, without some clever transformations and an extremely messy Jacobian calculation, looks unsolvable.

2. Apr 1, 2008

### Mystic998

I think you need to rethink your bounds on that one...

3. Apr 1, 2008

### Batmaniac

How does this look then?

$$\int_{0}^{2}\int_{0}^{2}\int_{0}^{{\sqrt{4-z^2-y^2}}}xyz\,dz\,dy\,dx$$

4. Apr 1, 2008

### Batmaniac

Hmm, MATLAB tells me that's zero.

5. Apr 1, 2008

### Dick

Your dy limit should depend on x.

6. Apr 2, 2008

### HallsofIvy

Staff Emeritus
That would be over a square in the xy-plane rising up to the sphere.

Projecting the sphere into the xy-plane gives you the quarter circle x2+ y2= 4, with $0\le x\le 2$, $0\le y\le 2$. You can let x go from 0 to 2 but then, for each x, y ranges from 0 to $\sqrt{4- x^2}$.


text:
# Why am I Getting: Transaction Error. Exception thrown in contract code in Rinkeby?

I'm creating a token that generates new tokens every time ETH is sent to it. It takes those newly generated tokens and sends them to the wallet address that sent the ETH. The maxTokens is 40mil. The RATE is 20mil (trying to keep things simple for my test). It's pretty straightforward.

The issue I'm encountering with my test contract is that trying to send 1 ETH is fine and the transaction goes through. Trying to send a greater amount, like say 1.5, produces this warning: "Transaction Error. Exception thrown in contract code. Gas limit set dangerously high. Approving this transaction is likely to fail."

After playing around for a while I realized that I could send smaller amounts of ETH that would go through after sending the 1ETH. However, the closer I got to the max tokens I would get the above mentioned error.

Can anyone explain why I am getting this error? I can't understand why an error is producing when someone sends an amount of ETH that is relatively close to the maxTokens.

Edit: I have successfully been able to buy up to 39,999,700 of the tokens. However, I have to keep buying smaller amounts each time or else I get the above mentioned errors.

pragma solidity ^0.4.11;

import './IERC20.sol';
import './SafeMath.sol';

contract ChekOutToken is IERC20 {

using SafeMath for uint256;

uint public _totalSupply = 0;

string public constant symbol = "CHEKS";
string public constant name = "ChekOut Token";
uint8 public constant decimals = 18;

// 1 ETH = 1000 CHEKS
uint256 public constant RATE = 20000000;

// Sets Maximum Tokens to be Created
uint256 public constant maxTokens = 40000000000000000000000000;

mapping (address => uint256) public balances;

function () payable{
createTokens();
}

function ChekOutToken(){
owner = msg.sender;
}

function createTokens() payable{
require(msg.value > 0);
uint256 tokens = msg.value.mul(RATE);
owner.transfer(msg.value);
}

function totalSupply() public constant returns (uint256 totalSupply) {
return _totalSupply;
}

function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}

function transfer(address _to, uint256 _value) public returns (bool success) {
require(balances[msg.sender] >= _value && _value > 0);
balances[msg.sender] = balances[msg.sender].sub(_value);
Transfer(msg.sender, _to, _value);
return true;
}

function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(allowed[_from][msg.sender] >= _value && balances[_from] >= _value && _value > 0);
balances[_from] = balances[msg.sender].sub(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
Transfer(_from, _to, _value);
return true;
}

function approve(address _spender, uint256 _value) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}

return allowed[_owner][_spender];
}

}

I see two issues, and I think the second is the source of your error:

function createTokens() payable{
require(msg.value > 0);
uint256 tokens = msg.value.mul(RATE);
owner.transfer(msg.value);
}

The line require(_totalSupply.add(tokens) <= maxTokens); occurs twice. Each time is problematic:

1. The first time, tokens has not yet been assigned a value. (I was surprised this even compiled, but apparently variable declarations are hoisted?) So this checks adding 0, which doesn't do what you want.
2. The second time, you've already added tokens to _totalSupply so you're effectively checking "Can I add tokens twice and still stay under maxTokens?"

I would fix the function by moving the earlier require to after the computation of tokens and getting rid of the require at the end:

function createTokens() payable{
require(msg.value > 0);
uint256 tokens = msg.value.mul(RATE);


text:
# How to solve this problem?

Oct 27, 2017

2,439 kw (rounded)

#### Explanation:

"varies directly as the cube of the wind speed S" means that
$P = c {S}^{3}$, where c is some constant you don't know, yet.

But you can derive it, since you are told that when S = 27, P = 750

$750 = c \left({27}^{3}\right) = c \left(19 , 683\right)$
...therefore $c = \frac{750}{19683}$ = .0381 (rounded)
...so then you can plug in 40:

$P = .0381 \left({40}^{3}\right) = .0381 \left(64000\right) = 2 , 439 k w$ (rounded)

GOOD LUCK


text:
107 146
Assignments Done
100%
Successfully Done
In January 2023

# Answer to Question #120946 in Mechanics | Relativity for Vidurjah Perananthan

Question #120946
In traffic knowledge, one speaks of reaction distance, braking distance and stopping distance. From the driver noticing the danger until they react, it takes a certain amount of reaction time. The reaction distance is the distance the car travels during the reaction time. The braking distance is the distance the car moves during braking. The stop distance is the sum of the reaction distance and the brake distance. Calculate the stopping distance for a motorist who has a speed of 108 km / h. The reaction time is assumed to be 0.84 s and the mean value of the acceleration during braking is 5.1 m / s2. Draw three diagrams for the whole process.
One with distance time-graph, one with speed time-graph and one with acceleration time-graph
1
2020-06-09T13:20:23-0400

Explanations & Calculations

• 108kmh-1 = 30ms-1

• Reaction distance is (dr) : apply s = ut along the moving direction

• Assuming the deceleration is uniform throughout, apply V = U +at to find the time taken until come to rest.

"\\qquad\\qquad\n\\begin{aligned}\n\\small 0ms^{-1} &= \\small 30 ms^{-1} +(-5.1ms^{-2}) \\times t\\\\\n\\small t &= \\small \\bold{5.88 s}\n\\end{aligned}"

• Traveled distance after applying brakes (d1) : apply V2 = U2 +2as

"\\qquad\\qquad\n\\begin{aligned}\n\\small 0 &= \\small 30^2 +2\\times(-5.1) \\times d_1\\\\\n\\small d_1 &= \\small \\bold{88.24m\n}\\end{aligned}"

• Stopping distance = 25.2 + 88.24 = 113.44 m
• Total time expelled = 0.84 + 5.88 = 6.72 s

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


text:
1. ## Constructing injection questions

Let $S_2$ = {0,1}^N, $S_2^*$= { $(a_n) \in S_2$; (there exists $k\in N$) s.t ( $for all n>=k) a_n = 1$}. Recall that the function $f: S_2-S_2^*--> [0,1)$, given by $f((a_n)) = \displaystyle \sum_{n = 1}^{\infty}a_n/2^n$ is a bijection. Denote by $\varphi: [0,1)-->S_2-S_2^*$the inverse function $f^{-1}$. Note that for $x \in [0,1)$,
$\varphi (x)$ is the sequence $\varphi(x) = (\varphi_n(x))_{n = 1}^{\infty}$ $\in S_2-S_2^*$ with $f(\varphi(x)) = \displaystyle \sum_{n = 1}^{\infty} \varphi_n(x)/2^n = x$.

a) Construct an injection $g:$ $S_2-S_2^* --> [0,1) x [0,1)$.

b) Construct an injection $h: [0,1) x [0,1) --> S_2-S_2^*$. (Hint: Interlace decimals)

The question is kind of confusing with all these notations, any help will be useful.

2. ## Re: Constructing injection questions

I am truly not sure what you are asking for?
Do you understand that $S_2$ is the set of infinite bit strings?
That $S_2^*$ is the set of infinite bit strings with at a finite collection of zeros?
Every number in $[0,1)$ has binary representation.
The set $S_2\setminus S_2^*$ represent the binary representation that are unique.

Does that help?

3. ## Re: Constructing injection questions

sorry, I do not understand those terms, I think this question has things to do with decimal reprsentation


text:
In part one, we simulated a simple CTMC. Now, let us complicate things a bit. Remember the example problem there:

A gas station has a single pump and no space for vehicles to wait (if a vehicle arrives and the pump is not available, it leaves). Vehicles arrive to the gas station following a Poisson process with a rate of $\lambda=3/20$ vehicles per minute, of which 75% are cars and 25% are motorcycles. The refuelling time can be modelled with an exponential random variable with mean 8 minutes for cars and 3 minutes for motorcycles, that is, the services rates are $\mu_\mathrm{c}=1/8$ cars and $\mu_\mathrm{m}=1/3$ motorcycles per minute respectively (note that, in this context, $\mu$ is a rate, not a mean).

Consider the previous example, but, this time, there is space for one motorcycle to wait while the pump is being used by another vehicle. In other words, cars see a queue size of 0 and motorcycles see a queue size of 1.

The new Markov chain is the following:

where the states car+ and m/c+ represent car + waiting motorcycle and motorcycle + waiting motorcycle respectively.

With $p$ the steady state distribution, the average number of vehicles in the system is given by

# Arrival rate
lambda <- 3/20
# Service rate (cars, motorcycles)
mu <- c(1/8, 1/3)
# Probability of car
p <- 0.75

# Theoretical resolution
A <- matrix(c(1,                   0,       0,               mu[1],            0,
1, -(1-p)*lambda-mu[1],   mu[1],                   0,            0,
1,            p*lambda, -lambda,        (1-p)*lambda,            0,
1,                   0,   mu[2], -(1-p)*lambda-mu[2], (1-p)*lambda,
1,                   0,       0,               mu[2],       -mu[2]),
byrow=T, ncol=5)
B <- c(1, 0, 0, 0, 0)
P <- solve(t(A), B)
N_average_theor <- sum(P * c(2, 1, 0, 1, 2)) ; N_average_theor

## [1] 0.6349615

As in the previous post, we can simulate this chain by breaking down the problem into two trajectories (one for each type of vehicle and service rate) and two generators. But in order to disallow cars to stay in the pump’s queue, we need to introduce a little trick in the cars’ seize: the argument amount is a function that returns 1 if the pump is vacant and 2 otherwise. This implies that the car gets rejected, because there is only one position in queue and that seize is requesting two positions. Note also that the environment env must be defined before running the simulation, as it is needed inside the trajectory.

library(simmer)
set.seed(1234)

option.1 <- function(t) {
car <- create_trajectory() %>%
seize("pump", amount=function() {
if (env %>% get_server_count("pump")) 2  # rejection
else 1                                   # serve
}) %>%
timeout(function() rexp(1, mu[1])) %>%
release("pump", amount=1)

mcycle <- create_trajectory() %>%
seize("pump", amount=1) %>%
timeout(function() rexp(1, mu[2])) %>%
release("pump", amount=1)

env <- simmer() %>%
add_generator("car", car, function() rexp(1, p*lambda)) %>%
env %>% run(until=t)
}

The same idea using a branch, with a single generator and a single trajectory.

option.2 <- function(t) {
vehicle <- create_trajectory() %>%
branch(function() sample(c(1, 2), 1, prob=c(p, 1-p)), c(F, F),
create_trajectory("car") %>%
seize("pump", amount=function() {
if (env %>% get_server_count("pump")) 2  # rejection
else 1                                   # serve
}) %>%
timeout(function() rexp(1, mu[1])) %>%
release("pump", amount=1),                 # always 1
create_trajectory("mcycle") %>%
seize("pump", amount=1) %>%
timeout(function() rexp(1, mu[2])) %>%
release("pump", amount=1))

env <- simmer() %>%
env %>% run(until=t)
}

We may also avoid messing up things with branches and subtrajectories. We can decide the type of vehicle and set it as an attribute of the arrival with set_attribute. Then, every activity’s function is able to retrieve those attributes as a named list. Although the branch option is a little bit faster, this one is nicer, because there are no subtrajectories involved.

option.3 <- function(t) {
vehicle <- create_trajectory("car") %>%
set_attribute("vehicle", function() sample(c(1, 2), 1, prob=c(p, 1-p))) %>%
seize("pump", amount=function(attrs) {
if (attrs["vehicle"] == 1 &&
env %>% get_server_count("pump")) 2    # car rejection
else 1                                     # serve
}) %>%
timeout(function(attrs) rexp(1, mu[attrs["vehicle"]])) %>%
release("pump", amount=1)                    # always 1

env <- simmer() %>%
env %>% run(until=t)
}

But if performance is a requirement, we can play cleverly with the resource’s capacity and queue size, and with the amounts requested in each seize, in order to model the problem without checking the status of the resource. Think about this:

• A resource with capacity=3 and queue_size=2.
• A car always tries to seize amount=3.
• A motorcycle always tries to seize amount=2.

In these conditions, we have the following possibilities:

• Pump empty.
• One car (3 units) in the server [and optionally one motorcycle (2 units) in the queue].
• One motorcycle (2 units) in the server [and optionally one motorcycle (2 units) in the queue].

Just as expected! So, let’s try:

option.4 <- function(t) {
vehicle <- create_trajectory() %>%
branch(function() sample(c(1, 2), 1, prob=c(p, 1-p)), c(F, F),
create_trajectory("car") %>%
seize("pump", amount=3) %>%
timeout(function() rexp(1, mu[1])) %>%
release("pump", amount=3),
create_trajectory("mcycle") %>%
seize("pump", amount=2) %>%
timeout(function() rexp(1, mu[2])) %>%
release("pump", amount=2))

simmer() %>%
add_generator("vehicle", vehicle, function() rexp(1, lambda)) %>%
run(until=t)
}

We are still wasting time in the branch decision. We can mix this solution above with the option.1 to gain extra performance:

option.5 <- function(t) {
car <- create_trajectory() %>%
seize("pump", amount=3) %>%
timeout(function() rexp(1, mu[1])) %>%
release("pump", amount=3)

mcycle <- create_trajectory() %>%
seize("pump", amount=2) %>%
timeout(function() rexp(1, mu[2])) %>%
release("pump", amount=2)

simmer() %>%
add_generator("car", car, function() rexp(1, p*lambda)) %>%
add_generator("mcycle", mcycle, function() rexp(1, (1-p)*lambda)) %>%
run(until=t)
}

Options 1, 2 and 3 are slower, but they give us the correct numbers, because the parameters (capacity, queue size, amounts) in the model remain unchanged compared to the problem. For instance,

gas.station <- option.1(5000)

library(ggplot2)

# Evolution + theoretical value
graph <- plot_resource_usage(gas.station, "pump", items="system")
graph + geom_hline(yintercept=N_average_theor)

However, it is not the case in options 4 and 5. The parameters of these models have been adulterated to fit our performance purposes. Therefore, we need to extract the RAW data, rescale the numbers and plot them. And, of course, we get the same figure:

gas.station <- option.5(5000)

limits <- data.frame(item = c("queue", "server", "system"), value = c(1, 1, 2))

library(dplyr); library(tidyr)

graph <- gas.station %>% get_mon_resources() %>%
gather(item, value, server, queue, system) %>%
mutate(value = round(value * 2/5),                  # rescaling here <------
item = factor(item)) %>%
filter(item %in% "system") %>%
group_by(resource, replication, item) %>%
mutate(mean = c(0, cumsum(head(value, -1) * diff(time))) / time) %>%
ungroup() %>%
ggplot() + aes(x=time, color=item) +
geom_line(aes(y=mean, group=interaction(replication, item))) +
ggtitle("Resource usage: pump") +
ylab("in use") + xlab("time") + expand_limits(y=0) +
geom_hline(aes(yintercept=value, color=item), limits, lty=2)
graph + geom_hline(yintercept=N_average_theor)

Finally, these are some performance results:

library(microbenchmark)

t <- 1000/lambda
tm <- microbenchmark(option.1(t),
option.2(t),
option.3(t),
option.4(t),
option.5(t))
graph <- autoplot(tm)
graph + scale_y_log10(breaks=function(limits) pretty(limits, 5)) +
ylab("Time [milliseconds]")


text:
# Tag Info

9

Upon close reading, this appears to be 3 (interesting) questions, not one. I'm not sure if the mods have the tools needed to split it up, so I'm just going to write down the three questions as I see them and then deal with them one by one. Note, it is simpler for me to talk about variance instead of volatility. This has no material impact on the answer. ...

6

Well there are two main things to consider here. Many implementation of Black-Litterman use the market portfolio and the ex post volatility and correlation structure to back out implied returns to use as prior. As far as I know, there is no standard way to reverse-engineer the optimization problem in the presence of nonnormal markets. (the first guess is ...

5

The VaR of level $\alpha$ a loss random variable (the bigger the worse) is the quantity $q$ such that the loss is bigger with probability $1-\alpha$. Thus we need a $q$ such that $$P[L>q] = 1-\alpha,$$ where we can imagine $\alpha=99\%$ and thus we need the starting point of the $1\%$ tail. Because we have a probability of a loss of size $0$ of ...

4

Surely, there is; search for aggregational gaussianity in Google Scholar or ScienceDirect. In fact, 5 minutes returns are leptokurtic and fat-tailed; then as you increase timeframe, returns become more and more normal. Yearly data is almost normal, if you have enough points.

4

The rsgt is a skewed generalized t distribution, whereas your picture is a skewed student-t distribution. Try using fGarch package. Plot reproduced: library(fGarch) x<-seq(-2.5, +2.5, by=0.001) plot(x, fGarch::dsstd(x, mean = 0, sd = 1, nu = 30, xi = 1 + 0.5), type = "l", ylim=c(0, 2.4), lty = 1, xlab="z", ...

3

When possible, I look at implementations in IMSL and the GSL for really good accuracy. Neither one appears to implement the Wald (inverse gaussian) or its quantile function. Matlab does have the distribution (as inversegaussian) so you could roll your own with fzero() or another root-finder based on that if you are unhappy with the accuracy, or for testing ...

3

Your question is not clear. What you might want to say is what distribution should the futures price follow, under the risk-neutral or physical probability measure. In this sense, it will depend on your intention. For potential future exposure, you may want to use the physical measure for the price evolution, while the distribution will depend on your model ...

3

You know that : $X \sim N(\mu,\sigma^2)$. $Z = \large\frac{X-\mu}{\sigma}$. $\text{Var}(Z) = \large\frac{1}{\sigma^2}\text{Var}(X) = \large\frac{1}{\sigma^2}\sigma^2 = 1$. So that $Z \sim N(0,1)$. However note that the pdf evaluated for X and Z have different domains. The following figure illustrate it : $X$ is plotted in a) and $Z$ in b) ...

3

Hi bcf: This is a good question. As you pointed out below, \begin{align*} p_0 &= \delta(y-y_0)\\ &=\delta(e^w-y_0). \end{align*} Then, \begin{align*} p_0 * g &= \int_{-\infty}^{\infty}\delta(e^z-y_0) g(w-z) dz\\ &=\int_{0}^{\infty}\delta(u-y_0) g(w-\ln u) \frac{1}{u}du\\ &= \frac{1}{y_0}g(w-\ln y_0). \end{align*} Consequently, your last ...

3

My main reference will be "Dan Xu, Christian Beck - Transition from lognormal to chi-square superstatistics for financial time series" Non-equilibrium statistical mechanics (more specifically, superstatistics) gives some ideas of explaining the relation between time frame and its distribution: "...to regard the time series as a superposition of local ...

2

Normal distribution makes most sense these days for ratesthat are very low, or even negative, like euribor, chf libor Normal distribution is what is assumed by option brokers impliedvolatility quotes for these currencies

2

You might also look at the boost package which should (I'm no expert for this) be usable within C#. It comes with an implementation of the inverse normal distribution which is explained in the online documentation http://www.boost.org/doc/libs/master/libs/math/doc/html/math_toolkit/dist_ref/dists/inverse_gaussian_dist.html Here they claim quite a high ...

1

VaR for GED in R package(fGarch) qged(p, mean = 0, sd = 1, nu = 2) #Example qged(.01, mean=1000, sd=2000) [1] -3652.696 where, $1-p$ is confidence level.

1

Have a look at ?dnorm, and rather use the standardized value as argument in your function, in addition to mean and sd: a_<-dnorm((0.001-0.0001)/0.4, mean=0, sd=1) Hope it helps [EDIT] Likewise from ?dsgt st<-(0.001-0.0001)/0.4 skewt<-dsgt(st, mu=0, sigma=1, lambda=0.1, p = 2, q=5, mean.cent=TRUE, var.adj=TRUE) results in skewt=0.4302996 (close ...

1

1- It seems to me there is a problem in the original code the variable b should be defined as b= sqrt(1 + 3*lamda^2 - a^2) 2- The likelihood is defined just after equation 8. in the paper. You have to take into account the $\frac{1}{\sigma}$ term (in $\frac{1}{\sigma} \times g(..)$ , ie to scale the densitie) . So the - 0.5*log(h(t)) refers to this ...

1

If high frequency returns are iid and the mean and variance are finite and vthe variance is greater than zero then the Central Limit theorem holds Then, regardless of the distribution of the high returns, when aggregated over time the aggregated returns will tend in distribution to a Normal distribution. The Lindeberg-Lévy-Feller version of the Central Limit ...

1

As an additional (simple) solution I would use the probability integral transform (PIT) of the returns with respect to the generalized pareto distribution. Under the null hypothesis that the distribution is correctly specified, outcomes of the PIT should be independent uniform U[0; 1] random variables. Then you can use traditional independence tests.

Only top voted, non community-wiki answers of a minimum length are eligible


text:
Meta

# How can Cross Multiplication be intuited or pictured? average(average(a,b),c) vs. average(a,average(b,c)).

+1
−2

Why were my two questions closed? Moderator Peter Taylor's comments feel dissimulating.

I can't even guess at what you're asking.

But another user r~~ understood my question.

Peter Taylor understands my question faultlessly, but the hitch is that he doesn't know how to intuit this? This is the same question as https://math.stackexchange.com/a/2667399, but I'm seeking a better explanation than cakes and pieces of cake.

I'm seeking intuition like these questions. Intuitively, why $pt = qr \iff p/q = r/t$?

Why does this post require moderator attention?
Why should this post be closed?

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+3
−0
1. The two questions were closed as unclear because they're unclear. There's no dissimulation involved.

2. I don't see any evidence in r~~'s comment that they understood the question. They say that you've ignored suggestions elsewhere for how to improve it, and they reference the introduction, but that is in no way equivalent to saying that they understand what on Earth the apparently broken markup is supposed to signify.

3. A question should be self-contained. If it's been asked elsewhere better then look for the answer in that same elsewhere, bring your own question up to the standard of that better question elsewhere, or both. This applies for any value of "elsewhere", but bearing in mind that Codidact exists because of people choosing to boycott SE, it is doubly unreasonable to post a question in the form "Please answer this question on SE".

4. Peter Taylor understands my question faultlessly, but the hitch is that he doesn't know how to intuit this?

If your question is indeed "Why does dividing two equal things by the same thing give two equal things?" then ask that, delete the irrelevant pictures, and try to explain what you find unintuitive about it.

5. And please improve the existing post and ask for it to be reopened rather than posting a new question which asks the same thing, even if it does do a slightly better job of it.

Why does this post require moderator attention?


text:
# Why are they called isothermal coordinates?

On a Riemannian manifold, a coordinate system is called "isothermal" if the Riemannian metric in those coordinates is conformal to the Euclidean metric:

$$g_{ij} = e^{f} \delta_{ij}$$

My question is: Why are such coordinate systems called "isothermal"? It must have something to do with classical thermal physics. I tried looking for a reason online, with no success.

It is well known that when the dimension $n=2$, there always exist isothermal coordinates, and this is probably where they were first introduced. So maybe the nomenclature has something to do with heat diffusion in the plane?

(The reason I ask is because I am planning to give a seminar talk next week giving a proof that such coordinates exist when $n=2$, and thought it would be nice to explain to the students where the name comes from...)

• I keep trying to fix the display: the comma after the n=2 is too close. It looks fine in the preview. Any suggestions? Jul 16, 2010 at 13:47
• As the display depends highly on which browser you are using and which computer you are using and which set of fonts your are using, I think trying to prettify the display is a futile exercise. Just make sure it is syntactically correct. Jul 16, 2010 at 14:00
• A Riemannian manifold has an intrinsic Laplacian, called the Laplace-Beltrami operator. Isothermal coordinates are harmonic in the sense that they belong to the kernel of this operator. On an oriented Riemannian 2-manifold, every harmonic function u has a harmonic conjugate function v, defined by the relation dv = * du, where * denotes the Hodge star operator. Near a point where du is non-zero, the pair (u,v) then provides an isothermal coordinate system, and every isothermal coordinate system arises this way. May 11 at 17:34

Isothermal coordinates are harmonic. In other words, it solves $\triangle_g u = 0$. So locally it is a stationary solution of the heat equation. In physics, for a steady state distribution of temperatures, each level set is called an isotherm.


text:
# Showing a contraction without a fixed point

Suppose $f: [1, \infty) \to [1, \infty]$ defined by $f(x) = x + \frac{1}{x}$ for all $x \geq 1$. I want to prove that:

$$|f(x)-f(y)| < |x-y|$$ except when $x=y$, but $f$ does not have a fixed point.

By the Banach fixed point theorem we know that if a function $f: X \to X$ is a contraction of a complete metric space, then $f$ has a unique fixed point $p$ and the sequence of $(f, f \circ f, f\circ f\circ f, ...)$ that is the sequence of $f$ composed with itself $n$ times at index $n$ converges to p for all $x$.

But $[1, \infty]$ is not a complete metric space. So it seems like a good idea to proceed via contradiction? Where can I go from here

All help is greatly appreciated

-
$[1,\infty)$ is actually a complete space because it's closed in $\mathbb R$. I think your problem lies with your definition of contraction. –  kahen Apr 19 '13 at 1:37

Use $$f(x)-f(y) = x - y + \frac{1}{x} - \frac{1}{y} = (x-y) \left(1 - \frac{1}{x y}\right)$$ Thus, for $x\not= y$ $$\left| f(x)-f(y) \right| = \left|x-y\right| \left(1 - \frac{1}{x y}\right) < \left|x-y\right|$$ since $1 - \frac{1}{x y} < 1$ for all $x>1$ and $y>1$
Then we know $f(x)$ can never have a fixed point because $x+\dfrac{1}{x} \neq x$. Correct? –  CodeKingPlusPlus Apr 19 '13 at 1:50
Look at user40314's answer for the inequality. Regarding your second question, the space $[1, \infty)$ is complete although your map isn't a contraction map because for that, you would need there to be a constant $r$ outside the right hand side of the inequality for which $|r| < 1$. In your case, there is a factor of $1 - \frac{1}{xy}$ which can be made arbitrarily close to $1$ by picking large enough $x$ and $y$.


text:
What is the distance of the point (4, 3) from the origin?

• Last Updated : 02 Dec, 2021

Geometry is undeniably one of the most important branches in the field of mathematics. Its significance is as profound as that of arithmetic and algebra, as much in our daily lives, as much as in the technicalities and intricacies of mathematics. Geometry, in daily lives, is basically prevalent everywhere. It is applied in designing a simple tiffin box to a mobile phone or a laptop to a water tank or even a bus, truck, and even dams. Hence anything which occupies space and has a definite shape has to be covered under the scope of geometry. In mathematical theory and problems too, the concept of geometry is employed to find the distance between two shapes, the space they take up, their sizes, and positions.

Coordinate Plane

Such a plane which is formed by the intersection of two lines, one of them being vertical and the other one horizontal, is called a co-ordinate plane in mathematics. It is a two- dimensional plane, with the vertical line being regarded as its y-axis and the horizontal one as the x-axis. The point of intersection of the two lines in the plane is called origin and is denoted by O. The figures on a match grid are used to detect points. A coordinate plane can be used to graph points, lines, and much further. It acts as a chart and yields precise directions from one point to another.

Coordinates

Coordinates are a group of two values that locate a selected point on a coordinate plane grid, better referred to as a coordinate plane. A point inside a coordinate plane is known by its ordered pair (x, y), written in parentheses, like the X-coordinate and therefore the Y-coordinate. These coordinates are often positive, zero, or negative, depending on their position within the respective quadrants.

Signs of Coordinates in Different Quadrants

The coordinate plane gets divided into 4 quadrants with the x-axis and y-axis. The first quadrant is the uppermost right one where both the x and y coordinates are positive numbers; the second quadrant lies to the left of the first where the x coordinate is positive and the y coordinate is negative; the third quadrant lies directly below the second quadrant where the x coordinate is negative and the y coordinate is positive; the fourth quadrant lies directly below the first quadrant and to the right of the third quadrant where both the x and y coordinates are negative.

Distance Formula

Distance in simple words is the quantification of how far apart two things/ objects/ points are. So clearly distance formula would be a mathematical equation for finding out the distance between two objects/ points, given their coordinates. It is to be noted that the points in question need not belong to the same quadrant. In mathematics, the distance formula is exclusively used in the coordinate system to find out how far apart two points are from each other in a coordinate plane with the help of their coordinates, thus having great importance in the field of geometry.

Suppose there are two points, A and B in a coordinate plane, first quadrant for the sake of simplicity. The coordinates of point A are (a,b) and B are (p,q). The distance between points A and B, denoted AB shall be given by:

AB =

Derivation of Distance Formula

The formula is a direct application of the Pythagorean Theorem. The right triangle ASJ, with its hypotenuse AB would represent the required distance between the two points.

By Pythagoras Theorem,

AB2 = AJ2 + BJ2

= (a-p)2+(b-q)2

AB =

Distance of a Point From The Origin

Let the coordinates of the point be (x,y). The coordinates of origin are (0,0).

Using distance formula, we have:

d =

Distance of a point from the origin =

What is the distance of the point (4, 3) from the origin?

Solution:

We know, distance of a point from the origin =

Hence, required distance =

= 5

Thus, the distance of the point (4, 3) from the origin is 5 units.

Similar Problems

Question 1. Calculate the distance of the point (-100,0) from the origin.

Solution:

We know, distance of a point from the origin =

Hence, required distance =

= 100

Thus, the distance of the point (-100,0) from the origin is 100 units.

Question 2. Calculate the distance of the point (9,5) from (4,5).

Solution:

Using distance formula, the distance between A(a,b) and B(p,q) is

AB =

Hence required distance =

= 5

Thus, the distance of the point (9,5) from (4,5) from the origin is 5 units.

Question 3. Calculate the distance of the point (8,6) from the origin.

Solution:

We know, distance of a point from the origin =

Hence, required distance =

= 10

Thus, the distance of the point (8,6) from the origin is 10 units.

Question 4. Calculate the distance of the point of (5,12) from the origin.

Solution:

We know, distance of a point from the origin =

Hence, required distance =

= 13

Thus, the distance of the point (5,12) from the origin is 13 units.

Question 5. Calculate the distance of the point (3,5) from (1,2).

Solution:

Using distance formula, the distance between A(a,b) and B(p,q) is

AB =

Hence required distance =

Thus, the distance of the point (3,5) from (1,2) from the origin is  units.

My Personal Notes arrow_drop_up


text:
ProblemOrbiter 2010 MMU and HUD missing

gattispilot

This is confusing. In d3d9 I have some vessels where the HUD displays good. The MMU hud displays good. But I have another set of vessel that it doesn't. Using the same code. All these vessels were Vessel2. I update to Vessel 3 and got the hud to work. Put them into another d3d9 and no mmu or specialized HUD or MMU status.

gattispilot

this is weird. Same code for the beacons.
Code:
   static VECTOR3 APbeaconcol[10] = {{ 0,128,  0},{   255,0,0},
{ 0,128,  0},{   255,0,0},
{ 0,128,  0},{   255,0,0},
{ 0,128,  0},{  255,0,0},
{ 0,128,  0},{   255,0,0}

};

for ( i = 0; i < 10; i++) {
APbeacon[i].shape = BEACONSHAPE_STAR;
APbeacon[i].pos = APbeaconpos+i;
APbeacon[i].col = APbeaconcol+i;
APbeacon[i].size = 3;
APbeacon[i].falloff =  0.4;
APbeacon[i].period = 0.8;
APbeacon[i].duration = 0.3;
APbeacon[i].tofs = (6-i)*0.2;
APbeacon[i].active = false;
}

APbeacon[0].active = true;
2 sets of colors green and red. In d3d9 the red beacon is good. but in normal graphics it is black

gattispilot

This is so weird. Sound 4.0 doesn't seem in work in d3d9. I get animation that works in regular graphics but not in d3d9


text:
TODO: eventually there will be selectors for tag, date, etc

# Efficient preparation of thermal states of quantum systems: natural or artificial

$\require{cancel} \def\bra#1{\mathinner{\langle{#1}|}} \def\ket#1{\mathinner{|{#1}\rangle}} \def\braket#1{\mathinner{\langle{#1}\rangle}} \def\Bra#1{\left\langle#1\right|} \def\Ket#1{\left|#1\right\rangle}$

Lecturer: Aram Harrow

Scribes: Sinho Chewi, William Moses, Tasha Schoenstein, Ary Swaminathan

November 9, 2018

### Outline

Sampling from thermal states was one of the first and (initially) most important uses of computers. In this blog post, we will discuss both classical and quantum Gibbs distributions, also known as thermal equilibrium states. We will then discuss Markov chains that have Gibbs distributions as stationary distributions. This leads into a discussion of the equivalence of mixing in time (i.e. the Markov chain quickly equilibrates over time) and mixing in space (i.e. sites that are far apart have small correlation). For the classical case, this equivalence is known. After discussing what is known classically, we will discuss difficulties that arise in the quantum case, including (approximate) Quantum Markov states and the equivalence of mixing in the quantum case.

# Sum some sums!

The other day a friend got an email back from a Google recruiter asking if he’d like to interview.

Being a TA for the MIT’s introductory algorithms class, and generally knowledgable about algorithms (I often help prep friends for algo interviews), he asked if I could help him prepare.

I was more than happy to oblige.

# Tapir

Tapir is a new framework for compilers that offers the ability to do a variety of optimizations on parallel code, created by myself, TB Schardl, and Charles Leiserson [1].

Since we’re getting a number of questions about it, I thought I’d write this blog post to talk about some of its features!


text:
# Almost equal random variables

1. Aug 4, 2009

### student12s

I've been trying to solve the following question: Let X be a random variable s.t. Pr[|X|<+\infty]=1. Then for every epsilon>0 there exists a bounded random variable Y such that P[X\neq Y]<epsilon.

The ideia here would be to find a set of epsilon measure so Y would be different than X in that set. However, it is not clear even that such a measurable set exists...

Any help?

2. Aug 4, 2009

### mXSCNT

To show there is some interval (-a, a) such that $$\int_{-a}^a f(x) dx > 1-\epsilon$$, apply the definition of an improper integral to $$\int_{-\infty}^\infty f(x) dx = 1$$. Have Y=X over (-a,a).

3. Aug 5, 2009

### g_edgar

For a large positive number $\lambda$, define $Y = X$ on the set $\{|X| \le \lambda\}$ and $Y=0$ on the remaining part of the sample space. Now all you have to do is choose $\lambda$ large enough to get the conclusion you want.

4. Aug 5, 2009

### student12s

It would remain to show that such $\lambda$ exists. We can definte the sets A_n=\{\omega\in \Omega: |X(\omega)|<n\}. Since A_n is measurable, as X is a random variable, and A_n \uparrow \{\omega: |X|<+\infty}, we have that \lim P(A_n) = P(\{\omega: |X|<+\infty}. Therefore, for all \epsilon, there is $m$ large enough so that P(A_n)>1-\epsilon. Then we can define Y=X in A_m and Y=0 otherwise.

Thanks!


text:
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.STACS.2010.2449
URN: urn:nbn:de:0030-drops-24496
URL: https://drops.dagstuhl.de/opus/volltexte/2010/2449/
 Go to the corresponding LIPIcs Volume Portal

### AMS Without 4-Wise Independence on Product Domains

 pdf-format:

### Abstract

In their seminal work, Alon, Matias, and Szegedy introduced several sketching techniques, including showing that $4$-wise independence is sufficient to obtain good approximations of the second frequency moment. In this work, we show that their sketching technique can be extended to product domains $[n]^k$ by using the product of $4$-wise independent functions on $[n]$.

Our work extends that of Indyk and McGregor, who showed the result for $k = 2$. Their primary motivation was the problem of identifying correlations in data streams. In their model, a stream of pairs $(i,j) \in [n]^2$ arrive, giving a joint distribution $(X,Y)$, and they find approximation algorithms for how close the joint distribution is to the product of the marginal distributions under various metrics, which naturally corresponds to how close $X$ and $Y$ are to being independent. By using our technique, we obtain a new result for the problem of approximating the $\ell_2$ distance between the joint distribution and the product of the marginal distributions for $k$-ary vectors, instead of just pairs, in a single pass. Our analysis gives a randomized algorithm that is a $(1\pm \epsilon)$ approximation (with probability $1-\delta$) that requires space logarithmic in $n$ and $m$ and proportional to $3^k$.

### BibTeX - Entry

@InProceedings{braverman_et_al:LIPIcs:2010:2449,
author =	{Vladimir Braverman and Kai-Min Chung and Zhenming Liu and Michael Mitzenmacher and Rafail Ostrovsky},
title =	{{AMS Without 4-Wise Independence on Product Domains}},
booktitle =	{27th International Symposium on Theoretical Aspects of Computer Science},
pages =	{119--130},
series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN =	{978-3-939897-16-3},
ISSN =	{1868-8969},
year =	{2010},
volume =	{5},
editor =	{Jean-Yves Marion and Thomas Schwentick},
publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},