text:
# Is the explained variance of a model invariant to the presence of multicollinearity?

I have fitted two different binomial logistic regression models A and B. Model A contains only one predictor variable. Model B contains a different set of predictor variables, none of which is the predictor included in model A. There is a notable degree of multicollinearity between the predictors in model B. I want to compare how well the two models can account for the variation in my data.

Usually, when discussing the consequences of multicollinearity in linear regression models, most authors focus on the effect on the predictors. For example Dormann et al (2012) point out that the standard errors of collinear coefficients will be inflated, which leads to "inaccurate tests of significance for the predictors, meaning that important predictors may not be significant, even if they are truly influential" (p. 29).

However, what is less clear to me is the effect of multicollinearity on the overall performance of the model. This question asks whether multicollinearity affects the performance of the model as a classifier, with reference to the Wikipedia article on Multicollinearity which says that "multicollinearity does not reduce the predictive power or reliability of the model as a whole, at least within the sample data set". In his answer to the question, @EdM seems to confirm that multicollinearity does not affect model reliability unless it is used to predict a data set different from the one used to fit it.

My case is somewhat different because I don't want to use the models as classifiers on new data. Instead, I want to compare how well they can explain my data set. So, that answer still leaves me with the following questions:

• Is it valid to say that the explained variance of a model is invariant to the presence of multicollinearity?
• Can I use still measures such as AIC or AUROC to compare the performance of my models A and B even though the predictors of model B are strongly correlated?
• Is there a quotable reference that discusses the effect of multicollinearity on the explained variance of models and on measures such as the AIC or AUROC?
• What a dynamite question. btw I'll say Yes to the first 2 questions. I am curious, though, why within-sample performance is all you care about here. Feb 3, 2017 at 18:42
• @rolando2: There's a claim made by one author that his novel predictor is as good as the established predictors discussed by other authors. My data set comes from an experiment specifically designed to test the effect of the novel predictor in comparison to the combined effect of the established predictors. The point of the analysis is not to tease apart the effect of the established predictors, or to verify that they actually work, the point is only to see whether the model using the novel predictor performs as good as the model using the established predictors. Feb 3, 2017 at 18:51
• Thanks....A predictor requires a coefficient :-) How will anyone know that the within-sample results give the best, most reliable estimates of this novel predictor's coefficient...standardized coefficient...standard error...or, generally, performance? Feb 3, 2017 at 19:18
• @Schmuddi You mean a reviewer said that? It could be helpful to quote his or her comment exactly so we can help you decide on a reply. Feb 4, 2017 at 0:15
• As shown at stats.stackexchange.com/questions/447684, in any model that is fit by optimizing some function of a linear combination of the variables, it doesn't matter how you express the variables: all that matters is the vector space they generate. That instantly answers your question: multicollinearity is irrelevant. What might be relevant is the possibility that future data could vary so much from the data you have that your predictions become gross extrapolations. stats.stackexchange.com/a/507178/919 is also relevant.
– whuber
May 3 at 17:02

From the comments, it is evident that you mean some kind of predictive accuracy measurement, any of which would be a function of the predictions and the true observations.

Multicollinearity cannot affect the true observations, since they are the observations even if you don't do any modeling, so for multicollinearity to influence the predictive accuracy, multicollinearity must influence the predictions.

Let's do a simulation where we do a logistic regression on two correlated variables, regress on a transformation of those variables that retains all of the information while removing the correlation, and comparing predictions.

library(MASS)
set.seed(2022)
N <- 25
X <- MASS::mvrnorm(N, c(0, 0), matrix(c(1, 0.9, 0.9, 1), 2, 2))
y <- rbinom(N, 1, 0.5)
L_correlated <- glm(y ~ X, family = binomial)
predictions_correlated <- predict(L_correlated)
PCs <- X %*% prcomp(X)\$rotation # Do PCA to remove correlation
L_uncorrelated <- glm(y ~ PCs, family = binomial) # Take all PCs to
# retain all information
predictions_uncorrelated <- predict(L_uncorrelated)
round(predictions_correlated - predictions_uncorrelated, 14)

Aside from floating point arithmetic issues out past the $$14^{\text{th}}$$ decimal place, the predictions are the same.

In GLMs, multicollinearity can affect interpretations, p-values, and confidence intervals, but multicollinearity does not affect the predicted values. Some people also dislike multicollinearity because they think they can drop some variables and retain most of the information while lowering the parameter count. As much as that makes sense, it is not perfect and might even be fairly problematic.

• I have to admit that by now, I completely forgot about my question, and I had to re-read everything to understand my own problem back then. But this is exactly the type of argument that I could've needed back then – thanks! May 3 at 17:02


text:
Splitting a vector into a rowspace component and a nullspace component

1. Nov 1, 2011

starcoast

1. The problem statement, all variables and given/known data
Find a basis for the orthogonal complement of the row space of A:
A =
[1 0 2
1 1 4]

Split x = (3,3,3) into a row space component xr and a nullspace component xn.

3. The attempt at a solution
For the first part of the problem I took A to RREF
R =
[1 0 2
0 1 2]
and then solved to find a basis for the nullspace, x * (-2,-2,1), which should be the basis for the orthogonal complement of the row space.

I THINK that's right but maybe it's not because I'm stuck on the second part, splitting x = (3,3,3). Do I try to find a vector in Row(A) and a vector in Nul(A) that, when added, produce the vector (3,3,3)? How do I solve for that?

Help is very much appreciated!

Also, what's the best way to represent a matrix on these message boards?

2. Nov 1, 2011

starcoast

nevermind, I figured it out

3. Nov 1, 2011

Deveno

an observation:

x(-2,-2,1) isn't the basis for Null(A), it's the entire space. "a" basis, is any particular vector, using a non-zero value for x. x = 1 works well, so one basis is:

{(-2,-2,1)}.

to find xn and xr, we're looking for a,b, and c with:

(3,3,3) = a(-2,-2,1) + (b(1,0,2) + c(1,1,4))

the first term is in Null(A) and the second sum of two terms in in Row(A).

this isn't that hard, we have:

(3,3,3) = (b-2a+c,c-2a,a+2b+4c), or, if you prefer:

$$\begin{bmatrix}-2&1&1\\-2&0&1\\1&2&4\end{bmatrix} \begin{bmatrix}a\\b\\c\end{bmatrix} = \begin{bmatrix}3\\3\\3\end{bmatrix}$$

solve this for a,b and c.

****

the string i entered to input the matrix equation was:

$$\text{$$\begin{bmatrix}-2&1&1\\-2&0&1\\1&2&4\end{bmatrix} \begin{bmatrix}a\\b\\c\end{bmatrix} = \begin{bmatrix}3\\3\\3\end{bmatrix}\$$}$$

format: plain


text:
# How to write a Thesis with font of size 14pt? [duplicate]

I want to write my thesis in latex, with a font of size 14pt. I wrote

\documentclass[14pt,oneside,a4papper]{book}

but the font is not of 14pt. Can someone tell me how can I write with 14pt? Thank you!

## marked as duplicate by Stefan Pinnow, egreg, Zarko, Henri Menke, ebosiJun 19 '17 at 22:12

• memoir suport 14 pt fonts. Beside this it also has many other features which can be handy ... – Zarko Jun 19 '17 at 20:04
• @Huang_d if I try to use extsize package, it tells me that "MiKTeX encountered an internal error." – g.pomegranate Jun 19 '17 at 20:07
• @g.pomegranate Great! I then suggest you to ask a new question about this specific issue. Please remember to add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – ebosi Jun 19 '17 at 22:12

The book class supports only 10, 11, and 12pt sizes. You need the extbook to be able to use 14pt. Better options exist, like scrbook or the memoir class, both support 14pt size out of the box.

\documentclass[14pt,oneside,a4paper]{extbook}
\usepackage{geometry}

\begin{document}

some text here ..

\end{document}

• If a I put extbook, it tells me: "MiKTeX encountered an internal error." – g.pomegranate Jun 19 '17 at 20:08
• Package extsizes.sty? – Johannes_B Jun 24 '17 at 14:39


text:
# Sine Series Finite Sum – C PROGRAM

In the last post, I discussed about how would one go about calculating the sum of a finite series using C.

In this post I will apply that method, to find the sum of the Sine series for only a finite number of terms.

Sine series is given by:
$\sin (x) = x-\frac{x^3}{3!} + \frac{x^5}{5!} - ....$

We will start the numbering the terms from 0. That is, $t_0=x$ , $t_1=-\frac{x^3}{3!}$, ….

It’s easy to see that the ratio between consecutive terms is given by:

$R=\frac{t_i}{t_{i-1}}=-\frac{x^2}{(2i+1)2i}$

Since, we indexed the terms starting from 0, therefore, for the above relation to work, $i$ will go from 1 to $n$.

[Hint: To find the general form of the ratio given in the above expression, try writing down t1/t0, t2/t1,…and then you would be able to see the ratio.]

Now, knowing the first($t_0$) term, the successive terms can be calculated as :

$t_1=R\times t_0$

$t_2=R\times t_1$

and so on.

Therfore, the C program that calculates the sum of the sin series upto a given number of terms can be written as shown below.

### PROGRAM:

/********************************
******FINITE SERIES SUM**********
Series: sin(x) = x - (x^3/3!) + (x^5/5!) + .....
********************************/
#include<stdio.h>
#include<math.h>
main(){
int i,n;
double x,t0,t1,R,sum;
printf("Enter the value of x:\n");
scanf("%lf",&x);
printf("Enter the no. of terms to be summed: ");
scanf("%d",&n);
//Initialize First Term
t0=x;
//Make sum equal to the first term
sum=t0;
printf("n\ttn\t\tSn\n_________________________________");
for(i=1;i<n;i++){
//Find the ratio of the second term to the first term using already known relation
R=-(x*x)/(2*i+1)/(2*i);
//Calculate the second term
t1=R*t0;
//find the new sum
sum=sum+t1;
t0=t1;
printf("\n%d\t%f\t%lf\n",i+1,t1,sum);
}
printf("\nThe sum is: %f",sum);
}

The program also prints the value of each term(except the first($t_0$) term) and sum(partial) upto that term.

### OUTPUT:

The output of the above program for various values of $x$ and no. of terms is shown below:

[wpedon id="7041" align="center"]


text:
# latex

## TikZ Externalization for Beamer

Compile a single file if the figure doesn't change across overlays

7 min, 1209 words

Recently I made a presentation for a talk on FWCG2021. As always I went to Beamer. What was different this time was that I needed many figures, I mean, a lot. On top of that, I wanted to do overlays on these figures. Overleaf timed out when trying to compile all the TikZ figures so I turned to external. There are a lot of files to generate when I built the presentation locally and it was unbearably slow. Maybe there's a way to reduce the time, at least a little bit?


text:
# TikZ automata: size of circle around nodes

I am trying to replace vaucanson-g with TikZ, but I cannot make the automata as small. There seems to be a minimum size of the circle around nodes, that I can't reduce even with inner sep=0. Example below:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture} [->,auto,node distance=0.6cm,line width=0.4mm]
\node[state,initial,inner sep=1pt] (q) {$q$};
\node[state,accepting] (p) [right=of q] {$p$};
\end{tikzpicture}
\end{document}

A lot of whitespace is left around the letters.

-
Please include a full compilable example including \documentclass and all the packages (especially with tikz) and not just code snippets. –  Peter Grill Sep 21 '11 at 23:16
@Peter percusse and I took that liberty. –  Alan Munn Sep 21 '11 at 23:24

Adding inner sep=0pt, minimum size=0pt does the job for me.

Here is the full code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture} [->,auto,node distance=0.6cm,line width=0.4mm]
\node[state,initial,inner sep=1pt,minimum size=0pt] (q) {$q$};
\node[state,accepting,inner sep=1pt,minimum size=0pt] (p) [right=of q] {$p$};
\end{tikzpicture}
\end{document}

-
You have to set this explicitly, because state is (basically) defined as circle,draw,minimum size=2.5em. To change this globally, add \tikzset{every state/.style={minimum size=0pt}}. –  Caramdir Sep 21 '11 at 23:33


text:
When do $n$ ants in cyclic pursuit with constant velocity converge?

I'm reading a paper (Ants, Crickets and Frogs in Cyclic Pursuit) and trying to understand one of the simpler results.

The following is a paraphrasing of the parts I'm using, but check the paper if more context is needed:

Consider $$n$$ moving ants $$\mathrm{x}_1(t)$$ through $$\mathrm{x}_n(t)$$ in a vector space $$\mathcal{L}$$. Each ant $$\mathrm{x}_i$$ moves at all times in the direction of the ant $$\mathrm{x}_{i-1}$$ (and $$\mathrm{x}_1 \to \mathrm{x}_n$$) with constant velocity $$v$$.

For $$i = 1,...n$$, define the initial conditions as $$\mathrm{x}_i(0) = \xi_i$$ and the following system of $$n$$ differential equations:

$$\frac{d}{dt} \mathrm{x}_i(t) = v \ \frac{\mathrm{x}_{i-1}(t) - \mathrm{x}_i(t)}{||\mathrm{x}_{i-1}(t) - \mathrm{x}_i(t)||}$$

We can construct an equivalent model in barycentric coordinates by defining

$$\mathrm{y}_i(t) = \mathrm{x}_{i-1}(t) - \mathrm{x}_i(t)$$

Then for $$i = 1,...,n$$, we have $$\mathrm{y}_i(0) = \xi_{i-1} - \xi_i$$ and the following system of equations:

$$\frac{d}{dt} \mathrm{y}_i(t) = v \left(\frac{\mathrm{y}_{i-1}(t)}{||\mathrm{y}_{i-1}(t)||} - \frac{\mathrm{y}_i(t)}{||\mathrm{y}_i(t)||} \right)$$

For this system, we can prove the following:

$$\textbf{Lemma 1}$$ The difference vectors $$\mathrm{y}_i(t)$$ have the following properties:

1. $$\sum \mathrm{y}_i = 0$$
2. $$\frac{d}{dt} ||\mathrm{y}_i|| = (\cos \alpha_i - 1) v$$

Where $$\alpha_i$$ is the angle between $$\mathrm{y}_i$$ and $$\mathrm{y}_{i-1}$$.

$$\textbf{Proof:}$$ The first part follows by definition and the second comes from projecting $$\mathrm{y}_{i-1}$$ onto $$\mathrm{y}_i$$.

Call $$T$$ the termination time where all ants collide and define $$Y(t) = \sum_i ||\mathrm{y}_i(t)||$$.

Then comes the part I'm most curious about. They claim

If the speeds are constant and equal, Lemma $$1$$ part 2 implies that $$T \le Y(0)/v$$.

I think this works by summing both sides of the second equality to get

$$\sum_i \frac{d}{dt}||\mathrm{y}_i|| = v \sum_i (\cos \alpha_i - 1) \le -v$$

which would prove the claim, but the inequality is where I get stuck.

I'm thinking we can bound the sum somehow by using the fact that $$\sum_i \alpha_i \ge 2\pi$$, but I'm not quite sure how to do this.

Edit: It appears this claim is false as pointed out by @stewbasic.

I'd still like to get answers for the following:

1. A general bound for the termination time $$T$$.

2. Under what conditions do the ants collide simultaneously?

For simultaneity, a sufficient condition is fine provided it covers the specific case of cube. For example, if a cycle of $$n$$ ants all start a constant distance $$\mathrm{y}(0) = ||\mathrm{y}_i(0)||$$ from their pursuer and prey and all start the same distance $$d$$ from their centroid, is this enough to ensure simultaneity of collision? If it simplifies things, the time bound need only apply to cases that satisfy the sufficient condition for simultaneity.

Specific case: Consider $$8$$ ants on the corners of a unit cube with pursuit cycle given by

$$(0,0,0) \to (1,0,0) \to (1,1,0) \to (1,1,1) \to (1,0,1) \to (0,0,1) \to (0,1,1) \to (0,1,0)$$

I'd ideally like to get the bound $$T \le 2/v$$, but even $$T \le 8/v$$ would acceptable. The actual value is about $$1.96$$, which I can get from simulation where their convergence path looks like this:

Here's an animated version I created:

Edit:

As @VictorZurkowski points out, the proof of Theorem $$1$$ includes a (not very strict) bound on $$T$$ which reduces in the constant velocity case to

$$T \le \frac{Y(0)}{v\left(1 - \cos\left(\frac{2\pi}{m}\right)\right)}$$

where $$m$$ is the number of survivors. For the cube case with unit speed, this becomes

$$T \le \frac{Y(0)}{1\left(1 - \cos\left(\frac{2\pi}{8}\right)\right)} = \frac{8}{\left(1 - \cos\left(\frac{\pi}{4}\right)\right)} = 8\left(2 + \sqrt{2}\right) \approx 27.3137$$

Using symmetry, I think I could get this down to $$2 \left(2+\sqrt{2}\right) \approx 6.82843$$.

All of the $$\alpha_i$$ follow one of these two curves where the $$y$$-axis is in degrees and the $$x$$-axis is $$t$$ in percent of of $$T$$ (at 100% they converge). We can see that they converge to the planar case where $$\alpha_i = \frac{\pi}{4} = 45^{\circ}$$

I believe the planar case is worst case in terms of convergence time and this website has some nice bounds for regular polygons with unit area. If my calculations are correct, an octagon with unit length sides would have path length $$2\sqrt{4+3\sqrt{2}} \approx 5.742$$.

[To be revised and continued...]

• You should include the definition that $\alpha_i$ is the angle between $\mathbf y_i$ and $\mathbf y_{i-1}$. – user856 Aug 26 '16 at 5:43
• Yes, of course. Thank you. I will edit it. – Alexis Olson Aug 26 '16 at 5:44
• I believe $\sum_i\alpha_i$ is exactly $2\pi$ if the $\alpha_i$ are taken with signs. Then maybe the inequality $\cos\alpha\ge1-\frac12\alpha^2$ (from the Taylor series) can help bound the $\sum_i(\cos\alpha_i-1)$ term. – user856 Aug 26 '16 at 5:54
• That is that case if the ants are in a plane, but certainly not necessarily true in more dimensions. – Alexis Olson Aug 26 '16 at 5:56
• There is no reason to have a simultaneous collision in general. Imagine the scenario when ant 1 is moving towards ant 2, which is nearby, while ant 2 is moving towards ant 3 that initially is far away on the ray going from ant 2 to ant 1. Clearly, ant 1 will intercept ant 2 in a harsh collision even if they don't stay on one line all the time. There is no a priori reason why the situation like that won't eventually arise even from some innocently looking generic initial setting if the pursuit order is fancy... – fedja Sep 3 '16 at 2:28

This seems to be not true. Consider the case where the ants start on successive vertices of a regular $n$-gon (in the plane). By symmetry, their positions will always form a regular $n$-gon, so $$\alpha_i=\frac{2\pi}n.$$ Now Lemma 1 part 2 gives $$\frac{d}{dt}Y(t)=-kv$$ where $$k=n\left(1-\cos\left(\frac{2\pi}n\right)\right).$$ Thus $T=Y(0)/(kv)$. Now $k\to0$ as $n\to\infty$ (asymptotically it is $\frac{2\pi^2}n$) so we can choose $n$ with $k<1$. Explicitly if $n=20$ then $k\approx0.97887$ (see wolframalpha). Then $T>Y(0)/v$.

• Thanks. I'll have to check closely to make sure I'm not missing something. The text explicitly says "the only conconfigurations leading to equality are those for which $C(0)$ is a perfect polygon" so it would seem rather sloppy of them for this exact case to be a counterexample. – Alexis Olson Sep 1 '16 at 6:07
• Their claim also doesn't make sense intuitively. As $n\rightarrow\infty$ their bound for $T$ goes to a constant, but the ants get closer and closer to just moving along the circumference of the circle at speed $v$. It's possible that this case is the worst, so the bound should be $T\leq Y(0)/(kv)$ (haven't thought carefully about it). – stewbasic Sep 1 '16 at 6:21
• I wonder about regular $n$-gons of fixed radius $||x_i||$ rather than fixed edge length $||y_i||$. According to this, unit area $n$-gons path lengths approach $n \pi^{-3/2}$. So $X(0) = n$ means in the limit $T = X(0)/(v\pi^{3/2})$. – Alexis Olson Sep 1 '16 at 7:03
• I meant sending $n\to\infty$ with $Y(0)$ fixed, which is roughly the same as fixing $\|x_i\|$ (either way the initial configuration approaches a particular circle). Why are you dividing $X(0)$ by the path length $s_n$? $T$ should be $s_n/v$ which is asymptotically proportional to $n$. – stewbasic Sep 1 '16 at 23:03
• @AlexisOlson for your edited question, I think you also need to specify the order of the ants - ie which vertex is being targeted by which? – stewbasic Sep 1 '16 at 23:06

In Section 1 (the one about Ants), Theorem 1 says:
"Termination must therefore occur before [$(\cos(2\pi /m)-1) \int_0^t \min v_i(s)\;ds$] assumes the value $-\sum ||y_i(0)||$ ." (1)

In case of constant speed, this statement translates to $T \le (1-\cos(\frac{2\pi}{m}))^{-1}\frac{Y(0)}{v}$, where $m$=number of survivors by termination time.

In particular, @stewbasic basic example does not contradict the statement, since in that case the number of survivors by temination time is $n$.

In your example of 8 points at the vertices of a cube, whether $T\le 2$ depends on the speed $v$ that you are considering.

$\mathbf{\text{Note}}$: To prove (1), Bruckstein et alt. use that $\alpha_i \ge \frac{2\pi}{m}$ for some $i$, which does not seem to follow from the result they quote. i.e.: it is not clear that the proof of the bound for $T$ is without gaps.

• I meant $T \le 2$ for unit speed. In other words, $T \le 2/v$. – Alexis Olson Sep 5 '16 at 16:31
• After a second look, there is an obvious mis-statement in Lemma 3, Section V of the paper you refer to. Where it says "$\sum_{i=1}^n \alpha_i \le 2\pi$" it should say "$\sum_{i=1}^n \alpha_i \ge 2\pi$", from where it follows that $\alpha_i \ge \frac{2\pi}{m}$ for some $i$. – VictorZurkowski Sep 5 '16 at 17:46
• The statement I claimed was false was that $T\leq Y(0)/v$, made near the end of page 9. – stewbasic Sep 5 '16 at 22:42
• I missed that line. I stopped at the top of page 8. $T\leq Y(0)/v$ is wrong, as @stewbasic example shows. – VictorZurkowski Sep 6 '16 at 16:19


text:
# Proof that every number ≥ $8$ can be represented by a sum of fives and threes.

Can you check if my proof is right?

Theorem. $\forall x\geq8, x$ can be represented by $5a + 3b$ where $a,b \in \mathbb{N}$.

Base case(s): $x=8 = 3\cdot1 + 5\cdot1 \quad \checkmark\\ x=9 = 3\cdot3 + 5\cdot0 \quad \checkmark\\ x=10 = 3\cdot0 + 5\cdot2 \quad \checkmark$

Inductive step:

$n \in \mathbb{N}\\a_1 = 8, a_n = a_1 + (x-1)\cdot3\\ b_1 = 9, b_n = b_1 + (x-1)\cdot3 = a_1 +1 + (x-1) \cdot 3\\ c_1 = 10, c_n = c_1 + (x-1)\cdot3 = b_1 + 1 + (x-1) \cdot 3 = a_1 + 2 + (x-1) \cdot 3\\ \\ S = \{x\in\mathbb{N}: x \in a_{x} \lor x \in b_{x} \lor x \in c_{x}\}$

Basis stays true, because $8,9,10 \in S$

Lets assume that $x \in S$. That means $x \in a_{n} \lor x \in b_{n} \lor x \in c_{n}$.

If $x \in a_n$ then $x+1 \in b_x$,

If $x \in b_x$ then $x+1 \in c_x$,

If $x \in c_x$ then $x+1 \in a_x$.

#### Solutions Collecting From Web of "Proof that every number ≥ $8$ can be represented by a sum of fives and threes."

Proof by induction.
For the base case $n=8$ we have $8=5+3$.
Suppose that the statement holds for $k$ where $k\gt 8$. We show that it holds for $k+1$.

There are two cases.

1) $k$ has a $5$ as a summand in its representation.

2) $k$ has no $5$ as a summand in its representation.

For case 1, we delete “that $5$” in the sum representation of $k$ and replace it by two “$3$”s ! This proves the statement for $k+1$.

For case 2, since $k\gt 8$, then $k$ has at least three “$3$”s in its sum representation. We remove these three $3$’s and replace them by two fives! We obtain a sum representation for $k+1$. This completes the proof.

Write $x=8n+k$ for $0\leq k<8$ and $n\geq 1$. Because $8n=(3+5)n$, the problem is clear if $k=0,3,5$. Let’s consider the remaining 5 cases:
\begin{align*}
k=1 & \implies 8n+1=5(n-1)+3(n+2),\\
k=2 & \implies 8n+2=5(n+1)+3(n-1),\\
k=4 & \implies 8n+4=5(n-1)+3(n+3),\\
k=6 & \implies 8n+6=5n+3(n+2),\\
k=7 & \implies 8n+7=5(n+2)+3(n-1).
\end{align*}
Note that $k=4$ is based on $k=1$ (just add one more $3$) and, similarly, $k=6$ and $k=7$ follow from $k=1$ and $k=2$, respectively. So in fact, we have really only considered 2 cases.

You are almost done, actually you can prove it even without induction:

If $\forall x \ge 8$ and you must prove that $x \in \mathbb{N} \land x = 5a + 3b$

Let $x_1$ be 8 and consider your base cases:

$x_1 = 8 = 3 ⋅ 1 + 5 ⋅ 1$

$x_2 = 9 = 3⋅3 + 5 ⋅ 0$

$x_3 = 10 = 3⋅0 +5⋅2$

This is true for the first 3 $n$ (1, 2 and 3) of $x_n$.

Now, consider the following:

$x_4 = 11 = x_1 + 3$

$x_5 = 12 = x_2 + 3$

$x_6 = 13 = x_3 + 3$

$x_7 = 14 = x_4 + 3$

$x_8 = 15 = x_5 + 3$

$…$

$x_n = x_{n-3} + 3 \,\,\,\,\,\,\forall n \gt 3$

As you can see from the pattern, it’s obvious that you are summing only multiples of 3 basing on your previous results (which were also sums of multiples of threes and multiples of fives).

And you may also note that as soon as you sum 5 threes ($3+3+3+3+3 = 15 = 3⋅5$) you can safely replace them with 3 fives ($5 + 5 + 5 = 15 = 3⋅5$)

The previous equation leads to a recurrence relation and you can say with certainty that your statement is true $\forall x \ge 8$

I would avoid induction and use the elementary Euclidean division algorithm (Eda).

Let $n\geq8$ be an integer. Then, by the Eda, there exist integer $q$ and $r$ such that $r\in\{0,1,2\}$ and $$n=3q+r.$$

• If $r=0$, we are done since $n=3q$.

• If $r=1$, then $q\geq3$ (because $n\geq8$). Hence $n=3(q-3)+10$.

• If $r=2$, then $q\geq2$ (because $n\geq8$). Hence $n=3(q-1)+5$.

This is some mixture of Bezout’s Lemma and Frobenius coin problem. Frobenius coin problem claims that if $a_1$ and $a_2$ are coprime numbers then every number bigger or equal to $(a_1-1)(a_2-1)$ can be written in the form $a_1x + a_2y$ for some non-negative integers $x,y$.

Write $a_1=3$ and $a_2=5$ in you case and you’ve got the answer. Anyway a inductive proof wouldn’t be much harder.

1.if the integer can be written as $3s$, then set $a=0$

2.if the integer can be written as $3s+1$, set $a=2$, $10+3b=3s+1$,b=s-3

3.if the integer can be written as $3s+2$, set $a=1$, $b=s-1$

I am sure you have got the idea.

Your base case work is fine.

For the induction, you can assume (1) $k\ge 10$ and (2) all cases from $n=8$ to $n=k$ hold.

Then it is simply a matter of noting that we have $k-2=5a+3b$ and so we can say that $k+1 = 5a+3(b+1)$ as required.

Any number is of the form $5k+1$, $5k+2$, $5k+3$, $5k+4$ and $5k+5$.

If $n=5k+3$ then nothing to prove.

$n=5k+1 \implies n=5(k-1)+2\cdot3$

$n=5k+2 \implies n=5(k-2)+4\cdot3$

$n=5k+4\implies n=5(k-4)+8\cdot3$

$n=5k+5\implies n=5(k-2)+5\cdot 3$

Hence for all $k\ge5$ the result holds.

Hence for all $n\ge 25$ the result hold.

What is left is to check the remaining cases and that is also true.

Hence the proposition is true.

Let $P(m)$ be the proposition that $k$ can be represented by a sum of fives and threes for all $m-2 \le k \le m$. $P(10)$ is true, since $8=5+3$, $9=3+3+3$, and $10=5+5$. This is the base case. And if $P(m)$ is true, then so is $P(m+1)$, since (applying the inductive hypothesis at the *): $$m+1=(m-2)+3 =^*(3a+5b)+3=3(a+1)+5b.$$ By induction on $m$, then, $P(m)$ is true for all $m\ge 10$; hence $k$ can be represented by a sum of fives and threes for all $k \ge 8$.

Really late to the party, but here is a very short and sweet approach:

Claim: For each integer $n\geq 8$, let $S(n)$ be the statement that $n$ is expressible as a sum of $3$’s and $5$’s.

Base step: Since $8=3+5, 9=3+3+3, 10=5+5, S(8), S(9)$, and $S(10)$ are true.

Inductive step ($S(k)\to S(k+3)$): Let $k\geq 8$ and assume that $S(k)$ is true, where for some non-negative integers, $a,b,k = a\cdot 3+b\cdot 5$. Then $$k+3=(a+1)\cdot 3+b\cdot 5,$$
a sum of $3$’s and $5$’s, so $S(k+3)$ is true.

By mathematical induction, three cases of induction actually, for all $n\geq 8, S(n)$ is true. $\blacksquare$

Lets call $T$ every multiple of three: $T$ satisfies the condition. Numbers are $T, T-1,$ or $T-2$.

for $n > 3\cdot 2+1$:

$$n=T \implies n=3k$$
$$n=T-1 \implies n= 3\cdot 2 – 1 + 3(k-2) = 5 + 3(k-2)$$
$$n=T-2 \implies n= 3\cdot 4 – 2 + 3(k-4) = 10 + 3(k-2)$$

I’m attempting to answer the question intuitively:

Every third number is a multiple of 3, and can definitely be written as a sum of 3s and 5s:
$3x$ + $5$ x $0$.

Now we need to deal with numbers $y$ for which $y mod 3 = 1$ and $y mod 3 = 2$

For $y mod 3 = 2$:
We know that $5 mod 3 = 2$, so 5 x 1 + 3$x$ should give us all numbers $y$ where $y mod 3 =2$
For $y mod 3 = 1$:
We know that $5$ x $2 mod 3 = 1$, so 5 x 2 + 3$x$ should give us all numbers $y$ where $y mod 3 =1$

The smallest case in which we can use this proof is 5 x 2 + 3 x 0 = 10

We can show it is possible for 8 and 9 as 5+3 =8 and 3 x 3 =9

Hence, we can show that is possible for all numbers greater than or equal to 8.

This is also proves that the maximum multiplier we would need for 5 is 2.


text:
# easy way to get numbers from a string

This topic is 4389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys, I was wondering; what is a fast way to see if a particular string is a number? I'm parsing lines of input from the user, and if it is a number, I want it to do a certain thing. Once i determine whether or not it is a number, i can easily use atof()... p.s. no extra #include files, if possible.

##### Share on other sites
if youre using c you could iterate over the string, and check if all the chars are between '0' and '9', with 1 '.' and an optional '-' at the start...

[EDIT]
and 'e' or 'E', with another optional '-' before it...

##### Share on other sites
true, but is there no stdlib function that could do that for me?

(sorry, I should have been more specific about "extra" include files. I am currently using <string>, <iostream>, and <stdlib>)

##### Share on other sites
Pretty easy way is to subtract the value of '0' from the character. If it's less than 0, then you have an alpha character, otherwise it's the value of the number(i.e. '3' - '0' = 3)

so you could just iterate through:

if(char - '0' < 0)
// Alpha character
else
// Numeric character

You can also use the just use the stdio isalpha() function. :)

##### Share on other sites
Quote:
 Original post by BTownTKDtrue, but is there no stdlib function that could do that for me?(sorry, I should have been more specific about "extra" include files. I am currently using , , and )

strtod(), strtol() are what you're after I think, defined in stdlib.

##### Share on other sites
You could use strtof and check the returned end pointer, i.e. verify that it's pointing at the null terminator and there's at least one character in the string.
It won't complain about initial whitespace however, so you'd have to add detection for that manually. Similarily you may want to ignore any whitespace at the end of the string.

A better way to handle whitespace (by ignoring it) may be to use sscanf with a 'canary' character at the end.
if(sscanf(string, "%lf %*c", &value) != 1) { // error}
At least I think that'd work..

edit: 10 seconds too late..

##### Share on other sites
In C++ this is easy, although it will require one more include file (why the resistance to this? Only the bits that are actually needed will get put into your exe, if you do the right stuff when compiling, and it's pretty small compared to the flat one-time cost of "the C++ CRT"):

// other includes - I noticed you have 'string', which is good#include <sstream>using namespace std;// This checkes whether it is a number and also gets the number out if possible.string input;stringstream ss(input);int value;// As an added bonus, if we want to change the code to read hex numbers, for// example, it's as easy as uncommenting this:// ss << hex; // <-- that's a "stream manipulator"; the << gets translated into// a call like "std::hex(ss)", which in turn tells this stringstream object// to change its "reading mode" so that it assumes hex when looking for numbers.// I don't think there exist manipulators for arbitrary number bases, however;// but there are still many other useful things you can do here.if (ss >> value) {  // there was a number at the beginning of the string, and now it is stored in  // value.  char garbage;  if (ss >> garbage) {    // if we get here, there is something after the number within the string.    // Maybe you don't want to do the 'number' handling in this case; maybe    // you do.  } else {    // we definitely have a number.  }} else {  // the string definitely does not hold a number.  // The stringstream is now in a "fail state" just like cin is if you try  // to read a number when there isn't one, and similarly no data has been  // read from it. And naturally, 'value' is still uninitialized here.}

If you're willing to go to Boost, they also provide a nice wrapper for this sort of process: boost::lexical_cast. It will throw an exception if the conversion cannot be done, and return the int (or whatever) as a new value if it can.

##### Share on other sites
I'm unsure of the performance of this, but here's yet another way:

#include <algorithm>	// for find_first_of#include <iostream>#include <string>bool stringContainsNumber( std::string s ) {	const std::string numberSet( "0123456789" );	std::string::iterator it( std::find_first_of( s.begin(), s.end(), numberSet.begin(), numberSet.end() ) );	if( it != s.end() ) return true;	return false;}int main() {	std::string testString1( "This string contains no numbers" );	std::string testString2( "This string contains 1 number" );		if( stringContainsNumber( testString1 ) )		std::cout << "testString1 contains number(s)" << std::endl;	if( stringContainsNumber( testString2 ) )		std::cout << "testString2 contains number(s)" << std::endl;	return 0;}

You could also use std::find_first_of(...) to get a number within a (alphanumeric) string, if that's what you're expecting.

Zahlman's suggestion is a little cleaner, though.

##### Share on other sites
That's ok except that it will (a) detect numbers with leading zeroes; (b) detect numbers too big to fit into an int; (c) not detect negative numbers. It will also only tell you where the first number starts, so you still have to go in and do the work of extracting the number. And anyway, complex searches are often better handled by a regex library (assuming a good understanding of regexes).

But yes, string::find_first_of() is a good tool to be aware of.

##### Share on other sites

This topic is 4389 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628644
• Total Posts
2984007

• 9
• 9
• 10
• 21
• 20


text:
Geometry and algebraic equations

Gold Member
Hi PF!

I'm given a circle with parametric representation ##x=r\sin\theta,y=h+r\cos\theta##. There is also a line, which has the parametric equation ##x=x,y=\cot (\beta) x##. Note the line makes angle ##\beta## with the y-axis. When the circle intersects the line, it makes an angle, call this angle ##\alpha##. The 2D area of the enclosed y-axis,circular arc, and line, together form an area, call this ##A##. Given ##\beta,\alpha,A##, I want to determine ##h,r,\theta_e## where ##\theta_e## is the ##\theta## value that intersects with the line. See the image below for clarity.

I've come up with three equations to specify the system: can you confirm these are correct? I use subscribts ##c## and ##l## to denote circle and line respectively.

1) area equation
$$\int_0^{\theta_e} y_c \, dx - \int_0^{x_c(\theta_e)} y_l \, dx = A \implies\\ \int_0^{\theta_e} y_c x_c'(\theta) \, d\theta - \int_0^{x_c(\theta_e)} y_l \, dx = A \implies\\ \boxed{\frac{1}{2} r (\sin (\theta_e ) (2 h+r \csc (\beta ) \sin (\beta -\theta_e))+\theta_e r) = A}.$$

2) circle intersecting line equation
$$x_c = x_l,\,\,\,y_c=y_l\implies\\ \boxed{h+r\cos\theta_e = r\sin\theta_e\cot\beta}.$$

3) dot product of unit-tangent vectors for circle and line intersection must equal ##\cos\alpha##

$$\left.\frac{\langle x_c'(\theta),y_c'(\theta)\rangle}{|| \langle x_c'(\theta),y_c'(\theta)\rangle||} \cdot \frac{\langle x_l,y_l'(x)\rangle}{|| \langle x_l,y_l'(x)\rangle||}\right|_{\theta=\theta_e} = \cos\alpha\implies\\ \boxed{-\sin(\theta_e-\beta)=\cos\alpha}.$$

How do these equations look? (OOPS, the bottom figure labels the upper-right angle ##\theta##, but it should read ##\alpha##. My fault!)

Last edited:

Homework Helper
Gold Member
I didn't look over everything, but most of it looks good. I do see in the dot product with the line that goes through the origin, you can either use ## (x,y) ## or ## (1,dy/dx) ##, but not ##(x, dy/dx) ##.
e.g. You can parametrize the line with ## x=x ## and ## y=y(x) ##, and instead of using ## (dx/dt,dy/dt) ##, you use ##(dx/dx,dy/dx) ## for the tangent vector.

Last edited:
Gold Member
I didn't look over everything, but most of it looks good. I do see in the dot product with the line that goes through the origin, you can either use ## (x,y) ## or ## (1,dy/dx) ##, but not ##(x, dy/dx) ##.
e.g. You can parametrize the line with ## x=x ## and ## y=y(x) ##, and instead of using ## (dx/dt,dy/dt) ##, you use ##(dx/dx,dy/dx) ##.
Shoot, I meant 1 there ***typo***, so dx/dx. Thanks. So this is correct: I'm not crazy?


text:
# Probability issues: draw 3 balls from bag of 12 in 3 colors

#### heidi18

##### New member
I am auditing a college class and I did not understand these problem by the teacher. Go easy this is my first go around with this stuff.

A bag contains five white, three black, and four red balls. A single drawing of three balls is made. Find the probability that the three balls will all be of a different color?

Is it (5/12) times (4/11) times (3/10)??????

The other one that did not make sense was...

From a deck of 52 cards, three aces have been drawn one at a time in three consecutive draws. What is the probability of the fourth ace being drawn on the next draw, and what is the probability of these four aces being drawn as described?

Is the second part of that question (4/52)(3/51)(2/50)(1/49)? I am not sure of the first part of the question, where do I start?

I do not want to be a bother, ill be greatful to anyone who can make me better and smarter and help me with this!

#### galactus

##### Super Moderator
Staff member
A bag contains five white, three black, and four red balls. A single drawing of three balls is made. Find the probability that the three balls will all be of a different color?

Is it (5/12) times (4/11) times (3/10)??????
You are on the right track, except you need to multiply by 6. That's because they can come out in 3!=6 different ways. For instance, say they came out BWR, RWB, WRB, etc. 6(5/12)(4/11)(3/10).

Another way to do this is using combinations. $$\displaystyle \frac{5\cdot{4}\cdot{3}}{C(12,3)}$$. Because we are choosing 3 from 12 and and there are 5 whites to choose, 4 reds, and 3 blacks.

The other one that did not make sense was...

From a deck of 52 cards, three aces have been drawn one at a time in three consecutive draws. What is the probability of the fourth ace being drawn on the next draw, and what is the probability of these four aces being drawn as described?

Is the second part of that question (4/52)(3/51)(2/50)(1/49)? I am not sure of the first part of the question, where do I start?

I do not want to be a bother, ill be grateful to anyone who can make me better and smarter and help me with this!
You are correct. The last Ace will have a probability of 1/49 of being drawn. But remember, they can be drawn in 4!=24 different ways because there are 4 different Aces. So multiply by 24. 24(4/52)(3/51)(2/50)(1/49)=

#### heidi18

##### New member
I think I am starting to understand...

A box holds 4 apples, 5 oranges, and 8 pears. How many ways can 2 apples, 1 orange, and 2 pears be chosen?

so I would have multipication because of the word AND, (4/17)(3/16)(5/15)(2/14)(1/13)=

...except I probably need to multiply this by all the ways they can come out of the box, right???

that seems like a lot of ways, do I have to list all the of them to find out? Like AAOPP AOPPA...???

#### galactus

##### Super Moderator
Staff member
You are on the right track. Seems you're catching on and you are correct in that you have to multiply by the number of arrangements. 5!/(2!1!2!)=30

There are 5 items you are choosing, but there are 2 the same, 1 , and 2 the same. That is called distinguishable permutations.

30/6188=30/221.

Here is another way. You get the same answer.

$$\displaystyle C(4,2)C(5,1)(C(8,2)=840$$

Because we are choosing 2 from 4, 1 from 5, 2 from 8.

Now, if you wanted the probability of choosing what you stated, then divide by C(17,5)

Because we are choosing 5 from 17 total.

$$\displaystyle \frac{C(4,2)C(5,1)(C(8,2)}{C(17,5)}=\frac{30}{221}$$

#### heidi18

##### New member
I dont mean to bother you, but where did you get the 30/6188=30/221? Particularly the 30/6188? sorry

#### galactus

##### Super Moderator
Staff member
That is the calculation. You got the 1/6188 yourself. I just multiplied by 30.


text:
Problem: Suppose the position of an object is given by r = (3.0t2 i − 6.0t3 j) m .(a) Determine its velocity v and acceleration a, as a function of time,(b) Determine r and v at time t = 2.5 s.

FREE Expert Solution
86% (279 ratings)
FREE Expert Solution

This problem requires us to determine velocity and acceleration as a function of time and to determine and v at a given time.

Anytime we're given a position, velocity, or acceleration function and asked to find one or more of the others, we know it's a motion problem with calculus. A PVA diagram like the one below can help remind you of the relationships between the three functions:

$\mathbit{P}\begin{array}{c}{\mathbf{←}}\\ {\mathbf{\to }}\end{array}\underset{\frac{\mathbit{d}}{\mathbit{d}\mathbit{t}}}{\overset{{\mathbf{\int }}{\mathbit{d}}{\mathbit{t}}}{\mathbit{V}}}\begin{array}{c}{\mathbf{←}}\\ {\mathbf{\to }}\end{array}\mathbit{A}$

To get from position to velocity, we differentiate the position function.

$\overline{)\stackrel{\mathbf{⇀}}{\mathbit{v}}{\mathbf{\left(}}{\mathbit{t}}{\mathbf{\right)}}{\mathbf{=}}\frac{\mathbit{d}\stackrel{\mathbf{⇀}}{\mathbit{r}}\mathbf{\left(}\mathbit{t}\mathbf{\right)}}{\mathbit{d}\mathbit{t}}}$

Also, to get acceleration, we differentiate the velocity function:

$\overline{)\stackrel{\mathbf{⇀}}{\mathbf{a}}{\mathbf{\left(}}{\mathbf{t}}{\mathbf{\right)}}{\mathbf{=}}\frac{\mathbf{d}\stackrel{\mathbf{⇀}}{\mathbf{v}}\mathbf{\left(}\mathbf{t}\mathbf{\right)}}{\mathbf{d}\mathbf{t}}}$

Remember the power rule of differentiation.

$\overline{)\frac{\mathbit{d}}{\mathbit{d}\mathbit{t}}\mathbf{\left(}{\mathbit{t}}^{\mathbit{n}}\mathbf{\right)}{\mathbf{=}}{\mathbit{n}}{{\mathbit{t}}}^{\mathbit{n}\mathbf{-}\mathbf{1}}}$  (for example, $\frac{\mathbit{d}}{\mathbit{d}\mathbit{t}}{\mathbit{t}}^{\mathbf{3}}\mathbf{=}\mathbf{3}{\mathbit{t}}^{\mathbf{2}}$)

Whenever you take the derivative of a vector, make sure to do the operation on each component (î, ĵ, and k̂) separately—they're independent of each other and shouldn't get mixed up!

(a) We're asked to determine velocity and acceleration as functions of time.

86% (279 ratings)
Problem Details

Suppose the position of an object is given by r = (3.0t2 i − 6.0t3 j) m .
(a) Determine its velocity v and acceleration a, as a function of time,
(b) Determine r and v at time t = 2.5 s.


text:
# The system cannot find the file specified

I have just downloaded WinEdt and written my first code, but it will not run because I keep getting the following error. I am at a loss as to how to fix this.

Error launching Console Application PDFLaTeX ...

Command Line: pdflatex.exe --interaction=errorstopmode --synctex=-1 "practice.tex"

Startup Folder: C:\Users\shahand\WinEdt Team\WinEdt 8

The system cannot find the file specified.

-
Running options -> execute command -> diagnosis, it says "There are some problems with your TeX installation. Depending on your intended use of WinEdt and TeX you may have to install additional software, or missing TeX Components..." –  DShahan Jun 27 '13 at 21:03
Do you have a TeX distribution installed (MiKTeX or TeX Live)? –  karlkoeller Jun 27 '13 at 21:04

There are three different cases for which these errors may occur in WinEdt.

## 1. No TeX distribution installed

WinEdt is merely an editor, if you want to use TeX you have to download a TeX distribution. See here for more details.

## 2. No info about the TeX distribution in the system PATH

WinEdt can automatically detect the executables of a TeX distribution only if its bin directory is in the system PATH.

If you have any problems, go to `Options` menu -> `Execution Modes` -> `Diagnosis` page, and you will see something like:

Looking at the "Windows PATH" part of the report, you can see if the bin directory of your distribution has been inserted there. If not, there are two common causes for that:

1. Something has gone wrong when you installed your TeX distribution and it didn't insert its bin directory in the system PATH.
2. For some reasons, you've manually deleted the path to the bin directory from the system PATH.

In both cases you'd better insert this information in the PATH manually and then restart WinEdt.

If you don't want to deal with changing the system PATH manually, you can proceed as follows:

• Choose the right configuration (MiKTeX or TeX Live) from the `Options` -> `Configurations` menu.

• Go to the `TeX System` page of the `Execution Modes` interface, insert the root path of your TeX distribution in the `TeX Root` field and press 'Apply'. WinEdt will retreive all relevant info about your TeX distribution automatically.

## 3. Problems with a specific application

It can happen that WinEdt finds where your TeX distribution is installed, but it doesn't find a specific application. For example, you have MiKTeX installed and you want to use ConTeXt. Since it is not bundled with MiKTeX, you've installed the standalone version, but WinEdt is not able to find `context.exe`.

In this case, go to the `Console Application` page of the `Execution Modes` interface and you will see that ConTeXt is marked by a question mark.

Insert the full path to `context.exe` in the `Executable` field and press 'OK'. WinEdt will now know where `context.exe` is and you will be able to launch it from within WinEdt.

## Other issues

It is unlikely that following the above guidelines you still receive the message

Error launching Console Application ????? ...

Anyway, in such a case, let me know and I will update the answer.

-

Also be careful about installing miktex properly. Sometimes people just download miktex but forget to run setup after that.

-


text:
# Homework Help: Effect of Instantaneous Velocity Change on Orbit

1. Jan 25, 2012

### PChar

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

A small particle of mass m is on a circular orbit of radius R around
a much larger mass M. Suppose we suddenly increase the speed at which the mass m is moving
by a factor (that is, v$_{final}$ = α * v$_{initial}$, with α > 1). Compute the major axis, minor axis,
pericentre distance, and apocentre distance for the new orbit; express your answers in terms
of R and α alone

2. Relevant equations

Vis-Viva Equation:

(αv)$_{initial}$$^{2}$ = GM [ $\frac{2}{R}$ - $\frac{1}{a}$ ]

Speed of circular orbit:

v$_{initial}$ = $\sqrt{\frac{GM}{R}}$

Pericentre distance:

a(1 - e)

Apocentre distance:

a(1 + e)

Semi-minor axis:

$b^{2}=a^{2}(1-e^{2})$

3. The attempt at a solution

By inserting the initial orbital speed into the vis-viva equation I was able to find the semi-major axis as required:

a = $\frac{R}{2-α^{2}}$

The problem I'm having now is that I can't find the semi-minor axis without the eccentricity of the new elliptical orbit, or the distance between the two foci, and I can't find a way to eliminate them.

2. Jan 25, 2012

### netgypsy

have you drawn a diagram and labeled everything?

3. Jan 25, 2012

### PChar

Yeah, but it's hasn't really helped any more than trying to manipulate formulas.

I have an idea rolling around that the since the velocity increased while the particle was at a Radius of R, then R will be its pericenter, which would allow me to find the eccentricity, but I'm not sure if that's right, or how to justify it if it is.

4. Jan 25, 2012

### netgypsy

Well at the point it obtains an instantaneous velocity increase it moves off tangent to the circle it was already traveling in, faster than it was going so the inward pull of the gravity will not pull it back to the original path. This means it's not going to get any closer to the larger mass so it's not going to go any faster so it has to be the position closest to the large mass at that point. So go from there.

5. Jan 25, 2012

### Staff: Mentor

It's a good idea, and a correct one. The particle starts in a circular orbit of radius R and you're adding to its velocity (KE) in a direction tangent to the circle. There are only two places in an elliptical orbit where the velocity is tangent to the radius vector, and that's at periapsis and apoapsis, and since closed orbits repeat it must be one or the other. Since the new velocity is greater than that required for circular motion, the radius must be increasing from that point as time increases and so it's at periapsis.

If it turns out that the new orbit is not closed (what values of $\alpha$ will cause this?) then indeed, periapsis is the only choice.

6. Jan 25, 2012

### PChar

Thanks for the help guys.

7. Jan 25, 2012


text:
# Is the integrated Sachs-Wolfe effect from super-structures still a problem for LambdaCDM?

Speaker:
Shaun Hotchkiss
Date/Time:
Wed, 22/02/2012 - 16:30
Room:
Maths 103
Seminar series:

In any region of the universe where the gravitational potential decays over time large-scale structure will produce a redshift in the cosmic microwave background. This is known as the integrated Sachs-Wolfe (ISW) effect. A cosmological constant causes such a decay and as such the ISW effect is an important consistency test of the standard cosmological model. The ISW imprint of very large (super) structures has reportedly been detected with >4\sigma significance. I will discuss this observation and the LambdaCDM prediction for it. It is seen that the observed signal is >3-sigma larger than expectations. No solution to this 'ISW mystery' is yet known; however I will discuss some interesting directions worth further exploration.


text:
# Microsoft Agent Tutorial Chapter 2

Microsoft Agent Tutorial Chapter 2

Author: Abstractvb
Date: 4/22/2000 6:54:54 PM
ID: 84
Microsoft Agent Version 2 Needed.

Shows how to recieve input from the user via speech.  This uses the Text to Speech engine and MSAgents commands to determine what the user said and take action. This covers commands, and confidence settings.

 Part 1 - Adding Agent Commands

To get the Agent to respond to userinput you will need to add commands.  Commands are a word or series of words the Agent waits for. Once one of the commands is spoken the agent will call the Commands() Event and return the name of the command that was spoken.

MSAgent.Characters.Load "DefaultCharacter"
Set AgentChar= MsAgent.Characters("DefaultCharacter")
AgentChar.Commands.Add "Notepad", "Notepad", "Notepad", True, True

Private Sub MsAgent_Command(ByVal UserInput As Object)
MsgBox UserInput.Name
End Sub

There, now try running it. Press SCROLLLOCK and then say your agents name to get him to appear. Once the agent has appeared press SCROLLLOCK again to get the agent to listen and then say the word "Notepad". A msgbox should appear with the word notepad in it, since that is the name we gave our command.

The first parameter listed above is the name that is what the Command() Event will return to you when your command is spoken. The next is the Caption parameter, which will determine how this command is displayed in the Agent Voice Commands Window. The third is the Voice property. The voice property is what the user must say to evoke this command. The voice property does not have to be the same as the Name or the Caption.

Now take a look at this line of code:

AgentChar.Commands.Add "notepad", "notepad", "[...] notepad [...]", True, True

Notice the ellipses in brackets? These have a special meaning to the Text to speech engine. These basically mean to ignore any speech before and after the word notepad. So you could say something like this "Open notepad please" and it will still return the "Notepad" command.  Be careful when using the ellipses though, since they slow down processing considerably.

 Part 2 - It's all Guesswork!

When a command is spoken the Agent takes its best guess and then returns you a command. The command may not always be correct, since the Agent is really just making a guess. Imagine this scenario: You have the agent setup to delete a database entry when the user speaks a specific command. Now you would want to ensure that MSAgent is fairly confident in the command before you wipe out valuable data. Thankfully MSAgent has a property designed to let you know just how certain the agent is about a command.

The UserInput object has a confidence property designed just for this purpose; the Confidence property. Confidence properties in MSAgent can range from -100 to 100. Try this:

Private Sub MsAgent_Command(ByVal UserInput As Object)
If UserInput.Confidence > -50 Then
MsgBox UserInput.Name
Else
MsgBox "I have " & UserInput.Confidence & " confidence in that command"
End If
End Sub

Sometimes you want to have different confidence levels for different commands. There is a property for this as well. Each command object can have a confidence level specified and a confidence text specified. If the agents confidence level does not meet or exceed the confidence level you set then the confidence text will be displayed in the agents ToolTip. Try adding this to the Form_Load:

AgentChar.Commands("notepad").Confidence = "50"

Notice that when the agents confidence level is below 50 it will display the ConfidenceText in the tooltip. But you should also notice that the agent will still proceed with the command and show the msgbox. To avoid that you would need to add code to check the UserInput confidence setting and the Command confidence setting to see if the latter is met or exceeded. Something like this:

If UserInput.Confidence > AgentChar.Commands(UserInput.Name).Confidence Then
MsgBox UserInput.Name
End If

There is also other parameters to let you know what other commands the agent considered when guessing. You can get the name of the second best match using the UserInput.Alt1Name, and the third best match using the UserInput.Alt2Name properties. Each of these have their own confidence scoring (Alt1Confidence, and Alt2Confidence). I guess one use for this would be to query the user showing all three choices and get the user to clarify the choice.

Sometimes the agent will get a built in command like "Show" or "Hide". In this case no Command names are returned. So to determine if any command names are returned the best way is to check the Userinput.Count property. This will tell you if 1, 2 or 3 guesses were returned from the agent. If only two are returned then the Alt2Name property will be empty so there will be no use checking it.

• 本文已收录于以下专栏：

举报原因： 您举报文章：Microsoft Agent Tutorial Chapter 2 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)


text:
Simple example: how switching identification procedures swaps patients

Here is a concrete example.   We want to count gannets.

1. There is one gannet above the water.
2. There are two gannets under the water.
3. There are two pigeons above the water and pigeons don’t swim.
4. At any given time, the gannets under the water cannot be the gannets above the water.
5. And by genetic definition the gannets cannot be the pigeons.
6. Thus, we are confronted with two genetically defined species and two circumstances.
7. Forensic Procedure: If I select and define my population of “gannets” by way of DNA identification, I identify the one gannet which was above the water and the two gannets that were under the water. The pigeons are not a genetic match, and so I eliminate them from the count. What underlies my claim of “three gannets” are all gannets.
8. Circumstantial Procedure: Later, I select and define my population of “gannets” by the circumstance where gannets spend a lot of time — flying above the sea. My conclusion is human but untenable, “Therefore, what flies above the sea is a gannet.” If I find three birds above the water, I simply check them off on my clipboard, calling them “three gannets” … because they fit the circumstantial definition imposed upon them by my chosen identification procedure. I have one gannet, it is true, but I also have two pigeons which are simply renamed, “gannets,” because they happened to be flying above the water too.
9. If I use the DNA examination (7) to prove to a purchaser how many gannets there are but then use the circumstantial definition (8) when actually selling them, I swap out the submerged gannets used in the advertisement and swap in the pigeons for the sale, employing a bait-and-switch scheme.

“Above” and “Below” the water is above and below a circumstantial cutoff point. Given that DNA testing put us closer to the original aim and established a statistical fact, opting later for a circumstantial judgment effectively de-identifies the underwater gannets and the flying pigeons, swapping them when switching identification procedures. The transfer is the same when the FH were first identified in genetic terms when claiming prevalence and underdiagnosis, but then later identified circumstantially when sold treatments.


text:
location:  Publications → journals → CMB
Abstract view

# On the Diameter of Unitary Cayley Graphs of Rings

Published:2016-06-07
Printed: Sep 2016
The unitary Cayley graph of a ring $R$, denoted $\Gamma(R)$, is the simple graph defined on all elements of $R$, and where two vertices $x$ and $y$ are adjacent if and only if $x-y$ is a unit in $R$. The largest distance between all pairs of vertices of a graph $G$ is called the diameter of $G$, and is denoted by ${\rm diam}(G)$. It is proved that for each integer $n\geq1$, there exists a ring $R$ such that ${\rm diam}(\Gamma(R))=n$. We also show that ${\rm diam}(\Gamma(R))\in \{1,2,3,\infty\}$ for a ring $R$ with $R/J(R)$ self-injective and classify all those rings with ${\rm diam}(\Gamma(R))=1$, 2, 3 and $\infty$, respectively.
 Keywords: unitary Cayley graph, diameter, $k$-good, unit sum number, self-injective ring


text: Title Search for a Higgs boson decaying into $\gamma*\gamma$ -> ll$\gamma$ with low dilepton mass in pp collisions at $\sqrt{s}$=8 TeVSearch for a Higgs boson decaying into $\gamma*\gamma$ -> ll$\gamma$ with low dilepton mass in pp collisions at $\sqrt{s}$=8 TeV Author Khachatryan, V. Sirunyan, A.M. Tumasyan, A. Alderweireldt, S. Cornelis, T. de Wolf, E.A. Janssen, X. Knutsson, A. Lauwers, J. Luyckx, S. Ochesanu, S. Rougny, R. van de Klundert, M. van Haevermaet, H. Van Mechelen, P.M. Van Remortel, N. Van Spilbeeck, A. et al. Faculty/Department Faculty of Sciences. Physics Research group Elementary Particle Physics Publication type article Publication 2016Amsterdam, 2016 Subject Physics Source (journal) Physics letters: B. - Amsterdam, 1967, currens Volume/pages 753(2016), p. 341-362 ISSN 0370-2693 ISI 000368783600052 Carrier E Target language English (eng) Full text (Publishers DOI) Affiliation University of Antwerp Abstract A search is described for a Higgs boson decaying into two photons, one of which has an internal conversion to a muon or an electron pair (ll gamma). The analysis is performed using proton-proton collision data recorded with the CMS detector at the LHC at a centre-of-mass energy of 8TeV, corresponding to an integrated luminosity of 19.7 fb(-1). The events selected have an opposite-sign muon or electron pair and a high transverse momentum photon. No excess above background has been found in the three-body invariant mass range 120 < m(ll gamma) < 150 GeV, and limits have been derived for the Higgs boson production cross section times branching fraction for the decay H -> gamma*gamma -> ll gamma, where the dilepton invariant mass is less than 20 GeV. For a Higgs boson with m(H) = 125 GeV, a 95% confidence level (CL) exclusion observed (expected) limit is 6.7 (5.9(-1.8)(+2.8)) times the standard model prediction. Additionally, an upper limit at 95% CL on the branching fraction of H -> (J/psi)gamma for the 125 GeV Higgs boson is set at 1.5 x10(-3). (C) 2015 CERN for the benefit of the CMS Collaboration. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). E-info http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000368783600052&DestLinkType=RelatedRecords&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000368783600052&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 Full text (open access) https://repository.uantwerpen.be/docman/irua/bfed8d/132239.pdf Handle


text:
# Is $\text{rational}^{\text{irrational}}$ rational or irrational?

Is the number $\text{rational}^{\text{irrational}}$ rational or irrational?

For example $2^{\sqrt{2}}$: is it rational or irrational?

I tried using a logarithm but it didn't work. It seems by superficial studying that it will be irrational. But what is the proof?

Given any two rational numbers, $a,b$, note that $a^{\log_a(b)} = b$ is rational but $\log_a(b)$ is generally not rational.

For example $2^{\log_2(3)} = 3$ but $\log_2(3)$ is not rational.

So a rational number taken to an irrational power can easily be rational.

However, if $a\neq 0,1$ is rational (in fact even algebraic) and $b$ is an irrational algebraic number, then it is known that $a^b$ is actually transcendental. This is called the Gelfond–Schneider theorem.

This is essentially the Gelfond-Schneider Theorem which says:

$$\text{If } a,b \text{ are algebraic}, a \neq 0,1 \text{ and } b \in \mathbb{R} \setminus \mathbb{Q} \text{ then } a^b \text{ is transcendental.}$$

Now every transcendental number is also irrational, and every rational number is algebraic. $\sqrt{2}$ is also algebraic so in this case, yes $2^\sqrt{2}$ is irrational and transcendental.

But (I believe) a non-zero algebraic number to the power of a transcendental number can either be rational or irrational, so a rational to the power of an irrational may be rational, only if the irrational is also transcendental. For concrete examples note that $\log_2 (3)$ is irrational, but $2^{\log_2 (3)} = 3$, however I suspect $2^\pi$ is irrational.

Examples of algebraic numbers are say $\sqrt{n}$ or $\sqrt{3 + \sqrt{2}}$ or anything that is the root of a polynomial (that is in fact the definition), whereas transcendental numbers are more like $\pi$ or $e$.

Hopefully this was helpful for you, but in that particular example, yes $2^\sqrt{2}$ is irrational.

• "But (I believe) it is an open problem to show whether an algebraic number to the power of a transcendental number is irrational." It is not open, look at my first comment. – Andrés E. Caicedo Apr 21 '14 at 16:39
• So \/2^\/2 will irrational and transcendental? – Satvik Mashkaria Apr 21 '14 at 16:48
• I maybe misphrased that, I meant an algebraic to a transcendental is EVER irrational, obviously it can be rational but I couldn't find a proof that (say) $2^\pi$ is irrational even though I'd assume it was. But either way, I'll edit it to make what I meant more clear. – CameronJWhitehead Apr 21 '14 at 16:49
• @SatvikMashkaria, $\sqrt{2} ^ {\sqrt{2}}$ is in fact transcendental yes, it is the square root of the Gelfond-Scneider Constant, which has its own wikipedia page en.wikipedia.org/wiki/Gelfond%E2%80%93Schneider_constant – CameronJWhitehead Apr 21 '14 at 16:53
• Nope. Not yet. Probably you want the conclusion to be "can either be rational or transcendental." – Andrés E. Caicedo Apr 21 '14 at 17:05


text:
# Charging of the body : How a body gets charged ?

Electrostatics is the study of electric charges at rest and so it is also called static electricity.

#### Electric Charge

Electric charge, like mass, is one of the fundamental attributes of the particle of which the matter is made. Charge is the physical property of certain fundamental particles (like electron, proton) by virtue of which they interact with the other similar fundamental particles.

To distinguish the nature of interaction charges are divided into two parts :

(i) positive

(ii) negative

SI unit of charge is coulomb and CGS unit is esu.
1 C = 3 × 109 esu.

Magnitude of the smallest known charge is e = 1.6 × 10-19C (charge of one electron or proton).

Note : True test of electrification is repulsion and not attraction as attraction may also take place between a charged and an uncharged body and also between two oppositely charged bodies.

#### Charging of the body

Basically charging can be done by two methods; by
(i) Conduction
(ii) Induction

Ordinarily, matter contains equal number of protons and electrons. A body can be charged by the transfer of electrons or redistribution of electrons.

The process of charging from an already charged body can happen either by conduction or induction.

Conduction : Conduction from a charged body, involves transfer of like charges. A positively charged body can create more bodies, which are positively charged, but the sum of the total charge on all positively charged bodies will be the same as the earlier sum.

Induction : Induction is a process by which a charged body accomplishes the creation of other charged bodies, without touching them or losing its own charge. An uncharged conductor gets charged by induction due to redistribution of its own charge.

Induced Charge  , $\large q’ = -q(1-\frac{1}{k})$

Where k = dielectric constant of material of uncharged body .

For metals , k = ∞  ⇒ q’ = – q

#### Properties of Charge :

(i) Like charges repel and unlike charges attract each other .

(ii) Charge is a scalar quantity .

(iii) Charge is additive in nature . e.g. +2C + 5C-3C = 4C

(iv) Conservation of charge :
Charge is conserved, i.e. total charge on an isolated system is constant. By isolated system, we mean here a system through the boundary of which no charge is allowed to escape or enter. This does not require that the amount of positive and negative charges separately conserved; only their algebraic sum is conserved.

(v) Quantization of charge :
Charge exists in discrete packets rather than in continuous amount.
i.e. charge on any body is the integral multiple of the charge on an electron
Q = ± ne, where n = 0, 1, 2, ……………..

(vi) Charges on a conductor :
Static charges reside on the surface of the conductor.

(vii) Distribution of charges :
The concentration of the charges is maximum on a surface with greater curvature.

Note: If a body possesses n1 protons and n2 electrons, then net charge on it will be (n1 – n2)e , i.e., n1(e) + n2(-e) = (n1 – n2)e

Illustration : Is a charge of 5.8 × 10-18 possible ?

Sol: Applying Quantization of charge ,

Q = n e
$\large n = \frac{Q}{e} = \frac{5.8 \times 10^{-18}}{1.6 \times 10^{-19}}$

n= 36.25 , this is not an integer . Hence this charge is not possible .

Illustration : One million electrons are added to a glass rod. What is the total charge on the rod ?

Sol: here , n = 106

Applying Quantization of charge ,

Q = n e

Q = 106 × (-1.6 × 10-19)

Q = – 1.6 × 10-13 C