We have two sequences $(a_n)$ and $(b_n)$, of positive integers, such that, $1\leq a_1,...,a_m\leq n$, $1\leq b_1,...,b_n\leq m$ prove that there exist $p\leq q$, $r\leq s$ such that, $$\sum_{i=p}^{q} a_i =\sum_{i=r}^{s}b_i$$  I think Pigeon Hole Principle can be applied, but I'm not sure how. Any help will be appreciated.
We have two sequences , $(a_i)_{i=1}^{2n}$ and $(b_i)_{i=1}^{2n}$ such that  $1\leq a_i, b_i\leq n$ for every $i$.  Show that there are two sets of indexes $I, J \subseteq \left \{ 1,2, ... 2n \right \}$ such what $\sum_{i\in I}a_i=\sum_{j\in J}b_j$.  Well, the question didn't say anything about those sets being empty but I believe that's not what they meant. I don't know that to do with questions like these. There are obviously much more subsets that possible sums ($2^{2n}-1$ compared to $2n^2$) but it doesn't really help.  I'd be glad to hear ideas, hints or solutions.
Uninstall kubuntu-desktop I installed kubuntu-desktop using sudo apt-get install kubuntu-desktop but I no longer want to use KDE.  How do I remove all the packages that were installed by this command ?  Thank you What is an quick way to create a new blank file in Lion? In Windows, one can create a new file using Right Click -> Add New -> Type of File. Is there an analogous action in Lion?  I just want to create a new blank file on my Desktop. Pass extra parameters to an event handler? How many edges does an undirected tree with $n$ nodes have? Why is the determinant of a symplectic matrix 1? Suppose $A \in M_{2n}(\mathbb{R})$. and$$J=\begin{pmatrix} 0 &amp; E_n\\   -E_n&amp;0  \end{pmatrix}$$ where $E_n$ represents identity matrix. if $A$ satisfies $$AJA^T=J.$$ How to figure out $$\det(A)=1~?$$ My approach: I have tried to separate $A$ into four submartix:$$A=\begin{pmatrix}A_1&amp;A_2 \\A_3&amp;A_4 \end{pmatrix}$$ and I must add a assumption that $A_1$ is invertible. by elementary transfromation:$$\begin{pmatrix}A_1&amp;A_2 \\ A_3&amp;A_4\end{pmatrix}\rightarrow \begin{pmatrix}A_1&amp;A_2 \\ 0&amp;A_4-A_3A_1^{-1}A_2\end{pmatrix}$$ we have: $$\det(A)=\det(A_1)\det(A_4-A_3A_1^{-1}A_2).$$ From$$\begin{pmatrix}A_1&amp;A_2 \\ A_3&amp;A_4\end{pmatrix}\begin{pmatrix}0&amp;E_n \\ -E_n&amp;0\end{pmatrix}\begin{pmatrix}A_1&amp;A_2 \\ A_3&amp;A_4\end{pmatrix}^T=\begin{pmatrix}0&amp;E_n \\ -E_n&amp;0\end{pmatrix}.$$ we get two equalities:$$A_1A_2^T=A_2A_1^T$$ and $$A_1A_4^T-A_2A_3^T=E_n.$$ then $$\det(A)=\det(A_1(A_4-A_3A_1^{-1}A_2)^T)=\det(A_1A_4^T-A_1A_2^T(A_1^T)^{-1}A_3^T)=\det(A_1A_4^T-A_2A_1^T(A_1^T)^{-1}A_3^T)=\det(E_n)=1,$$ but I have no idea to deal with this problem when $A_1$ is not invertible. I have to do some manual reordering or rows in Excel and cut/paste is too hard to use. I'm looking for something that would enable me to use drag'n'drop or to add some buttons to move-up/down move-top/bottom. Math mode macro in TeXstudio I want to set up a macro in TeXstudio for math mode which displays $*$ and places the cursor at position *. So far I have tried using $%|$ but upon triggering, this macro does not allow text insertion at the placeholder.  EDIT: The method above works fine if the macro shortcut is set to the default Shift+F1. However, changing the shortcut to another combination, as I would like to do, seems to be the cause of the problem. Base-b Representation of an Integer: Why can I make the assumption about number of terms in expansions in uniqueness part?   Reading the book of Koshy I have come across the below theorem. It states that I can write any integer $N$ in a base $b\ge2$ representation $N=a_kb^k+...+a_1b+a_0$ such that $0\le a_i&lt;b$, $a_k \neq 0$ for some $k\ge0$.  In the uniqueness part, why can I assume the expansions contains the same number of terms ? I must prove that all expansions of $N$ equal the one in the theorem, but if I add terms to the expansion by zero coefficients, well, then the expansion is not in the proper form anymore ? (the greatest term in the expansion is $0$ if I add zero coefficients) .  Can someone help clear this out ?     Why can I assume the expansions contain the same number of terms ? If I add terms to the expansion, well then I've violated the form of the expansion ? Engines that play Mangala? Prove that there exist two integers such that i - j is divisible by n. Here's the full question:  Prove that, for any $n + 1$ integers, $\{x_0, x_1, x_2, . . . , x_n\}$, there exist two integers $x_i$ and $x_j$ with $i \neq j$ such that $x_i − x_j$ is divisible by $n$.  Now, the integers aren't necessarily consecutive, positive, or without repeats. I've tried breaking this into cases, such as "$x_i = x_j, \dfrac{0}{n} = 0$" etc. But I don't think it's possible to exhaust the cases.  I feel like there should be an easy way to contradict this one, by saying that $x_i - x_j$ isn't divisible by $n$. But I just wasn't getting anywhere with that one.  I thought about using induction, but I would have just as hard a time proving this for $n$ integers before $n+1$ integers, so I don't think it would be possible for me to do it that way.  If anyone could help out, that would be wonderful. I'm pretty stuck here. Flag pop-up hidden beneath answer box (and it's still transparent!) The flag window on (a comment to) the last question is hidden beneath the answer box, as shown in the following screenshot:    Linked: , which is currently  - this is not fixed for flags on comments! Is there a service that I can use to check if my machine will be able to run a certain game? One thing that made me curious while watching a football game on TV was the numbers that appear on the ground. For instance, there's a "1st &amp; 10" beside one team, but there was a "3rd &amp; 6" a few minutes prior (and I think it was beside the other team). What do these numbers mean? I often see questions on Stack Exchange sites which I presume are written by non-native English speakers who use the word "doubt" in place of the word "question". Is this a case of misunderstanding the correct meaning or are people being taught that this is correct usage? Custom one-key keyboard shortcuts in Outlook 2010 or 2013? Graph vertex chromatic number in a union of 2 sub-graphs $G_1$ is graph on the set of vertices $\{1,2,3,4,5,6,7,8\}$, $G_1$ vertex chromatic number is 5. $G_2$ is graph on the set of vertices $\{7,8,9,10,11,12,13,14,15,17,18,19,20\}$, $G_2$ vertex chromatic number is 7. We know $G_1$ and $G_2$ have an edge between vertex 7 and vertex 8. (We already used 2 different colors on them both). $G$ is graph on the set of vertices $\{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\}$, and its set of edges is the union of the edges set of $G_1$ with the edges set of $G_2$. The vertex chromatic number of $G$ is: 5 / 7 / 12 / we can't know without further information Prove the answer. I think I got it, can someone approve? After the union to $G$, we copy the colors of $G_2$ to 7,8,9,10,11,12,13,14,15,16,17,18,19,20, obviously, $G$ vertex chromatic number is 7 and can't be less. We go through the vertices 1,2,3,4,5,6,7,8. We look for a vertex that doesn't connect to a different vertex. (There must be one, because if only one edge was missing in $G_1$, our chromatic number of $G_1$ was 7, but it's 5). Once we find a missing edge, we color both its vertices in the same color. We go through vertices 1-6, and color each vertex that doesn't have a color, with the colors of $G_2$ that we didn't use in $G_1$ (there should be 4-5 of them). Output from ls has newlines but displays on a single line. Why? Can I sell starting gear in Adventurers League play? I'm starting a new AL game (as a player) and I have a question that's not addressed in the AL material.  According to Adventurers League Player's Guide (page 4)     When you create your D&amp;D Adventurers League character for the current season, take starting equipment as determined by your class and background. You cannot roll for your starting wealth.   Meaning I can't start with whatever I want. However, I am playing a ranged-focused fighter, so the second gear option is of no use to me:   (a) a martial weapon and a shield or (b) two  martial weapons   Can I choose any two martial weapons and sell them for half price to use for purchasing other gear before play? And is there a restriction on how much gold I can get?  For example, two hand crossbows (martial ranged weapons) can net me 75 gp when sold, or two greatswords nets me 50 gp when sold. What is the variance of the weighted mixture of two gaussians? (Pardon if this seems a bit beginner, this is my first post in math - trying to improve my knowledge while tackling Project Euler problems)  I'm aware of Sigma notation, but is there a function/name for e.g.  $$ 4 + 3 + 2 + 1 \longrightarrow 10 ,$$  similar to $$4! = 4 \cdot 3 \cdot 2 \cdot 1 ,$$ which uses multiplication?   Edit: I found what I was looking for, but is there a name for this type of summation?