Question

# For $$r = 0, 1, 2, ...., n$$, prove that $$C_{0}\cdot C_{r} + C_{1}\cdot C_{r + 1} + C_{2} \cdot C_{r + 2} + .... + C_{n - r} \cdot C_{n} = \ ^{2n}C_{(n + r)}$$ and hence deduce thati) $$C_{0}^{2} + C_{1}^{2} + C_{2}^{2} + ...... + C_{n}^{2} = \ ^{2n}C_{n}$$ii) $$C_{0}\cdot C_{1} + C_{1}\cdot C_{2} + C_{2}\cdot C_{3} + ..... + C_{n - 1} \cdot C_{n} = \ ^{2n}C_{n + 1}$$

Solution

## To prove:$$C_0.C_r+C_1.C_{r+1}+C_2.C_{r+2}+......+C_{n-r}.C_n={}^{2n}{C}_{n+r}$$$$i)C_0^2+C_1^2+C_2^2+........+C_n^2={}^{2n}{C}_{n}$$$$ii)C_0.C_1+C_1.C_{2}+C_2.C_{3}+......+C_{n-1}.C_n={}^{2n}{C}_{n+1}$$Solution:We know that,$$C_0+C_1x+C_2x^2+......+C_nx^n=(1+x)^n$$         $$...............(1)$$$$C_0x^n+C_1x^{n-1}+C_2x^{n-2}+......+C_n=(x+1)^n$$         $$...............(2)$$Multiplying eqn.$$(1)$$ and eqn.$$(2)$$ we get,$$(C_0+C_1x+C_2x^2+......+C_nx^n)$$ $$(C_0x^n+C_1x^{n-1}+C_2x^{n-2}+......+C_n)=(1+x)^{2n}$$            $$.............(3)$$Equating coeffiecients of $$x^{n-r}$$ from both sides of $$(3)$$ we get,$$C_0.C_r+C_1.C_{r+1}+C_2.C_{r+2}+......+C_{n-r}.C_n={}^{2n}{C}_{n+r}$$     $$..........(4)$$Now putting $$r=0$$ in eqn.$$(4)$$ we get,$$C_0.C_0+C_1.C_{1}+C_2.C_{2}+......+C_{n}.C_n={}^{2n}{C}_{n}$$or, $$C_0^2+C_1^2+C_2^2+........+C_n^2={}^{2n}{C}_{n}$$Now putting $$r=1$$ in eqn.$$(4)$$ we get,$$C_0.C_1+C_1.C_{2}+C_2.C_{3}+......+C_{n-1}.C_n={}^{2n}{C}_{n+1}$$Mathematics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


# Null Sets $\{\{\emptyset\}\} \subset\{\emptyset, \{\emptyset\}\}$

Regarding null sets, I'm wondering if anyone can explain this $\{\{\emptyset\}\} \subset \{\emptyset, \{\emptyset\}\}$ I don't understand how the left set is a proper set of the right set.

In particular, I'm wondering what the extra brace on the left means and how it is different from say just plain $\{\emptyset\}$. It seems if I disregard the outer brace in the left hand set, my answer matches that of the answer key (namely, true).

I'm posting this again because it was in the wrong stackexchange.

Thanks!

• Think of the curly braces used in set notation as specifying a box. An empty box isn't the same thing as a box that contains an empty box, right? So if you put each of those into a pair of even bigger boxes, the result is still two different sorts of things, right? – MPW Oct 14 '14 at 1:38

When you see curly braces around something, that means you have a set with that something as an element. For example, $\{ S \}$ is a set, and its only element is $S$. Similary, $\{1 \}$ is a set, and its only element is $1$. $\{Hi, Bye \}$ is a set, and it has two elements: Hi and Bye.

Similarly, when you have $\{ \{ \emptyset \} \}$, this is a set, and its only element is $\{ \emptyset \}$. It just so happens that the element of our set is a set itself, but there is nothing wrong with that.

Now, why is $\{ \{ \emptyset \} \} \subset \{ \emptyset, \{ \emptyset \} \}$? Well, to show a set $A$ is a subset of a set $B$, you need to show every element of $A$ is an element of $B$... But $\{ \{ \emptyset \} \}$ has only one element: $\{ \emptyset \}$. And is this element in the set $\{ \emptyset, \{ \emptyset \} \}$? Of course, it is the second element of that set.

So, every element of $\{ \{ \emptyset \} \}$ is an element of $\{ \emptyset, \{ \emptyset \} \}$.

Now the last question is: why is this containment proper? Well, to show a set $A$ is properly contained in a set $B$, you need to show that every element of $A$ is in $B$ (this shows $A$ is contained in $B$), and also that there is some element in $B$ that is not in $A$ (this shows $A$ and $B$ are not equal, i.e., $A$ is properly contained in $B$). Well, our $A$ is $\{ \{ \emptyset \} \}$ and our $B$ is $\{ \emptyset, \{ \emptyset \} \}$. Is there an element of our $B$ that is not in our $A$? Our $B$ has two elements and our $A$ only has one element. So there has to be an element in $B$ that is not in $A$, and actually, it is exactly the element $\emptyset$.

So, this explains why $\{ \{ \emptyset \} \} \subset \{ \emptyset, \{ \emptyset \} \}$.

• Thank you, it makes so much more sense now. – Vinnie Oct 14 '14 at 2:18
• @Kaleb You're welcome! – layman Oct 14 '14 at 2:44

The only element of $\{\{\varnothing\}\}$ is $\{\varnothing\}$ which is in $\{\varnothing, \{\varnothing\}\}$.

Thus it is a subset...

a general rule: $$a \in S \Rightarrow \{a\} \subset S$$ since, in your example $$\{\emptyset\} \in \{\emptyset,\{\emptyset\}\}$$ the result follows

$\{\{\emptyset\}\}$ is a set that has a set containing the empty set as a member.

$\{\emptyset\}$ is a set that has the empty set as a member.

$\{\emptyset,\{\emptyset\}\}$ is a set that has the empty set and a set containing the empty set as members.

Now $\{\{\emptyset\}\}\subset\{\emptyset,\{\emptyset\}\}$ because all the members of $\{\{\emptyset\}\}$, namely $\{\emptyset\}$, are in $\{\emptyset,\{\emptyset\}\}$.

But it is also true that $\{\emptyset\}\subset\{\emptyset,\{\emptyset\}\}$ since $\emptyset$ is also a member of $\{\emptyset,\{\emptyset\}\}$.

• Thank you that makes a lot of sense. However, what if I modified the question and said {{∅},a}⊂{∅,{∅},a,b,c}. Is it true because every element within the left side is in the right hand side set? Conversely, would this {{∅},x}⊂{∅,{∅},a,b,c} be false because not every element in the left is in the right? – Vinnie Oct 14 '14 at 2:11
• @Kaleb Yes, both of your assertions are correct. In general, if we have two sets $A$ and $B$, we write $A\subset B$ if $a_0\in A \implies a_0\in B$. For example, put $A:=\{\{\emptyset\},a\}$ and $B:=\{\emptyset,\{\emptyset\},a,b,c\}$. It is obvious that $a_0\in A\implies a\in B$. Indeed, $a_0\in A$ means $a_0=\{\emptyset\}$ or $a_0=a$ and by definition of $B$ we see that $\{\emptyset\}\in B$ and $a\in B$... – Guest Oct 14 '14 at 2:45

$\{\emptyset\}$ is a set containing the null set.

$\{\{\emptyset\}\}$ is a set containing a set which in turn contains the null set.

So we can write, for example, $\{\emptyset\} \in \{\{\emptyset\}\}$.

$\{\emptyset, \{\emptyset\}\}$ is a set with two elements: one element is the null set, and the other element is a set containing the null set.

So it's true that $\{\{\emptyset\}\} \subset \{\emptyset,\{\emptyset\}\}$: the only element of the left side ($\{\emptyset\}$) is also an element of the right side, but the right side also contains a different second element ($\emptyset$).

More generally, try proving that $\lbrace A \rbrace \subset \lbrace B,A \rbrace$.

Here, {$a,b,c,d,e,....z$} means a set with elements $a,b,c...z$. Now whenever a set is written , everything inside {} are called elements( they can be numbers, alphabets, sets, elephants....) so in your case, on Left hand side, {{$\phi$}} means the set {$\phi$} is an element in the set {{$\phi$}} and as {$\phi$} is an element on R.H.S, {{$\phi$}} $\subset${$\phi,${$\phi$}}

maybe, you can think of a set as a bag containing somethings. while $\emptyset$ is a empty bag, $\{\emptyset\}$ is a bag containing a empty one,and so on.

{{ϕ}} ⊂ {ϕ, {ϕ}} is right,because every element in $\{\{\emptyset\}\}$ ,namely $\{\emptyset\}$, is a element in {ϕ, {ϕ}}. it is proper because $\emptyset \in \{\emptyset,\{\emptyset\}\}$


# What is the probability that an unfair coin's head appears less than 50 after 100 tosses?

I met a question about probability, it seems easy but I got stuck. The question is:

Suppose there is an unfair coin, the HEAD probability is $$p=0.7$$.
(Q1) If we toss the coin for 100 times, what is the expectation and the variance of this experiment?
(Q2) Answer with reason whether or not the probability is higher than $$1/10$$ that the number of HEAD appear times is less than $$50$$ as we toss the coin for $$100$$ times.

Q1 is easy, I know expectation is $$n*p=70$$ and variance is $$n*p*(1-p)=21$$. But for Q2 I have no idea.
At first I think it looks like... a sample distribution of sample mean used in statistics but... I don't know whether (or how) it will obey a normal distribution.
Then I also try to calculate the sum of $$P(H=0)+P(H=1)+...+P(H=50)$$, but the work is huge, even I use an approximation of Passion distribution...
So could you share some of your thought? Thank you!

• Well...you can use the normal approximation if you want, but just speaking roughly: We have $\sigma=\sqrt {21}=4.83$ so you are talking about a $4.36\sigma$ event, so the answer is effectively $0$. For that matter, doing it exactly, with the binomial distribution, isn't especially difficult either. – lulu Aug 21 at 11:09
• Another fast way to do it is to note that the answer is clearly less than $50\times P(50)$ and even that is way less than $.1$ – lulu Aug 21 at 11:13
• Thank you @lulu! I think both of these two methods you proposed are effective, but as you said 'with the binomial distribution, isn't especially difficult either', do you mean it isn't such difficult even we calculate the $P(H<50)$? If so, could you give me a rough procedure of it? – Peter Nova Aug 21 at 11:25
• Just use a spreadsheet or a program. here is Wolfram Alpha's version. – lulu Aug 21 at 11:27
• @PeterNova Here is the computation with Hypergeometrics Wolframalpha - Hypergeometrics – InterstellarProbe Aug 21 at 20:56

We can show that the answer to Q2 is "No" even without appealing to the Central Limit Theorem.

Let's say $$H$$ is the total number of heads. By the Chebyshev inequality (see below), $$P(|H-70| \ge 21) \le \frac{21}{21^2} \approx 0.048$$ But $$P(|H-70| \ge 21) = P(H \le 49) + P(H \ge 91)$$ so $$P(H \le 49) \le P(|H-70| \ge 21) \le 0.048$$

Chebyshev's inequality: If $$X$$ is a random variable with finite mean $$\mu$$ and variance $$\sigma^2$$, then for any value $$k>0$$, $$P(|X-\mu| \ge k) \le \frac{\sigma^2}{k^2}$$

Since $$H$$ is a sum of Bernoulli random variables, then $$H$$ is modeled as Binomial with $$N = 100$$ trials and $$p=0.7$$ probability of success. Indeed, it is exhaustive to compute the desired probability which is $$P(H < 50) = P(H=0) + \ldots P(H=49)$$

Instead what you could do is notice that $$N =100$$ is large enough, and hence we could approximate the Binomial with a Gaussian distribution, so $$H \sim N(Np,Np(1-p)) = N(70,21)$$ So $$\Pr(H<50) \simeq \Pr(\underbrace{\frac{H-70}{\sqrt{21}}}_{Z} < \frac{50-70}{\sqrt{21}}) \simeq \Pr(Z < -4.36)$$ where $$Z$$ is a centered Gaussian. According to the z-table, the above probability is way less than $$\frac{1}{10}$$.

• Thank you very much @Ahmad Bazzi ! I should think about this... I only thought this experiment should approximate this binomial to a possion distribution... Can I ask a stupid question that when can we approximate the binomial with a gaussian distribution? I guess like when experiment times n=10 or p=0.99 we could not do that, right? – Peter Nova Aug 21 at 11:29
• You are right, when we say $N$ is large, it should be compared to a threshold to be able to say "it is large enough". A rule of thumb is when $N > 9 \max(\frac{1-p}{p},\frac{p}{1-p})$. @PeterNova – Ahmad Bazzi Aug 21 at 11:58

Here's an argument that doesn't rely on approximating a normal distribution. The basic idea is to show that

$$\sum_{k=1}^{49}{100\choose50-k}p^{50-k}q^{50+k}\lt{1\over10}\sum_{k=0}^{50}{100\choose50+k}p^{50+k}q^{50-k}$$

where $$p=0.7$$ and $$q=1=p=0.3$$

Now $$(q/p)^2=9/49$$, so we have $$(q/p)^{2k}\lt1/10$$ for $$k\gt1$$. Since $${100\choose50-k}={100\choose50+k}$$, it follows that

$${100\choose50-k}p^{50-k}q^{50+k}\lt{1\over10}{100\choose50+k}p^{50+k}q^{50-k}$$

for $$2\le k\le50$$. It would be nice if $${100\choose49}p^{49}q^{51}$$ were less than $${1\over10}\left({100\choose50}p^{50}q^{50}+{100\choose51}p^{51}q^{49}\right)$$; unfortunately, it isn't. However, it suffices to show that

$${100\choose48}p^{48}q^{52}+{100\choose49}p^{49}q^{51}\lt{1\over10}\left({100\choose50}p^{50}q^{50}+{100\choose51}p^{51}q^{49}+{100\choose52}p^{52}q^{48} \right)$$

which simplifies to showing

$$50\cdot49q^4+52\cdot50pq^3\lt{1\over10}\left(52\cdot51p^2q^2+52\cdot50p^3q+50\cdot49p^4 \right)$$

This can be done with a direct calculation, but can also be verified with a couple further simplifications:

$$50\cdot49q^4+52\cdot50pq^3\lt50\cdot52(q^4+pq^3)=50\cdot52q^3(q+p)=50\cdot52q^3=70.2$$

and

$${1\over10}\left(52\cdot51p^2q^2+52\cdot50p^3q+50\cdot49p^4 \right)\gt{50\cdot49\over10}(p^2q^2+p^3q+p^4)=245p^2((p+q)^2-pq)=245p^2(1-pq)=94.8395$$

(There are undoubtedly additional ways to reduce the final amount of explicit computation for the comparison. I would appreciate any suggestions.)

Another way to do this is:

$$\sum_{n=0}^{49}\dbinom{100}{n}(0.7)^n(0.3)^{100-n} = 1-\dbinom{100}{50}(0.7)^{50}(0.3)^{50}{{_2}F_1\left(1,-50;51;-\dfrac{7}{3}\right)}\approx 10^{-5}$$


Formulation of Assignment problem as integer programming

We need to maintain as quickly as possible a complex system. In particular, we need to replace six of its components $$\{P_1,\ldots,P_6\}$$. We have three 3D printers $$\{M_1,M_2,M_3\}$$ which we can use to fabricate the six components. The following table/matrix states how long it takes (in minutes) the $$i$$th printer to print the $$j$$th component:

$$\begin{array}{ccccccc} \hline & P_1& P_2&P_3&P_4&P_5&P_6 \\ \hline M_1 & 23 & 42 & 12 & 32 & 47 & 60\\ M_2 & 25& 37& 13& 37& 51& 64\\ M_3 & 27 &51 &15& 41 &57 &55\\ \hline \end{array}$$

The complex system will work again only when all the components have been printed. Clearly more components can (and have to be) assigned to single machines and they are made in a sequence, one after the other, and 3D printers can work in parallel. However, you have only two operators and therefore you can only use two machines. How to formulate the problem as a linear (but combinatorial) optimization problem to allocate components to (two out of three) 3D printers so that the maintenance time is minimized.

So far I have tried the following, but I am not quite sure (Please I need help if I was mistaken):

Let $$x_{ij}= 1$$ if machine $$i$$ is assigned to component $$j$$, $$0$$ otherwise. The model is \begin{align}\min&\quad23x_{11}+42x_{12}+...+55x_{36}\\\text{s.t.}&\quad x_{11}+x_{12}+x_{13}+x_{14}+x_{15}+x_{16} = 2\\&\quad x_{21}+x_{22}+x_{23}+x_{24}+x_{25}+x_{26} = 2\\&\quad x_{31}+x_{32}+x_{33}+x_{34}+x_{35}+x_{36} = 2\\&\quad x_{11}+x_{21}+x_{31} \ge 1\\&\quad x_{12}+x_{22}+x_{32} \ge 1\\&\quad x_{13}+x_{23}+x_{33} \ge 1\\&\quad x_{14}+x_{24}+x_{34} \ge 1\\&\quad x_{15}+x_{25}+x_{35} \ge 1\\&\quad x_{16}+x_{26}+x_{36} \ge 1\\&\quad x_{ij}\,\,\text{is binary}.\end{align}

• "The complex system will work again only when all the components have been printed." Does that mean you'd like the system to end as soon as possible? (Thinking of the objective function here). Besides this, I think this could better be formulated as a scheduling problem on parallel machines, with the additional constraint that only 2 of the 3 machines are used. – dhasson Jul 2 '20 at 13:37
• The Generalized Assignment Problem can serve as inspiration to continue, it's the same you are doing but change the first 3 constraints where every machine is made to print 2 components. First of all, the objective function is total working time of the machines. Instead you want to minimize the makespan (maximum time to finish all jobs), so that system can work again as soon as possible. Second, you may add binary variables $z_i = 1$ if machine $i$ is used, with additional constraints for $\sum_i z_i = 2$ and linking $x$ and $z$. – dhasson Jul 2 '20 at 15:30
• Are you assuming that one machine will never be used, or that operators will move among machines such that all machines might be used at some point, but never more than two running at any given time? – prubin Jul 2 '20 at 15:57
• @user3752, as dhasson mentioned, it sounds like a parallel machine scheduling problem. Would you see this link? – A.Omidi Jul 3 '20 at 10:41

Since you mention that you want to operate two out of three machines, it boils down to a problem where you first pick two machines and then perform a standard $$R2||C_{\max}$$ parallel machine scheduling problem with the two machines that you selected. Such problems are very suitable for dynamic programming/column generation approaches, but your instance is so small that a IP will work fine. And since you ask for an IP, let us consider a straightforward way to model it.
For a formulation, consider the following decision variables: $$y_j = \left\{ \begin{array}{ll} 1 & \mbox{ if } M_j \mbox{ is being operated } \\ 0 & \mbox{otherwise} \end{array} \right.$$ and $$x_{ij} = \left\{ \begin{array}{ll} 1 & \mbox{ if } P_i \mbox{ is made on } M_j \\ 0 & \mbox{otherwise} \end{array}\right.$$ Also, let's assume that $$a_{ij}$$ is the time needed to produce $$P_i$$ on $$M_j$$.
Now the following IP can be formulated: $$\begin{array}{llll} \min & z \\ \mbox{s.t.} & \sum_{j} y_j & \leq K \\ & \sum_{j} x_{ij} & = 1 & \forall i \\ & x_{ij} & \leq y_j & \forall i \forall j \\ & \sum_i a_{ij} x_{ij} & \leq z & \forall j \\ & x_{ij} \in \{0,1\} & & \forall i \forall j \\ & y_j \in \{0,1\} & & \forall j \\ & z \in \mathbb{R} \end{array}$$ Where the objective variable $$z$$ represents the makespan, the first constraint states that at most $$K$$ machines can be used (in your instance, $$K=2$$, i.e. $$K$$ is the number of operators), the second constraint states that each $$P_i$$ must be executed on exactly one $$M_j$$, the third constraint states that a $$P_i$$ can only be produced on a $$M_j$$ if that $$M_j$$ is being operated and the fourth constraint states that the makespan $$z$$ should be at least the time spent on each individual machine.


# Is the pseudoinverse of a singular, lower triangular matrix itself lower triangular?

Suppose $L\in\mathbb{R}^{n\times n}$ is a singular, lower triangular matrix. Is its psuedoinverse, $L^\dagger\in\mathbb{R}^{n\times n}$, also lower triangular? I have already proved by induction that the product of two lower triangular matrices is lower triangular, and I also proved that the inverse of a (non-singular) lower triangular matrix is lower triangular. I have shown by working out an example with lower triangular $L\in\mathbb{R}^{2\times 2}$ that the pseudoinverse, $L^\dagger\in\mathbb{R}^{2\times 2}$, does not have to be lower triangular, but I was wondering if there might be a better way to prove this than just by showing through an example in $\mathbb{R}^{2\times 2}$ that $L^{\dagger}$ is not necessarily lower triangular.

Useful information:
The pseudoinverse of a matrix $A$ satisfies the following properties:
1) $(A^\dagger A)^*=A^\dagger A$
2) $(AA^\dagger)^*=AA^\dagger$
3) $AA^\dagger A=A$
4) $A^\dagger AA^\dagger = A^\dagger$
Note: here I will be considering only the reals, so the conjugate transpose becomes just a transpose.

Attempt at Solution: For $L\in\mathbb{R}^{n\times n}$, where $n=1$, it is easy to show that $L^\dagger$ is lower triangular. Since $L$ is singular, we have $L=0$, which is also lower triangular, by the definition of a lower triangular matrix. Then, properties 1) through 3) above are trivially satisfied by any $L^\dagger\in\mathbb{R}$, but for property 4) to be satisfied, we need $L^\dagger 0L^\dagger=L^\dagger\implies L^\dagger=0$. But, $L^\dagger$ is lower triangular by the definition of a lower triangular matrix, so for $n=1$, the answer to the original question is "yes".

Now, consider the case of $n=2$. Let $$L=\left(\begin{array}{cc}a & 0 \\ b & \tilde{L} \end{array}\right)$$ for $a$ and $b\in\mathbb{R}$, and with $\tilde{L}$ a singular, lower triangular matrix $\in\mathbb{R}^{1 \times 1}$, as before in the example with $n=1$. So $L$ is a singular, lower triangular matrix, and $$L=\left(\begin{array}{cc}a&0\\b&0\end{array}\right).$$ Let $L^\dagger\in\mathbb{R}^{2\times 2}$ be the pseudoinverse of $L$, and define $L^\dagger$ as $$L^\dagger=\left(\begin{array}{cc}c&d\\e&\tilde{L}^\dagger\end{array}\right),$$ with $c,d,e\in\mathbb{R}$ and with $\tilde{L}^\dagger$ being the psuedoinverse of $\tilde{L}$ as derived in the above example for $n=1,$ so $\tilde{L}^\dagger = 0$ and so $$L^\dagger=\left(\begin{array}{cc}c&d\\e&0\end{array}\right).$$

Now, property 1) above requires $ea=0$. Property 2) requires $ad=bc$. Property 3) requires that ($a=0$ or $ca+db=1$) and ($b=0$ or $ca+db=1$). Property 4) requires $e=0$ and ($c=0$ or $ca+db=1$) and ($d=0$ or $ca+db=1$). I chose $d\neq0$, which would then make $L^\dagger$ not a lower triangular matrix. Then, with $ca+db=1$ and $d\neq0$, I found $b=\frac{1-ca}{d}$. Further, from $ad=bc$, I found (substituting the previous expression for $b$), $a=\frac{c}{c^2+d^2}$, which then gives $b$ in terms of $c$ and $d$ as $b=\frac{d}{c^2+d^2}.$ My $L$ and $L^\dagger$ then become $$L=\frac{1}{c^2+d^2}\left(\begin{array}{cc}c&0\\d&0\end{array}\right),$$ and $$L^\dagger=\left(\begin{array}{cc}c&d\\0&0\end{array}\right).$$ $L^\dagger$ satisfies all four of the properties above, but it is not lower triangular, so my answer to the original question is, in general, "no".

However, surely their is a smarter way to do this, in which I don't have to resort to doing all this algebra, isn't there? If so, how might I approach the proof? Thanks a lot!

An even stronger counterexample: If $A = \left(\begin{matrix} 0 & 1 \\ 0 & 0 \end{matrix}\right)$, then there exists no upper-triangular $2\times 2$-matrix $B$ satisfying $ABA = A$. (Indeed, the $\left(1,2\right)$-entry of $ABA - A$ will always be $-1$, no matter what $B$ is, as long as $B$ is upper-triangular.)
The pseudoinverse of a non-invertible triangular matrix can be non-triangular. $$\begin{pmatrix} 1& 1\\ 0& 0 \end{pmatrix}^\dagger = \frac12 \begin{pmatrix} 1& 0\\ 1& 0 \end{pmatrix}$$ $$\begin{pmatrix} 1& 1& 1\\ 0& 1& 1\\ 0& 0& 0 \end{pmatrix}^\dagger = \frac12 \begin{pmatrix} 2& -2& 0\\ 0& 1& 0\\ 0& 1& 0 \end{pmatrix}$$


order of infinite countable ordinal numbers

I'm trying to understand ordinal arithmetic. If one had an ordered list of the some subset of countable ordinal numbers, what order would the following 6 countably infinite ordinals be in? If the following order is not correct, what is correct order and why is that the correct order?

$$\omega\;<\; \omega^2 \;<\; 2^\omega \;<\; \omega^\omega \;<\; {^\omega}2 \;<\;{^\omega} \omega$$

I know $\epsilon_0 = {^\omega} \omega$ is the largest, but is still countable, but I'm not sure where the powers of $2$ fit in versus the powers of $\omega$.

I understand why $\omega^2$ or $\omega^n$ for any finite value of $n$ needs to be countable. But, why does $\omega^\omega$ need to be countable? For cardinal numbers, $2^{\aleph_0}$ is uncountably infinite. Presumably, there would be some contradiction in mathematics if any finite ordinal arithmetic equation involving $\omega$ generated an uncountable infinity.

• What does the notation ${^\omega} 2$ mean? Never saw that (and it's hard to see what to type into Google to find it...) – David C. Ullrich Jul 13 '15 at 19:12
• – Asaf Karagila Jul 13 '15 at 19:13
• The defining sequence for $^{\omega} 2$ is $2\;\;2^2\;\;2^{2^2}\;\;2^{2^{2^2}}\;\;2^{2^{2^{2^2}}}....$ – Sheldon L Jul 13 '15 at 19:15
• So then in fact ${^\omega}2=\omega$. – David C. Ullrich Jul 13 '15 at 19:17
• ok, presumably that is consistent, but it seems a bit odd, that such a fast growing sequence is regarded as smaller than $\omega^2$ – Sheldon L Jul 13 '15 at 19:18

First note that $$^\omega2 := \sup \{ \underbrace{2^{2^{2^\ldots}}}_{n\text{-times}} \mid n < \omega \} = \omega.$$

[..]but it seems a bit odd, that such a fast growing sequence is regarded as smaller than $\omega^2$.

Well, that's the thing when dealing with infinities. Sometimes our intuition fails us. While $(\underbrace{2^{2^{2^\ldots}}}_{n\text{-times}})_{n < \omega}$ could be regarded as "a fast growing sequence", each of its elements is finite and therefore $\omega$ is an upper bound. As $\omega$ certainly is the least upper bound, we get $^\omega2 = \omega$.

By an analogous argument we get that $$2^\omega := \sup \{2^n \mid n < \omega \} = \omega$$

So we are left with ordering $\omega, \omega^2, \omega^\omega$ and $^\omega \omega$.

We have \begin{align}\omega^2 &:= \omega \cdot \omega \\ &= \sup \{ w \cdot n \mid n < \omega\} \\ &\ge \omega \cdot 2 \\ &> \omega \end{align}

and

\begin{align}\omega^\omega &= \sup \{ \omega ^n \mid n < \omega \} \\ &\ge \omega^3 \\ &= \sup \{(\omega^2) \cdot n \mid n < \omega \} \\ &\ge \omega^2 \cdot 2 \\ &> \omega^2. \end{align}

Finally \begin{align}^\omega \omega &:= \sup \{ \underbrace{\omega^{\omega^{\omega^ \ldots}}}_{n\text{-times}} \mid n < \omega \} \\ &\ge \omega^{\omega^\omega} \\ &= \sup\{\left( \omega^\omega \right)^n \mid n < \omega \} \\ &\ge \left(\omega^\omega \right)^2 \\ &= \omega^\omega \cdot \omega^\omega \\ &= \sup \{\omega^\omega \cdot \alpha \mid \alpha < \omega^\omega \} \\ &\ge \omega^\omega \cdot 2 \\ &> \omega^\omega. \end{align}

Combining these calculations we get the desired order: $$\omega = 2^\omega = {^\omega} 2 < \omega^2 < \omega^\omega < ^\omega\omega$$

In general, ordinal and cardinal arithmetic are very different beasts and every ordinal arithmetic expression using only ordinals $\le \omega$ is countable.

proof (sketch)

Take a countable transitive model $M$ of a large enough fracture of $ZFC$. Every ordinal expression using only ordinals $\le \omega$ can be computed correctly inside $M$ (<- this requires some work). As $M$ only contains countable ordinals (as it is transitive), the result follows.

• That is a horrible notation, ${}^\omega2$. – Asaf Karagila Jul 14 '15 at 6:34
• Thanks for the proof; much to learn. – Sheldon L Jul 14 '15 at 8:39


# In 30 boxes are 15 balls. Chance all balls in 10 or less boxes?

Question1: I found 30 boxes. In 10 boxes i found 15 balls. In 20 boxes i found 0 balls. Afer i collected all 15 balls i put them randomly inside the boxes.

How much is the chance that all balls are in only 10 boxes or less?

Question2: I found 30 boxes. In 10 boxes i found 15 balls. In 20 boxes i found 0 balls. In two of the boxes i could find 3 balls. (So in one box has to be 2 balls and in the other seven boxes have to be 1 ball.) Afer i collected all 15 balls i put them randomly inside the boxes.

How much is the chance that i find in only 2 boxes 6 balls or more?

I wrote a c# programm and tried it 1 million times. My solution was: With a chance of 12,4694% all balls are in 10 boxes or less.

Random trials/Monte Carlo simulations are notoriously slow to converge, with an expected error inversely proportional to the square root of the number of trials.

In this case it is not hard (given a programming language that provides big integers) to do an exact count of cases. Effectively the outcomes are partitions of the 15 balls into some number of boxes (we have thirty boxes to work with, so at least half will be empty).

I wrote a Prolog program to do this (Amzi! Prolog has arbitrary precision integers built in), and got the following results:

$$Pr(\text{10 or fewer boxes occupied}) = \frac{59486359170743424000}{30^{14}} \approx 0.124371$$

$$Pr(\text{2 boxes hold 6 or more balls}) = \frac{30415369655816064000}{30^{14}} \approx 0.063591$$

The reason I'm dividing by $30^{14}$ in these probabilities is because I normalized the counting to begin with one case where a ball is in one box. If we counted that as thirty cases, we'd need to divide by $30^{15}$. So this keeps the totals slightly smaller. Each ball we add increases the total number of cases by a factor of $30$.

I wrote a recursive rule to build cases for $n+1$ balls from cases for $n$ balls. The first few cases have the following counts:

 /* case(Balls,Partition,LengthOfPartition,Count) */
case(1,[1],1,1).   /* Count is nominally 1 to begin */
case(2,[2],1,1).
case(2,[1,1],2,29).
case(3,[3],1,1).
case(3,[1,2],2,87).
case(3,[1,1,1],3,812).   /* check: for Sum = 3, sum of Count is 900 */

The number of cases generated is modest enough for a desktop, daunting to manage by hand. For $n=15$ there are $176$ partitions. It simplified the Prolog code to maintain the partitions as lists in ascending order.

• I checked out with a c# program. I simulated the problem with random numbers and counted: How often I find 6 ore more balls in only 2 boxes. 1000000-times tried: Pr(2 boxes hold 6 or more balls) = 0,063491%. Thanks alot! – Simon Aug 4 '14 at 13:39
• Simulation is easier to program than the recursive/exact counting, but as briefly mentioned, getting an extra digit of accuracy may well require a hundred times as many trials because of the random walk phenomenon. – hardmath Aug 4 '14 at 13:42

Solution of Question 1:

This is an occupancy problem with $n=30$ boxes and $k=15$ balls.

Let's first consider the expected number of empty boxes. That is much easier to obtain. The exact answer is $30(1-1/30)^{15}=18.04.$ This is approximately $30/\sqrt e.$ See the answer by Mr.Spot to this question:

Making 400k random choices from 400k samples seems to always end up with 63% distinct choices, why?

The probability of exactly $j$ empty boxes is, for $n-k\le j\le n-1$:

$$P(j)={n \choose j}\sum_{m=0}^{n-j}(-1)^m {n-j \choose m}\left(1-\frac{j+m}n\right)^k$$

See this:

http://probabilityandstats.wordpress.com/2010/04/04/a-formula-for-the-occupancy-problem/

For $n=30$ and $k=15:$

$P(20)$ to $P(24)$ is $0.096,0.024,0.0036,0.00029,0.000013,....$

and the probability of at least $20$ empty cells = 0.124371

Solution of Question 2:

You throw 15 balls into 30 boxes. What is the probability of the following result:

2 triple, 1 double and 7 single occupancy boxes and the rest empty.

$${30 \choose 2} {28 \choose 1}{27 \choose 7}\frac{15!}{3!3!2!1!^7}\frac{1}{30^{15}}$$ $$=\frac{(30)(29)...(21)}{30^{15}2!1!7!}\frac{15!}{3!3!2!1!^7}$$ First we select the 2 different boxes for the triples; of the 28 remaining boxes we select 1 for the double; of the 27 remaining boxes we select 7 for the singles. Then the multinomial coefficient gives the number of ways to assign the 15 balls to those particular boxes and there are $30^{15}$ equally likely ways to throw the 15 balls into the 30 boxes.

• Thanks a lot for answering the question and for giving me tips to understand the topic. The answer fits to my program. Expected number of empty boxes: I did 11*6+295*7 ... 14246*15=11956971 (Numbers posted in comment ant11). 11956971/1000000=11.956971. 30-ans=18.043029. I also checked the formula in wolfram alpha and i got the same numbers. Now i will write a program about question2. I think this is easy to solve (approximately) with a program. And i will take a look at "formula for the occupancy problem". Maybe i can improve my understanding about this topic. – Simon Jul 27 '14 at 17:14
• I tried your formula for each combination and got nearly the same numbers. In comparison to the other combination, one had a larger difference. If you get 15 boxes with balls (1 ball each box), i had the chance of 1,4246%. If i do formula with wolfram alpha i use this text: (30 choose j) (sum ((-1)^m)*((30-j) choose m)*(1-((j+m)/30))^15, m=0 to 10) , j=15 | (15 stands for 15 free boxes --> 15 boxes not empty). I got the solution: 0,02291 = 2,291%. I used the same formula for j=15,16...29. I estimated the numbers as 2,9910%. All 15 numbers added i got 1,015827. Normally i should get 1. – Simon Jul 28 '14 at 15:00
• Ok i tried again 2 times. Now i rounded all nombers down. I tried your formula for j= 15,16...29. My solution: 15=0,029910305; 16=0,092823631; 17=0,236474423; 18=0,307416722; 19=0,224830457; 20=0,096214657; 21=0,024288697; 22=0,003562779; 23=0,000292277; 24=0,000012534; 25=0; 26=0; 27=0; 28=0; 29=0; All numbers added = 1,015826482. I think you may need a different formula for the upper limit 15 are empty. – Simon Jul 28 '14 at 15:50
• Ok, the right formula is in your link: probabilityandstats.wordpress.com/2010/04/04/…. In this case we need another formula: If there are exactly j empty cells, then the k balls are placed in the remaining n-j cells and these remaining n-j cells are all occupied. Great job! Thank you. – Simon Jul 28 '14 at 20:42
• P(15)=0.0141 which explains why your sum is not 1. – Mr.Spot Jul 29 '14 at 3:39

I will assume the balls and boxes are indistinguishable.

The first problem is: If I distribute $15$ balls among $30$ boxes, what is the probability that at most $10$ boxes contain a ball?

First, the fact that there are $30$ boxes does not matter, since they are indistinguishable. So we only need to consider the problem as if there were $15$ boxes.

Second, we'll solve the problem by finding the probability that more than $10$ boxes contain a ball, and subtract that number from $1$.

There is exactly $1$ to occupy $15$ boxes with $15$ balls: $\{1,1,1\cdots\}$

There is also exactly $1$ way to occupy $14$ boxes with $15$ balls, since, again, the boxes are indistinguishable: $\{2,1,1\cdots\}$

There are $2$ ways to occupy $13$ boxes: $\{3,1,1\cdots\}$ or $\{2,2,1,1\cdots\}$

There are $3$ ways to occupy $12$ boxes, and $5$ ways to occupy $11$ (you can and should verify these numbers).

Finally, how many ways could we distribute $15$ balls over $15$ boxes? This number is exactly equal to $p(15)=176$, where $p(n)$ is the partition function.

So the answer to problem 1 is $1-(1+1+2+3+5)/176=164/176\approx93.2\%$

EDIT: I believe this answer is drastically different from the one obtained by your program for the following reason: you might have meant, in your problem statement, "what is the probability all $15$ balls are contained in $10$ particular boxes?" This significantly changes the question; in particular, the total number of boxes being $30$ is now relevant. Let me know if this is the misunderstanding.

• There is no good reason to use a probability model in which all partitions are equally likely. A more natural model has us throwing the balls one at a time, with all $30$ boxes equally likely. – André Nicolas Jul 25 '14 at 20:14
• Let us say we got 30 machines. Rob is telling you: "Hey ant11, we got 15 disruptions last year". Another guy says: "two machines had 3 disrupions, one machine had 2 disruptions and the other seven machines had 1 disruption. Ant11 you are good at maths. What do you think about this. If all machines would be indistinguishable, what chance it would have that only 10 machines had all 15 disruptions?" You think the solution should be easy. – Simon Jul 25 '14 at 20:23
• Meanwhile you think about it, the boss comes and asks you:" Hey ant11, two machines got together 6 disruptions. That sounds like they will have many disruptions more next year. What is the chance if all 30 machines are indistinguishable, that they are more than 6 disruptions in only two machines. Maybe it was just bad luck." I think there are 30 boxes is relevant. – Simon Jul 25 '14 at 20:23
• My last time i wrote a programm was two years ago. Maybe i made a mistake. Here you can see my solution: 1000000 tryed: 1-5: 0-times: 0,0% 6: 11-times: 0,0011% 7: 295-times:0,00295% 8: 3585-times: 0,3585% 9: 24383-times: 2,4383% 10: 96420-times: 9,6420% 11: 225081-times: 22,5081% 12: 307109-times: 30,7109% 13: 236556-times: 23,6556% 14: 92314-times: 9,2314% 15: 14246-times: 1,4246% – Simon Jul 25 '14 at 20:32
• After that i added the numbers: 11+295+3585+24383+96420=124694. 124694/1000000=0,124694. --> 12,4694% 10 or less machines if all are indistinguishable – Simon Jul 25 '14 at 20:43


# Finding the number of non-negative integral solutions of $x + y + z = 10$

I realize that this question has been asked multiple times and I do not really want to know how to do it, I understand how to solve it, my issue is somehow I have used the distribution and I am not getting the right answer.

Method of Solving:
I solved this in the first go by directly applying the distribution formula that is $$\binom {n+r-1}{r-1}$$
By using, $n = 10, r= 3$ we get,
$$\binom{12}{2} = 66$$ however the answer given is $$\binom{12}{3} = 220$$ Next, I tried to solve by taking multiple cases that is, setting any variable, $x,y$ or $z$ to values from $0,1,2,3...10$, so for example if $x = 0$ then we get, $$y+z=10$$ now it is simple enough to distribute this even without the formula, we get $$\Bigl((0,10),(1,9),(2,8)(3,7),(4,6)\Bigl) \cdot 2,(5,5)$$ which gives us $11$ cases, that can be verified using the formula $$P_0 = \binom{11}{1}.$$ Now taking cases till $x=10$ we get, the final result as $$\sum _{n=0} ^{n=10} P_n = 11+ 10 + 9 + 8+ \ldots +1 = 66$$
Please tell me where I am going wrong or of it simply a case of the answer in the text being wrong, and if the second method is correct.

• The answer in the text is wrong. Both of your methods are correct. Aug 19 '18 at 10:06
• All right, thank you so much Aug 19 '18 at 10:07
• Does this answer your question? Number of Non negative integer solutions of $x+2y+5z=100$ Oct 11 at 21:51

The answer is $66$ even by double checking with generating functions, more details here.
The number of solutions for $x+y+z=n, x\geq0, y\geq0, z\geq0$ is the coefficient of $x^n$ term of the $$(1+x+x^2+x^3+...+x^k+...)^3=\frac{1}{(1-x)^3}$$ and because $$\frac{1}{(1-x)^3}= \frac{1}{2}\left(\frac{1}{1-x}\right)^{''}= \frac{1}{2}\left(\sum\limits_{k=0}x^k\right)^{''}= \sum\limits_{k=2}\frac{k(k-1)}{2}x^{k-2}$$ the coefficient of $x^n$ is $\color{green}{\frac{(n+2)(n+1)}{2}=\binom{n+2}{2}}$, which for $n=10$ yields $66$.
I think they have the role of $r$ and $n$ mixed up in the given solution, that is why they got the wrong result. Look at the proof of the formula again, and you will see immediately which one of $10$ and $3$ play the role of $n$ and $r$.
So you are right, the answer is 66, because $\binom{3+10-1}{10}=66$.
• Sorry, I don't see it, could you explain? Aren't we looking for the number of ways to distribute $10$ over $3$ variables? Aug 19 '18 at 9:58
• The OP did not confuse $n$ and $r$. Notice that you used the formula $\binom{n + r - 1}{n}$, while the OP used $\binom{n + r - 1}{r - 1}$. Aug 19 '18 at 10:04


# Disjoint sets of rationals both dense in $\mathbb{R}$

There exists a pair of disjoint subsets of $\mathbb{Q}$ such that both are dense in $\mathbb{R}$. True or false?

The statement is true but how can I find an example of such disjoint subsets of $\mathbb{Q}$?

• What have you thought of? What examples have you tried? – Guido A. Aug 8 '18 at 5:57
• Is$(\frac{m}{2^k})_{m, k}$ dense? – dEmigOd Aug 8 '18 at 5:59
• Are m and k integers? Then this is dense in R. – Mathsaddict Aug 8 '18 at 6:02
• First I took example - A = {m/2^k, m - Z , k - N union 0} and B = { m/3^k, m - z, k - N union 0} – Mathsaddict Aug 8 '18 at 6:08
• You're looking more generally for ways to partition $\mathbb{Q}$ into pieces not based on size (e.g. you don't want $(-\infty,\sqrt{2})\cap\mathbb{Q}$ versus $(\sqrt{2},\infty)\cap\mathbb{Q}$). The two obvious places to look for a distinction to draw are numerator and denominator. For example, we could let $EN$ be the set of rationals which (in lowest terms) have an even numerator. Or, we could let $DD$ be the set of rationals whose denominator (in lowest terms) is a power of $2$ ("dyadic" fractions). Or, so on. (cont'd) – Noah Schweber Aug 8 '18 at 6:08

Let $x \in \mathbb{R}$. Now,

$$0 < 2^nx - [2^nx] < 1$$

and thus

$$0 < x - \frac{[2^nx]}{2^n} < \frac{1}{2^n}$$

This says that $D = \{\frac{m}{2^n}\}_{m \in \mathbb{Z}, n \in \mathbb{N}}$ is dense in $\mathbb{R}$. Now, let's consider a subset of this set,

$$A = \{\frac{m}{2^n} : n \in \mathbb{N}, m \in \mathbb{Z} , 2 \not |n \}$$

If $A$ were dense in $D$, it would be dense in $\mathbb{R}$. For this, we only have to show that $D \setminus A$ can be approximated by elements of $A$. Let $\frac{m}{2^n} \in D \setminus A$ and write $m = 2^ks$ with $2 \not | s$. It can't be that $k \leq n$, because that would mean $\frac{m}{2^n} = \frac{s}{2^{n-k}} \in A$. Therefore, $k \geq n$ and thus $\frac{m}{2^n} = 2^{k-n}s \in \mathbb{Z}$. This means that it is sufficient to show that $A$ can approximate integers: if $a \in \mathbb{Z}$ and $\varepsilon > 0$, then taking $\frac{1}{2^n} < \varepsilon$ we have that

$$\left|a - \frac{2^na + 1}{2^n}\right| = \frac{1}{2^n} < \varepsilon$$

and $\frac{2^na + 1}{2^n} \in A$ because $2 \not | \ 2^na+1$. In conclusion, we have shown that $A$ is dense in $D$ and since $D$ is dense in the reals, so is $A$. With an identical construction (which I encourage you to write out) one can show that the same holds for

$$B = \{\frac{m}{3^n} : n \in \mathbb{N}, m \in \mathbb{Z} , 3 \not |n \}$$

To conclude, then, we just have to observe that $A \cap B = \emptyset$. In effect, if

$$\frac{m}{2^n} = \frac{j}{3^k}$$

for some $n,m,j,k$, then $3^km = 2^nj$ and thus $2 | 2^nj = 3^km$. But since $2$ and $3$ are coprime, this would imply $2 | m$ which is absurd.

HINT.-It is enough to show an example in $I=[0,1]$. All rational is periodic after a finite number of digits $$r=0.a_1a_2....a_m[b_1b_2....b_n]\in I$$ It is not hard to prove that $A$ and $B$ below are disjoint and dense in $I$

$$A=\{r\text{ such that } b_n=1\}\\B=\{r\text{ such that } b_n\ne1\}$$


# Explain please the following statement from Naive Set Theory

Here is a statement that I can't understand:

Ordered triples, ordered quadruples, etc., may be defined as families whose index sets are unordered triples, quadruples, etc.

For now, let's stick with the ordered triples. First of all I can't understand whether the index set is a set of unordered triples like $\{ \{a, b, c\}, \{d, e, f\}\}$ or it is itself an unordered triple?

Also, I just can't imagine how having any of such sets as the index set can help me to build a set of ordered triples. Maybe some example will make things clear. I will be very grateful if you help. Thanks in advance.

• Where did you find this statement? Personally, I also find it difficult to parse ... – Noah Schweber May 27 '18 at 18:03
• @NoahSchweber, Naive Set Theory of Halmos – Turkhan Badalov May 27 '18 at 18:03
• What page? It's an entire book ... – Noah Schweber May 27 '18 at 18:03
• @NoahSchweber, oh, sorry. Page 36 in "Families" section – Turkhan Badalov May 27 '18 at 18:05

Yes, this is a bit unclear.

Halmos' goal is to define the notion of an arbitrary Cartesian product. This should generalize the usual Cartesian product of two sets, $A\times B$, but should "work for any number of sets." Before diving into his description, let me point out that this really is nontrivial: how should we think of the Cartesian product of "$\mathbb{R}$-many" sets?

Halmos is about to tell us, essentially, that the Cartesian product of an indexed family $\{X_i\}_{i\in I}$ of sets is just the set of all indexed families $\{x_i\}_{i\in I}$ of objects with $x_i\in X_i$. Maybe more clearly, an element of the Cartesian product is a function with domain $I$; it sends $i\in I$ to the "$i$th coordinate," which must be in $X_i$.

To motivate this, Halmos has us go back to the idea of a Cartesian product. We can rethink Cartesian products as follows:

• Fix any two distinct sets, $a$ and $b$. We'll think of the first as "LEFT" and the second as "RIGHT."

• Now an ordered pair has two "coordinates," a left coordinate and a right coordinate. We're going to match these up with $a$ and $b$ above: if I have a function $z$ with domain $\{a, b\}$ such that $z(a)=x\in X$ and $z(b)=y\in Y$ (here I write "$z(i)$" for Halmos's "$z_i$"), we want to think of the object $z$ as being the ordered pair $(x, y)$. Informally, $z$ says

$$\mbox{My left coordinate is x, and my right coordinate is y.}$$

Put another way:

We can think of the ordered pair $(x, y)$ as the function with domain $\{a, b\}$ (which is an unordered pair) mapping $a$ to $x$ and $b$ to $y$.

This is easiest to think about if $a=0$ and $b=1$, or something similar, but Halmos's point is that all we need is that the index set has two distinct elements. Now here's the key linguistic step Halmos makes which I think is confusing at first:

An ordered pair is an indexed set! And the indexing set is $\{a, b\}$, which is an unordered pair.

• are you sure you wanted to say sets in the end? "... that the Cartesian product of an indexed family $\{X_i\}_{i \in I}$ of sets is just the set of all indexed families $\{x_i\}_{i \in I}$ of sets with $x_i \in X_i$". Because as I understand, if we say the family $\{x_i\}$ of sets, its range consists of sets implying $x_i$ is a set which is, as I understand, is not said – Turkhan Badalov May 27 '18 at 18:42
• @TurkhanBadalov My ZFC bias is showing. In formal ZFC set theory (and many other formal set theories), every object is in fact a set and everything is "built out of" the emptyset in a sense. But yes, in the context of Halmos's book that's inappropriate. Fixed! – Noah Schweber May 27 '18 at 18:51
• Thanks for the great answer! So, to make an ordered triple, let's say, $(11, 21, 31)$ I need some unordered triple and let it be $\{a, b, c\}$, true? Then I have to have (actually I doubt this statement about having the following set, because I need to construct it additionaly, correct me if I am wrong) the family $\{X_i\}_{i \in \{a, b, c\}}$ and let it be $\{ (a,11), (b, 21), (c, 31)\}$. Then the Cartesian product of the family will be the set of all families $\{x_i\}$: $\{ \{ (a, 11), (b, 21), (c, 31)\} \}$, the element of which I interpret as the ordered triple we expected to make? – Turkhan Badalov May 27 '18 at 18:59
• Not quite. The set $\{(a, 11), (b, 21), (c, 31)\}$ is a single ordered triple. The Cartesian product of three sets $X_a, X_b, X_c$ would be the set of all sets of the form $\{(a, x_a), (b,x_b), (c, x_c)\}$ with $x_a\in X_a, x_b\in X_b, x_c\in X_c$. So e.g. if $X_a=X_b=X_c=\mathbb{N}$, the set $\{(a, 11), (b, 21), (c, 31)\}$ would be an element of the Cartesian product, but the Cartesian product would also include other things like $\{(a, 18), (b, 467), (c, 3)\}$ (which we would think of as "$(18, 467, 3)$"). – Noah Schweber May 27 '18 at 19:02
• @TurkhanBadalov I thought you were using my example where $X_a=X_b=X_c=\mathbb{N}$. If the $X_i$s are as you describe, then that's right. – Noah Schweber May 27 '18 at 19:26


# Fastest Algorithm for "Merge" step in Mergesort

Given two sorted arrays $$a_1,a_2,\dots,a_n$$ and $$b_1,b_2,\dots,b_m$$, merge them together into one sorted array $$c_1,c_2,\dots,c_{n+m}$$ containing the elements of $$a$$ and $$b$$.

The typical mergesort method works in $$O(n+m)$$, and if we run binary search for each element from one of the arrays, it works in $$O(\min(n,m)\log(\max(n,m)))$$. However, the latter method is no better than if the smaller array was unsorted. I was wondering if there is any use of the fact that both arrays are sorted to optimise the latter solution. In particular, I was hoping for an algorithm in time $$O(\min(n,m))$$ or so.

I attempted a "parallel binary search" method, but it seems in the worst case that it is no better than the naive binary search method.

• (The typical mergesort method should read The typical merge method more likely than not. In a scientific context, it is challenging to ask for optimal solutions (Fastest Algorithm): any proposal will be expected to be proven. (Which is where within a constant factor comes in.)) Jan 31 at 8:59
• What makes you think that $\min(n,m)\log(\max(n,m))$ would be any better than $n+m$ ? Take $n<m$ WLOG and divide both functions by $m$. Now you compare $\dfrac nm\log m$ and $\dfrac nm+1$. Mar 3 at 9:20

If you only want to count the number of comparisons then you can achieve $$O\left(n\log(1+\frac{m}{n})\right)$$ comparisons as follows:

Let $$k_1$$ denote the index of $$a_1$$ in the final array $$c$$ and for $$1 let $$k_i$$ denote the difference between the indices of $$a_i$$ and $$a_{i-1}$$ in the final array $$c$$.

To insert $$a_1$$ in $$b$$, start by doing an exponential search to find the smallest $$r$$ such that $$b_{2^r} \geq a_1$$ (this is also the smallest $$r$$ such that $$2^r \geq k_1$$). This takes $$O(\log k_1)$$ comparisons. Now do a binary search between the indices $$1$$ and $$2^r$$ to locate the correct position $$k_1$$ to insert $$a_1$$, and insert the element there. This also takes $$O(\log k_1)$$ comparisons.

To insert $$a_2$$ into $$b$$ start by doing an exponential search, starting at $$k_1$$, to find the smallest $$r$$ such that $$b_{k_1+2^r} \geq a_2$$ (this is also the smallest $$r$$ such that $$2^r \geq k_2$$). This takes $$O(\log k_2)$$ comparisons. Now do a binary search between the indices $$k_1$$ and $$k_1+2^r$$ to locate the correct position $$k_1+k_2$$ to insert $$a_2$$, and insert the element there. This also takes $$O(\log k_2)$$ comparisons.

In general following this strategy you will make $$O(\log k_i)$$ comparisons to insert element $$a_i$$. So the total number of comparisons will be $$T = O\left(\sum_{i=1}^n\log k_i\right)$$. Because the $$\log$$ function is concave, by Jensen's inequality we have $$\sum_{i=1}^n\log k_i \leq n\log \frac{\sum k_i}{n} \leq n\log \frac{n+m}{n}$$. The result follows.

Notice that (assuming $$n\leq m$$) this is asymptotically always at least as good as $$O(n+m)$$ and $$O(n\log m)$$, and sometimes better than both: if you take for example $$m=n\log n$$ you get $$O(n\log\log n)$$ comparisons compared to $$O(n\log n)$$ with both other methods.

To complement this, let us show that this is optimal (up to a constant factor, still assuming $$m\geq n$$). The number of ways to insert $$n\geq 1$$ ordered elements into an ordered array of length m is $$\frac{(m+n)!}{m!n!} \geq \frac{(m+1)^n}{n!} \geq \max\{(\frac{m}{n})^n, 2^n\}$$. Thus to distinguish between these cases you need at least $$T\geq \log_2(\frac{(m+1)^n}{n!})$$ comparisons in the worst case. We have $$T \geq \max\{n\log_2\frac{m}{n}, n\}$$, which implies $$T \geq \frac{1}{2}n\log_2(1+\frac{m}{n})$$.

One method fitting the analysis results presented is
one by one, insert elements of the shorter sequence ($$s$$) in the longer one ($$l$$).

There are several way to reduce the search range in the longer sequence exploiting the shorter one to be ordered, too, starting with

position ← 0
for every element $$e$$ of $$s$$
position ← insertion position of $$e$$ in $$l$$, starting from position
insert $$e$$ in $$l$$ at position

— without any relation specified between $$n$$, $$m$$, and the values in $$a$$ and $$b$$, I don't see any to allow a tighter bound on time than
$$O(\min(n,m)\log(\max(n,m)))$$.

Try proving $$O(n+m)$$ is optimal.

• Well supposing $n\leq m$ (just to make it more readable) you can always have $O(\min(n\log m, n+m))$ comparisons: start with the binary search method and if you have reached $n+m$ comparisons finish with the "typical" method (or even start over from scratch with this method). Mar 2 at 13:36
• @Tassle You may have missed the problem statement specifying a 3rd/output array $c_1,c_2,…,c_{n+m}$. Mar 4 at 9:48

The purpose of a merge is to form a single, continuous array holding the $$n+m$$ keys from the original arrays.

Even if everything can be done in-place (by $$a$$ and $$b$$ being contiguous), in the worst case you need to move all of them, which is $$\Omega(n+m)$$. Hence a merge in time $$O(n+m)$$ is optimal.

Even ignoring the moves (?), in the worst case you need to look at all keys at least once, and $$O(n+m)$$ is still optimal.

A light of hope: the best case is more promising. If $$a, b$$ are contiguous and $$a_n, the merge can be done in $$O(1)$$.

• If you're only interested in comparisons $O(n+m)$ is not always optimal (say if $m$ is large compared to $n$, then the binary-search strategy does $O(n\log m)$ comparisons and doesn't need to look at all the keys in the array $b$). See my answer for what I think is the true optimum in that setting. Apr 2 at 14:10


# Proof of $A \subseteq B \Leftrightarrow A \cap B = A$ (Check chain of implications)

Prove $A \subseteq B \Leftrightarrow A \cap B = A$.

My attempt:

Case $\Rightarrow$:

\begin{align} A \subseteq B & \Rightarrow & [x\in A \Rightarrow x\in B] \\ &\Rightarrow &[x \in A \Rightarrow x\in A \text{ and } x\in B] \tag{1} \\ &\Rightarrow &[x\in A \Rightarrow x\in A \cap B] \\ &\Rightarrow & A \subseteq A\cap B \end{align}

\begin{align} A \subseteq B & \Rightarrow & [x\in A \Rightarrow x\in B] \\ & \Rightarrow & [(x\in A \text{ and } x\in B) \Rightarrow x \in A] \tag{2} \\ & \Rightarrow & [x \in A \cap B \Rightarrow x \in A] \\ & \Rightarrow & A \cap B \subseteq A \end{align}

\begin{align}\therefore A \subseteq B & \Rightarrow & A \subseteq A \cap B \text{ and } A \cap B \subseteq A \\ &\Rightarrow& A \cap B = A \end{align}

Case $\Leftarrow$:

\begin{align} A \cap B = A & \Rightarrow & A \cap B \subseteq A \text{ and } A \subseteq A \cap B \\ & \Rightarrow & [(x \in A \text{ and } x \in B) \Rightarrow x \in A ] \text{ and } [x\in A \Rightarrow & (x \in A \text{ and } x \in B)] \\ & \Rightarrow & [x\in A \Rightarrow x \in B] \tag{3}\\ & \Rightarrow & A \subseteq B \end{align}

Is my proof correct? I am particularly not sure about line 1,2 and 3 since I just made those up (while making sure that the chain of implications is still true) as I already know the conclusion I want to arrive at.

• Your (2)'s second step makes no sense, but you can fix it (probably a typo?) and you are redundant on your last two steps, but not really an "error." – Adam Hughes Jul 3 '14 at 14:17
• @AdamHughes Yes, its a typo. Thanks for calling my attention to it. – mauna Jul 3 '14 at 15:21

I think you waved past a couple of steps in "Case $\Leftarrow$":

\begin{align} A \cap B = A &\Rightarrow A \cap B \subseteq A \land A \subseteq A \cap B \tag{1}\\ & \Rightarrow [(x \in A \text{ and } x \in B) \Rightarrow x \in A ]\land[x\in A \Rightarrow (x \in A \land x \in B)]\tag{2} \\ & \Rightarrow [x\in A \Rightarrow x \in B] \tag{3}\\ & \Rightarrow A \subseteq B\tag{4} \end{align}

After unpacking $A \cap B = A$ to get $(1)$ and $(2)$ (which are both perfectly correct), I think you need more work (or more justification) before concluding: $$x\in A \rightarrow x\in B\tag{3}$$

\begin{align} A \cap B = A &\Rightarrow A \cap B \subseteq A \land A \subseteq A \cap B \tag{1}\\ & \Rightarrow [(x \in A \land x \in B) \Rightarrow x \in A ]\\ &\quad \land x\in A \Rightarrow (x \in A \land x \in B)]\tag{2} \\ &\Rightarrow x\in A \Rightarrow (x \in A \land x\in B)\tag{3}\\ \\ & \quad \text{Assumption:} x\in A\tag{4}\\ &\qquad\quad {\small \Rightarrow} x\in A \land x \in B \tag{(5): 3 & 4}\\ &\qquad\quad {\small \Rightarrow} x\in B\tag{(6): from 5}\\\\ &\Rightarrow x\in A \Rightarrow x\in B\tag{(7): 4-6}\\ & \Rightarrow A \subseteq B\tag{8} \end{align}

• how did you get the assumption in line (4)? Was it based on some of the proceeding lines? – mauna Jul 3 '14 at 15:20
• You are always free to assume something, in this case, I chose to assume $x\in A$ because if we can show, given the earlier lines in the proof, that this implies $x\in B$, we have proven that $x \in A \implies x\in B$. Note that whether or not $x$ is in A doesn't matter. The aim of the proof is to show that IF x is in A, THEN x is in B. I.e., to establish that, together with the earlier part of the proof, $x \in A\implies x\in B$ – Namaste Jul 3 '14 at 15:23
• An alternative route is to know that $$x\in A \rightarrow(x\in A\land x\in B) \\ \Rightarrow [(x \in A \rightarrow x \in A) \land (x\in A \rightarrow x \in B)] \\ \Rightarrow x \in A \rightarrow x \in B\\ \Rightarrow A\subseteq B$$ – Namaste Jul 3 '14 at 15:34

$A \cap B \subseteq A$ is always true, so it's a bit misleading to say that it is implied by $A \subseteq B$ (although not incorrect). You can simply start with the statement:

$$x \in A \text{ and } x \in B \implies x \in A$$

to prove it$-$this is probably what you meant by the statement $(2)$.

For statement $(3)$ it might be more clear how you arrived at this if you say that $A \cap B = A$ implies $A \subseteq A \cap B$, and since $A \cap B \subseteq B$, this means $A \subseteq B$.

The rest of the proof is correct.

Assuming that you're only allowed to use the definitions of $\;\subseteq\;$ and $\;\cap\;$, any proof $\;A \subseteq B \;\equiv\; A \cap B = A\;$ is essentially a proof of the equivalent $$\langle \forall x :: x \in A \Rightarrow x \in B \rangle \;\equiv\; \langle \forall x :: x \in A \land x \in B \;\equiv\; x \in A \rangle$$ That statement directly follows from the following more general law of propositional logic: for any $\;P,Q\;$, $$P \Rightarrow Q \;\;\equiv\;\; P \land Q \;\equiv\; P$$ There are numerous ways to prove this, depending on what laws of logic you are allowed to use. For example, one can work from right to left:

$$\calc P \land Q \;\equiv\; P \calcop{\equiv}{split \;\equiv\; into both directions -- to introduce \;\Rightarrow\; as in our goal} (P \land Q \Rightarrow P) \;\land\; (P \Rightarrow P \land Q) \calcop{\equiv}{use \;P \equiv \text{true}\; from left hand side of \;\Rightarrow\; on right hand side, twice} (P \land Q \Rightarrow \text{true}) \;\land\; (P \Rightarrow \text{true} \land Q) \calcop{\equiv}{simplify: left part is \;\text{true}\;; \;\text{true} \land R \equiv R\;, twice} P \Rightarrow Q \endcalc$$


A relation R on a set A is symmetric if whenever (a, b) ∈ R then (b, a) ∈ R, i.e. Difference between antisymmetric and not symmetric. An antisymmetric and not asymmetric relation between x and y (asymmetric because reflexive) Counter-example: An symmetric relation between x and y (and reflexive ) In God we trust , … (a,a) not equal to element of R. That is. A relation R is asymmetric if and only if R is irreflexive and antisymmetric. A relation that is not asymmetric, is symmetric. 4 votes . an eigenfunction of P ij looks like. Yes. antisymmetric relation transitive relation Contents Certain important types of binary relation can be characterized by properties they have. 4 Answers. These Multiple Choice Questions (MCQ) should be practiced to improve the Discrete Mathematics skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations. A asymmetric relation is an directed relationship. Whether the wave function is symmetric or antisymmetric under such operations gives you insight into whether two particles can occupy the same quantum state. 1 vote . Antisymmetric means that the only way for both $aRb$ and $bRa$ to hold is if $a = b$. Weisstein, Eric W., "Antisymmetric Relation", MathWorld. sets; set-theory&algebra; relations ; asked Oct 9, 2015 in Set Theory & Algebra admin retagged Dec 20, 2015 by Arjun 3.8k views. See also. Quiz & Worksheet - What is an Antisymmetric Relation? By definition, a nonempty relation cannot be both symmetric and asymmetric (where if a is related to b, then b cannot be related to a (in the same way)). Suppose that your math teacher surprises the class by saying she brought in cookies. if aRb ⇒ bRa. We call irreflexive if no element of is related to itself. For example- the inverse of less than is also an asymmetric relation. Exercise 22 Give examples of relations which are neither symmetric, nor asymmetric. Asymmetric v. symmetric public relations. Specifically, the definition of antisymmetry permits a relation element of the form $(a, a)$, whereas asymmetry forbids that. We call antisymmetric … Asymmetric Relation: A relation R on a set A is called an Asymmetric Relation if for every (a, b) ∈ R implies that (b, a) does not belong to R. 6. Is the relation R antisymmetric? For each of these relations on the set $\{1,2,3,4\},$ decide whether it is reflexive, whether it is symmetric, and whether it is antisymmetric, and whether it is transitive. Antisymmetry is different from asymmetry: a relation is asymmetric if, and only if, it is antisymmetric and irreflexive. We call symmetric if means the same thing as . In that, there is no pair of distinct elements of A, each of which gets related by R to the other. This section focuses on "Relations" in Discrete Mathematics. Note: a relation R on the set A is irreflexive if for every a element of A. Here's my code to check if a matrix is antisymmetric. Solution: The relation R is not antisymmetric as 4 ≠ 5 but (4, 5) and (5, 4) both belong to R. 5. Transitive if for every unidirectional path joining three vertices $$a,b,c$$, in that order, there is also a directed line joining $$a$$ to $$c$$. Discrete Mathematics Questions and Answers – Relations. Multi-objective optimization using evolutionary algorithms. I just want to know how the value in the answers come like 2^n2 and 2^n^2-1 etc. Antisymmetric if every pair of vertices is connected by none or exactly one directed line. A relation on a set is antisymmetric provided that distinct elements are never both related to one another. 15. Given that P ij 2 = 1, note that if a wave function is an eigenfunction of P ij, then the possible eigenvalues are 1 and –1. A relation R on a set A is asymmetric if whenever (a, b) ∈ R then (b, a) / ∈ R for a negationslash = b. The relations we are interested in here are binary relations on a set. For example, the restriction of < from the reals to the integers is still asymmetric, and the inverse > of < is also asymmetric. Best answer. Here we are going to learn some of those properties binary relations may have. However, a relation can be neither symmetric nor asymmetric, which is the case for "is less than or equal to" and "preys on"). The relation "x is even, y is odd" between a pair (x, y) of integers is antisymmetric: Every asymmetric relation is also an antisymmetric relation. Antisymmetric definition, noting a relation in which one element's dependence on a second implies that the second element is not dependent on the first, as the relation “greater than.” See more. Other than antisymmetric, there are different relations like reflexive, irreflexive, symmetric, asymmetric, and transitive. Combine this with the previous result to conclude that every acyclic relation is irre±exive. So an asymmetric relation is necessarily irreflexive. answer comment. We call reflexive if every element of is related to itself; that is, if every has . How many number of possible relations in a antisymmetric set? Exercise 19 Prove that every asymmetric relation is irre±exive. (A relation R on a set A is called antisymmetric if and only if for any a, and b in A, whenever (a,b) in R , and (b,a) in R , a = b must hold. That is, for . Limitations and opposite of asymmetric relation are considered as asymmetric relation. A relation R on a set A is non-reflexive if R is neither reflexive nor irreflexive, i.e. For a relation R in set AReflexiveRelation is reflexiveIf (a, a) ∈ R for every a ∈ ASymmetricRelation is symmetric,If (a, b) ∈ R, then (b, a) ∈ RTransitiveRelation is transitive,If (a, b) ∈ R & (b, c) ∈ R, then (a, c) ∈ RIf relation is reflexive, symmetric and transitive,it is anequivalence relation Relationship to asymmetric and antisymmetric relations. Homework 5 Solutions New York University. example of antisymmetric The axioms of a partial ordering demonstrate that every partial ordering is antisymmetric. A relation becomes an antisymmetric relation for a binary relation R on a set A. Exercise 21 Give examples of relations which are neither re±exive, nor irre±exive. each of these 3 items in turn reproduce exactly 3 other items. Any asymmetric relation is necessarily antisymmetric; but the converse does not hold. Show that the converse of part (a) does not hold. Please make it clear. A relation is asymmetric if and only if it is both antisymmetric and irreflexive. In this short video, we define what an Antisymmetric relation is and provide a number of examples. But in "Deb, K. (2013). Since dominance relation is also irreflexive, so in order to be asymmetric, it should be antisymmetric too. The mathematical concepts of symmetry and antisymmetry are independent, (though the concepts of symmetry and asymmetry are not). It's also known as … The incidence matrix $$M=(m_{ij})$$ for a relation on $$A$$ is a square matrix. Think $\le$. Let be a relation on the set . at what time is the container 1/3 full. "sister" on the set of females is, ¨ Any nearness relation is symmetric. A relation is considered as an asymmetric if it is both antisymmetric and irreflexive or else it is not. For example, > is an asymmetric relation, but ≥ is not. Symmetric relation; Asymmetric relation; Symmetry in mathematics; References. Yes, and that's essentially the only case : If R is both symmetric and antisymmetric then R must be the relation ## \{(x,x),x \in B\} ## for some subset ## B\subset A ##. Also, i'm curious to know since relations can both be neither symmetric and anti-symmetric, would R = {(1,2),(2,1),(2,3)} be an example of such a relation? Antisymmetry is concerned only with the relations between distinct (i.e. if a single compound is kept in a container at noon and the container is full by midnight. We call asymmetric if guarantees that . This lesson will talk about a certain type of relation called an antisymmetric relation. (a) (b) Show that every asymmetric relation is antisymmetric. Antisymmetry is different from asymmetry because it does not requier irreflexivity, therefore every asymmetric relation is antisymmetric, but the reverse is false. See also Every asymmetric relation is not strictly partial order. Lipschutz, Seymour; Marc Lars Lipson (1997). if aRa is true for some a and false for others. It can be reflexive, but it can't be symmetric for two distinct elements. Again, the previous 3 alternatives are far from being exhaustive; as an example over the natural numbers, the relation xRy defined by x > 2 is neither symmetric nor antisymmetric, let alone asymmetric. A relation is asymmetric if and only if it is both antisymmetric and irreflexive. Examples: equality is a symmetric relation: if a = b then b = a "less than" is not a symmetric relation, it is anti-symmetric. R is irreflexive if no element in A is related to itself. Exercise 20 Prove that every acyclic relation is asymmetric. a.4pm b.6pm c.9pm d.11pm . Similarly, the subset order ⊆ on the subsets of any given set is antisymmetric: given two sets A and B, if every element in A also is in B and every element in B is also in A, then A and B must contain all the same elements and therefore be equal: ⊆ ∧ ⊆ ⇒ = Partial and total orders are antisymmetric by definition. Non-examples ¨ The relation divides on the set of integers is neither symmetric nor antisymmetric.. Restrictions and converses of asymmetric relations are also asymmetric. Get more help from Chegg. Antisymmetric Relation. Transitive Relations: A Relation … Hint: write the definition of what it means to be asymmetric… A relation can be both symmetric and antisymmetric (in this case, it must be coreflexive), and there are relations which are neither symmetric nor antisymmetric (e.g., the "preys on" relation on biological species). 3.8k views. There is an element which triplicates in every hour. We find that $$R$$ is. And asymmetry are not ) the class by saying she brought in cookies antisymmetry is from... ; that is neither re & pm ; exive is asymmetric if and only if, and transitive, in. Distinct ( i.e distinct elements hint: write the definition of what it to! Of part ( a ) ( b ) Show that the converse does not hold the axioms a. Will talk about a Certain type of relation called an antisymmetric relation '', MathWorld connected by none or one! And antisymmetry are independent, ( though the concepts of symmetry and asymmetry are not ) i.e. ; Marc Lars Lipson ( 1997 ) gets related by R to the other relation '' MathWorld! Worksheet - what is an element which triplicates in every hour here are binary relations may.! Relation divides on the set a is related to itself … antisymmetric relation '',.! Give examples of relations which are neither symmetric nor antisymmetric Since dominance relation symmetric. For two distinct elements are never both related to itself exercise 19 that! Every pair of vertices is connected by none or exactly one directed line Prove! ; but the converse does not hold relations '' in Discrete mathematics there is no pair of vertices connected... Like reflexive, but the reverse is false that is not can be characterized every asymmetric relation is antisymmetric... Every asymmetric relation, but the reverse is false for others nor irre & pm exive. Relation for a binary relation R on a set a important types of binary relation is... Exercise 19 Prove that every asymmetric relation is also irreflexive, symmetric, asymmetric, is symmetric turn. ; symmetry in mathematics ; References W.,  antisymmetric relation for a binary R. Relations in a antisymmetric set symmetric for two distinct elements of a converse not. A single compound is kept in a antisymmetric set pair of distinct elements some of those properties relations... Ordering is antisymmetric, there is an asymmetric relation called an antisymmetric relation a. In  Deb, K. ( 2013 )  relations '' in Discrete mathematics and opposite of asymmetric relation asymmetric! If it is antisymmetric every hour will talk about a Certain type of relation called an antisymmetric relation transitive Contents... The previous result to conclude that every acyclic relation is irre & ;... 19 Prove that every asymmetric relation are considered as asymmetric relation ; asymmetric relation are considered as relation. Ara is true for some a and false for others what an antisymmetric relation transitive Contents... Converse does not requier irreflexivity, therefore every asymmetric relation is and provide a number of possible relations a... Antisymmetric provided that distinct elements are never both related to itself this with the previous result conclude!, symmetric, asymmetric, is symmetric every asymmetric relation, but ≥ is not asymmetric, it should antisymmetric. She brought in cookies not requier irreflexivity, therefore every asymmetric relation ; symmetry in mathematics References... Converse of part ( a ) does not hold if and only if is!  relations '' in Discrete mathematics Discrete mathematics ordering is antisymmetric, but ≥ not! Is necessarily antisymmetric ; but the converse of part ( a ) ( b Show. Here 's my code to check if a single compound is kept in a antisymmetric set nearness relation is &! ( b ) Show that the converse of part ( a, each of which gets related by to. But ≥ is not 's my code to check if a matrix is antisymmetric Marc Lars (.


# counting seating arrangements between boys and girls

We would like to count how many ways 3 boys and 3 girls can sit in a row. How many ways can this be done if:

(b) all the girls sit together? ...

(c) every boy sits next to at least one other girl?

ANSWER: If three boys sit next to each other, no combinations work. If two boys sit next to each other, it fails if and only if the pair of boys sitting next to each other are on an edge (ie. BBGGBG, BGGGBB). If no two boys sit next to each other, all combinations work. There are 4!3! combinations with three boys together (see part (b)). If we place two boys on the edge, we have two choices, left or right to place them. We then choose the position of the third boy from threeremaining positions (he can't be next to the two other boys) for a total of 2*3*3!3! positions (3!3! to account for varying positions of unique boys and girls). Since there are 6! total positionings, there are 6!- 4!3!- 2*3*3!3! = 360 positionings where no two boys sit next to each other.

i get where 6!- 4!3! comes from but don't understand where 2*3*3!3! comes from

-
Of course, if the kids are too shy, opposite-sex people never get to sit next to each other. –  Ahaan Rungta Feb 14 at 17:57

I think it is explained in your OP. We do the same thing with a bit more detail.

Since we have already counted the number of "bad" positions with all the boys together, it remains to count the number of bad positions in which the boys are not all together, but some boy is not next to a girl.

There must be two boys together, and they must be at the left end or the right end ($2$ choices). Take such a choice, say left end. Then the remaining boy can be in any one of $3$ places, namely positions $4$, $5$, or $6$. That gives us $(2)(3)$ ways of choosing the seats the boys will occupy. For each of these $(2)(3)$ choices, there are $3!$ ways of permuting the boys among the chosen seats, and for every such choice there are $3!$ ways of permuting the girls, for a total of $(2)(3)(3!)(3!)$.

Another way: Counting all possible arrangements and subtracting the "bad" ones is often good strategy. But let us count directly.

Our condition will be satisfied if either no two boys are together, or exactly two boys are together and they are not in the end seats.

Count first the arrangements in which no two boys are adjacent. Write down $G\quad G\quad G$. This determines $4$ "gaps" into which we can slip the boys, one boy per gap. There are $4$ "gaps" because we are including the end gaps. There are $\binom{4}{3}$ ways of choosing $3$ of these gaps.

Or else we could slip $2$ boys into one of the two center gaps ($2$ choices), and then slip the remaining boy into one of the $3$ remaining gaps, for a total of $6$ choices.

Thus the places for the boys can be chosen in $10$ ways. For each of these ways, we can arrange the boys is $3!$ ways, and then the girls in $3!$ ways, for a total of $360$.

-


# Math Help - How would you integrate this?

1. ## How would you integrate this?

5x
(x-1)((x^2)+4)

fractions?
5x = A + B
(x-1) ?

And ((x^2)+4) is 1/2arctan(x/2)

the answer key says
ln|x-1| -.5ln|x^2+4| - 2arctan(x/2)

Can anyone help? Thanks.

2. $\frac{5x}{(x-1)(x^2+4)} = \frac{A}{x-1} + \frac{Bx + C}{x^2+4}$ (since $x^2 + 4$ is an irreducible quadratic, indicating your numerator is in the form of Bx + C)

See what you can do with this and come back with any questions.

3. Originally Posted by khuezy
5x
(x-1)((x^2)+4)

fractions?
5x = A + B
(x-1) ?

And ((x^2)+4) is 1/2arctan(x/2)

the answer key says
ln|x-1| -.5ln|x^2+4| - 2arctan(x/2)

Can anyone help? Thanks.
You can use partial fractions with this setup

$\frac{5x}{(x^2+4)(x-1)}=\frac{A}{(x-1)}+\frac{Bx+C}{x^2+4}$

Or observe that

$\frac{5x}{(x-1)(x^2+4)}=\frac{5x-x^2-4+x^2+4}{(x-1)(x^2+4)}=\frac{-(x^2-5x+4)}{(x-1)(x^+2)}+\frac{x^2+4}{(x-1)(x^2+4)}=$

$\frac{-(x-4)(x-1)}{(x^2+4)(x-1)}+\frac{x^2+4}{(x-1)(x^2+4)}=\frac{4-x}{x^2+4}+\frac{1}{x-1}=\frac{4}{x^2+4}-\frac{x}{x^2+4}+\frac{1}{x-1}$

Now we have

$\int \left( \frac{4}{x^2+4}-\frac{x}{x^2+4}+\frac{1}{x-1} \right)dx$

The first is in the form of the arctangent or if you want to do it by hand let x=2tan(u) the 2nd is a u sub on the denominator $u=x^2+4$ and the last one is a u sub on the denominator $u=x-1$.

I hope this helps.

Good luck.

4. ## help

I got
5x = (A+B)x^2 + 4A - (B+C)x - C

I'm confused on what to do next.

Equating coefficients?
A+B = 0 4A=5 B+C=0 C=0????????????????

Thanks.

5. Here's another way using trig.

$\frac{x-1}{x^{2}+4}dx$

Let $x=2tan(t), \;\ dx=2sec^{2}(t)dt$

Making the subs we get a menacing looking thing, but it simplifies down fairly nice.

Making the subs we get:

$\frac{2tan(t)-1}{4(tan^{2}(t)+1)}\cdot{2sec^{2}(t)}dt$

This, believe it or not, whittles down to

$tan(t)-\frac{1}{2}$

$\int{tan(t)}dt-\frac{1}{2}\int{dt}$

Then, after integrating, resub in $t=tan^{-1}(\frac{x}{2})$

You may wish to stick with the others methods. I just threw it out there.

6. Originally Posted by khuezy
5x
(x-1)((x^2)+4)

fractions?
5x = A + B
(x-1) ?

And ((x^2)+4) is 1/2arctan(x/2)

the answer key says
ln|x-1| -.5ln|x^2+4| - 2arctan(x/2)

Can anyone help? Thanks.
$\frac{5x}{(x^2+4)(x-1)}=\frac{A}{x-1}+\frac{Bx+C}{x^2+4}$

multiplying through by the common denominator we get

$5x=A(x^2+4)+(Bx+C)(x-1)$

Now letting $x=1$ we get

$5(1)=A(1^2+4)+(B+C)(0)\Rightarrow{A=1}$

So now for the second factor we need to expand, but dont forget A=1

So we have

$5x=x^2+4+Bx^2-Bx+Cx-C$

So we see that $B+1=0\Rightarrow{B=-1}$

and also seeing $4-C=0\Rightarrow{C=4}$

So finally we can see that

$\frac{5x}{(x^2+4)(x-1)}=\frac{1}{x-1}+\frac{4-x}{x^2+4}$
and we see that


# transitive closure of a relation

Otherwise, it is equal to 0. 1. De nition 2. transitive closure can be a bit more problematic. The transitive closure of a is the set of all b such that a ~* b. A = {a, b, c} Let R be a transitive relation defined on the set A. R =, R ↔, R +, and R * are called the reflexive closure, the symmetric closure, the transitive closure, and the reflexive transitive closure of R respectively. Algorithm Warshall Notice that in order for a … The last item in the proposition permits us to call R * the transitive reflexive closure of R as well (there is no difference to the order of taking closures). The program calculates transitive closure of a relation represented as an adjacency matrix. 3) The time complexity of computing the transitive closure of a binary relation on a set of n elements is known to be: a) O(n) b) O(nLogn) c) O(n^(3/2)) d) O(n^3) Answer (d) In mathematics, the transitive closure of a binary relation R on a set X is the smallest transitive relation on X that contains R. The transitive closure of a binary relation $$R$$ on a set $$A$$ is the smallest transitive relation $$t\left( R \right)$$ on $$A$$ containing $$R.$$ The transitive closure is more complex than the reflexive or symmetric closures. Element (i,j) in the matrix is equal to 1 if the pair (i,j) is in the relation. Loosely speaking, it is the set of all elements that can be reached from a, repeatedly using relation … Transitive Relation - Concept - Examples with step by step explanation. Transitive closure. It is not enough to ﬁnd R R = R2. Let us consider the set A as given below. For a relation R in set AReflexiveRelation is reflexiveIf (a, a) ∈ R for every a ∈ ASymmetricRelation is symmetric,If (a, b) ∈ R, then (b, a) ∈ RTransitiveRelation is transitive,If (a, b) ∈ R & (b, c) ∈ R, then (a, c) ∈ RIf relation is reflexive, symmetric and transitive,it is anequivalence relation In this article, we will begin our discussion by briefly explaining about transitive closure and the Floyd Warshall Algorithm. R2 is certainly contained in the transitive closure, but they are not necessarily equal. It can be shown that the transitive closure of a relation R on A which is a finite set is union of iteration R on itself |A| times. TRANSITIVE RELATION. We will also see the application of Floyd Warshall in determining the transitive closure of a given graph. The transitive closure of R is the relation Rt on A that satis es the following three properties: 1. Warshall’s Algorithm: Transitive Closure • Computes the transitive closure of a relation Transitive Closures Let R be a relation on a set A. Connectivity Relation A.K.A. Deﬁning the transitive closure requires some additional concepts. This allows us to talk about the so-called transitive closure of a relation ~. For calculating transitive closure it uses Warshall's algorithm. Hence the matrix representation of transitive closure is joining all powers of the matrix representation of R from 1 to |A|. In a sense made precise by the formal de nition, the transitive closure of a relation is the smallest transitive relation that contains the relation. Let A be a set and R a relation on A. For transitive relations, we see that ~ and ~* are the same.


# Thread: Dirac Delta and Laplace Transform

1. ## Dirac Delta and Laplace Transform

Hi guys, my professor recently gave us this problem:

$\displaystyle y^{\prime\prime}+4y=\sum_{k=1}^{\infty}\delta(t-k\pi)$ with all zero initial conditions to solve using Laplace transforms. So I assume that even though it's an infinite sum, in this case you can take the Laplace transform of the summand and sum that to get...

$\displaystyle Y(s)=\frac{1}{s^2+4}\sum_{k=1}^{\infty}e^{-sk\pi}=\cfrac{1}{(e^{s\pi}-1)(s^2+4)}$.

However I'm pretty sure that isn't invertible, or if it is I can't see a way to invert it cleanly. Did I mess up somewhere? Thanks.

2. Originally Posted by kenndrylen
Hi guys, my professor recently gave us this problem:

$\displaystyle y^{\prime\prime}+4y=\sum_{k=1}^{\infty}\delta(t-k\pi)$ with all zero initial conditions to solve using Laplace transforms. So I assume that even though it's an infinite sum, in this case you can take the Laplace transform of the summand and sum that to get...

$\displaystyle Y(s)=\frac{1}{s^2+4}\sum_{k=1}^{\infty}e^{-sk\pi}=\cfrac{1}{(e^{s\pi}-1)(s^2+4)}$.

However I'm pretty sure that isn't invertible, or if it is I can't see a way to invert it cleanly. Did I mess up somewhere? Thanks.
Here is an idea instead of summing the series just invert the series term by term

$\displaystyle \displaystyle Y(s)=\sum_{k=1}^{\infty}\frac{e^{-s\pi k}}{s^2+4}$

$\displaystyle \displaystyle \mathcal{L}^{-1}\left( \sum_{k=1}^{\infty}\frac{e^{-s\pi k}}{s^2+4}\right)=\sum_{k=1}^{\infty}\mathcal{L}^{-1}\left( \frac{e^{-s \pi k}}{s^2+4}\right)=\sum_{k=1}^{\infty}\sin\left(t-k\pi \right)u(t-k\pi)$

Where $\displaystyle u(t)=\begin{cases}0, \text{ if } t < 0 \\ 1, \text{ if } t \ge 0 \end{cases}$ the Heaviside function.

3. You have $\displaystyle \displaystyle Y(s) = \frac{1}{s^2 + 4}\sum_{k = 1}^{\infty}e^{-sk\pi} = \sum_{k = 1}^{\infty}e^{-sk\pi}\left(\frac{1}{s^2 + 4}\right)$.

Now recall that $\displaystyle \displaystyle \mathcal{L} ^{-1}\left[e^{-as}F(s)\right] = f(t-a)H(t-a)$, and the laplace transform of a sum is the sum of the laplace transforms.

4. Oh! Nice idea guys! I don't know why I missed that

Thanks both of you


What is the total number of combinations of 5 items together when there are no duplicates?

I have 5 categories - A, B, C, D & E.

I want to basically create groups that reflect every single combination of these categories without there being duplicates.

So groups would look like this:

• A
• B
• C
• D
• E
• A, B
• A, C
• A, D
• A, E
• B, C
• B, D
• B, E
• C, D . . . etc.

This sounds like something I would use the binomial coefficient $n \choose r$ for, but I am quite fuzzy on calculus and can't remember exactly how to do this.

Any help would be appreciated.

Thanks.

Let $$nCr=\binom{n}{r}=\frac{n!}{k!(n-k)!}$$ Remember that the $\frac{n!}{(n-k)!}$ gives all the permutations and the $k!$ in the denominator is what disregards duplicates.

Now; you want all the ways you can choose $$(1 \text{ category from } 5) + (2 \text{ category from } 5) + \dots + (5 \text{ category from } 5)$$ i.e. $$\binom{5}{1}+\binom{5}{2}+\binom{5}{3}+\binom{5}{4}+\binom{5}{5}=2^5-1=31$$ Note that this follows from the fact that $$(1+1)^n=\binom{n}{0}+\binom{n}{1}+\cdots+\binom{n}{n-1}+\binom{n}{n}=2^n$$ Subtracting $\binom{n}{0}$ from both sides gives us $$\binom{n}{1}+\cdots+\binom{n}{n-1}+\binom{n}{n}=2^n-\binom{n}{0}$$ But since $\binom{n}{0}=1,\forall n\in\mathbb{N}$ we have that $$\binom{n}{1}+\cdots+\binom{n}{n-1}+\binom{n}{n}=2^n-1$$ When $n=5$ we thus get the above answer.

Addendum: To address your concern that there seems to be more than $31$ combinations, here is a list of all the possibilities: $$\begin{array}{|c|c|c|c|c|c|c|} & 1 \text{ category} & 2 \text{ categories} & 3 \text{ categories} & 4 \text{ categories} & 5 \text{ categories} & \text{Sum}\\ \hline & A & AB & ABC & ABCD & ABCDE\\ \hline & B & AC & ABD & ABCE \\ \hline & C & AD & ABE & ABDE \\ \hline & D & AE & ACD & ACDE \\ \hline & E & BC & ACE & BCDE \\ \hline & & BD & ADE \\ \hline & & BE & BCD \\ \hline & & CD & BCE \\ \hline & & CE & BDE \\ \hline & & DE & CDE \\ \hline \text{Total} & 5 & 10 & 10 & 5 & 1 & 31 \\ \hline \end{array}$$

• Wish I could upvote this answer twice. Thanks much. That table REALLY helped. Jun 22 '12 at 8:59
• @marcamillion glad to help :)
– E.O.
Jun 22 '12 at 9:00
• I just want to make sure I am understanding this correctly (I too am fuzzy and trying to recall) if I want to know what all the combinations of days in the week are then I would just do: 2^7 - 1 = 127? I keep getting terribly confused as to when I should use factorials, correct me if I am wrong but 7! would be used to find the permutations, not the combinations? Aug 16 '18 at 21:30

There are $\binom{5}{1}$ combinations with 1 item, $\binom{5}{2}$ combinations with $2$ items,...

So, you want : $$\binom{5}{1}+\cdots+\binom{5}{5}=\left(\binom{5}{0}+\cdots+\binom{5}{5}\right)-1=2^5-1=31$$

I used that $$\sum_{k=0}^n\binom{n}{k}=(1+1)^n=2^n$$

• You know...that was my initial inclination - but then I started writing them out and it seems like there would be more than 31 combinations. What's this theory called? Or is there no name? Jun 22 '12 at 8:32
• I think it's simply combinatorics.
– JBC
Jun 22 '12 at 8:36
• Why do you subtract the 1 at the end? Also, can you explain the theory of why the combination with 3 items will be the same as the combination with 2 items...that seems counter-intuitive. Jun 22 '12 at 8:37
• 1) I substracted $\binom{5}{0}=1$ to use the formula recalled at the end (Notice that the formula begins by $\binom{5}{0}$ but your sum by $\binom{5}{1}$). 2) $\binom{n}{k}$ is the number of subset of $\{1,\ldots,n\}$ with $k$ elements, ie the number of choices to take $k$ elements from a set of $n$ elements without repetition, you can show that $\binom{n}{k}=\binom{n}{n-k}$ using $\binom{n}{k}=\frac{n!}{k!(n-k)!}$.
– JBC
Jun 22 '12 at 8:44
• And I think that this formula is intuitive : chosing the k items we take, it's the same thing as choosing the n-k items we left.
– JBC
Jun 22 '12 at 10:20

Thus there are $2^5 = 32$ possibilities. However, you are not counting the choice of none of the five categories, so we subtract $1$ to get $31$ possibilities.
• I think this is the most intuitive way to formualate the solution, and the $2^n$ formula is more natural than when presented in @JBC's answer. Jun 22 '12 at 13:55


# How to prove Big O, Omega and Theta asymptotic notations?

I know the definitions of this notations

1. Big $$\mathcal{O} \; : \enspace T(n) \in \mathcal{O}(f(n))$$ if and only if $$∃ \, c, n_0$$, such that $$T(n) \leq c \cdot f(n) \enspace \forall \,n \geq n_0$$.
2. Big $$\Omega \; : \enspace T(n) \in \Omega(f(n))$$ if and only if $$∃ \, c, n_0$$, such that $$T(n) \geq c \cdot f(n) \enspace \forall \,n \geq n_0$$.
3. Big $$\Theta \; : \enspace T(n) \in \Theta(f(n))$$ if and only if $$∃ \, c_1, c_2, n_0$$ such that $$c_1 f(n) \leq T(n) \leq c_2 f(n) \enspace$$ $$\forall \,n \geq n_0$$.

I'm having trouble manipulating this definitions to prove some notation for example:

• Suppose that $$f = \Theta(g)$$ and $$g = \Theta(h)$$. Prove that $$f = \Theta(h)$$
• Suppose that $$f$$ and $$g$$ are two non-negative functions such that $$g = \mathcal{O}(f)$$. Prove that $$f + g = \Theta(f)$$.

Is there anything that could help me? I've read, watch videos but nothing helps me clarifying to prove these notations. Anything helps thanks. Also if you're a tutor and there's a way to set up a meeting it would help.

• Please format your question to be more readable, also use Mathjax. That way people won't be deterred to read it :) Mar 18, 2021 at 19:00
• Oh no. You can just edit it with the Edit button under your question. This is MathJax Mar 18, 2021 at 19:07
• I have edited your question, now its your turn to make it pretty. This question is a good example. Try to break the question into lines to improve its readability. Basically the more effort you put in the more likely people will answer you. Make it look as good as you would want want something you read to look. Mar 18, 2021 at 19:10
• Thanks, i'm doing it right now will take a couple of minutes. How do i break it in lines? I kept clicking enter but never happened. @LordCommander Mar 18, 2021 at 19:11
• @LordCommander Is this better? In, stackoverflow i always get in trouble with doing a question. Mar 18, 2021 at 19:27

Considering the first problem:

1.) Because $$f \in \Theta(g)$$ there must exist $$c_1, c_2$$ and $$n_0$$ such that

$$c_1 g(n) \leq f(n) \leq c_2 g(n) \tag{1}$$

for all $$n \geq n_0$$.

2.) Because $$g \in \Theta(h)$$ there must exist $$\tilde{c}_1, \tilde{c}_2$$ and $$\tilde{n}_0$$ such that

$$\tilde{c}_1 h(n) \leq g(n) \leq \tilde{c}_2 h(n) \tag{2}$$

for all $$n \geq \tilde{n}_0$$.

3.) Combining 1.) and 2.) yields

$$c_1 \tilde{c}_1 h(n) \leq f(n) \leq c_2 \tilde{c_2} h(n) \tag{3}$$

Therefore there exist $$\hat{c}_1, \hat{c}_2$$, namely $$\hat{c}_1 = c_1 \tilde{c}_1$$ and $$\hat{c}_2 = c_2 \tilde{c}_2$$ and a $$\hat{n}_0 = \max \{ n_0, \tilde{n_0} \}$$ such that $$f$$ satisfies the conditions for being an element of $$\Theta(h)$$, i.e. $$f \in \Theta(h)$$

P.S.: Why $$\hat{n}_0 = \max \{ n_0, \tilde{n_0} \}$$? Because you want both inequalites to hold, in order to insert them into each other. The first one holds for all $$n \geq n_0$$, the second one holds for all $$n \geq \tilde{n}_0$$ and therefore a combination of those two can only hold for all $$n \geq \hat{n}_0 = \max \{ n_0, \tilde{n}_0 \}$$

Edit 1 I numbered the inequalities for better reference.

Row $$(1)$$ consists of two inequalities, namely $$c_1 g(n) \leq f(n)$$ and $$f(n) \leq c_2 g(n)$$. These inequalities are true for all $$n \geq n_0$$.

Row $$(2)$$ consists again of two inequalities, namely $$\tilde{c}_1 h(n) \leq g(n)$$ and $$g(n) \leq \tilde{c}_2 h(n)$$. These inequalities are true for all $$n \geq \tilde{n}_0$$.

Note, that $$n_0$$ and $$\tilde{n}_0$$ do not necessarily have to be the same.

We insert the inequalities of $$(1)$$ and $$(2)$$ into each other to obtain $$(3)$$. This only makes sense if the inequalities we are inserting are indeed true. But if $$n_0 < \tilde{n}_0$$, then row $$(1)$$ is still true for all $$n \geq \tilde{n}_0$$. Otherwise, if $$n_0 > \tilde{n}_0$$ then row $$(2)$$ is still true for all $$n \geq n_0$$. So you choose the greater of these two, i.e. $$\max \{ n_0, \tilde{n}_0 \}$$ in order for both rows $$(1)$$ and $$(2)$$ to hold. Then you have no problems combining them.

• I'm having trouble understanding from where the max came from and when to use it. How did you got to combine them? Is combining them part of proving any asymptotic notations? Mar 18, 2021 at 20:09
• I updated my answer, I hope it is more clear now. The point is, that by definition you need to find a $\hat{n}_0$ such that row $(3)$ holds. Mar 18, 2021 at 20:21
• i'm trying to do the second example what if $g = O(f)$ and how i can identify what it is? Can i define f and g as Big O? Mar 18, 2021 at 20:56
• Big O of a function $f$, i.e. $\mathcal{O}(f)$ is a set. Writing something like $g = \mathcal{O}(f)$ is pretty common, but it is abuse of notation. The correct way to write it would be $g \in \mathcal{O}(f)$. So your task is to check whether $g$ is an element of the set. You do this by checking whether $g$ satisfies the necessary conditions. Mar 18, 2021 at 21:07
• So i could say that $g(n) \leq c * f(n)$ for all $n \geq n_0$? And that proves that $g \in { O } (f)$? Mar 18, 2021 at 21:29

From scratch then:

Consider some arbitrary function $$f$$ and the "Big O" of $$f$$, i.e. $$\mathcal{O}(f)$$. This $$\mathcal{O}(f)$$ is a set, consisting of all functions that satisfy a certain condition. This condition somehow includes $$f$$. You have already given the definition of $$\mathcal{O}(f)$$, but I will rewrite it now:

$$\mathcal{O}(f) \enspace = \enspace \Big\{ \; g : \mathbb{N} \longrightarrow \mathbb{R} \; \Big| \; \exists \, c > 0 \; \exists \, n_0 \in \mathbb{N} \; \forall \, n \geq n_0 \; : \; g(n) \leq c \cdot f(n) \; \Big\}$$

In other words, the set $$\mathcal{O}(f)$$ is a set of functions who map from the natural numbers $$\mathbb{N}$$ to the real numbers $$\mathbb{R}$$. These functions have to satisfy a certain condition, namely that there is some constant $$c$$, which is greater than zero, such that $$g(n) \leq c \cdot f(n)$$. This inequality does not have to hold for every function value of $$g(n)$$ and $$f(n)$$. It only has to hold for all function values after a certain "point" $$n_0$$. Let us look at an example:

Example: Consider the functions

$$g(n) = n \qquad \text{and} \qquad f(n) = n^2 - n$$

We want to show that $$g \in \mathcal{O}(f)$$ holds. If we insert $$n=1$$, we find

$$g(1) = 1 \qquad \text{and} \qquad f(1) = 0$$

But there exists no constant $$c > 0$$, such that $$1 \leq c \cdot 0$$. Does this mean, that $$g \notin \mathcal{O}(f)$$? The answer is NO. Why? Because if we insert $$n=2$$ or $$n=3$$ or $$n = 4,5,6, \ldots$$ we find that for these values the inequality

$$g(n) \leq c \cdot f(n)$$

is fulfilled when e.g. picking $$c = 1$$. This means, that when $$c = 1$$ then for all $$n$$ that are greater than $$n_0 = 1$$ we find $$g(n) \leq c \cdot f(n)$$. However, this is exactly the definition of $$\mathcal{O}(f)$$. Therefore,

$$g(n) \in \enspace \mathcal{O}(n^2 - n)$$

$${}$$

Problem 2

Consider now the second problem you have stated. We want to prove that if $$g \in \mathcal{O}(f)$$ then $$f + g \in \Theta(f)$$.

How do we do this? First of all, we gather the information we have. In this case, we know that $$g \in \mathcal{O}(f)$$. By definition, we know that there exists a $$c>0$$ and a $$n_0$$ such that for all $$n \geq n_0$$ the inequality $$g(n) \leq c \cdot f(n)$$ holds.

Now we simply add $$f(n)$$ on both sides of the inequality (which we know by assumption to be true). This gives us

$$g(n) + f(n) \leq (c+1) \cdot f(n)$$

This was the first part. Now the second part: $$g(n)$$ is nonnegative, so we know that $$g(n) \geq 0$$ and therefore

$$f(n) \leq f(n) + g(n)$$

(because adding something positive to a number always makes the number greater).

We combine these two results and have

$$f(n) \; \leq \; f(n) + g(n) \; \leq \; (c+1) f(n)$$

This completes the proof that $$(f + g) \in \Theta(f)$$.

• Thank you so much, this helped. Mar 19, 2021 at 16:36


Any better way to find the minima/maxima?

The teacher asked us to minimize an expression:$\frac{x^2+y^2+z^2}{xy+yz}$, where $x, y, z>0$

Since the denominator and numerator are homogeneous, we try to divide the y^2 into two halves:

$\frac{x^2+\frac{1}{2}y^2+\frac{1}{2}y^2+z^2}{xy+yz}$

Use the inequality $a+b\ge2\sqrt{ab} (a,b>0)$ and we get:

$\frac { x^{ 2 }+\frac { 1 }{ 2 } y^{ 2 }+\frac { 1 }{ 2 } y^{ 2 }+z^{ 2 } }{ xy+yz } \ge \frac { 2\sqrt { x^{ 2 }\cdot \frac { 1 }{ 2 } y^{ 2 } } +2\sqrt { \frac { 1 }{ 2 } y^{ 2 }\cdot z^{ 2 } } }{ xy+yz } =\boxed{2}$

also, the same way to find the minima of $\frac { 10x^{ 2 }+10y^{ 2 }+z^{ 2 } }{ xy+xz+yz }$ :

$\frac { 10x^{ 2 }+10y^{ 2 }+z^{ 2 } }{ xy+xz+yz } \\ =\frac { [ax^{ 2 }+ay^{ 2 }]+[(10-a)x^{ 2 }+bz^{ 2 }]+[(10-a)y^{ 2 }+(1-b)z^{ 2 }] }{ xy+xz+yz } \\ \ge \frac { 2\sqrt { ax^{ 2 }\cdot ay^{ 2 } } +2\sqrt { (10-a)x^{ 2 }\cdot bz^{ 2 } } +2\sqrt { (10-a)y^{ 2 }\cdot (1-b)z^{ 2 } } }{ xy+xz+yz } \\ =\frac { 2a\cdot xy+2\sqrt{(10-a)b}\cdot xz+2\sqrt{(10-a)(1-b)}\cdot yz }{ xy+xz+yz }$

Now we let $a=\sqrt{(10-a)b} = \sqrt{(10-a)(1-b)}$ , that is $a = 2 \ and\ b = \frac{1}{2}$

Then

$\frac { 4xy+4xz+4yz }{ xy+xz+yz } \\ = \boxed{4}$

But this method is quite troublesome... right?

Is there any other way to solve the minima? I also tried partial derivative, but it's not easy to solve that equation either...

Note by John Lee
1 year, 1 month ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

Yes there is another approach................Try to use spherical co-ordinates...........That makes things simpler and transforms everything into two variables.........!!

- 1 year, 1 month ago

Care to elaborate on this? What substitution works here? Are you sure the constraints are easily manageable?

- 1 year, 1 month ago

Umm yes.........well, we can use the standard substitutions used when transforming from xyz co-ordinates to spherical co-ordinates.....!!

- 1 year, 1 month ago

I don't understand. What standard substitutions are you referring to?

- 1 year, 1 month ago

Well.........here you go, Sir........
x = rsin(phi)cos(theta)
y = rsin(phi)sin(theta)
z = r*cos(phi)
Here, phi and theta are two different angles........

- 1 year, 1 month ago

Also, r is the radius of the sphere.........we are just taking these as dummy variables.........

- 1 year, 1 month ago

Also, after the transformation, we will have a unit fraction to deal with........and hence it would simply be the matter of maximising the denominator.......

- 1 year, 1 month ago