# probability that random draws from the same pool will collectively select 90% of the pool

There are a total of 200 names on a list. 30 times names are selected from the full list. How many names should be selected each time to predict with 90% certainty that 90% of all the names will be selected at least once?

# The answer is $$n=17$$.

I can't see an easy analytic solution to this question. Instead, we will develop an analytic solution to a closely related problem, and then find the answer to your exact question via simulation.

## Clarification:

Since the question is slightly vague, let me re-state the problem. There are $$200$$ names on a list and $$n$$ names will be selected from this list without replacement. This process, using the full $$200$$ names each time, is repeated a total of $$30$$ times.

## A related problem.

Let $$X_i$$ equal $$1$$ if the $$i^{th}$$ name is selected at least once and equal to $$0$$ otherwise. This implies that $$X = \sum_{i=1}^{200}X_i$$ represents the total number of names which are selected at least once. Since the $$X_i$$ are dependent, the exact distribution of $$X$$ is not-trivial, and the original question is hard to answer. Instead, we can easily determine the value of $$n$$ such that $$90\%$$ of the names are selected on average.

First, note that $$P(X_i = 0) = \left(\frac{200 - n}{200}\right)^{30}$$ which implies $$E(X_i) = P(X_i =1) = 1 - \left(1- \frac{n}{200}\right)^{30}.$$

Now by linearity of expectation we have $$E(X) = \sum_{i=1}^{200}E(X_i) = 200\left(1 - \left(1- \frac{n}{200}\right)^{30}\right).$$

For this expectation to equal $$90\%$$ of the names, we need to set $$E(X) = 180$$ and solve for $$n$$. This gives $$n = 200\left(1 - (1 - 0.9)^{1/30}\right) = 14.776.$$

Thus $$n=15$$ names should be drawn from the list each time for this to occur on average. This answer will be close to (but not the same as) the original question with $$50\%$$ certainty. To achieve $$90\%$$ certainty, we will need to increase $$n$$.

## Simulations.

First, we write a function which is able to generate $$X$$ a large number (say $$M$$) times for a given value of $$n$$.

sample_X <- function(n, M){
X <- rep(NA, M)
for(i in 1:M){
#Set all names to false
names <- rep(FALSE, 200)
#Repeat process 30 times
for(k in 1:30){
#Sample n names from list
selection <- sample(200, n, replace=F)
#Mark that these names have been selected
names[selection] <- TRUE
}
#Let X be the number of selected names
X[i] <- sum(name_been_selected)
}
return(X)
}

Now, for a given value of $$n$$ we can approximate "the probability that at least $$90\%$$ of the names are selected", i.e. $$P(X \geq 180)$$. In R, this probability can be approximated by typing:

X <- sample_X(n, M=10000)
prob <- mean(X >= 180)

Repeating this for $$n = 14, 15, \cdots 20$$ gives us the following plot.

From the plot, we can determine that $$n=17$$ names must be selected in each round for the probability of selecting at least $$180$$ names to exceed $$0.9$$.

The blue line in the figure shows the exact simulations detailed above. The orange line is an approximation which is obtained by ignoring the dependency of the $$X_i$$ (see previous section) and assuming that $$X \sim \text{Binom}\left(200, 1 - \left(1- \frac{n}{200}\right)^{30}\right).$$

Although the assumption of independence is obviously incorrect, the probabilities obtained by this simple assumption are reasonably close to the simulated probabilities.

• There appear to be bugs. Why are you sampling n from 200 names when you should always be sampling 30? When I compute the exact solution (using a method similar to the one you posted yesterday but deleted) or when I perform a simulation I get answers very much like your deleted answers. In particular, the chance of collecting 180 or more names in 17 iterations is 99.26%; in 16 iterations it is 95.46%; and in 15 iterations it is 81.14%, whence 16 iterations will do the job. A simple but accurate estimate is the ceiling of $\log(0.10)/\log(1-30/200)= 14.2,$ or 15. – whuber Jan 8 '20 at 5:10
• @whuber, perhaps we are interpreting the question differently. The original question is quite vague, but my best interpretation is that $n$ names are sample from the list of $200$, and this is repeated $30$ times: "thirty times, names are selected..." and "how many names should be selected each time " – knrumsey Jan 8 '20 at 5:20
• I'm sorry--I confused you with the author of the deleted post. There are too many "*-Reinstate Monica" user names here. :-). Upon rereading the question (several times, because it's strangely phrased) I have to agree with you: I mixed up "names" and "times" in my interpretation. +1 to you--but note that an exact solution still is relatively easy to obtain. Simply update the generating polynomial for the distribution 30 times. – whuber Jan 8 '20 at 5:30
• I am hoping that the author of the deleted post will make the small changes need to reflect your (correct) interpretation and undelete it, because it's a nice post. – whuber Jan 8 '20 at 5:39
• @filbranden, that's relatively close to what I get: $97.8\%$. – knrumsey Jan 8 '20 at 16:32

# Here is a general analytic solution --- does not require simulation

This is a variation on the classical occupancy problem, where you are sampling lots of thirty names at each sampling point, instead of sampling individual names. The simplest way to compute this result is by framing the problem as a Markov chain, and then computing the required probability using the appropriate power of the transition probability matrix. For the sake of broader interest to other users, I will generalise from your example by considering a list with $$m$$ names, with each sample selecting $$1 \leqslant h \leqslant m$$ names (using simple-random-sampling without replacement).

The general problem and its solution: Let $$0 \leqslant K_{n,h} \leqslant m$$ denote the number of names that have been sampled after we sample $$n$$ times with each lot sampling $$h$$ names. For a fixed value $$h$$ the stochastic process $$\{ K_{n,h} | n = 0,1,2,... \}$$ satisfies the Markov assumption, so it is a Markov chain. Since each sampling lot is done using simple-random-sampling without replacement, the transition probabilities for the chain are given by the hypergeometric probabilities:

$$P_{t,t+r} \equiv \mathbb{P}(K_{n,h} = t+r | K_{n-1,h} = t) = \frac{{m-t \choose r} {t \choose h-r}}{{m \choose h}}.$$

Let $$\mathbf{P}_h$$ denote the $$(m+1) \times (m+1)$$ transition probability matrix composed of these probabilities. If we start at the state $$K_{0,h} = 0$$ then we have:

$$\mathbb{P}(K_{n,h} = k) = [ \mathbf{P}_h^n ]_{0,k}.$$

This probability can be computed by matrix multiplication, or by using the spectral decomposition of the transition probability matrix. It is relatively simple to compute the mass function of values over $$k=0,1,...,m$$ for any given values of $$n$$ and $$h$$. This allows you to compute the marginal probabilities associated with the Markov chain, to solve the problem you have posed.

The problem you have posed is a case of the following general problem. For a specified minimum proportion $$0 < \alpha \leqslant 1$$ and a specified minimum probability $$0 < p < 1$$, we seek the value:

$$h_* \equiv h_* (\alpha, p) \equiv \min \{ h = 1,...,m | \mathbb{P}(K_{n,h} \geqslant \alpha m) \geqslant p \}.$$

In your problem you have $$m=200$$ names in your list and you are taking $$n=30$$ samples. You seek the value $$h_*$$ for the proportion $$\alpha = 0.9$$ and the probability cut-off $$p = 0.9$$. This value can be computed by computing the relevant marginal probabilities of interest in the Markov chain.

Implementation in R: We can implement the above Markov chain in R by creating the transition probability matrix and using this to compute the marginal probabilities of interest. We can compute the marginal probabilities of interest using standard analysis of Markov chains, and then use these to compute the required number of names $$h_*$$ in each sample. In the code below we compute the solution to your problem and show the relevant probabilities increasing over the number of samples (this code takes a while to run, owing to the computation of matrix-powers in log-space).

#Create function to compute marginal distribution of Markov chain
COMPUTE_DIST <- function(m, n, H) {

#Generate empty matrix of occupancy probabilities
DIST <- matrix(0, nrow = H, ncol = m+1);

#Compute the occupancy probabilities
for (h in 1:H) {

#Generate the transition probability matrix
STATES <- 0:m;
LOGP <- matrix(-Inf, nrow = m+1, ncol = m+1);
for (t in 0:m) {
for (r in t:m) {
LOGP[t+1, r+1] <- lchoose(m-t, r-t) + lchoose(t, h-r+t) - lchoose(m, h); } }
PP <- exp(LOGP);

#Compute the occupancy probabilities
library(expm);
DIST[h, ] <- (PP %^% n)[1, ]; }

#Give the output
DIST;  }

#Compute the probabilities for the problem
m <- 200;
n <- 30;
H <- 20;
DIST <- COMPUTE_DIST(m, n, H);

From the marginal probabilities for the Markov chain, we can now compute the required value $$h_*$$ for your particular problem.

#Set parameters for problem
alpha  <- 0.9;
cutoff <- ceiling(alpha*m);
p      <- 0.9;

#Find the required value
PROBS <- rowSums(DIST[, (cutoff+1):(m+1)]);
hstar <- 1 + sum(PROBS < p);

#Show the solution and its probability
hstar;
[1] 17

PROBS[hstar];
[1] 0.976388

We can see here that we require $$h_* = 17$$ samples in order to obtain a minimum $$p=0.9$$ probability of sampling at least $$\alpha \cdot m = 180$$ of the names on the list. Below we show a plot of the probabilities for values $$h=1,...,20$$ with the required value highlighted in red.

#Plot the probabilities and the solution
library(ggplot2);
THEME <- theme(plot.title    = element_text(hjust = 0.5, size = 14, face = 'bold'),
plot.subtitle = element_text(hjust = 0.5, face = 'bold'));
DATA <- data.frame(h = 1:H, Probability = PROBS);
ggplot(aes(x = h, y = Probability), data = DATA) +
geom_point(size = 3, colour = 'blue') +
geom_point(size = 4, colour = 'red', data = DATA[hstar, ]) +
geom_hline(yintercept = p, size = 1, linetype = 'dashed') +
geom_segment(aes(x = hstar, y = 0, xend = hstar, yend = DATA[hstar, 2]),
colour = 'red', size = 1) +
annotate("text", x = hstar + 1, y = 0.1,
label = paste0('h = ', hstar), colour = 'red', fontface = 'bold') +
THEME +
ggtitle('Probability of required occupancy') +
labs(subtitle = paste0('(Occupancy problem taking ', n,
' samples of size h from ', m,
' units) \n (We require ', sprintf(100*alpha, fmt = '%#.1f'),
'% occupancy with ', sprintf(100*p, fmt = '%#.1f'), '% probability)'));

## The answer is $$n = 17$$, with $$P(N_{30}\ge180)=0.976388$$.

The approach I took to calculate the probability after 30 draws was to determine the probability of drawing seen vs. unseen names at each round.

When drawing $$n$$ names out of $$p=200$$ after having seen $$s$$ of them, let's call $$U_s$$ the number of names out of those $$n$$ which were previously unseen.

Then we have:

$$P(U_s = u) = \frac{\text{P}(200-s, u) \text{P}(s, n-u) \text{C}(n, u)}{\text{P}(200, n)}$$

The first term is the permutations of u previously unseen names, the second permutations of previously seen ones. The last term $$\text{C(n, u)}$$ accounts for the $$u$$ unseen names coming in different positions out of the $$n$$ drawn. The denominator accounts for all possible draws of $$n$$ names.

Having calculated that, we can look at successive draws of names. Let's call $$N_d$$ the total number of names after draw $$d$$.

Before the first draw, there will be no previously seen names, so in the first draw all $$n$$ names will be seen for the first time.

$$P(N_1=n)=1$$

We can then calculate the probability of drawing a certain number of names on draw $$N_{d+1}$$ by looking at the possibilities of drawing after $$N_d$$ and having a specific number of previously unseen names. Which we can calculate with:

$$P(N_{d+1} = x) = \sum_{i=0}^{n}{P(N_d = x-i) P(U_{x-i} = i)}$$

For example, if we're drawing $$n=16$$ every time, then drawing exactly 180 names in total in a specific drawing can be arrived at by drawing 164 names in the previous drawing an then drawing exactly 16 unseen names (totalling 180), or having previously seen 165 names and drawing 15 unseen and one previously seen name, and so on... Until the possibility of having seen 180 names in the previous iteration and drawing all 16 previously seen names.

At this point we can use iteration to calculate $$P(N_{30} \ge 180)$$ for different values of $$n$$.

## Iteration in Python:

This code uses Python 3 and as written requires Python 3.8 for math.comb() and math.perm() from the standard library (if using an older version of Python, you can use a different implementation of those functions.)

Let's start with $$P(U_s = u)$$:

from functools import lru_cache
from math import comb, perm

@lru_cache
def prob_unseen(n, p, s, u):
# Return  the probability of drawing
# exactly $$u$$ unseen names when
# drawing $$n$$ names out of a total of $$p$$,
# having previously seen $$s$$ of them.
return (perm(p-s, u) *
perm(s, n-u) *
comb(n, u) /
perm(p, n))

Pretty straightforward. Now for $$P(N_d = x)$$ let's use a list of 201 elements (indices go from 0 to 200) to track the probabilities for each $$x$$:

def names_in_draw(prev_draw, n):
# Calculate probabilities of finding
# exactly $$x$$ names in this draw,
# for every $$x$$, taking in consideration
# the probabilities of having drawn specific
# numbers of names in the previous draw.
p = len(prev_draw) - 1
this_draw = [0.0] * (p+1)
for x in range(n, p+1):
this_draw[x] = sum(
prev_draw[x-u] * prob_unseen(n, p, x-u, u)
for u in range(n+1))
return this_draw

Finally, let's calculate the probability for the number of names after $$d$$ draws.

def total_names(n, p, d):
# Calculate probabilities for finding
# exactly $$x$$ names after $$d$$ draws.
draw = [0.0] * (p+1)
draw[n] = 1.0  # first draw
for _ in range(d):
draw = names_in_draw(draw, n)
return draw

We start from the first draw, where we know for sure we'll draw $$n$$ unique names. Than we repeatedly calculate the probabilities $$d-1$$ times.

Finally, we can calculate the probability of drawing at least $$x$$ names, drawing $$n$$ out of $$p$$ at a time, performing $$d$$ drawings:

def prob_names(n, p, d, x):
# Return the probability of seeing
# at least $$x$$ names after $$d$$ drawings,
# each of which draws $$n$$ out of $$p$$ names.
return sum(total_names(n, p, d)[x:])

Finally, we can run this for a few values of $$n$$ to find the probabilities:

>>> for i in range(13, 20):
...     print(i, prob_names(i, 200, 30, 180))
13 0.058384795418431244
14 0.28649904267865317
15 0.6384959089930037
16 0.8849450106842117
17 0.976388046862824
18 0.9966940083338005
19 0.9996649977705089

So $$n=17$$ is the answer, with probability of 97.6388% of seeing at least 90% of the names. $$n=16$$ comes close, with 88.4945%.

(Since I had the code, I also looked at how many drawings of a single name are needed to see 90% of the names, with 90% probability. It turns out it's 503 drawings, or 454 drawings to see 90% of the names with 50% probability. Quite interesting result!)


# Maclaurin Series from sin(x) to cos(x) using derivative

I understand how to find the MacLaurin series for $$\sin(x)$$. $$\sum_{n=1}^\infty \frac{x^{2n-1}\cdot\!(-1)^{n-1}}{(2n-1)!}$$ Now I am trying to find the MacLaurin series for $$\cos(x)$$ by taking the derivative of the above sum with respect to $$x$$. Using power rule, I got the following series: $$\cos(x) = \sum_{n=1}^\infty \frac{x^{2n-2}\cdot\!\mathrm{(-1)}^{n-1}}{(2n-2)!}$$

However, the MacLaurin series is: $$\cos(x) = \sum_{n=0}^\infty \frac{x^{2n}\cdot\!\mathrm{(-1)}^{n}}{(2n)!}$$ How are these two $$\cos(x)$$ MacLaurin series equal? What makes the second one more correct than the series I got by taking the derivative of the $$\sin(x)$$ series.

A sort of related question: if you choose to start at $$n=1$$ vs $$n=0$$, how would you change the terms of the $$\sin(x)$$ Maclaurin series?

• The two series are the same. They only differ by "re-indexing". Shifting the start from $n=1$ to $n=0$ just replaces all the $n$'s by $(n+1)$ in the formula. – Nick Mar 6 at 21:34

You got twice the same series. Both$$\sum_{n=0}^\infty \frac{x^{2n}\cdot\!\mathrm{(-1)}^{n}}{(2n)!}\text{ and }\sum_{n=1}^\infty \frac{x ^{2n-2}\cdot\!\mathrm{(-1)}^{n-1}}{(2n-2)!}$$are equal to$$1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\cdots$$
To reindex, replace $$n$$ with $$n+1$$ in the summand of the first series and lower the range of $$n$$ by $$1$$ (so the new initial index will now be $$0$$ instead of $$1$$).
More generally, if the index $$n$$ runs from $$n=a$$ to $$n=b$$, then replace $$n$$ with $$n+K$$ in the summand and change the index limits to run from $$n=a-K$$ to $$n=b-K$$. You are essentially adding and subtracting $$K$$ from each value of $$n$$, so it is unchanged in the end. Symbolically: $$\sum_{n=a}^b t_n =\sum_{n=a-K}^{b-K}t_{n+K}$$


# How do you calculate a sum over a polynomial?

I know that given a polynomial $p(i)$ of degree $d$, the sum $\sum_{i=0}^n p(i)$ would have a degree of $d + 1$. So for example

$$\sum_{i=0}^n \left(2i^2 + 4\right) = \frac{2}{3}n^3+n^2+\frac{13}{3}n+4.$$

I can't find how to do this the other way around. What I mean by this, is how can you, when given a polynomial, calculate the polynomial which sums to it?

For example, if we know that

$$\sum_{i=0}^{n} p(i) = 2n^3 + 4n^2 + 2,$$

how can we find the polynomial $p(i)$?

• Are you asking how sums like $\sum_{i=0}^{n} p(i)$ can be calculated in general? – Antonio Vargas Sep 11 '15 at 15:42
• @AntonioVargas I'm asking how a polynomial can be written as a Sigma notation. So for example, the polynomial $2/3n^3+n^2+13/3n+4$ can be written as $\sum_{i=0}^n 2i^2 + 4$, but I have no idea how you would start. – Esoemah Sep 11 '15 at 15:46
• Okay, maybe the last part of the question should be written a little differently then. Is this your question?: If we know that $\sum_{i=0}^{n} p(i) = 2n^3 + 4n^2 + 2$, how can we find the polynomial $p(i)$? – Antonio Vargas Sep 11 '15 at 15:48
• Great, I've edited the question to try to clarify it. If you'd like you can also edit it by clicking the "edit" link just below the list of tags at the bottom of the question. – Antonio Vargas Sep 11 '15 at 16:00
• Short answer:$$p(n) = \left( \sum_{i=0}^n p(i) \right) - \left( \sum_{i=0}^{n-1} p(i) \right)$$ – Hurkyl Sep 11 '15 at 17:01

To rephrase, I believe the question is this:

Suppose that polynomials $p$ and $q$ have the property that $$\sum_{i=0}^n p(i) = q(n)$$ If you're given $q$, how can you find $p$?

First, this is a lovely question. I'd never really considered it, because we almost always study instead "if you know $p$, how do you find $q$?"

To answer though, turns out to be fairly simple. Write the following: \begin{align} q(n-1) &= p(0) + p(1) + \ldots + p(n-1) \\ q(n) &= p(0) + p(1) + \ldots + p(n-1) + p(n) \\ \end{align}

Now subtract the top from the bottom to get \begin{align} q(n) - q(n-1) &= p(n) \end{align}

As an example, in your case if we knew $$q(n) = 2n^3 + 4n^2 + 2$$ we'd find that $$p(n) = q(n) - q(n-1) = 2n^3 + 4n^2 + 2 - [2(n-1)^3 + 4(n-1)^2 + 2],$$ which you simplifies to $$p(n) = 6n^2 +2n - 2.$$

Let's do an example: we know that for $p(n) = n$, we have $q(n) = \frac{n(n+1)}{2}$. So suppose we were given just $q$. We'd compute \begin{align} q(n) - q(n-1) &= \frac{n(n+1)}{2} - \frac{(n-1)(n)}{2} \\ &= \frac{n^2 + n}{2} - \frac{n^2 - n}{2} \\ &= \frac{n^2 + n-(n^2 - n)}{2} \\ &= \frac{n^2 + n- n^2 + n}{2} \\ &= \frac{2n}{2} \\ &= n, \end{align} so that $p(n) = n$, as expected.

Note: As written, I've assumed that $p$ and $q$ are both polynomials. But the solution shows that if $q$ is a polynomial, then $p$ must also be a polynomial, which is sort of pleasing.

Post-comment remarks

As @Antonio Vargas points out, though, there's an interesting subtlety:

I've given a correct answer to my revised question, which was "If there are polynomials $p$ and $q$ satisfying a certain equality, then how can one find $p$ given $q$."

But suppose that there is no such polynomial $p$. My answer still computes an expression which $p$, if it existed, would have to match. But since no such $p$ exists, the computed expression has no value.

Or maybe I should say that it has a limited value: you can take the polynomial $p$ and compute its sum using inductive techniques and see whether you get $q$. If so, that's great; if not, then there wasn't any answer in the first place.

Fortunately, you can also do that "Does it really work" check much more simply. You just need to check the the $n = 0$ case: if $$\sum_{i = 0}^0 p(i) = q(0)$$ then all higher sums will work as well. And this check simplifies to just asking: is $$p(0) = q(0)?$$ In our example, $p(0) = -2$, while $q(0) = +2$, so it doesn't work out.

• It is, by the way, a nice exercise to show that if $q$ is a degree-$d$ polynomial, then $p(n)=q(n)-q(n-1)$ is a degree-$(d-1)$ polynomial. This operation is known as finite differencing and there are many close analogs with differentiation. – Steven Stadnicki Sep 11 '15 at 16:10
• Nice point; I've added further remarks. My test for whether things work out is that $p(0) = q(0)$ rather than that $p(-1) = 0$, but that's a tiny difference. – John Hughes Sep 14 '15 at 20:16
• Doesn't all this procedure remind a little: integrals and derivatives? – Widawensen Jul 1 '16 at 7:53

Which Polynomials Can Be Written as a Sum

By summing a Telescoping Series, we get \begin{align} \sum_{k=0}^n(p(k)-p(k-1)) &=\sum_{k=0}^np(k)-\sum_{k=0}^np(k-1)\\ &=\sum_{k=0}^np(k)-\sum_{k=-1}^{n-1}p(k)\\ &=p(n)-p(-1) \end{align} It turns out that not every polynomial can be written as a sum of other polynomials. To be written as a sum of polynomials $$p(n)=\sum_{k=0}^nq(k)$$ we must have $p(-1)=0$, and if that condition holds, then $q(k)=p(k)-p(k-1)$.

Finite Differences

$q(k)=p(k)-p(k-1)=\Delta p(k)$ is the first Backward Finite Difference of $p$.

Using the Binomial Theorem, we get the first backward finite difference of $x^n$ to be $$\Delta x^n=x^n-(x-1)^n=\sum_{k=0}^{n-1}(-1)^{n-k-1}\binom{n}{k}x^k$$ This shows that the first backward finite difference of a degree $n$ polynomial is a degree $n-1$ polynomial.

Thus, for $$p(k)=2k^3+4k^2+2$$ we have \begin{align} \Delta p(k) &=2\overbrace{\left[3k^2-3k+1\right]}^{\Delta k^3}+4\overbrace{\left[\vphantom{k^2}2k-1\right]}^{\Delta k^2}+2\overbrace{\left[\vphantom{k^2}\ \ \ 0\ \ \ \right]}^{\Delta 1}\\ &=6k^2+2k-2 \end{align} However, since $p(-1)=4$, we have $$\sum_{k=0}^n(6k^2+2k-2)=2n^3+4n^2-2$$ which is not $p(n)$. That is,

There is no polynomial $q(n)$ so that $\sum\limits_{k=0}^nq(k)=2n^3+4n^2+2$

Previous Question

The answer below was posted before the question was changed. It was

The other way around however, I'm still a bit lost. For example, given the polynomial $p(i) = 2i^3 + 4i^2 + 2$, how would you find $\sum_{i=0}^n p(i)$?

So what follows may seem to be off-topic.

There are several ways to approach this problem.

Binomial Polynomials

One is by writing the polynomial as a binomial polynomial: $$2k^3+4k^2+2=12\binom{k}{3}+20\binom{k}{2}+6\binom{k}{1}+2\binom{k}{0}$$ Then use the formula $$\sum_{k=0}^n\binom{k}{m}=\binom{n+1}{m+1}$$ to get \begin{align} \sum_{k=0}^n\left(2k^3+4k^2+2\right) &=12\binom{n+1}{4}+20\binom{n+1}{3}+6\binom{n+1}{2}+2\binom{n+1}{1}\\ &=\frac{3n^4+14n^3+15n^2+16n+12}6 \end{align}

Euler-Maclaurin Sum Formula

In most cases, the Euler-Maclaurin Sum Formula is an asymptotic approximation, but in the case of polynomials, it is exact. $$\sum_{k=0}^nf(k)\sim C+\int_0^nf(x)\,\mathrm{d}x+\frac12f(n)+\frac1{12}f'(n)-\frac1{720}f'''(n)+\frac1{30240}f^{(5)}(n)+\dots$$ where subsequent terms involve higher derivatives, which for polynomials will eventually vanish. In the case at hand, this gives the same answer as above.

• Now I have answered the new question. Unfortunately, there is no $q$ so that $p(n)=\sum\limits_{k=0}^nq(k)$ for this particular $p$. – robjohn Sep 11 '15 at 17:46


# Surjective and Unbounded functions

• Every surjective function from $\mathbb{R}$ to $\mathbb{R}$ is unbounded.
• Every unbounded function from $\mathbb{R}$ to $\mathbb{R}$ is surjective.

Is it possible for either of these statements to be false? I have a feeling there is some counterexample that I am missing but I cannot figure it out.

My understanding is that if a function is unbounded then for all $M\in\mathbb{R}$ there is an $x$ such that $|f(x)| \gt M$.

And the definition of surjective is that for all $b \in Y$, there exists an $x \in X$ such that $f(x) = b$.

Clearly if we have some $M$ in the image of this function there is an $x$ that exists such that $f(x) = M$ by the definition of surjective.

I dont know if I am thinking of this correctly, intuition needed. Thanks.

-
Your edit still does not give the right definition. Language is not commutative ("answer the exam and study" is not the same thing as "study and answer the exam"). When you say "$|f(x)|\gt M$ for all $M\in\mathbb{R}$" you are saying that the value of $f$ is always greater than any number. That's false for any function with values in $\mathbb{R}$. What you want to say is "For every $M\in\mathbb{R}$ there exists $x$ such that $|f(x)|\gt M$." This says that the $x$ you pick may depend on $M$. The other way, the $x$ must be independent of $M$. –  Arturo Magidin Mar 23 '11 at 16:52

Let's be a bit clearer: a function $f\colon X\to\mathbb{R}$ is unbounded if and only if for every $M\in\mathbb{R}$ there exists $x\in X$ such that $|f(x)|\gt M$. The quantifier ("for every") is important; otherwise, you are just saying that there is at least one $M$ with the property.

It is certainly true that a surjective function onto $\mathbb{R}$ (regardless of the domain) is unbounded. Simply note that for every $M\in\mathbb{R}$, there exists $N\in\mathbb{R}$ with $N\gt M$, $N\gt 0$. Since surjectivity of $f$ implies that for every $y\in\mathbb{R}$ there exists $x$ such that $f(x)=y$, then putting $y=N$ shows that there exists $x$ such that $f(x)=N$, hence $|f(x)|=f(x)\gt M$.

So you are correct in the first one.

The second one, however, is false: unbounded means you can always exceed any given bound. But it does not guarantee that you can always "hit" every value.

Consider the greatest integer function, $f(x)=\lfloor x\rfloor$: this is defined as follows $f(x) = \max\{n\in\mathbb{Z}\mid n\leq x\}$. For example, $f(3.5) = 3$, $f(e) = 2$, $f(-1.5) = -2$, $f(\sqrt{2}) = 1$.

Is $f$ surjective? Is $f$ unbounded?

-
For a simpler example, $f(x)=x^2$ is unbounded but not surjective. –  lhf Mar 23 '11 at 16:18
@lhf: Sure; lots of examples (-: The thing I like about this example as opposed to $x^2$ is that the image is full of gaps: no matter what $M$ you pick, there are always values $N,K\gt M$ for which there are $x$ with $f(x)=N$, but $f(x)\neq K$ for all $x$. –  Arturo Magidin Mar 23 '11 at 16:24
For the second one it says, an unbounded function that maps from X -> R, doesn't that mean its image must span R? –  1337holiday Mar 23 '11 at 16:29
@1337holiday: No. It just means that the image must be contained in $\mathbb{R}$, and be unbounded as a set. ("Span" is usually reserved for linear maps; there is no linearity assumption here). A "function from $\mathbb{R}$ to $\mathbb{R}$" just means the variable is real and the output is real. –  Arturo Magidin Mar 23 '11 at 16:31
@1337holiday: The "contrapositive" of "If P then Q" is "If not Q, then not P". The negation of "If P then Q" is "P and not Q". The contrapositive of "if unbounded, then surjective" would be "if not surjective, then bounded". This is also false (as my example shows: the function is not surjective, but it is not bounded). The negation of "if unbounded, then surjective" would be a function that is both unbounded and not surjective (like my example). A bounded function that is not surjective does not address the statement "if unbounded then surjective" at all. –  Arturo Magidin Mar 23 '11 at 16:42

For the first question, let's prove the contrapositive: bounded implies not surjective. So let $f$ be bounded. This means that there is a number $M$ such $|f(x)|\le M$ for all $x$. But then the value $M+1$ is never taken by $f$ and thus $f$ is not surjective.

For the second question, the function $f(x)=x^2$ is unbounded but not surjective.

-
But how is x^2 unbounded when f(x) = -1 does not exist? –  1337holiday Mar 23 '11 at 16:40
@1337holiday: Look at the definition of "unbounded": "For every $M$ there exists an $x$ such that $|f(x)|\gt M$." Is this true for $f(x)=x^2$? Yes: given ANY $M$, there is always a value of $x$ for which $|x^2|$ will be larger than $M$. The fact that it never takes the value $-1$ is completely irrelevant to the concept of boundedness. Graphically: "bounded" means that you can draw two horizontal lines in the plane in such a way that the graph of the function is always between the two lines. Is that true for $y=x^2$? –  Arturo Magidin Mar 23 '11 at 16:50
Wow this did it for me, i think i finally understand this! No it is not possible for this function, that is a good way to put it (draw 2 lines). –  1337holiday Mar 23 '11 at 16:54

This statement

• Every unbounded function from R to R is surjective is false. Counter example as lhf points out, any function $f(x)=x^{4n}$ for $n \in \mathbb{N}$.
-


# Euro 2008 Soccer Seedings

• November 21st 2007, 08:18 PM
chopet
Euro 2008 Soccer Seedings
Euro 2008 seedings for draw on Dec. 2 in Vienna:

Pot 1: Switzerland (hosts), Austria (hosts), Greece (holders), Netherlands

Pot 2: Croatia, Italy, Czech Republic, Sweden

Pot 3: Germany, Romania, Portugal, Spain

Pot 4: Poland, France, Turkey, Russia

4 groups will be created, with each Pot contributing 1 member to each group.
So Group A may have Switzerland, Croatia, Germany and Poland.

I was wondering about the probability for Netherlands, Italy, Germany and France to be drawn into the same group. Is it:
${1\over(4!)^4}$
• November 23rd 2007, 09:14 AM
TKHunny
Whoa!!! That is WAY too small. There are only $4^{4}$ ways to pick teams. You have selected one such way. There are only four ways to achieve the one way you have selected, that is, they must be selected together in one of the four selection rounds.

Pr(Selected in the first round) = (1/4)^4

The problem with the next step is that not all paths lead to the desired result. If any of the four teams is selected in the first round, they all must be. If any of the four teams is selected in the first round, but any of the others is not, the process ends. The ONLY way to get to round two is for NONE of the teams to be selected in round 1. There are only a few ways to do that.

Pr(None selected in round 1) = (3/4)^4

Thus, Pr(Selected in round 2) = (3/4)^4*(1/3)^4, since round 2 doesn't exist without its dependence on the outcome of round 1.

Using the same logic:

Pr(Selected in round 3) = (3/4)^4*(2/3)^4*(1/2)^4

If we get to round four with hope, obviosuly they will be selected together.

Pr(selected in round 4) = (3/4)^4*(2/3)^4*(1/2)^4*(1)^4

Thus, (3/4)^4 + (3/4)^4*(1/3)^4 + (3/4)^4*(2/3)^4*(1/2)^4 + (3/4)^4*(2/3)^4*(1/2)^4*(1)^4 = 4*(1/4)^4 = 0.015625
• November 23rd 2007, 10:20 AM
Plato
I missed this question when it was first posted.
There is another way to see the answer is $\frac{1}{{\left( {4!} \right)^3 }}$.
Think of the first row of host teams as urns: S, A, G, N.
Then arrange those four letters on each of the three lines to provide one possible selection.
• November 26th 2007, 03:27 AM
chopet
Hi Plato, I was thinking along the same line as you but I missed out fixing the top line.

But the answer is too small. and TKHunny's one is more intuitively correct.
Then I realise we should fix even more than we should.

Let's give each country a label, with Pot 1 labelled A1,A2,A3,A4, and so forth, and we can create a table with the rows representing the pots and the columns representing the groups:

1A 1B 1C 1D
2A 2B 2C 2D
3A 3B 3C 3D
4A 4B 4C 4D

Each row can be arranged in 4! way. There are 4 rows giving: $4!^4$ ways.
But I am interested only in:

x x 1C x
x x 2C x
x x 3C x
x x 4C x

I don't care what happens to all other groups, so I have to divide by $3!^4$ ways.
And the group {1C,2C,3C,4C} can exist in column 1, 2, 3 or 4, I divide by 4.

Finally, the probability is: $4{ {3!^4}\over{4!^4}}={1\over 4^3}=0.015625$

Thanks guys!
• November 27th 2007, 11:10 PM
PHANTOM
Just like Plato said
I agree with the answer Plata wrote.

every POT has 4 members and the way we scatter these 4 members into different groups is : 4!

We have 4 pots, so the number of ways for all combinations is: 4! x 4! x 4! x 4!
that's the number of elements of the sample space.

now lets figure out how many elements of the sample space account for " the 4 specific teams being together". There are 4! ways to arrange the 4 groups.

so P= 4!/(4!)^4= 1/(4!)^3 same as Plato's answer.
• November 30th 2007, 04:05 AM
chopet
Your method doesn't discount the fact that while your 4 countries are in the same group, any 4 OTHER countries can make up the OTHER groups.

e.g.
{France,Germany,Italy,Holland} in one group is what we want.

{Austria,Croatia,Spain,Poland} in another group is actually INDISTINGUISHABLE from
{Switzerland,Croatia,Spain,Poland}
or
{Switzerland, Sweden,Spain,Poland}
or
{Sweden, Czech, Portugal,Poland}
...

I can go on, but I know you have $3!^4$ groups to discount.


# Reduced row echelon form of an augmented matrix is not unique

I am given a sysetem of linear equations which after graphing, have no solution (the three lines intersect at different points). Now I am trying to prove this algebraically.

As an augmented matrix,

$$\begin{bmatrix} 1 & -1 & 3 \\ 1 & 1 & 1\\ 2 & 3 & 6\\ \end{bmatrix}$$

• $$R_{1}-R_{2} \Rightarrow R_{2}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & -2 & 2\\ 2 & 3 & 6\\ \end{bmatrix}$$

continue from here in $$(1)$$ or $$(2)$$

$$(1)$$

• $$R_{1}-\frac{1}{2}R_{3} \Rightarrow R_{3}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & -2 & 2\\ 0 & -\frac{5}{2} & 0\\ \end{bmatrix}$$

• $$-\frac{1}{2}R_{2} \Rightarrow R_{2}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & 1 & -1\\ 0 & -\frac{5}{2} & 0\\ \end{bmatrix}$$

• $$\frac{5}{2}R_{2} + R_{3} \Rightarrow R_{3}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & 1 & -1\\ 0 & 0 & -\frac{5}{2}\\ \end{bmatrix}$$

Then in RREF

$$\begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & -1\\ 0 & 0 & -\frac{5}{2}\\ \end{bmatrix}$$

$$(2)$$

• $$-2R_{1}+R_{3} \Rightarrow R_{3}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & -2 & 2\\ 0 & 5 & 0\\ \end{bmatrix}$$

• $$-\frac{1}{2}R_{2} \Rightarrow R_{2}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & 1 & -1\\ 0 & 5 & 0\\ \end{bmatrix}$$

• $$-5R_{2} + R_{3} \Rightarrow R_{3}$$

$$\begin{bmatrix} 1 & -1 & 3 \\ 0 & 1 & -1\\ 0 & 0 & 5\\ \end{bmatrix}$$

Then in RREF

$$\begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & -1\\ 0 & 0 & 5\\ \end{bmatrix}$$

which is different from the RREF in $$(1)$$

Can someone explain why I end up with a different RREF? I thought all RREF are unique, but clearly not in this case. Of course as mentioned earlier, the system has no solutions and both augmented matrices show this but their RREF's are not unique still.

• I'm not sure if RREF are only unique for coefficient matrices instead of augmented matrices. Or if RREF are only unique for consistent systems Sep 16, 2020 at 0:43


• # Boolean Matrix Operations

Join Coursera for free and transform your career with degrees, certificates, Specializations, & MOOCs in data science, computer science, business, and dozens of other topics. The boolean type¶. Boolean Algebra Calculator Circuit Diagram. You can also remember operator precedence using the PEMDAS acronym, which stands for Parentheses, Exponent, Multiply And Divide, Add and Subtract. Access Management, Folder access matrix, logical access control. The logical operators are typically used in decision making like in an "if" statement, which we will see later. The product is in a way the opposite of boolean sum. Operator in java is a symbol that is used to perform operations. View Animesh Raj Vardhan’s profile on LinkedIn, the world's largest professional community. Quantitative measurement is replaced by a simple light-or-no-light decision, something optics can do well. Properties of matrix multiplication. From the operators point of view, Scilab is able to fulfil arithmetic calculations, comparison and logical operations. A and B must be matrices with the same dimensions or one from them must be a single boolean. How to perform element wise boolean operations on numpy arrays [duplicate] Logical operators for Is there a canonical way of doing element wise boolean. BOOLEAN RANK Matrix rank. Operator Precedence. Boolean matrices is to treat them as integer matrices, and apply a fast matrix multiplication algorithm over the integers. Certain MATLAB ® functions and operators return logical values to indicate fulfillment of a condition. In this video, I go through an easy to follow example that teaches you how to perform Boolean Multiplication on matrices. Define boolean operation. If you have never used logical operators in Matlab, this is a MUST-READ!. We want the matrix multiplication to preserve the structure of Boolean algebra. Logical operators Another key concept in programming is the ability to test a conditional statement and make decisions about the flow of the program based on the truth value of the statement. For example, the following two expressions are equivalent. The built-in VBA operators consist of mathematical operators, string operators, comparison operators and logical operators. Boolean Algebra Calculator Circuit Diagram. Adjacency matrix representation. Fast sparse boolean matrix product with possible preprocessing. download crud matrix for atm system free and unlimited. Conceptual, logical and Physical data model Conceptual, logical and physical model or ERD are three different ways of modeling data in a domain. Linear algebra, like matrix multiplication, decompositions, determinants, and other square matrix math, is an important part of any array library. These variables can be used to define matrices of booleans, with the usual syntax. gL is the logical operation and g is the corresponding physical operation. As with vectors, in this context we call a number a scalar in order to emphasize that it is not a matrix. , the product of two n nmatrices can be computed in O(n3 ) additions and multiplications over the ﬁeld. Statements that use the logical operators return Boolean (TRUE or FALSE) values. A logical matrix, in the finite dimensional case, is a -dimensional array with entries from the boolean domain Such a matrix affords a matrix representation of a -adic relation. Operators and Elementary Operations Arithmetic, relational, and logical operators, special characters, rounding, set functions The MATLAB ® language uses many common operators and special characters that you can use to perform simple operations on arrays of any type. frame object. Two LOGICAL expressions combined with an. For !, a logical or raw vector(for raw x) of the same length as x: names, dims and dimnames are copied from x, and all other. An adjacency matrix is a way of representing a graph G = {V, E} as a matrix of booleans. The logical operations are also generally applicable to all objects, and support truth tests, identity tests, and boolean operations: operator. List of operators. Of course, if during the working of the device, an adversary turns on unwanted interactions, such as a Hamiltonian on the control qubit that is not diagonal in the logical basis, this could prevent the device from implementing the correct operation on the systems of interest. Boolean Algebra. It is instead defined so that it is analytic and continuous (the transition from $(-\infty, 1]$). In defining the effect that a logical operation has on two propositions, the result must be specified for all four cases. This section will simply cover operators and functions specifically suited to linear algebra. And actually, there's a logical reason why I centered addition at zero. GHELASE Daniela 2 1„Politehnica” University of Bucharest 2„Dunarea de Jos” University of Galati ABSTRACT The AutoCAD software is a power computer-aided design (CAD) system that can offers all users of graphics, 2D and 3D objects representation. In this article, you will learn about different R operators with the help of examples. BOOLEAN RANK Matrix rank. To date we have accommodated various brand to enhance our customer needs such as PELCO, Hikvision, Indigovision, FLIR , BOSCH ,AXIS ,HERNIS, Samsung , MOBOTIX, Phillips ,Honeywell ,Arecont Vision , Geovision, GUARDTECH ,SONY. com is a leading Professional Closed Circuit Television (CCTV) Surveillance Security System Distributor , Reseller & System Integrator in Malaysia. A logical matrix, in the finite dimensional case, is a -dimensional array with entries from the boolean domain = {,}. The best transitive closure algorithm known, due to Munro, is based on the matrix multiplication method of Strassen. Correspondence will be sent to the first author, unless otherwise indicated. Such a matrix affords a matrix representation of a k {\displaystyle k\!} -adic relation. The logical data type represents true or false states using the numbers 1 and 0, respectively. See _tensor_py_operators for most of the attributes and methods you’ll want to call. Logical Reasoning Questions and Answers Matrix Processing House reviews Based on Matrix Processing House Operations Manager. Logical Operators Logical operators are extremely useful in subsetting vectors and in controlling program ﬂow. Notably these do work bitwise for raw arguments. Selection is the means by which MATLAB makes decisions about the order in which it executes its statements. Operators are used to perform various operations on variables and constants. So setting every value >0 to 1 in the product will solve your issue. Boolean Operators In Matlab 2. They can be used to selectively execute code based on the outcome of the condition. Maintaining track of software licenses and renewal of antivirus, Inventory Management. THIS SITE IS FOR U. It is maintained by the Cinder team and Vendor driver maintainers. Apart from the classical arithmetic operators, R contains a large set of operators and functions to perform a wide set of matrix operations. For complex matrices, computes the complex conjugate (Hermitian) transpose. OpenSCAD User Manual/Mathematical Operators. Logical operators such as greater than, less than, and equal to are also defined in both matrix and colon versions (note that the equals operator is ==, as opposed to = for assignment). All that is required is to extend this to the rest of the possible GPA's - the full code is in the section below, along with an image of the graph it will create. ) and functions like any, all, isnan, isinf, and isfinite. Python provides the boolean type that can be either set to False or True. A logical matrix, in the finite dimensional case, is a -dimensional array with entries from the boolean domain Such a matrix affords a matrix representation of a -adic relation. The future state unknown, but is either S1 or S2. ANNEX I – SINGLE FORM - LOGICAL FRAMEWORK MATRIX Guidelines These guidelines are drafted for information purposes only. Framework for classifying logical operators in stabilizer codes Beni Yoshida and Isaac L. Statements that use the logical operators return Boolean (TRUE or FALSE) values. Matrix Rank. This example program uses the literal constants true and false. I modify this program for my application: instead of using multiplication, addition, soustraction and division, i use Xor and & function as logical operators. Matrix Commands for Solving Linear Equations det Computes determinant of an array. tables of composition and nutritional values of organically produced feed materials for pigs and poultry soile. characteristic_polynomial() == A. Boolean Logic Operations A Boolean function is an algebraic expression formed using binary constants, binary variables and Boolean logic operations symbols. Know miscellaneous operations on arrays, such as finding the mean or max ( array. Monitoring and Evaluation Web-Based Tool,Mandeonline ,M&E Software Tools,Monitoring and Evaluation,monitoring and Evaluation software tool,social learning,web application,monitoring and Evaluation webbased tool,reporting tool ,donor tools,NGO software,project monitoring & evaluation,Balanced Scorecard,Donor Management,Annual Operation Plan,Results-Based Programme and Project Management: The. In this extension the logical operations are normally carried out in bitwise fashion on binary representations of those integers, comparing corresponding bits with corresponding bits to produce the output pixel value. The plus sign (+) and minus sign (-) can be used as prefix operators. Note that BMM can be computed using an algorithm for integer matrix multiplication, and so we have BMM for n !nmatrices is in O(n ) time, where !<2:373 (the current bound for integer matrix multiplication). But, for the beginner, they seem to often mysteriously fail, and it is difficult to understand why. The Boolean equal to operator is different from the evaluation operator. ModelicaReference. The transition from optical numerical matrix algebra to optical Boolean matrix algebra is explored in detail. View Animesh Raj Vardhan’s profile on LinkedIn, the world's largest professional community. Before we define an elementary operation, recall that to an nxm matrix A, we can associate n rows and m columns. A Boolean object combines two or more other objects by performing a Boolean operation or operations on them. As a similar post of mine Find all Combinations of a Matrix I am trying to find matrix combinations with entries $>0$ meaning for a matrix \begin{bmatrix} 0 & 1 & 3 \\ 5 & 2 & 1 \\ 0 & 0 & 10 \end{bmatrix}. Given a boolean matrix mat[M][N] of size M X N, modify it such that if a matrix cell mat[i][j] is 1 (or true) then make all the cells of ith row and jth column as 1. com is a leading Professional Closed Circuit Television (CCTV) Surveillance Security System Distributor , Reseller & System Integrator in Malaysia. That is, islogical(ans) returns 1. Multiplication is denoted by an asterisk (*). Let U be a Boolean algebra with at least two elements. For more information, see how to Find Array Elements That Meet. The above operations are carried out through the menu that can divide everything that you want to run into logical groups that make it easier and quicker to tray; Quick launch of applications using hot keys; Logical grouping of commands; Using separators to make the. class theano. The below mentioned table gives the arithmetic operators hold up by R language. R Tutorial – We shall learn about R Operators – Arithmetic, Relational, Logical, Assignment and some of the Miscellaneous Operators that R programming language provides. We've seen the matrix before in Lecture 1 as a 2-D array. "Operations" is mathematician-ese for "procedures". Fast sparse boolean matrix product with possible preprocessing. They are shown in the following picture :. The result is an array of logical values the size of the array operand. expressions, which have a numerical value, and logical expressions, which evaluate to true or false. Intersection, union, complementation, and containment of elements is expressed in U. They are shown in the following picture :. SYMBOL in Matlab MEANING & logical AND operator |. A matrix construction values are converted to their boolean equivalent, so '' = false, 'foo' = true, 1 = true, 0 = false etc, according to normal PHP casting rules for boolean. If the left operand in a statement that contains the and operator is FALSE, the right operand is not evaluated. This example will help you understand, how the logical operators in R Programming are used in If statements. Examples of such statements are "Is A equal to B?". Logical operators in MATLAB are those that link logical statements together and return true (1) or false (0) in a logical matrix depending upon the nature of the logical operator and the value of the components. This section will simply cover operators and functions specifically suited to linear algebra. We've seen the matrix before in Lecture 1 as a 2-D array. Other output function operators can have a more profound effect on the operation of the function. When one operand is a list or matrix and another is an operand of some other type, the other operand is combined with each of the elements of the list or matrix. is the create matrix icon, which upon click will bring up a dialog box that allow us to create a matrix with speciﬁed number of rows and columns. Because the BLAS are efficient, portable, and widely available, they're commonly used in the development of high quality linear algebra software, LAPACK for example. The expression value is TRUE (1), if the values of x and y are true (not null). Mar 22, 2019 · In this article I have discussed briefly about almost all arithmetic and logical instructions of 8086 microprocessor. Visual and Graphical language unlike textual high-level, such as C, C++, Java…. Many times, logical operators are used to link together the results of several relational operators. Engaging math & science practice! Improve your skills with free problems in 'Solving Word Problems Using Matrix Operations' and thousands of other practice lessons. Keywords Boolean matrix decomposition · Boolean rank · Efﬁcient algorithm ·Educational database 1 Introduction Matrixdecomposition,a. Boolean Algebra. for i = 1:22 plot(C1(i, :), 'color', 'b'), hold on end Not sure how I can exclude the first column. Instead of a single index, we can use two indexes, one representing a row and the second representing a column. Quote: A man has integrity if his interest in the good of the service is at all times greater than his personal pride, and when he holds himself to the same line of duty when unobserved as he would follow if his superiors were present General S. We will now work our way through the table of identities, in order, making observations about each, usually including a "common sense" informal proof. R's binary and logical operators will look very familiar to programmers. Operator overloading allows C/C++ operators to have user-defined meanings on user-defined types (classes). Akin to other matrix factorizations, the factor matrices can be used. First, we define two characteristic matrices of a covering. Computing arXiv:1803. Generally, at least one is a variable. For example: +, -, *, / etc. 9% that fail. T = true(sz) is an array of logical ones where the size vector, sz, defines size(T). array_equal (a1, a2) True if two arrays have the same shape and elements, False otherwise. The original application for Boolean operations was mathematical logic, where it combines the truth values, true or false, of individual formulas. The order in which these actions occur is unimportant as it does not affect the final result. Matrix Operations a la Shmoop you look at Gilligan Huffington III CEO of Handbags. Definition 3. A Boolean matrix multiplication is the usual matrix multiplication with Boolean operations: 0 + 0 = 0 , 1. The most common comparison is between two numeric values. In the product dimension (horizontal) of the matrix, the life cycle of a typical product is represented. The operators act on each element of the vector. Using these operators can greatly reduce or expand the amount of records returned. There are versions of R available for Windows, Mac OS and Unix that can be freely downloaded over the Internet. A system of m Boolean equations in n variables can be stated in matrix form with the usual matrix operations such as Ax = b and Rw = r, where x ∈ B n and w ∈ B 2 n are Boolean vector variables. ModelicaReference. Each element in a cell array has a non-neglegable amount of overhead to define the size, shape, and type of the data it stores. matrix into a Boolean embedding matrix under orthogonal or near-orthogonal rotations. All logical operators take Booleans as operands and produce a Boolean. By boolean, or binary matrix, we mean a matrix whose entries are from the ﬁeld with two elements. It is built deeply into the R language. Oct 17, 2014 · Boolean and relational operators in Matlab 1. For complex matrices, computes the complex conjugate (Hermitian) transpose. A Boolean matrix can be expressed as a product of two Boolean matrices, where the ﬁrst matrix represents a set of meaningful. These basis states are analogous to the orthonormal unit vectors in Euclidean space. R has many operators to carry out different mathematical and logical operations. Like comparison operations, each element of an element-by-element boolean expression also has a numeric value (1 if true, 0 if false) that comes into play if the result of the boolean expression is stored in a variable, or. Visual and Graphical language unlike textual high-level, such as C, C++, Java…. An identity matrix is a square matrix with ones along the diagonal and zeros elsewhere. BOOLEAN RANK Matrix rank. Operator overloading allows C/C++ operators to have user-defined meanings on user-defined types (classes). Find the result of a multiplication of two given matrices. *) and exponentiation (. The values returned by MATLAB logical operators and functions, with the exception of bit−wise functions, are of type logical and are suitable for use with logical indexing. equations via matrix operations. 06 for µVision® armasm User GuideVersion 5Home > Symbols, Literals, Expressions, and Operators > Addition, subtraction, and logical operators 7. Level 1 BLAS do vector-vector operations, Level 2 BLAS do matrix-vector operations, and Level 3 BLAS do matrix-matrix operations. A Boolean object combines two or more other objects by performing a Boolean operation or operations on them. The complexity of subtraction operation is O(m*n) where m*n is order of matrices; Matrices Multiplication - The multiplication of two matrices A m*n and B n*p gives a matrix C m*p. Relational operators perform element-by-element comparisons between two arrays. When an expression includes several operators, it is called a compound expression. On this page, we will discuss these type of operations. rank Computes rank of a matrix. We have a symbology for denoting Boolean variables, and their complements. Thus (as in Stata) logical operators return one for true and zero for false. Instead of a single index, we can use two indexes, one representing a row and the second representing a column. If none are found, find returns an empty, 0-by-1 matrix. How to Contact The MathWorks: www. The idea: I am making quantization intervals with hQInt. Know miscellaneous operations on arrays, such as finding the mean or max ( array. Think of it as a replacement for multiple simple formulas or as a shorthand in which a single formula is provided will all the information required to carry out a complex operation. Boolean logic. In Map Algebra, operators apply a mathematical operation on input rasters and numbers. Note that BMM can be computed using an algorithm for integer matrix multiplication, and so we have BMM for n !nmatrices is in O(n ) time, where !<2:373 (the current bound for integer matrix multiplication). ) and functions like any, all, isnan, isinf , and isfinite. ☞This page belongs to resource collections on Logic and Inquiry. Logical operators in MATLAB are those that link logical statements together and return true (1) or false (0) in a logical matrix depending upon the nature of the logical operator and the value of the components. Planning a new project, representing some algorithm or some process, illustrating a solution to a given problem, representing process operations, analysing, designing, documenting, managing a process in various fields is always better to do in a way of flowchart and the types of flowcharts and diagrams are numerous. LFA, the Logical Framework Approach, is an instrument for objective-oriented planning of projects. A one-dimensional array corresponds to a vector, while a two-dimensional array corresponds to a matrix. Unary operators take an operand on the right. Consider the expression A + B * 5. The new object is a Compound Object of type Boolean. Operators and Elementary Operations Arithmetic, relational, and logical operators, special characters, rounding, set functions The MATLAB ® language uses many common operators and special characters that you can use to perform simple operations on arrays of any type. You can use those logical values to index into an array or execute conditional code. GHELASE Daniela 2 1„Politehnica” University of Bucharest 2„Dunarea de Jos” University of Galati ABSTRACT The AutoCAD software is a power computer-aided design (CAD) system that can offers all users of graphics, 2D and 3D objects representation. SAS Operators in Expressions. Along with the standard unary and binary operators of conventional alge-braic notation,AMPL provides iterated operators likesumand prod, and a conditional (if-then-else) operator that chooses between two expressions, depending on the truth. We indicate which entries will be changed by performing an indexing operation on the left hand side and then specify the new values on the right hand side. The original application for Boolean operations was mathematical logic, where it combines the truth values, true or false, of individual formulas. Program (1): To perform addition, subtraction, multiplication, right division, left division and exponentiation operations on x and y given as x = 2; y = 3, in MATLAB. Logical operation definition, Boolean operation. However, it is. We can do operations such as addition and multiplication on the matrix in R. To use an operator with a raster, the raster must be a Raster object. The period character (. The function of Definition 7 is applied to the cell matrix B m × n. Boolean operations with non-manifold objects or objects that are not water-tight will fail when non-manifold parts interact in the boolean operation. Input: The first line of input contains an integer T denoting the number of test cases. The single quote character may also be used to delimit strings, but it is better to use the double quote character, since that is never ambiguous. It is an algorithm for mining multidimensional association rules from relational databases. Note that BMM can be computed using an algorithm for integer matrix multiplication, and so we have BMM for n !nmatrices is in O(n ) time, where !<2:373 (the current bound for integer matrix multiplication). These variables can be used to define matrices of booleans, with the usual syntax. The PowerShell logical operators evaluate only the statements required to determine the truth value of the statement. Array formulas can be understood as a combination of Array Constants, Array Operators and Array Ranges. Matrix Arithmetic cross Computes cross products. The implementation of left-shift and right-shift operators is significantly different on Windows for ARM devices. Chuang Department of Physics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA (Received 30 January 2010; published 4 May 2010) Entanglement, as studied in quantum information science, and nonlocal quantum correlations, as studied. max(), array. Animesh Raj has 8 jobs listed on their profile. But, for the beginner, they seem to often mysteriously fail, and it is difficult to understand why. That is, they operate on numbers (normally), but instead of treating that number as if it were a single value, they treat it as if it were a string of bits, written in twos-complement binary. A token is the smallest element in a program that is meaningful to the compiler. A boolean variable is %T (for "true") or %F (for "false"). Some of them can come in pretty handy, though, if you need to flip. Basically, it returns the opposite Boolean value of evaluating its operand. Relational and Logical Operators. 4 - GLSL Operators (Mathematical and Logical)¶ GLSL is designed for efficient vector and matrix processing. This class contains various functions (methods) that operate on Boolean matrices. eq (a, b) ¶. Basic operators in Scilab Scilab is capable of simple mathematical calculation as well as complex calculations. , the product of two n nmatrices can be computed in O(n3 ) additions and multiplications over the ﬁeld. In other words, 235 is the addition of 128+64+32+8+2+1. Its members are TRUE if the corresponding members in the original vector are to be included in the slice, and FALSE if otherwise. If you have never used logical operators in Matlab, this is a MUST-READ!. For matrices, there are three basic row operations; that is, there are three procedures that you can do with the rows of a matrix. They take each bit in one operand and perform the operation with the corresponding bit in the other operand. - Proven ability to motivate, encourage and support direct managers in building high performance teams across a regional/international cross-functional matrix environment. matrix into a Boolean embedding matrix under orthogonal or near-orthogonal rotations. It evaluates to a single logical value. Instead of elementary algebra where the values of the variables are numbers, and the prime operations are addition and multiplication, the main operations of Boolean algebra are the conjunction and denoted as ∧, the disjunction or denoted as ∨, and the negation not denoted as ¬. R's binary and logical operators will look very familiar to programmers. For !, a logical or raw vector(for raw x) of the same length as x: names, dims and dimnames are copied from x, and all other. Package bitops has similar functions for numeric vectors which differ in the way they treat integers 2^31 or larger. "Operations" is mathematician-ese for "procedures". OF Boolean operator allows the user to specify how many terms from a list of terms must be present if it is not necessary to have all terms in the list. The basic laws used in Boolean algebra are commutative law, associate law, distributive law, identity law and redundance law. 4 Binary factorization is different from Boolean factorization in the sense. Both x and y have to be true in order for the solution to be true. True or false (Boolean) conditions. Jun 18, 2018 · So is there a way to extract the values into a matrix using logical operators? Using reshape or whatever to reshape the vector into matrix is forbidden in my case. These variables can be used to define matrices of booleans, with the usual syntax. You can think of an r x c matrix as a set of r row vectors, each having c elements; or you can think of it as a set of c column vectors, each having r elements. We will learn how to use relational operators and logical operators. Then X(L) specifies the elements of X where the elements of L are nonzero. is the create matrix icon, which upon click will bring up a dialog box that allow us to create a matrix with speciﬁed number of rows and columns. Boolean Operators You use logical operators in conditional expressions much as you use math operators in numeric expressions. a boolean matrix A = (aij) by an addition circuit actually means to “encode” the matrix A by paths in a directed acyclic graph. unless both parts are. LOGICAL Operators and Expressions. unique, which is useful if you need to generate unique elements, given a vector containing duplicated character strings. For example: +, -, *, / etc. dot Computes dot products. The logical data type represents true or false states using the numbers 1 and 0, respectively. Consider the expression A + B * 5. You drag and drop the empty Array on the Front Panel, next you find a Control or Indicator (Numeric, String, Boolean, etc,) and drag it into the empty Array. In this article I have discussed briefly about almost all arithmetic and logical instructions of 8086 microprocessor. In Boolean algebra you represent the logical values true and false by the numbers 1 and 0 respectively. The Boolean rank of an n-by-m binary matrix A is the least integer k such that there exists n-by-k binary matrix B and k-by-m binary matrix C for which A = B C. Matrix transpose operator. Array formulas (committed with CTRL+SHIFT+ENTER) have one restriction: You canít use Excel's logical operations AND, OR, etc. A system of m Boolean equations in n variables can be stated in matrix form with the usual matrix operations such as Ax = b and Rw = r, where x ∈ B n and w ∈ B 2 n are Boolean vector variables. 2012 While exploring the Julia manual recently, I realized that it might be helpful to put the basic vocabularies of Julia and R side-by-side for easy comparison. The Logical Operator block performs the specified logical operation on its inputs. All that is required is to extend this to the rest of the possible GPA's - the full code is in the section below, along with an image of the graph it will create. boolean operation synonyms, boolean operation pronunciation, boolean operation translation, English dictionary definition of boolean. com Product enhancement suggestions. This is a simple two minute mini-crossword puzzle designed to reinforce the nuanced Boolean Operators the lecture introduced: Near, Next, Proximity. power consuming than that of Boolean matrix. Inventory Management. Key to understanding the use of matrix operations is the concept of the matrix (array) formula. The classes "octmode" and "hexmode" whose implementation of the standard logical operators is based on these functions. Maintaining track of software licenses and renewal of antivirus, Inventory Management. These are the available functions for logical operators. Sep 01, 2017 · Free Online Library: Analysis of Reliability for the Gate Level Fault Tolerant Design using Probabilistic Transfer Matrix method. boolean operation synonyms, boolean operation pronunciation, boolean operation translation, English dictionary definition of boolean. Definition 3. end blocks). Matrix Algebra. These are the 4 basic boolean operations (AND, OR, XOR and NOT). It does this using make. The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3. All six of the standard comparison operations are available:. A function defined on Boolean matrices which depends on the elements of the matrix in a manner analogous to the manner in which an ordinary determinant depends on the elements of an ordinary matrix, with the operation of multiplication replaced by intersection and the operation of addition replaced by union. National Entrepreneurs' Day: 5 Ways You Can Avoid AI Startup Failure. Sida, like many other donor agencies, has decided to use, and to encour-. 4 Closures of Relations Ch 9. The logical operators and, or, nand, nor, xor, xnor and not are defined for BIT and BOOLEAN types, as well as for one-dimensional arrays containing the elements of BIT and BOOLEAN. com is now LinkedIn Learning! To access Lynda. IfA is the adjacency matrix of a random graph G(n,p), the entries in its kth power gives the number of walks of lengthk between each pair of vertices [4]. In Map Algebra, operators apply a mathematical operation on input rasters and numbers. However, a matrix value used as the condition in an if or while statement is only true if all of its elements are nonzero. Logical operation definition, Boolean operation. Most of the methods on this website actually describe the programming of matrices. The original application for Boolean operations was mathematical logic, where it combines the truth values, true or false, of individual formulas. The example below will show you how to use arithmetic operators in MATLAB. Free Online Library: Automated Boolean Matrix data representation scheme through AVL tree for mining association rules. Logical operators are almost always found in the context of Conditional and Loop Structures. com Web comp. A single scalar can be compared against each element in an array. National Entrepreneurs' Day: 5 Ways You Can Avoid AI Startup Failure. In this paper, an association rule mining algorithm base d on th e Boolean matrix (ABBM) is proposed. The result is logical 0 (FALSE) where and are both zero or nonzero. Boolean product of Equation (1a), noting that message passing derivation for factorization and completion using the XOR product of Equation (1b) is similar. Matrix Operations a la Shmoop you look at Gilligan Huffington III CEO of Handbags. Assignment operations, in which we change a value or values in a matrix, are performed in a very similar way to the indexing operations above. IDL has two operators used to multiply arrays and matrices. The Logical Operator block performs the specified logical operation on its inputs. Program (1): To perform addition, subtraction, multiplication, right division, left division and exponentiation operations on x and y given as x = 2; y = 3, in MATLAB. However, Mata does not have a boolean variable type. The expression value is TRUE (1), if the values of x and y are true (not null). I ask everyone, however, to be careful and not to write Subject lines like "matrix operations in STATA and MATA do not match!" unless they are certain they are right. We will learn how to use the if-statement, which is the most important method of selection. Does Matlab have a Boolean (sometimes called logical or binary) matrix multiplication function? I'm specifically talking about what's usually denoted by a circle with a dot in it to denote Boolean. Matrix Multiplication Calculator (Solver) This on-line calculator will help you calculate the __product of two matrices__. You will learn how to use logical operations to search large data matrix very quickly. Boolean Operators include AND, OR, XOR, or NOT and can have one of two values, true or false. NET Framework does not come with built-in support for matrix math,. IfA is the adjacency matrix of a random graph G(n,p), the entries in its kth power gives the number of walks of lengthk between each pair of vertices [4]. In order to define the specific function, relation, and symbols in question it is first necessary to establish a few ideas about the connections among them. Lecture 2 MATLAB basics and Matrix Operations page 11 of 19 Matrix operations: MATLAB is short for MATrix LABoratory, and is designed to be a tool for quick and easy manipulation of matrix forms of data. Boolean matrices is to treat them as integer matrices, and apply a fast matrix multiplication algorithm over the integers.


# Check this proof: If two columns/rows of a matrix are the same, the determinant is $0$.

I have written this proof stating that if two rows or columns of a matrix are the same, then the determinant of the matrix is equal to 0. Is it correct?

Let us say we have an n x n matrix A, shown below:

For some $$i,n \in \mathbb{N}$$.

If we say that $$r_{i} = [a_{i1}, a_{i2}, a_{i3} ... a_{in}]$$, a row vector, then we can rewrite the matrix A as:

If we then also create the swapped $$S_{ij}$$ matrix, i.e. swap rows $$i$$ and $$j$$ around, we have the matrix:

We know that if we swap two rows of a determinant, in this case rows $$i$$ and $$j$$, then the determinant will simply be the negative of the original determinant.We can say that the det(A) = -det(S). But, if these two rows are identical, then det(S) = det(A), so this means that det(A) = -det(A), so A must be equal to $$0$$.

• Yes, your solution is correct. Jun 26 '20 at 8:12
• It's easier to use that $\det$ is an alternating multilinear form, i.e., $$\det(a_1,\dots,a_i,\dots,a_j\dots,a_n)=-\det(a_1,\dots,a_j,\dots,a_i\dots,a_n).$$ Jun 26 '20 at 9:18

That seems to be correct. Another way to think about this is to consider what happens when there are two identical columns/rows. Then, the number of linearly independent columns/rows is less than $$n$$ for a given $$n \times n$$ matrix. Hence, the matrix does not have maximal rank so the determinant has to be 0.

Of course, I'm working off of the idea that you've defined the determinant as the unique map $$det: M(n \times n, \mathbb{F}) \to \mathbb{F}$$ such that:

1. $$det$$ is linear in each row.

2. If $$rank(A) < n$$, then $$det(A) = 0$$.

3. $$det(E_n) = 1$$.

If you're not working off of these assumptions, that's fine. What you have written is fine too.

In essence, yes, your proof is very correct, and thorough.

For further clarification you can see this video https://www.khanacademy.org/math/linear-algebra/matrix-transformations/determinant-depth/v/linear-algebra-duplicate-row-determinant which gives a very thorough breakdown of your proof.

Yes, this is indeed a valid proof which you can see on occasion in published works.

If you have two (or more) rows which are linearly related, you can resolve some rows to zero. (Check out gaussian elimination to see how row reduction works.) By the way this proof is valid indeed.


# Explain Binary Search in Python

PythonServer Side ProgrammingProgramming

Binary search is a searching algorithm which is used to search an element from a sorted array. It cannot be used to search from an unsorted array. Binary search is an efficient algorithm and is better than linear search in terms of time complexity.

The time complexity of linear search is O(n). Whereas the time complexity of binary search is O(log n). Hence, binary search is efficient and faster-searching algorithm but can be used only for searching from a sorted array.

## How does Binary Search work?

The basic idea behind binary search is that instead of comparing the required element with all the elements of the array, we will compare the required element with the middle element of the array. If this turns out to be the element we are looking for, we are done with the search successfully. Else, if the element we are looking for is less than the middle element, it is sure that the element lies in the first or left half of the array, since the array is sorted. Similarly, if the element we are looking for is greater than the middle element, it is sure that the element lies in the second half of the array.

Thus, Binary search continuously reduces the array into half. The above process is recursively applied on the selected half of the array until we find the element we are looking for.

We will start searching with the left index 0 and right index equal to the last index of the array. The middle element index (mid)is calculated which is the sum of the left and right index divided by 2. If the required element is less than the middle element, then the right index is changed to mid-1, which means we will now be looking at the first half of the array only. Likewise, if the required element is greater than the middle element, then the left index is changed to mid+1, which means we will now be looking at the second half of the array only. We will repeat the above process for the selected array half.

## How do we know if element is not present in the array?

We need to have some condition to stop searching further which will indicate that the element is not present in the array. We will iteratively search for the element in the array as long as the left index is less than or equal to the right index. Once this condition turns false and we haven’t found the element yet, this means that the element is not present in the array.

### Example

Let us take the following sorted array and we need to search element 6.

 2 5 6 8 10 11 13 15 16

L=0 H=8 Mid=4

 2 5 6 8 10 11 13 15 16

6<10, therefore take the first half.

H=Mid-1

L=0 H=3 Mid=1

 2 5 6 8 10 11 13 15 16

6>5, therefore choose the second half.

L=Mid+1

L=2 H=3 Mid=2

 2 5 6 8 10 11 13 15 16

6==6, an element found

Hence the element 6 is found at index 2.

## Implementation

From a given sorted array, search for a required element and print its index if the element is present in the array. If the element is not present, print -1.

The code for the implementation of binary search is given below.

### Example

Live Demo

def binary_search(arr,x):
l=0
r=len(arr)-1
while(l<=r):
mid=(l+r)//2
if(arr[mid]==x):
return mid
elif(x<arr[mid]):
r=mid-1
elif(x>arr[mid]):
l=mid+1
return -1
array=[1,2,3,4,5,6,7,8,9,10]
a=7
print(binary_search(array,a))
b=15
print(binary_search(array,b))

### Output

6
-1

Element 7 is present at index 6.

Element 15 is not present in the array, hence -1 is printed.

Published on 11-Mar-2021 09:11:09


# Sequence that converges to 0 but its function diverges

Let f(x)=-2x+1 if x<0 and f(x)=$x^2$+x if x>0. Give a sequence {$x_n$} in $\mathbb R$\ {0} such that {$x_n$} converges to zero but {f($x_n$)} diverges.

I've tried with the sequence {1/n} but it does not seem to work. I can't think of another sequence that would converge to zero. Can anyone help me out please?

Thanks.

• I am a little confused by what the question means by the function at x<0 and x>0. So the function of the sequence must diverge while the sequence converges. – Su003 Nov 17 '14 at 0:36
• If x is negative than the function value is computed by the first expression while if x is positive then the function value is computed by the second expression. For example, f(-1)=3 while f(1)=2 – JB King Nov 17 '14 at 0:42
• But x is a term of the sequence {$x_n$} right? – Su003 Nov 17 '14 at 0:53
• $x$ is just a variable while $x_n$ would be a subscripted variable. – JB King Nov 17 '14 at 0:59

How about $x_n=\frac{(-1)^n}{n}$ for a sequence that converges to zero but alternates in sign which would make the function values be different. Thus, the sequence here is: $-1,\frac{1}{2},-\frac{1}{3},\frac{1}{4},-\frac{1}{5},\cdots$

For odd $n$, the function values will converge to 1. The first few function values here would be $3,\frac{5}{3},\frac{7}{5}$ as the general term will be $\frac{n+2}{n}$ which could also be seen as $1+\frac{2}{n}$

For even $n$, the function values would be $\frac{1}{n^2}+\frac{1}{n}=\frac{n+1}{n^2}$ which would have function values of $\frac{3}{4},\frac{5}{16},\frac{7}{36},...\frac{11}{100}, .... \frac{101}{10,000},...\frac{1001}{1,000,000}$ which will likely converge to 0 from this side as the denominator is growing much faster than the numerator.

Putting these together, the function value sequence would look like this: $3,\frac{3}{4},\frac{5}{3},\frac{5}{16},\frac{7}{5},\frac{7}{36},\frac{9}{7},\frac{9}{64}..., \frac{2k+1}{2k-1},\frac{2k+1}{(2k)^2},\frac{2k+3}{2k+1},\frac{2k+3}{(2k+2)^2}...$ which doesn't converge since there are sub-sequences which converge to different values.

If you want, consider $\varepsilon=\frac{1}{10}$ and try to prove the function value sequence converge,i.e. there exists $L,N$ such that for all $n>N\implies|f(n)-L|<\varepsilon$.

If you believe they converge to 0, consider some big odd $n>N$ where the function value will be greater than 1 which doesn't work.

If you believe they converge to 1, consider some big even $n$ where the function value will be close to zero and more than .1 away from 1 as for $n=1000$ then the function value is $\frac{1001}{1,000,000}=.001001$. Any bigger even $n$ will have even smaller values to consider.

If you have an alternative proof of what is wrong with my above answers, show me the error.

• Does {f($x_n$)} diverge in this case? I tried it but it looks like it converges to 1. – Su003 Nov 17 '14 at 0:31
• @Su003, even terms will converge to $0$, odd terms to $1$. – lhf Nov 17 '14 at 0:33
• I understand this. But what is confusing me is that the question says that {f($x_n$)} must diverge. Does such an {$x_n$} work in this case? – Su003 Nov 17 '14 at 1:37

The main point here is that $f$ is not continuous at $x=0$. It does have one-sided limits at $x=0$, but they are different. So, you need to find a sequence that converges to $0$ but visits both sides infinitely often. The answer by JB King uses the simplest possible such sequence.


# How to find the maximum angular speed from a bar which rotates about an axis?

#### Chemist116

The problem is as follows:

A rigid bar of negligible mass has three particles whose masses are the same and are joined to the bar as indicated in the figure. The bar is free to rotate in a vertical plane about an axis with no friction perpendicular to the bar through point $P$ and is released from rest on the horizontal position at $t=0$. Find the maximum angular speed in radians per second attained by the bar. You may consider $g=9.8\frac{m}{s^2}$ and $d=4.2\pi$

The alternatives given are:

$\begin{array}{ll} 1.&1\,\frac{rad}{s}\\ 2.&2\,\frac{rad}{s}\\ 3.&3\,\frac{rad}{s}\\ 4.&4\,\frac{rad}{s}\\ \end{array}$

What I've attempted to solve this problem was to equate the potential energy and the rotational energy of the masses assuming there's a superposition of the moment of inertia of the masses.

This is translated as:

$mgh=\frac{1}{2}I\omega^2$

$mgh=\left(\frac{1}{2}m\left(\frac{4d}{3}\right)^{2}+\frac{1}{2}m\left(\frac{d}{3}\right)^{2}+\frac{1}{2}m\left(\frac{2d}{3}\right)^{2}\right) \times \omega^2$

But after following the procedure I can't find a way to cancel the 4.2$\pi$. Supposedly, the answer is the first choice. How can I get to that result?

#### skeeter

Math Team
$\omega_{max}$ will occur when the bar is at the vertical ...

$U_{g0}-U_{gf} = K_{Rf}-K_{R0}$

$mg \cdot \dfrac{4d}{3} + mg \cdot \dfrac{d}{3} - mg \cdot \dfrac{2d}{3} = mgd = \dfrac{1}{2} \cdot I \cdot \omega^2$

$I = m \cdot \dfrac{16d^2}{9} + m \cdot \dfrac{d^2}{9} + m \cdot \dfrac{4d^2}{9} = m \cdot \dfrac{7d^2}{3}$

$mgd = m \cdot \dfrac{7d^2}{6} \cdot \omega^2 \implies \omega = \sqrt{\dfrac{6g}{7d}}$

using the given value for $d$, which I suspect is mistaken, the result is close to 1 rad/sec

#### Chemist116

$\omega_{max}$ will occur when the bar is at the vertical ...

$U_{g0}-U_{gf} = K_{Rf}-K_{R0}$

$mg \cdot \dfrac{4d}{3} + mg \cdot \dfrac{d}{3} - mg \cdot \dfrac{2d}{3} = mgd = \dfrac{1}{2} \cdot I \cdot \omega^2$

$I = m \cdot \dfrac{16d^2}{9} + m \cdot \dfrac{d^2}{9} + m \cdot \dfrac{4d^2}{9} = m \cdot \dfrac{7d^2}{3}$

$mgd = m \cdot \dfrac{7d^2}{6} \cdot \omega^2 \implies \omega = \sqrt{\dfrac{6g}{7d}}$

using the given value for $d$, which I suspect is mistaken, the result is close to 1 rad/sec
Can you include some drawing to accompany your solution? I'm having a problem at identifying where's the height to establish the potential energy. When you rotate the bar about the axis which is represented by the orange dot, the bar is vertical right? But from where to where you put the height?

Why Initially do we have

$mg \cdot \dfrac{4d}{3} + mg \cdot \dfrac{d}{3}$

and why finally do we have:

$mg \cdot \dfrac{2d}{3}$

@skeeter Can you please represent the justification of this in a drawing?

I got that part of adding the moment of inertia due the principle of superposition of them and the rest is just logical, but...

$\omega = \sqrt{\dfrac{6g}{7d}}$

in this part is where I'm stuck. How on earth did you get an answer close to $1\frac{rad}{s}$?

If I do insert the given values, this would become into:

$\omega = \sqrt{\dfrac{6\times 9.8}{7\times 4.2 \times 3.14}} \approx 0.7980 \frac{rad}{s}$

Can you please explain this part? Or did I misunderstand something from your explanation? Any help please?

#### skeeter

Math Team
0.798 is closest to 1rad/sec, given the available choices ... note that I stated disagreement with your given value for $d = 4.2\pi$

For $\omega = 1 \text{\rad/sec}$, $d$ would need to equal to 8.4

Full explanation of the method used to find the maximum angular velocity is given in the following diagram

topsquark


Problem : Suppose that the series $$\sum_{}^{} a_k$$ converges and $${n_j}$$ is a strictly increasing sequence of positive integers. Define the sequence $$b_k$$ as follows :

$$b_1=a_1+...+a_{n_{1}}$$

$$b_2=a_{n_1+1}+...+a_{n_{2}}$$

...

$$b_k=a_{n_{k-1}+1}+...+a_{n_{k}}$$

Prove that $$\sum_{}^{} b_k$$ converges and that $$\sum_{}^{} a_k=$$ $$\sum_{}^{} b_k$$

My Proof :

Let $$s_m=\sum_{i=1}^{n_m} a_i$$ $$\forall m \in \mathbb{N}$$ then by definition, $$s_m=\sum_{i=1}^{n_m} a_i=\sum_{k=1}^{m} b_k$$

Since $$n_j$$ is strictly increasing sequence of positive integers, $$\lim_{m\to\infty}\ n_m= \infty$$

Since $$\lim_{m\to\infty}\ n_m= \infty$$ and $$\sum_{}^{} a_k$$ converges, $$\lim_{m\to\infty}\ s_m$$ exists and

$$\lim_{m\to\infty}\ s_m=$$ $$\lim_{m\to\infty}\sum_{i=1}^{n_m} a_i=$$ $$\sum_{}^{} a_k$$

Since $$\forall m \in \mathbb{N}$$ $$s_m=\sum_{k=1}^{m} b_k$$ and $$\lim_{m\to\infty}\ s_m$$ exists,

$$\sum_{}^{} b_k$$ converges and $$\sum_{}^{} a_k$$=$$\sum_{}^{} b_k$$

But, I'm not sure my proof is correct. Please give me feedback on my proof.

Yes, the idea of your proof is fine. However, your argument in the 2nd and 3rd line is unclear (among other things since $$n_j$$ is not defined). I suppose, in short your argument is:
Define $$s_n := \sum_{k = 0}^n a_k$$ and $$s_m := \sum_{k = 0}^m b_k$$. Then $$(s_m)_{m \in \mathbb{N}}$$ is a subsequence of $$(s_n)_{n \in \mathbb{N}}$$. Since $$\sum a_k$$ converges (by definition) $$(s_n)_{n \in \mathbb{N}}$$ converges, so does $$(s_m)_{m \in \mathbb{N}}$$ and thus $$\sum b_k$$ converges. Since limits are unique, they coincide.


# Combinatorial proof of $\binom{nk}{2}=k\binom{n}{2}+n^2\binom{k}{2}$

This identity was posted a while back but the question had been closed; the question wasn't asked elaborately, though the proof of the identity is a nice application of combinatorics and a good example for future reference.

Also, there was just a flat-out wrong answer which had a couple of upvotes, so I thought to give my own possible proof and sort of 'reopen' the question that was left. Hopefully this time the question will have enough context to stay alive.

As a side note: the given right side does not appear symmetric between $$k$$ and $$n$$. However, when $$\binom{m}{2}=m(m-1)/2$$ is inserted and the products expanded, only symmetric terms remain uncancelled. Rendering the right side as $$k^2\binom{n}{2}+n\binom{k}{2}$$ would give the same cancellations and the same net value.

Proof

Suppose you have a grid of $$n\times k$$ dots. Firstly, the amount of ways to connect any two dots is $$\binom{nk}{2}$$. Now consider the right-hand side. We can split the cases for which the connected dots are on the same column, row, or are in both different columns and rows.

If the two connected dots are in the same column, we can choose two points from any two different rows in $$\binom{n}{2}$$ ways, and we have $$k$$ columns for which the two points can be on the same column, which gives a total of $$k\binom{n}{2}$$ options. The same argument holds for constant rows: $$n\binom{k}{2}$$.

Now if neither the row nor the column can stay constant, we can pick any point in $$nk$$ ways, and choose the second point from the remaining $$(n-1)(k-1)$$ points; one column and one row will be unavailable. This gives us $$\frac{nk(n-1)(k-1)}{2}$$ options, as we have to rule out the double counting.

We will now show (algebraically) that $$n\binom{k}{2}+\frac{nk(n-1)(k-1)}{2}=n^2\binom{k}{2}$$. We have that $$\binom{k}{2}=\frac{k(k-1)}{2} =\frac{nk(n-1)(k-1)}{2n(n-1)} \iff n(n-1)\binom{k}{2}=\frac{nk(n-1)(k-1)}{2}=n^2\binom{k}{2}-n\binom{k}{2}$$ which leads to the equation above.

Combining these cases gives $$\binom{nk}{2}=k\binom{n}{2}+n\binom{k}{2}+\frac{nk(n-1)(k-1)}{2} = k\binom{n}{2}+n^2\binom{k}{2}$$

If there are any mistakes or improvements on the arguments, please feel free to point them out.

• Uh ... How is the left side symmetric when $n$ and $k$ are interchanged and the right side isn't? – Oscar Lanzi Mar 30 '19 at 22:28
• @OscarLanzi The right side is symmetric too, just not obviously so. – Michael Biro Mar 30 '19 at 22:32
• I have now explained it. Feel free to roll back the edit if you feel it is inappropriate. – Oscar Lanzi Mar 30 '19 at 23:11

I don't think you need as many cases, which saves a little algebra. We have $$k$$ groups of $$n$$ dots each, so choosing two of them can be done in $$\binom{nk}{2}$$ ways.
Alternatively, both are in the same group of $$n$$ which has $$\binom{k}{1} \cdot \binom{n}{2}$$ possibilities, or they are in different groups of $$n$$, which has $$\binom{k}{2} \binom{n}{1}^2$$ possibilities.
Therefore, $$\binom{nk}{2} = k \binom{n}{2} + n^2 \binom{k}{2}$$


# Is there any analysis method of non-differentiability?

I am not sure if this question is proper, if not please let me know I would delete it.

I understand a function can be continuous but not differentiable. I can also understand existence of non-differentiable functions. The question: is there a 'measure' (like distance) between two non-differnetiable functions. The word 'measure' here should not be taken literally. Consider two non-differentiable function $f(x)$ and $g(x)$ the question: is there a way to compare the two functions (like a distance measure ) which tells either $f(x)$ or $g(x)$ is easier to make it differentiable? Something like a how far the function is away from differentiable?

• I think this is a great question, and I hope it attracts lots of responses - it's unfortunate that you accepted an answer so quickly. Although you didn't want measure to be taken literally, actually, that does provide a bit of information: the sets on which functions are not differentiable can be compared by seeing which has larger measure. Functions which are differentiable almost everywhere can either have or lack more 'completely differentiable-like' properties, such as obeying the fundamental theorem of calculus - this turns out to be equivalent to absolute continuity. – forget this Jul 19 '18 at 2:13
• @CoryGriffith Does accepting answers reduce attention? – Creator Jul 19 '18 at 2:15
• I've seen comments to that effect on other answers, but I don't have any way of knowing myself. It seems plausible, though. – forget this Jul 19 '18 at 2:20
• @CoryGriffith Ok I will wait for few days and see what happens. thanks – Creator Jul 19 '18 at 2:22

There is Rademacher's theorem which says that a function that is Lipschitz continuous is differentiable (almost everywhere). So one way of interpreting your question is to "how close to Lipschitz continuous is a function". Lipschitz continuity is a specific case of Hölder continuity.

A function is $\alpha$-Hölder continuous for $\alpha\in (0,1]$ if

$$|f(x)-f(y)|<K|x-y|^\alpha$$

If $\alpha=1$ then we say the function is Lipschitz.

Note that if $f$ is $\alpha$-Hölder, then it is $\beta$-Hölder for $\beta<\alpha$.

So if $f$ is $.6$-Hölder and $g$ is $.7$-Hölder, then $g$ is "closer" to being Lipschitz, i.e. differentiable.

Here are some pictures of various functions that are of increasing Hölder continuity:

Hölder continuous for all $\alpha \in(0,0.15)$:

Hölder continuous for all $\alpha \in (0,0.55)$:

Hölder continuous for all $\alpha\in (0,0.75)$:

Hölder continuous for all $\alpha\in (0,0.95)$:

Note how the paths get "nicer"/closer to being able to differentiate.

• May I ask how did you get this plots? – Creator Jul 19 '18 at 2:01
• @Creator They are on the Wikipedia page on fractional Brownian motion – user223391 Jul 19 '18 at 2:02
• @Creator Oh hey, it's you! I remember talking rough paths with you on here. Thanks for asking such good questions. Didn't realize you were asking the question at first, haha. Feel free to shoot me an email or whatever if you want to talk rough paths. – user223391 Jul 19 '18 at 2:04
• This is the very reason I asked the question mathoverflow.net/questions/304654/… but it is shown to be related to Hurst parameter, but look at your plots now, so close to low and high SNR type. – Creator Jul 19 '18 at 2:04
• . . . nice . . . – janmarqz Jul 19 '18 at 2:22


# Using field axioms for a simple proof

Question: If $F$ is a field, and $a, b, c \in F$, then prove that if $a+b = a+c$, then $b=c$ by using the axioms for a field.

Relevant information:
Field Axioms (for $a, b, c \in F$):

$a+b = b+a$ (Commutativity)
$a+(b+c) = (a+b)+c$ (Associativity)
$a+0 = a$ (Identity element exists)
$a+(-a) = 0$ (Inverse exists)

Multiplication:
$ab = ba$ (Commutativity)
$a(bc) = (ab)c$ (Associativity)
$a1 = a$ (Identity element exists)
$aa^{-1} = 1$ (Inverse exists)

Distributive Property:
$a(b+c) = ab + ac$

Attempt at solution:
I'm not sure where I can begin. Is it ok to start with adding the inverse of a to both sides, as in the following?
$(a+b)+(-a) = (a+c)+(-a)$ (Justification?)
$(b+a)+(-a) = (c+a)+(-a)$ (Commutativity)
$b+(a+(-a)) = c+(a+(-a))$ (Associativity)
$b+0 = c+0$ (Definition of additive inverse)
$b = c$ (Definition of additive identity)

I'm wondering about my very first step. Specifically, the axioms don't mention anything about doing something to both sides of an equation simultaneously. Is there some other axiom I can use to justify this step?

This is Exercise 1, part b in Section 1 on page 2 of Halmos, Finite Dimensional Vector Spaces (reading book for fun--this is not homework (probably too easy to be a homework problem anyway!)). In part a, I proved that $0+a = a$, in case that is somehow helpful in this problem. Thanks!

• Just a minor note: you may want to write $1/a$ as $a^{-1}$ because you would want to define "/" later using the inverses and it wouldn't be good to have syntax with ambiguous parsing. – user21820 Jan 25 '14 at 11:33
• That's a good idea--I made the change. – Mike Bell Jan 25 '14 at 11:44

Martín-Blas Pérez Pinilla suggests that "=" can be considered a logical symbol obeying logical axioms. While I agree that it fundamentally is so, I would like to note that it is possible to consider it an equivalence relation obeying 'internal' field axioms, because for example the rational numbers can be taken as equivalence classes of a certain set of pairs of integers, and so it is not quite right to consider the equality between these rationals as a logical equality. Also, Ittay made a mistake where he used an unstated axiom that allows substitution. What you need, either way, is something equivalent to the following for any field $F$:

$a=a$ for any $a \in F$ [reflexivity of =]

$a=b \Rightarrow b=a$ for any $a,b \in F$ [commutativity of =]

$a=b \wedge b=c \Rightarrow a=c$ for any $a,b,c \in F$ [transitivity of =]

(These describe "=" as an equivalence relation on $F$)

$a=b \Rightarrow P(a)=P(b)$ for any $a,b \in F$ and predicate $P$ [substitution]

(This describes substitution, which can be used to replace separate axioms governing how "=" and the field operations interact. Ittay used this in one of his steps.)

These allow us to "do the same thing to both sides", for example:

For any $a,b,c \in F$ such that $a=b$,

Let $d=a+c$ [closure under +]

$a+c=a+c$ [transitivity of =; $a+c=d=a+c$]

$a+c=b+c$ [substitution; where the predicate is given by $P(x) \equiv (a+c=x+c)$]

Note that to prove that something is a field, we will have to prove the substitution axiom, which boils down to proving the following equivalent set of axioms:

$a=b \Rightarrow a+c=b+c$ for any $a,b,c \in F$

$a=b \Rightarrow ac=bc$ for any $a,b,c \in F$

The original problem can then be proven as follows:

For any $a,b,c \in F$ such that $a+b=a+c$,

$b = 0+b = (-a+a)+b = (-a)+(a+b) = (-a)+(a+c) = (-a+a)+c = 0+c = c$

• Hurkyl had given a comment indicating that we could use substitution of an argument of $+$ considered as a 2-argument function. As I noted, fields constructed through equivalence relations will still require one to prove the substitution rule before using, so it amounts to the same two more basic axioms that I gave. – user21820 Jan 25 '14 at 11:48

The first step is justified by the existence of $-a$. No further axiom is required in order to deduce that $(a+b)+(-a)=(a+c)+(-a)$. To see that, just write $a+b=y=a+c$ (after all, it is given that $a+b=a+c$). Now, one of the information defining a field is the function of addition: $(u,v)\mapsto u+v$. Applying it to $u=y$ and $v=(-a)$, yields the element $y+(-a)$. But, since $y=a+b$, $y+(-a)=(a+b)+(-a)$. Similarly, since $y=a+c$, $y+(-a)=(a+c)+(-a)$. By transitivity of equality, it follows that $(a+b)+(-a)=(a+c)+(-a)$.

Note that it would be a lot easier to add $(-a)$ on the left rather than on the right. It will save you using commutativity.

• The step where you substitute $(a+b)$ into $y$ requires another axiom such as substitution. (See my answer.) With substitution or the alternative, you can just do it in one line. And that very axiom is the most important part of the problem! – user21820 Jan 25 '14 at 11:19
• Yes, you can put $(-a)$ on the left. But the axiom says $a + (-a) = 0$, not $(-a) + a = 0$. So you have to use Commutativity anyway! – TonyK Jan 25 '14 at 11:26

"Specifically, the axioms don't mention anything about doing something to both sides of an equation simultaneously." Because is a logical axiom. If you have two equal things and do the same with both things the results are equal. Search "first order logic with identity".

• See also en.wikipedia.org/wiki/…, for when we don't have two equal things but have two things that behave the same way under some operations, and we still want to have 'substitution'. – user21820 Jan 25 '14 at 11:29