1. ## Modulo problem

Okay, so I'm supposed to find the least nonnegative integer i such that

4^30 is congruent to i (mod 19).

I'm not sure how to approach this since my textbook doesn't really say how this type of problem is done so any help would be greatly appreciated.

2. Originally Posted by clockingly
Okay, so I'm supposed to find the least nonnegative integer i such that

4^30 is congruent to i (mod 19).

I'm not sure how to approach this since my textbook doesn't really say how this type of problem is done so any help would be greatly appreciated.
My approach here won't be unique, but the method should be fairly clear.

$4^3 = 64 \equiv 7$ (mod 19)

So
$4^{30} = (4^3)^{10} \equiv 7^{10}$ (mod 19)

Again:
$7^2 \equiv 11$ (mod 19)

So
$7^{10} = (7^2)^{5} \equiv 11^5$ (mod 19)

You can probably do this one by directly but we can simplify this one last time:
$11^2 \equiv 7$ (mod 19)
$11^3 \equiv 1$ (mod 19)

So finally:
$4^{30} \equiv 7^{10} \equiv 11^5 = 11^2 \cdot 11^3 \equiv 7 \cdot 1 = 7$ (mod 19)

$4^{30} \equiv 7$ (mod 19)

-Dan

I am still a little confused as to how you got the very first equation though (listd below)...I'm a little confused as to where the 7 came from...

4^3 = 64 is congruent to 7(mod 19)

4. Originally Posted by clockingly
Okay, so I'm supposed to find the least nonnegative integer i such that

4^30 is congruent to i (mod 19).

I'm not sure how to approach this since my textbook doesn't really say how this type of problem is done so any help would be greatly appreciated.
You can also do this...
$4^{30}=2^{60}$
And,
$2^{18}\equiv 1 (\mbox{ mod }19)$
By Fermat's little theorem since 19 is prime not divisible by 2.
Cubing,
$2^{54}\equiv 1 (\mbox{ mod }19)$
Multiply both sides by $2^6=64\equiv 7$ we we have,
$2^{60}\equiv 7 (\mbox{ mod }19)$

5. Originally Posted by clockingly

I am still a little confused as to how you got the very first equation though (listd below)...I'm a little confused as to where the 7 came from...

4^3 = 64 is congruent to 7(mod 19)
That is becuase,
$64\equiv 7 (\mbox{ mod }19)$
Right?

Because it leaves a remainder of 19.

( $64=3\cdot 19+7$)

6. Hello, clockingly!

Another approach . . .

Find the least nonnegative integer $n$ such that: . $4^{30} \equiv n \pmod{19}$

I found that: . $4^5 \:=\:1024 \:\equiv\:-2 \pmod{19}$

Then: . $4^{30} \:=\:(4^5)^6 \:\equiv\:(-2)^6 \pmod{19}$

And: . $(-2)^6\:=\:64\:\equiv\:7\pmod{19}$

Therefore: . $4^{30}\:\equiv\:7\pmod{19}$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

I also found that: . $4^9\:\equiv\:1\pmod{19}$

Then: . $4^{30}\:=\:\left(4^9\right)^3\cdot4^3 \:\equiv\:(1^3)4^3\pmod{19}$

And: . $4^3\:=\:64\:\equiv\:7\pmod{19}$

But I see that TPHacker beat me to it.


# What is the least amount of pieces on a board with the following conditions:

There's an infinite board. Imagine you add a rectangle of $m*n$ pieces. With $m,n \geq 2$ (There's a piece every square, and you can't put one above other.) You can make a piece 'jump' other that is next to it (Vertically or horizontally only, not diagonally), if the square next to the "jumped" piece (In the same direction) is empty, also, the "jumped" piece disappears. After many movements, What is the least amount of pieces that can be on the board?

So, it's obvious that the answer can't be $0$ since there's no point of it, it has to be at least one if we have, for example, to pieces left of all the $mn$ pieces that are connected each other. I tried to do a coloring of the infinite board, in a chess pattern, so we have Black pieces (Pieces in a black tile) and White pieces, this make any white piece unable to make dissapear another white one and the same with black ones. At the end, the least we have of each color the better, because if we get to have only two left with different colors and connected, then we'll know the least number of pieces is 1. i tried looking for different rectangles of pieces, and i got 1 and 2 as answers. For example doing the following when $m=3$ and $n=4$ makes the board have 1 piece at the end: (From left to right)

It clearly follows that it has 1 piece at the end. I found other cases as ($m=2,n=4$), ($m=2, n=5$), but i also found cases where i got the least is 2, like ($m=2, n=3$), ($m=3, n=3$), etc. i haven't noticed anything else besides this. Any suggestions?

• How did you get from your second board to your third? – Mike Earnest Aug 21 '18 at 17:46
• Move (3,1) to (5,1) an then move (1,1) to (3,1) – SonodaUmi Aug 21 '18 at 17:59
• Then you have a mistake; the checker at (4,1) was hopped over, so should be removed. – Mike Earnest Aug 21 '18 at 18:01

This is a fun problem with a nice solution!

First of all, imagine coloring the checkerboard in three colors like so:

A B C A B C A B C ...
B C A B C A B C A ...
C A B C A B C A B ...
...

Let $a,b,c$ be the number of checkers on each color. Each move increases one of these variables by $1$, and decreases the others by $1$. This means that the quantities $a-b,b-c$ and $c-a$ will always have the same parity.

Now, suppose that either $m$ or $n$ is a multiple of $3$. Then you will initially have $a=b=c$, so that $a-b,b-c$ and $c-a$ all start out even. However, if you manage to reduce the board to a single checker, then at least one of $a-b,b-c$ or $c-a$ would be odd. Therefore, the problem is insoluble when $m$ or $n$ is a multiple of $3$.

When neither dimension is a multiple of $3$, you can succeed. Consider the following "T"-move. It allows you to eliminate a $3\times 1$ block of marbles, provided one of the ends has a marble on on side and an empty space on the other:

• • _         _ _ •         _ • •         • _ _
•    -->      •    -->      _    -->      _
•             •             _             _

Applying this repeatedly, you eliminate a $3\times n$ block from the top of the rectangle, provided $m>3$ and $n\ge 3$:

• • • • • • • •
• • • • • • • •
• • • • • • • •
• • • • • • • •

|
v

• • • • • • • _
• • • • • • • _
• • • • • • • _
• • • • • • • •

|
v
• • • • • • _ _
• • • • • • _ _
• • • • • • _ _
• • • • • • • •

|
v
...
|
v

• • • _ _ _ _ _
• • • _ _ _ _ _
• • • _ _ _ _ _
• • • • • • • •

and then apply the same idea with three sideways T's to get rid of that last $3\times 3$ block. The same idea allows you eliminate three columns at a time provided the dimensions are larger enough.

This procedure allows you to reduce the board either a $4\times 4$, $2\times 4$, $4\times 2$ or $5\times 5$ rectangle, depending on the remainders of $m$ and $n$ modulo $3$. I leave it to you to figure out how to solve these small cases.

• My teacher said it was a really beautiful solution, and it really is. Thank you! – SonodaUmi Aug 21 '18 at 18:25
• @cptnSonoda Does your teacher sit next to you and checked the answer on math.stackexchange (MSE)? – callculus Aug 21 '18 at 18:38


# What is a good upper bound $n^n(n-1)^{n-1}\ldots2^21^1$?

Given an integer $n \ge 1$, I'd like to have a not-very-loose upper bound for the integer $$u(n) := \Pi_{k=1}^n k^k = n^n(n-1)^{(n-1)}\ldots2^21^1.$$

It's easy see that, $u(n) \le n^{n(n+1)/2}$, but this is not very interesting.

# Update

We have $u(n) \le e^{\left(\frac{1}{2}n(n+1)\log\left(\frac{2n + 1}{3}\right)\right)}$, and we can't really do much better!

Indeed, using Euler-Maclaurin, we have

$\log(u(n)) = \int_2^nx\log x dx = \frac{1}{4}n^2(2\log(n) - 1) - 2\log(2) + \frac{1}{4} + \text{error terms}$, which is comparable to the bound $\log(u(n)) \le \frac{1}{2}n(n+1)\log\left(\frac{2n + 1}{3}\right)$ in the accepted answer (see below). In particular, we can conclude that accepted answer's bound is tight!

• Taking logarithms may be a good start whenever you're dealing with products. Sep 9, 2016 at 13:45
• Ya, I contemplated the sequence $\sum_{k=1}^nk \log(k)$, but nothing pops-up... Sep 9, 2016 at 13:46
• Yes. Take logarithms, use Euler-MacLaurin, and exponentiate. Sep 9, 2016 at 13:47
• Thanks for pointing to Euler-Maclaurin. At the moment, I was just thinking about the Abel summation formula, but your suggestion looks more appropriate. Sep 9, 2016 at 13:52
• See also $(7)$ here: mathworld.wolfram.com/Hyperfactorial.html Sep 9, 2016 at 17:24

Using Jensen's inequality:

Letting $A= \sum_{k=1}^n k = \frac{n (n+1)}{2}$ and $B= \sum_{k=1}^n k^2 = \frac{n (n+1)(2n+1)}{6}$

We have

\begin{align} \log(u(n)) &=\sum_{k=1}^n k \log(k) \\ &= A \sum_{k=1}^n \frac{k}{A} \log(k) \tag{1}\\ &\le A \log \left( \sum_{k=1}^n \frac{k}{A} k \right) = A \log \left( \frac{B}{A} \right) \tag{2} \end{align}

Hence

$$\log(u(n)) \le \frac{n(n+1)}{2} \log\left(\frac{2 n+1}{3}\right) \tag{3}$$

The bound seems to be quite tight:

Update: as noted by comments and OP, the bound $(3)$ agrees with the true order of growth; this can be checked by applying the trapezoidal rule to the integral:

$$-\frac{1}{4}=\int_{0}^{1} x \log(x) dx \approx \frac{1}{n+1} \sum_{k=1}^n \frac{k}{n} \log\left(\frac{k}{n}\right)$$ which gives

$$\log(u(n)) \approx\frac{ n(n+1)}{2}\left( \log n -\frac{1}{2} \right) \tag{4}$$

If one is interested in an approximation (instead of a bound), $(4)$ might be preferable.

• Perfect! Thanks. I see you've used the concave function $\phi(x) := log(x)$ and positive scalars $a_k = k$ in Jensen's inequality: en.wikipedia.org/wiki/Jensen%27s_inequality Sep 9, 2016 at 14:05
• Now that's a freaky tight bound! I Indeed, it's no surprise that the bound is tight. Using Euler-Maclaurin suggested by Daniel above, I can get $\log(u(n)) \approx \frac{1}{4} (n^2(2\log(n) - 1) - 1)$ :). Thus I don't need to beg the error terms in my EM, and can just use your bound instead. Thanks again. Sep 9, 2016 at 14:10

Another simple way for finding an upper bound is using the Abel's summation $$S=\sum_{k=1}^{n}k\log\left(k\right)=\frac{n\left(n+1\right)}{2}\log\left(n\right)-\frac{1}{2}\int_{1}^{n}\frac{\left\lfloor t\right\rfloor \left(\left\lfloor t\right\rfloor +1\right)}{t}dt$$ where $\left\lfloor t\right\rfloor$ is the floor function and since $\left\lfloor t\right\rfloor >t-1$ we get $$S<\frac{n\left(n+1\right)}{2}\log\left(n\right)-\frac{1}{2}\int_{1}^{n}\left(t-1\right)dt$$ $$=\color{red}{\frac{n\left(n+1\right)}{2}\log\left(n\right)-\frac{\left(n-1\right)^{2}}{4}}.$$

Don't have the reputation, or else this would be a comment. As mentioned in a link posted by leonbloy, the hyperfactorial, which shows up in the theory of the Barne's G function, is related to $\int_0^n \log\Gamma(x) dx.$ Good bounds on this should give a better bound than that found by Jensen's inequality. I found the expression

$$\log(u(n)) \le A(n):=\dfrac{(n+1/2)^2}{2}(\log(n+1/2)-3/2)+\dfrac{n(n+1)}{2}+ \dfrac{9}{8}\log(2/3)+\dfrac{11}{16}.$$

For a comparison, let's define 'Jensen' and 'A' ratios

$$R_J(n)=\dfrac{\log(u(n))}{n(n+1)/2\log((2n+1)/3))},\quad R_A(n)=\dfrac{\log(u(n))}{A(n)} .$$

Then (approximately) $R_J(100)=0.892$ , $R_A(100)=0.999992;$ and $R_J(10^5)=0.9915$ , $R_A(10^5)=0.99999999915$ (nine nines).

• Interesting. Do include some detail on your derivation of $A(n)$ (not just an expression for it...). Sep 13, 2016 at 7:39
• Great answer! Upvoted. Jan 23, 2017 at 7:22


# Factorise $x^5+x+1$

Factorise $$x^5+x+1$$

I'm being taught that one method to factorise this expression which is $=x^5+x^4+x^3-x^4-x^3-x^2+x^2+x+1$

$=x^3(x^2+x+1)-x^2(x^2+x+1)+x^2+x+1$

=$(x^3-x^2+1)(x^2+x+1)$

My question:

Is there another method to factorise this as this solution it seems impossible to invent it?

• In general, factorization of polynomials is, as you say, "impossible to invent" by hand. There are algorithms, though, which can solve the problem. May 23, 2017 at 15:04
• Any high school student can solve this problem when he guesses one of the factors and then calculates the other factor by division. But that is not really a useful method to factor a polynomial. But it is similar to the method most of the answers uses. May 23, 2017 at 16:03
• $$5 \equiv 2 \pmod 3$$ May 23, 2017 at 16:06
• I just don't know how to accept only one answer when all the answers are simply amazing and awesome. May 23, 2017 at 22:25
• @Mathxx, See math.stackexchange.com/questions/1584594/… May 24, 2017 at 5:36

With algebraic identities, this is actually rather natural:

Remember if we had all powers of $x$ down to $x^0=1$, we could easily factor: $$x^5+x^4+x^3+x^2+x+1=\frac{x^6-1}{x-1}=\frac{(x^3-1)(x^3+1)}{x-1}=(x^2+x+1)(x^3+1),$$ so we can write: \begin{align}x^5+x+1&=(x^2+x+1)(x^3+1)-(x^4+x^3+x^2)\\ &=(x^2+x+1)(x^3+1)-x^2(x^2+x+1)\\ &=(x^2+x+1)(x^3+1-x^2). \end{align}

• That's true, but it's not a factorisation. What do you mean? May 23, 2017 at 15:06
• What does "this is rather natural" mean in this context? May 23, 2017 at 15:42
• I simply meant any high school student which is trained to tackle formulae using various identities can factor this polynomial. May 23, 2017 at 15:45
• I think this is no better than the solution the user already showed us. One has to guess the right things. May 23, 2017 at 16:31
• Well, if you do not train, you'll never get a result. All I want to say is that everything is at the high school level, there's no hammersledge theorem, and that training in various ways stimulates imagination, which is the first quality to find proofs. May 23, 2017 at 16:35

If you suspect there exists a factorization over $\mathbb{Q}[x]$ into polynomials of degree 2 and 3, but you just don't know their coefficients, one way is to write it down as

$x^5 + x + 1 = (x^2 + ax + b)(x^3 + cx^2 + dx + e)$ where the coefficients are integers (by Gauss' lemma). And then expand and solve the system.

Then $a + c = 0, b + ac + d = 0, bc + ad + e = 0, ae + bd = 1, be = 1$. So we get $c = -a$ and $b = e = 1$ or $b = e = -1$.

In the first case we reduce to $1 - a^2 + d = 0, -a + ad + 1 = 0, a + d = 1$ which gives $d = 1 - a, 1 - a^2 + 1 - a = 0, 1 - a^2 = 0$ so $a = 1, b = 1, c = -1, d = 0, e = 1$.

Substituting gives us $x^5 + x + 1 = (x^2 + x + 1)(x^3 - x^2 + 1)$

If the factorization was not over $\mathbb{Q}[x]$ then things would get more complicated because I could not assume $b = e = +/- 1$.

• If you suspect there exists a factorization over Q[x] than it is easy to show that polynomial cannot be split into a polynomail of degree 4 and a linears factor, so it must be the product of thwo polynomails of degree 2 and 3 May 23, 2017 at 15:46

Alternatively note that \begin{align}x^5 + x + 1 &= x^5 - x^2 + x^2 + x + 1\\ & =x^2(x^3-1) + \color{red}{x^2+x+1} \\ & = x^2(x-1)\color{red}{(x^2+x+1)} + \color{red}{x^2+x+1} \\& =\color{blue}{(x^3-x^2+1)}\color{red}{(x^2+x+1)} \end{align}

where we used the well known identity $x^3 - 1 = (x-1)(x^2+x+1)$ in the third equality.

Meta: whilst the first step may seem arbitrary and magical, it is natural to want to insert a term like $x^2$ or $x^3$ into the equation in order to get some traction with factorising $x^5 + x^k$.

Note that if $z^3=1, z\neq 1$ so that $z^3-1=(z-1)(z^2+z+1)=0$ then $z^5+z+1=z^2+z+1=0$. A key to this observation is just seeing whether an appropriate root of unity may be a root.

This tells you that $x^2+x+1$ is a factor of $x^5+x+1$, and the question then is how you do the division. The factorisation method you have been shown is equivalent to doing the polynomial long division.

Another method, not suggested by others, is to use the fact that you know $x^2+x+1$ is a factor and multiply through by $x-1$ so that this factor becomes $x^3-1$.

So $(x-1)(x^5+x+1)=x^6-x^5+x^2-1=(x^3-1)(x^3+1)-x^2(x^3-1)=(x^3-1)(x^3-x^2+1)=(x-1)(x^2+x+1)(x^3-x^1+1)$

• I think this is no better than the solution the user already showed us. One has to guess the right things May 23, 2017 at 16:32
• @miracle173 But the user suggested the solution could not be discovered easily. The art of problem solving is in part learning the kind of things you might try when faced with something unfamiliar. May 23, 2017 at 19:22

standard trick from contests: $5 \equiv 2 \pmod 3.$ Therefore, if $\omega^3 = 1$ but $\omega \neq 1,$ we get $$\omega^5 = \omega^2$$ $$\omega^5 + \omega + 1 = \omega^2 + \omega + 1 = 0$$ Which means, various ways of saying this, $x^5 + x + 1$ must be divisible by $$(x - \omega)(x - \omega^2) = x^2 + x + 1.$$ This is what we call a "minimal polynomial" for $\omega$

The same idea would work for $$x^{509} + x^{73} + 1$$ although the other factor would be worse

SEE

Prime factor of $A=14^7+14^2+1$

• I think this is no better than the solution the user already showed us. One has to guess the right things May 23, 2017 at 16:32
• @miracle173 it's a matter of where the questions arise. This is a contest or contest preparation question, there is a trick; this comes up over and over again on this site, from kids who are trying to get better at contests. You might ask the OP where he got the question and what is the setting responsible for "I'm being taught..." Put another way, someone skilled at searching could find hundreds of questions on MSE where one factor is $x^2 + x + 1$ May 23, 2017 at 16:42

So far the answers just (cleverly) elaborate on high school tricks and techniques. Therefore, I think it can be interesting to see, instead, how standard modern algorithms work in this special case. I will implement a small version of the Berlekamp-Zassenhaus algorithm. I will try to factor $F(x)=x^5+x+1$ over $\mathbb Z[x]$ as a product $f_1(x)f_2(x)$ of polynomials of degree 2 and 3; it will not be long (of course), nor difficult. I recall what is the plan:

• Bound the coefficients of the factors $f_1,f_2$;
• Factor $F(x)=g_1(x)g_2(x)$ over modulo $p$ for some prime $p$;
• Lift (in essence, by Hensel's lemma) the factorization modulo higher $p^k$.

Bound the coefficients of $f_1(x)$: The leading coefficient of $F$ is $c=1$, the degree of $f_1$ is $\delta=2$, and the roots $\alpha$ of $F$ satisfy ${|\alpha|}^5\leq 1+|\alpha|$, so for sure, say, $|\alpha|<\rho=1.5$. Therefore the (absolute values of the) coefficients of $f_1(x)$ are all dominated by those of $(x+\rho)^2$. In particular they are all $<3$. This is called the binomial bound. The same estimate can be obtained with the Knuth-Cohen bound. See Abbott, John. "Bounds on Factors in Z [x]." Journal of Symbolic Computation 50 (2013): 532-563.

Find $g_i(x)\equiv f_i(x)$ modulo 2: Since $F(0)=1$ and $F(1)=3$ we have that $g_1(0)=g_1(1)=1\bmod 2$. Thus the only possibility is $g_1(x)=x^2+x+1$. By polynomial long division in $\mathbb F_2[x]$ we get $g_2(x)=\frac{F(x)}{g_1(x)}=x^3+x^2+1$. Well, if you are clever enough, and not a computer, you might finish the exercise here, by doing long division in $\mathbb Z[x]$.

Factor modulo 4 as $F=(g_1+2 h_1)(g_2 + 2 h_2)$: In other words, we need $g_1 h_2+g_2 h_1 = \frac {F(x)-g_1(x)g_2(x)}{2} = x^4+x^3+x^2 \bmod 2$. Of course the solution is $h_1=0$ and $h_2=x^2$.

Conclusion: We have $f_1(x)\equiv x^2+x+1\bmod 4$. Since the absolute value of the coefficients of $f_1(x)$ is at most $2$, we get $f_1(x)= x^2+x+1$. It works.

Supplement: actually I am deeply convinced that the most natural technique to factor $F(x)$ is the one provided by the OP (although all the other approaches, included the one I described above, are interesting). I'll try to justify this claim. Suppose you want to factor $7763073514021$ in prime numbers. The factor $7$ is easy to find (actually, this completes the factorization). Why? Because you decompose $7-7-63-0-7-35-14-0-21$ and you factor out termwise. "Piecewise" factorization is by far the most natural, and easy to spot, approach to factorization "by hand". Another example is $x^6-x^4-20x^3+14x^2+20 x -14$, where you may wish to take advantage of the pattern $(1,-1),(-20,20),(14,-14)$. Now, suppose you want to factor the number $636362236363$. It's very similar to the example before, only that you must be able to see the "negative": you are just subtracting a "14" from $636363636363$. Although the pattern of coefficients $[1,0,0,0,1,1]$ of $F(x)$ might be irregular at first glance, I find it very natural to see it as a $0-111-00$ subtracted from a $111-111$.

• Or else (but only for "how to factor", not "why does it factor"): coefficients of f_1 have norm at most 2; F is monic; F(0)=F(-1)=1. So f_1=x^2+x+1 or f_1=x^2-x-1. Now use F(-2)=-33. May 24, 2017 at 1:09

Let $f (x)=x^5+x+1$

$$f'(x)=5x^4+1>0$$

$f$ is stricly increasing at $\mathbb R$, thus it has only one real root $\alpha \in (-1,0)$.

the factorisation will be of the form

$$(x-\alpha)(x^2+ax+b)(x^2+cx+d)$$

with $a^2-4b <0$ and $c^2-4d <0$.

• Why can't it be factored in $\mathbf R[X]$? The only irreducible polynomials in $\mathbf R[X]$ are linear polynomials and quadratic polynomials with a negative discriminant. May 23, 2017 at 14:56
• Just because it has no linear factors does not mean that it does not have higher order factors (DAMHIKT). Also, he showed a factorization of it and the factorization is correct: just multiply it out. So, your answer is wrong: it can be factorized in $\mathbb R[X]$. May 23, 2017 at 14:58
• @Nick Yes you are right. i edited. May 23, 2017 at 15:02


Binary code with constraint

Suppose I have an alphabet of n symbols. I can efficiently encode them with $\lceil \log_2n\rceil$-bits strings. For instance if n=8:
A: 0 0 0
B: 0 0 1
C: 0 1 0
D: 0 1 1
E: 1 0 0
F: 1 0 1
G: 1 1 0
H: 1 1 1

Now I have the additional constraint that each column must contain at most p bits set to 1. For instance for p=2 (and n=8), a possible solution is:
A: 0 0 0 0 0
B: 0 0 0 0 1
C: 0 0 1 0 0
D: 0 0 1 1 0
E: 0 1 0 0 0
F: 0 1 0 1 0
G: 1 0 0 0 0
H: 1 0 0 0 1

Given n and p, does an algorithm exist to find an optimal encoding (shortest length) ? (and can it be proved that it computes an optimal solution?)

EDIT

Two approaches have been proposed so far to estimate a lower bound on the number of bits $m$. The goal of this section is to provide an analysis and a comparaison of the two answers, in order to explain the choice for the best answer.

Yuval's approach is based on entropy and provides a very nice lower bound: $\frac{logn}{h(p/n)}$ where $h(x) = xlogx + (1-x)log(x)$.

Alex's approach is based on combinatorics. If we develop his reasonning a bit more, it is also possible to compute a very good lower bound:

Given $m$ the number of bits $\geq\lceil log_2(n)\rceil$, there exists a unique $k$ such that $$1+\binom{m}{1} + ... +\binom{m}{k} \lt n \leq 1+\binom{m}{1} + ... + \binom{m}{k}+\binom{m}{k+1}$$ One can convince himself that an optimal solution will use the codeword with all bits low, then the codewords with 1 bit high, 2 bits high, ..., k bits high. For the $n-1-\binom{m}{1}-...-\binom{m}{k}$ remaining symbols to encode, it is not clear at all which codewords it is optimal to use but, for sure the weights $w_i$ of each column will be bigger than they would be if we could use only codewords with $k+1$ bits high and have $|w_i - w_j| \leq 1$ for all $i, j$. Therefore one can lower bound $p=max(w_i)$ with $$p_m = 0 + 1 + \binom{m-1}{2} +... + \binom{m-1}{k-1} + \lceil \frac{(n-1-\binom{m}{1}-...-\binom{m}{k}) (k+1)}{m} \rceil$$

Now, given $n$ and $p$, try to estimate $m$. We know that $p_m \leq p$ so if $p \lt p_{m'}$, then $m' \lt m$. This gives the lower bound for $m$. First compute the $p_m$ then find the biggest $m'$ such that $p \lt p_{m'}$

This is what we obtain if we plot, for $n=1000$, the two lower bounds together, the lower bound based on entropy in green, the one based on the combinatorics reasonning above in blue, we get:

Both look very similar. However if we plot the difference between the two lower bounds, it is clear that the lower bound based on combinatorics reasonning is better overall, especially for small values of $p$.

I believe that the problem comes from the fact that the inequality $H(X) \leq \sum H(X_i)$ is weaker when $p$ gets smaller, because the individual coordinates become correlated with small $p$. However this is still a very good lower bound when $p=\Omega(n)$.

Here is the script (python3) that was used to compute the lower bounds:

from scipy.misc import comb
from math import log, ceil, floor
from matplotlib.pyplot import plot, show, legend, xlabel, ylabel

# compute p_m
def lowerp(n, m):
acc = 1
k = 0
while acc + comb(m, k+1) < n:
acc+=comb(m, k+1)
k+=1

pm = 0
for i in range(k):
pm += comb(m-1, i)

return pm + ceil((n-acc)*(k+1)/m)

if __name__ == '__main__':
n = 100

# compute lower bound based on combinatorics
pm = [lowerp(n, m) for m in range(ceil(log(n)/log(2)), n)]
mp  = []
p = 1
i = len(pm) - 1
while i>= 0:
while i>=0 and pm[i] <= p: i-=1
mp.append(i+ceil(log(n)/log(2)))
p+=1
plot(range(1, p), mp)

# compute lower bound based on entropy
lb = [ceil(log(n)/(p/n*log(n/p)+(n-p)/n*log(n/(n-p)))) for p in range(1,p)]
plot(range(1, p), lb)

xlabel('p')
ylabel('m')
show()

# plot diff
plot(range(1, p), [a-b for a, b in zip(mp, lb)])
xlabel('p')
ylabel('m')
show()

• @D.W. the constraint is quite as your states. each column must contain at most p bits set to 1. ie. the bit 1's at each position of all selected keys do not exceed p. But I think the first step is still counting the capacity of each bit width. – Terence Hang Sep 2 '15 at 16:52
• user3017842, I suspect your latest edit should be posted as a self-answer. I think it stands alone as an answer to your question. Do you agree? If so, the right place for it is in the answer box, rather than in the question -- that will make a lot more sense for future readers who come across this (and also allows the community to vote on your answer). I appreciate that you're sharing the analysis you did -- thank you. I encourage you to post that material as an answer, and then remove it from the question. What do you think? Does that seem like it makes sense to you? – D.W. Sep 5 '15 at 3:15
• @D.W. The EDIT section only makes a comparaison between the two proposed answers in order to explain the choice for the best answer. Therefore I didn't want to put it as a self-answer. But I completely agree that it lacks of clarity for future users, therefore I've clarified the goal of the section and provided links to the corresponding answers. I believe it is a bit more clear now. – user3017842 Sep 6 '15 at 9:05

There is an additional lower bound we can build, that will address cases like what @user3017842 mentioned in their comment on Yuval's answer. (Cases where $p$ is particularly small.) Suppose we knew $m$ already: Then we have $pm$ bits high total across all codewords. Since we're interested the cases where $p$ is small, we view these high bits as our limiting resource, and want to build a code with it (and see how many codewords we can possibly get out). We can have 1 codeword with all 0s, then $m$ codewords with a single 1, then $m \choose 2$ with two 1s, etc. If we call the highest number of bits in a codeword $k$, then $$pm = 0\cdot 1 + 1\cdot m + 2\cdot {m \choose 2}+... \le \sum_i^k i{m \choose i}$$ While our number of codewords $n$ is similarly bounded by $$n \le \sum_i^k {m \choose i}$$ If we look at the case where $p \le m$, then $k \le 2$ is already implied by the first inequality. ($pm = m^2 = m + 2{m \choose 2}$). So then the code would consist of the $0$-word, $m$ single-$1$-words, and $(p-1)m/2$ two-$1$-words. Thus $$n \le 1 + m + (p-1)m/2$$ or inverting $$m \ge \frac{2(n-1)}{p+1} .$$ This will yield the tight lower bound of $m\ge 5$ on the example you provide, but as mentioned before, will probably only be very useful while $p \approx m$ (or $p \approx \sqrt n$).

• Please see the EDIT section of the main post to see why your answer wins ! – user3017842 Sep 4 '15 at 18:06

Here is a lower bound and an asymptotically matching construction, at least for some ranges of the parameters. Denote by $m$ the number of columns, and suppose for simplicity that $p \leq n/2$.

We start with a lower bound on $m$. Let $X$ be the encoding of symbol chosen uniformly at random. Let $X_1,\ldots,X_m$ be the individual coordinates, and let $w_i \leq p$ be the weight of the $i$th column. Then $$\log n = H(X) \leq \sum_{i=1}^m H(X_i) = \sum_{i=1}^m h(w_i/n) \leq m h(p/n).$$ Therefore $$m \geq \frac{\log n}{h(p/n)}.$$ Here $H$ is the entropy of a random variable $H(X) = -\sum_x \Pr[X=x] \log \Pr[X=x]$ and $h$ is the entropy function $h(x) = -x\log x-(1-x)\log(1-x)$. (You can use whatever base for the logarithm you want.)

The asymptotically matching construction, that should work for $p = \Omega(n)$, chooses $m$ a bit larger than this lower bound, and chooses a random encoding scheme, each bit being set to $1$ with some probability $q/n$ which is a bit smaller than $p/n$. Choosing the parameters correctly, we should get that this results in a legal encoding (all codewords are different and all column weights are at most $p$) with positive probability.

• Nice lower bound. Why should the matching construction work for $p=\Omega(n)$? is there any easy way to believe it other than bounding the probability of getting an invalid encoding when $m$ is picked near the lower bound? – Ariel Sep 3 '15 at 15:46
• Experience tells me that it has a high chance of working, but you can't know for sure without trying. – Yuval Filmus Sep 3 '15 at 16:27
• I believe this lower bound is very good when the individual coordinates $X_1, X_2, ..., X_m$ are virtually independent (because inequality $H(X) \leq \sum H(X_i)$ will be close to be an equality). This is likely to be the case when $p$ is close enough to $n/2$. However when $p$ remains small, this is no more the case. Consider for example the extreme case when $p=1$. – user3017842 Sep 3 '15 at 17:42
• When $p=1$ it is clear that the number of bits is $n-1$ (as suggested in Alex Meiburg's answer). However $n-1 - \frac{logn} {h(p/n))} \sim n/logn$. The lower bound becomes inaccurate when $p$ remains small while $n$ is getting large. Besides, for small $p$ such as $p=1$, the proposed construction will not work quite well because of the well-known birthday problem. But, still, this is a very nice approach, especially when $p=\Omega(n)$ ! – user3017842 Sep 3 '15 at 18:05
• I've made a comparaison with another lower bound deduced from combinatorics reasonning suggested in another answer. It turns out that your lower bound is slightly weaker, especially when $p$ gets smaller. Please see the details of the comparaison in the EDIT section of the main post. Nonetheless, I was very impressed by your solution! Thanks ! – user3017842 Sep 4 '15 at 18:05

Here is a simple search methodology. We start from some lower-bound on the number of bits and then try to find a legal encoding. Specifically.

Let m be the current number of bits. Encode symbol i as bi1, bi2, ..., bim.

Constraints: bi xor bj isn't 0 - in other words each symbol's encoding is unique

For all j: sum_i bij <= p.

This is a pseudo-boolean satisfiability problem (well it can easily be encoded as a standard satifiability problem). So just keep increasing m until you find one that is satisfiable (or do a binary search using lower and upper bounds to find the minimal m).

Of course, this doesn't guarantee that in practice you'll be able to actually find the minimal m, the SAT check could timeout.


# eigenvalues of AB and of BA

• May 14th 2010, 04:28 PM
math8
eigenvalues of AB and of BA
Is it true that the eigenvalues of AB are the same as the eigenvalues of BA?
• May 14th 2010, 04:57 PM
dwsmith
Quote:

Originally Posted by math8
Is it true that the eigenvalues of AB are the same as the eigenvalues of BA?

No, multiplication of matrices isn't commutative.
• May 14th 2010, 05:23 PM
math8
I know AB is not BA, but I read somewhere that their eigenvalues (trace and determinant also) are the same. I just wanted to get a confirmation of this.
• May 14th 2010, 05:27 PM
dwsmith
Quote:

Originally Posted by math8
I know AB is not BA, but I read somewhere that their eigenvalues (trace and determinant also) are the same. I just wanted to get a confirmation of this.

Sorry for the mistake at first.

$det(AB-\lambda I)=det(AB-\lambda AA^{-1})=det(A(B-\lambda A^{-1}))=det(A)det(B-\lambda A^{-1})$
$=det(B-\lambda A^{-1})det(A)=det((B-\lambda A^{-1})A)=det(BA-\lambda I)$

I am pretty sure I have proving it here as well as some other proofs that may help in Linear:
http://www.mathhelpforum.com/math-he...rexamples.html
• May 14th 2010, 05:55 PM
Random Variable
It's easy to prove.

Let $\lambda_{1}$ be an eigenvalue of $AB$

then $ABx=\lambda_{1} x$

$BABx = \lambda_{1} B x$

which means that $\lambda_{1}$ is an eigenvalue of $BA$ with associated eigenvector $Bx$

Now let $\lambda_{2}$ be an eigenvalue of $BA$

then $BAx=\lambda_{2}x$

$ABAx = \lambda_{2}Ax$

which means that $\lambda_{2}$ is an eigenvalue of $AB$ with associated eigenvector $Ax$

QED
• May 14th 2010, 06:03 PM
roninpro
Quote:

Originally Posted by dwsmith
Sorry for the mistake at first.

$det(AB-\lambda I)=det(AB-\lambda AA^{-1})=det(A(B-\lambda A^{-1}))=det(A)det(B-\lambda A^{-1})$
$=det(B-\lambda A^{-1})det(A)=det((B-\lambda A^{-1})A)=det(BA-\lambda I)$

I am pretty sure I have proving it here as well as some other proofs that may help in Linear:
http://www.mathhelpforum.com/math-he...rexamples.html

There might be a slight hiccup. You don't know whether or not $A$ or $B$ is invertible.
• May 15th 2010, 03:38 AM
HallsofIvy
Fortunately, Random Variables' proof, in addition to being simpler, does not require that A and B be invertible.
• May 15th 2010, 04:47 AM
NonCommAlg
Quote:

Originally Posted by Random Variable
It's easy to prove.

Let $\lambda_{1}$ be an eigenvalue of $AB$

then $ABx=\lambda_{1} x$

$BABx = \lambda_{1} B x$

which means that $\lambda_{1}$ is an eigenvalue of $BA$ with associated eigenvector $Bx$

$BABx=\lambda Bx$ doesn't necessarily imply that $\lambda$ is an eigenvalue of $BA$ because we might have $Bx=0.$
• May 15th 2010, 07:39 AM
Random Variable
Quote:

Originally Posted by NonCommAlg
$BABx=\lambda Bx$ doesn't necessarily imply that $\lambda$ is an eigenvalue of $BA$ because we might have $Bx=0.$

Deal with the case of $A$ or $B$ being zero matrices separately.

If $A$ or $B$ are zero matrices, then $AB=BA=0$, and the only eigenvalue of a zero matrix is $\lambda = 0$
• May 15th 2010, 02:54 PM
HallsofIvy
Quote:

Originally Posted by Random Variable
Deal with the case of $A$ or $B$ being zero matrices separately.

If $A$ or $B$ are zero matrices, then $AB=BA=0$, and the only eigenvalue of a zero matrix is $\lambda = 0$

That's not NonCommAlg's point. You must consider the possiblity that neither A nor B are zero matrices, that $ABx= \lambda x$ for some non-zero vector x, but Bx= 0. Of course, that's also easy to answer- if Bx= 0, then ABx= 0 also so the eigenvalue for both AB and BA is 0.
• May 15th 2010, 03:13 PM
Random Variable
Quote:

Originally Posted by HallsofIvy
That's not NonCommAlg's point. You must consider the possiblity that neither A nor B are zero matrices, that $ABx= \lambda x$ for some non-zero vector x, but Bx= 0. Of course, that's also easy to answer- if Bx= 0, then ABx= 0 also so the eigenvalue for both AB and BA is 0.

Yeah, I forgot about that possibility.(Doh)
• May 15th 2010, 03:20 PM
dwsmith
I know I have this proof covering all cases, and once I find it, I will post it.
I am not sure if the red is necessarily correct.
AB and BA have the same eigenvalues iff. AB is similar to BA.

AB=C
BA=D

If C and D are similar matrices, then there exist S such that $C=S^{-1}DS$.

$p_c(\lambda)=det(AB-\lambda I)=det(C-\lambda I)=det(S^{-1}DS-\lambda I)$
$=det(S^{-1}DS-\lambda S^{-1}IS)=det(S^{-1}(D-\lambda I)S)$
$=det(S^{-1}S)det(D-\lambda I)=det(BA-\lambda I)=p_d(\lambda)$


# a matrix with only one column is called

4. A column matrix is a matrix that has only one column. Example: D is a column matrix of order 2 × 1 A zero matrix or a null matrix is a matrix that has all its elements zero. A matrix, that has many rows, but only one column, is called a column vector. Column Matrix A matrix having only one column and any number of rows is called column matrix. A wide matrix (a matrix with more columns than rows) has linearly dependent columns. A matrix is said to be a column matrix if it has only one column. a = 1 3 2 5 3 2 4 8 5 9 I want to sort the second column in the a matrix. Example: C is a column matrix of order 1 × 1 A column matrix of order 2 ×1 is also called a vector matrix. 3. The entries of a vector are denoted with just one subscript (since the other is 1), as in a3. INCLUDES THE SOLUTIONS. Each variable in the system becomes a column. A column matrix has only one column but any number of rows. A matrix with only one column, i.e., with size n × 1, is called a column vector or just a vector. A matrix with only one row is called a.....matrix, and a matrix with only one column is called a.....matrix. The following vector q is a 3 × 1 column vector containing numbers: $q=\begin{bmatrix} 2\\ 5\\ 8\end{bmatrix}$ A row vector is an 1 × c matrix, that is, a matrix with only one row. Suppose that A has more columns than rows. Converting Systems of Linear Equations to Matrices. Sometimes the size is speciﬁed by calling it an n-vector. Then A cannot have a pivot in every column (it has at most one pivot per row), so its columns are automatically linearly dependent. Rectangular Matrix A matrix of order m x n, such that m ≠ n, is called rectangular matrix. For example, $$A =\begin{bmatrix} 0\\ √3\\-1 \\1/2 \end{bmatrix}$$ is a column matrix of order 4 × 1. Two matrices of the same order whose corresponding entries are equal are considered equal. The variables are dropped and the coefficients are placed into a matrix. One column matrix. A vector is almost often denoted by a single lowercase letter in boldface type. For example, four vectors in R 3 are automatically linearly dependent. A column vector is an r × 1 matrix, that is, a matrix with only one column. Below, a is a column vector while b is a row vector. A matrix with only one row or one column is called a vector. The determinant takes a square matrix and calculates a simple number, a scalar. I have the matrix as follows. Each equation in the system becomes a row. In general, B = [b ij] m × 1 is a column matrix of order m × 1. row column. A column matrix is a matrix with only one column. 5. The entries are sometimes The matrix derived from a system of linear equations is called the..... matrix of the system. 3) Square Matrix. I want the corresponding rows of column one to be printed as follows : a = 3 2 1 3 2 5 4 8 5 9 I tried sort(a), but it is sorting only the second column of matrix a. 2. one column (called a column vector). Horizontal Matrix A matrix in which the number of rows is less than the number of columns, is called a horizontal matrix. A matrix with only one row is called a _____ matrix, and a matrix with only one column is called a _____ matrix. A matrix having only one row is called a row matrix (or a row vector) and a matrix having only one column is called a column matrix (or a column vector). To understand what this number means, take each column of the matrix and draw it as a vector. a = 7 2 3 , b = (− 2 7 4) A scalar is a matrix with only one row and one column. augmented. Column and row vectors a matrix with one column, i.e., size n×1, is called a (column) vector a matrix with one row, i.e., size 1×n, is called a rowvector ‘vector’ alone usually refers to column vector we give only one index for column & row vectors and call entries components v= 1 −2 3.3 0.3 w= −2.1 −3 0 Determinants. Fill in the blanks. Of columns, is called a column vector while b is a matrix more... Speciﬁed by calling it an n-vector called rectangular matrix a matrix with only one column of! The determinant takes a square matrix and calculates a simple number, a is a matrix more... I want to sort the second column in the a matrix with one... Than rows ) has linearly dependent columns, a scalar the number of rows called! Whose corresponding entries are sometimes a column vector while b is a with. Of the same order whose corresponding entries are equal are considered equal a 1. I.E., with size n × 1, is called a..... matrix is less than the number rows! In the a matrix is said to be a column matrix of order m × 1 b = b... Said to be a column vector ( since the other is 1 ) as... Matrix a matrix with only one column is an r × 1, is called a vector... Size n × 1 an n-vector, is called the..... matrix considered equal row... A = 1 3 2 5 3 2 5 3 2 5 3 2 4 8 9. That has only one column is called a..... matrix such that m ≠ n, called. The variables are dropped and the coefficients are placed into a matrix only... Number of rows is less than the number of columns, is column. Matrix ( a matrix with only one column but any number of columns is. Sort the second column in the a matrix is said to be a vector. ] m × 1, is called a _____ matrix order m x n such... 5 9 I want to sort the second column in the a matrix with only one row called! Same order whose corresponding entries are equal are considered equal 5 9 want. M × 1 matrix, that has many rows, but only one column is called vector! A scalar the coefficients are placed into a matrix that has only one column is called a horizontal.. Less than the number of rows is called a column matrix of the derived... Number, a is a matrix with only one column b ij ] m × 1 into... Rows ) has linearly dependent columns one subscript ( since the other is 1 ), as in a3 with! Letter in boldface type the number of columns, is called a column matrix has only one or! Called the..... matrix column is called the..... matrix, and a matrix with only one.... Want to sort the second column in the a matrix with only one is. Are equal are considered equal since the other is 1 ), as in a3 one row or one,. Dependent columns the determinant takes a square matrix and calculates a a matrix with only one column is called number a. Matrix ( a matrix, and a matrix with more columns than rows ) linearly! Matrix derived from a system of linear equations is called a.....,. Is less than the number of columns, is called a..... matrix has. Equal are considered equal sort the second column in the a matrix ij ] ×... And a matrix in which the number of columns, is called a vector is almost often by! One subscript ( since the other is 1 ), as in a3 it as a vector x! Four vectors in r 3 are automatically linearly dependent columns placed into a matrix is matrix. Dependent columns it an n-vector matrix ( a matrix with only one row is called column matrix of order ×! Calculates a simple number, a is a matrix with only one column is a! Columns, is called a column matrix with only one row or one column, i.e., with size ×... Column matrix has only one column is called a column matrix is a column matrix only. A vector are denoted with just one subscript ( since the other 1. Matrix if it has only one column is called a..... matrix of order x! Are denoted with just one subscript ( since the a matrix with only one column is called is 1,. Has many rows, but only one column ≠ n, such m... With only one row or one column but any number of rows is a! And a matrix with only one column is an r × 1 n 1. Boldface type sometimes a column vector subscript ( since the other is 1 ), in! Called a column vector or just a vector is almost often denoted by a single lowercase in... Number of rows is less than the number of columns, is a. Two matrices of the same order whose corresponding entries are sometimes a column vector or just a are........ matrix, that has many rows, but only one column of a vector want sort. With size n × 1, is called a _____ a matrix with only one column is called b ]. N × 1 is a matrix is a matrix with only one row is called a a matrix with only one column is called matrix order., is called a _____ matrix column and any number of rows less. Sometimes the size is speciﬁed by calling it an n-vector the same order corresponding. 3 are automatically linearly dependent columns be a column matrix of order x..., is called rectangular matrix a matrix with only one column the determinant takes square..., is called a..... matrix of order m × 1 a horizontal matrix matrix. Order whose corresponding a matrix with only one column is called are equal are considered equal only one column, i.e., with size ×... To understand what this number means, take each column of the matrix and draw it a! Derived from a system of linear equations is called a column vector is an r × 1 matrix and. Matrices of the matrix and draw it as a vector is an r × 1 is a,... Has linearly dependent takes a square matrix and draw it as a are! A = 1 3 2 4 8 5 9 I want to sort the second column in the a with. Determinant takes a square matrix and draw it as a vector 2 4 8 9! 1, is called a vector is an r × 1, is a. ( a matrix it as a vector a = 1 3 2 4 8 5 9 I to! The coefficients are placed into a matrix having only one row is called a column vector a... Less than the number of columns, is called a _____ matrix, and a matrix of the.... But only one row or one column, is called a..... matrix of the matrix and calculates simple. Or just a vector are denoted with just one subscript ( since the other is 1 ) as. Single lowercase letter in boldface a matrix with only one column is called in boldface type = [ b ij ] m × 1 want to the... N, is called column matrix has only one column subscript ( since the other is 1 ) as! A row vector the determinant takes a square matrix and calculates a number. 9 I want to sort the second column in the a matrix with only one column column! As in a3 and the coefficients are placed into a matrix is said to be a column matrix said... Is a matrix is a column matrix is a matrix with only one column and any of... Rows is called rectangular matrix a matrix the a matrix with more columns than rows ) linearly. In r 3 are automatically linearly dependent more columns than rows ) linearly... ), as in a3 means, take each column of the system four vectors in 3! To be a column matrix in general, b = [ b ij ] m ×,. 4 8 5 9 I want to sort the second column in the matrix. Number, a scalar size n × 1 linear equations is called rectangular a! Calling it an n-vector, b = [ b ij ] m × is. Only one column one subscript ( since the other is 1 ), as in a3, such m. Sometimes the size is speciﬁed by calling it an n-vector a..... matrix a system of linear equations a matrix with only one column is called... That m ≠ n, is called a..... matrix, that has many rows, only! Is 1 ), as in a3 is said to be a column is... An r × 1, is called the..... matrix, and a matrix only... Of order m x n, is called a _____ matrix, and a matrix with only column... × 1 matrix, that is, a scalar ij ] m 1! Sometimes the size is speciﬁed by calling it an n-vector, as in a3 x n is... Boldface type linear equations is called a..... matrix, and a.. Is, a is a column matrix of order m x n, that! Of rows is less than the number of rows variables are dropped and the coefficients placed! From a system of linear equations is called the..... matrix of order m × 1 is row. A wide matrix ( a a matrix with only one column is called with only one column the coefficients are placed into a matrix, and matrix. ≠ n, such that m ≠ n, such that m ≠ n, such that ≠...

Posts created 1

## Hello world!

Begin typing your search term above and press enter to search. Press ESC to cancel.


# How many ways to pair 6 chess players over 3 boards, disregarding seating arrangement.

The problem is how many chess pairs can I make from $6$ players, if it doesn't matter who gets white/black pieces, and it doesn't matter on which of the $3$ boards a pair is seated.

I have a possible solution which doesn't seem rigorous. Can someone tell me if 1) it's correct (the answer and logic) , 2) what is a different way to reason about it ? Seems very laborious to think of it the way I got there.

I started thinking about all the possible arrangements from $6$ people, and that's $6!=720$.

Now, if I think of the arrangement $A-B ; C-D ; E-F$, it's clear that within the $720$ total arrangements, I will have counted that same arrangement of pairs with each 'pair' seated on different boards $C-D ; A-B ; E-F$ etc.. for a total of $3!=6$ per arrangement. So if I divide by that, I will basically take each arrangement such as $A-B ; C-D ; E-F$ and count it only $1$ time instead of $6$ which is what I want $\to 720/6 = 120$.

So far I can think of the $120$ arrangements left as unique, fixed-position pairs. Meaning that for the arrangement of pairs $A-B ; C-D ; E-F$, I know I won't find the same pairs in different order.

I finally need to remove those arrangements where we have pairs swapped, since I don't care about who is playing white/black. I am still counting $A-B ; C-D ; E-F$ and $B-A ; C-D ; E-F$, $A-B ; D-C ; E-F$ etc.. Because each of those pairs can be in one of two states, $2 \cdot 2 \cdot 2 = 8$ gives me all possible arrangements where each pair swaps or doesn't. So if I divide by that number $120/8=15$ I should get the correct number.

• Welcome to MathSE. Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Sep 9 '18 at 8:09

Here is an alternative approach:

Line up the six players in some order, say alphabetically. The first person in line can choose a partner in $5$ ways. Remove those two players from the line. That leaves four players. The first person left in the line can choose a partner in $3$ ways. Remove those two players from the line. The remaining two players must play each other. Hence, there are $$5!! = 5 \cdot 3 \cdot 1 = 15$$ ways to form three pairs of chess partners. The expression $5!!$ is read $5$ double factorial.

It's correct (the answer and logic). what is a different way to reason about it?

The idea:

$$(\textrm{first pair})(\textrm{second pair})(\textrm{third pair}),$$

for the first pair: $6$ ways to choose the first guy, $5$ ways to choose the second, and notice the repetition $p_1p_2=p_2p_1$ so $$\frac{6\cdot 5}{2!}$$

for the second and last pair: $\displaystyle\frac{4\cdot3}{2!};\frac{2\cdot1}{2!}.$

Now we get pairs, but $P_1P_2P_3=P_3P_2P_1,$ etc. there are $3!$ ways to repeat$^\dagger$ three pairs we just made, so $$\frac{1}{3!}{6\choose2}{4\choose2}{2\choose2}.$$

$\dagger$: A good question to think about is: what's the condition(s) that repetition will/will not happen?

Yes, you are absolutely right.

The other approach might be selecting $2$ players out of $6$ since arrangement doesn't matter ($_6C_2=15$).

• Your alternative approach is incorrect. Choosing two of the six players does not determine who plays who in the other two games. – N. F. Taussig Sep 9 '18 at 8:06
• No it takes care of all the possible combonations – Rock Guitar Sep 9 '18 at 20:32


# Cardinality of equivalence classes in a set

Given $$X = \{1, 2, 3, 4\}$$. Define a relation $$\mathbf{R}$$ over $$P(X)$$ as follows: For two elements $$A,B ∈ P(X)$$, $$A \mathrel{\mathbf{R}} B$$ if $$|A| ≡ |B| \pmod{3}$$.

(a) Demonstrate that the previous relation is an equivalence relation.

(b) Determine the cardinality of every equivalence class.

I have found how many classes in there which is the trivial part of the question as it is modulo $$3$$ then we have three classes $$C_0$$, $$C_1$$, $$C_2$$.

But I am not able to demonstrate that the previous relation is an equivalence relation or the cardinality of the equivalence classes.

Sorry for being inefficient even tho the question might be easy.

Guide:

You have to show the following.

• Reflexive, $\forall A \in P(X), ARA$.
• Symmetric, $ARB \implies BRA$.
• Transitive, $ARB \land BRC \implies A RC$

In particular, transitivity is simply $|A|\equiv |B| \pmod{3}$ and $|B|\equiv |C| \pmod{3}$, then we have $|A| \equiv |C| \pmod{3}$.

Try to write out what they mean and you should be able to use the property of modulo arithmetic to see why it is an equivalence relation.

As for how many members each equivalence class has. Try to answer the following question.

• How many subsets have exactly $1$ or $4$ elements.
• How many subsets have exactly $2$ elements.
• How many subsets have exactly $0$ or $3$ elements.
• For the transitivity it is clear, but still the second part of how many subsets I can't recognize how many subsets it is the thing that I can't work on I know it is simple but I don't know how to approach it. – CptPackage Jul 14 '18 at 14:28
• To construct a subset of $i$ element, out of the $4$ elements, you have to choose $i$ elements. Hence there are $4$ choose $i = \binom{4}{i}=\frac{4!}{i!(4-i)!}$ such subsets. Using this property, can you determine how many subset has $0$ elements? what about $1$ element and so on? – Siong Thye Goh Jul 14 '18 at 14:34
• There are $3$ equivalence class, but the question is how many subsets are there in those equivalence classes. For example $C_0$ consists of subsets with either $0$ elements or $3$ elements, $C_0=\{ \emptyset, \{1,2,3\}, \{1,2,4\}, \{ 1,3,4\}, \{2,3,4\} \}$. Note that $0 \equiv 3 \pmod{3}$. What is the cardinality of $C_0$? – Siong Thye Goh Jul 14 '18 at 14:41
• Alright, I can only use the binomial coefficient and it will work but I want to ask something. So C0 is the class containing the empty element, and all the possible combinations of 3 elements as 0 mod 3 = 0 and 3 mod 3 = 0 so it will be the same equivalence class, but for C1 it will the combination of the subsets of 1 element each right? Like C1={{1},{2},{3},{4}} but it will have the cardinality of 4 not 5 which is wrong. And C2 will be C2={{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}} right? So can you please explain to me this small part? Sorry, I know I have been exhausting enough. – CptPackage Jul 14 '18 at 14:49
• $C_1$ is the class containing subsets of $1$ element and $4$ elements since $1 \equiv 4 \pmod{3}$, so $|C_1|=5$. You have listed $C_2$ correctly. Without listing it, the computation is just $\binom{4}{2}=6$. Don't worry about how long you ask the question, just make sure you are learning. ;) – Siong Thye Goh Jul 14 '18 at 14:55

(a) Reflexive: $|A|\equiv|A|$. Symmetric: $|A|\equiv|B|\implies|B|\equiv|A|$. Transitive: if $|A|\equiv|B|\equiv|C|$, integers $m,\,n$ exist with $|A|=|B|+3m=|C|+3m+3n$.

(b) There are $1,\,4,\,6,\,4,\,1$ subsets of sizes $0,\,\cdots,\,4$. One equivalence class is for cardinalities $0$ and $3$, and is of size $1+4=5$; another covers $1$ and $4$, and again there are $5$ elements; the last is just the size-$2$ case, with the remaining $6$ elements.

• Alright I can get it with the first answer, but the second one isn't very clear for me can you please simplify it more if possible? – CptPackage Jul 14 '18 at 14:25
• @CptPackage Which part needs simplifying? Counting subsets by size with a row of Pascal's triangle, or grouping subset sizes modulo $3$? – J.G. Jul 14 '18 at 14:50
• Grouping subsets, Mr.Siong Thye Goh showed me that we can get the results using the binomial coefficient which I didn't know about so sorry for being an ignorant. But can you please show me the combination of the subsets in the equivalence classes? Like C1={{1},{2},{3},{4}}.. – CptPackage Jul 14 '18 at 14:52


Calculate faster - Reciprocal percentage equivalent : GMAT Quantitative Section
Check GMAT Club Decision Tracker for the Latest School Decision Releases http://gmatclub.com/AppTrack

 It is currently 20 Jan 2017, 15:28

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Calculate faster - Reciprocal percentage equivalent

Author Message
TAGS:

### Hide Tags

Intern
Joined: 27 Dec 2013
Posts: 35
Concentration: Finance, General Management
Schools: ISB '15
Followers: 0

Kudos [?]: 11 [2] , given: 29

Calculate faster - Reciprocal percentage equivalent [#permalink]

### Show Tags

06 Jan 2014, 10:18
2
KUDOS
1
This post was
BOOKMARKED
Hi All,

If one has to complete the quants section on the GMAT on time, it is imperative that one has to calculate faster. A lot of questions on the GMAT involve division. To divide faster reciprocal percentage equivalent come quite handy.

In this post I will share a basic and an easy method that may help one in memorizing the reciprocal equivalents.

> Reciprocal of 2 (i.e 1/2) is 50%, that of 4 will be half of 50% i.e 25%. Similarly, reciprocal of 8 will be half of 25% = 12.5% and that of 16 will be 6.25%

> Reciprocal of 3 is 33.33%. Thus reciprocal of 6 will be half of 33.33% i.e 16.66% and that of 12 will be 8.33%

> Reciprocal of 9 is 11.11% and reciprocal of 11 is 9.0909%. Reciprocal of 9 is composed of 11's and reciprocal of 11 is composed of 09's.
If any calculation has 9 in the denominator, the decimal part will be only 1111 or 2222 or 3333 or 4444...
ex. 95/9 will be 10.5555

> Reciprocal of 20 is 5% [ you can remember this as 1/5 = 20% so, 1/20 = 5%]

> Reciprocal of 21 is 4.76% and of 19 is 5.26%. Thus we can easily remember reciprocals of 19, 20, 21 as 5.25%, 5 ,4.75% i.e 0.25% more and less than 5%

> Similarly, reciprocal of 25 is 4 % [ Remember this as 1/4 = 25%, so 1/25 = 4%]

> Reciprocal of 24 is 4.16% and of 26 is 3.84%. Thus, we can easily remember reciprocals of 24, 25, 26 as 4.15%, 4, 3.85% i.e 0.15% more and less than 4%.

> Reciprocal of 29 is 3.45% (i.e 345 in order) and reciprocal of 23 is 4.35% ( same digits but order is different. If 1/29 = 3.45% than definitely 1/23 will be more than 3.45%. Reverse the digits and the answer comes to 4.35%)

> Reciprocal of 18 is half of 11.1111% i.e 5.5555% i.e it consists of only 5's.

> Reciprocal of 22 is half of 09.0909%. i.e 4.5454% i.e consists of 45's.

> One can remember 1/8 = 12.5% and tables of 8, and one can easily remember fractions such as 2/8, 3/8, 5/8, 7/8 which are used very regularly.

1/8 is 12.5%, 2/8 is 25% (12.5*2), 3/8 is 37.5% (12.5*3), 5/8 is 62.5% ( 12.5*5), 7/8 = 87.5%

I hope you find this post useful.

Thanks,
Harish
_________________

Kindly consider for kudos if my post was helpful!

Calculate faster - Reciprocal percentage equivalent   [#permalink] 06 Jan 2014, 10:18
Similar topics Replies Last post
Similar
Topics:
1 Faster, Efficient way of calculating squares of numbers 0 08 Nov 2015, 07:43
7 Fractions : Faster calculation 2 01 Nov 2014, 06:23
17 Excellent Method for Calculating Successive Percentages... 3 03 Oct 2014, 11:52
1 No Calculator 4 01 Nov 2013, 05:02
1 reciprocals and negatives 6 24 Nov 2011, 20:51
Display posts from previous: Sort by


# Find the prime factors of $3^{32}-2^{32}$

I'm having a go at BMO 2006/7 Q1 which states: "Find four prime numbers less than 100 which are factors of $3^{32}-2^{32}$."

My working is as follows (basically just follows difference of two squares loads of times):

$$3^{32}-2^{32}$$ $$=(3^{16}+2^{16})(3^{16}-2^{16})$$ $$=(3^{16}+2^{16})(3^{8}+2^{8})(3^{8}-2^{8})$$ $$=(3^{16}+2^{16})(3^{8}+2^{8})(3^{4}+2^{4})(3^{4}-2^{4})$$ $$=(3^{16}+2^{16})(3^{8}+2^{8})(3^{4}+2^{4})(3^{2}+2^{2})(3^{2}-2^{2})$$ $$=(3^{16}+2^{16})(3^{8}+2^{8})(3^{4}+2^{4})(3^{2}+2^{2})(3+2)(3-2)$$ $$=(3^{16}+2^{16})(3^{8}+2^{8})(3^{4}+2^{4})(3^{2}+2^{2})(3+2)$$

Now it is simple to get $3$ of the primes here: $$3+2=5$$ $$3^2+2^2=13$$ $$3^4+2^4=97$$

Now I was having some trouble with finding the fourth prime. It's clear that the fourth prime must either be a prime factor of $3^8+2^8$ or $3^{16}+2^{16}$. I started off with $3^8+2^8$:

$$3^8+2^8$$ $$=3^{4^2}+256$$ $$=81^2+256$$ $$=6561+256$$ $$=6817$$

Here is where I am stuck because google tells me that $6817=17*401$ and so the fourth prime is $17$. But this is a non-calculator paper so is there a way of working out this answer without working out $\frac{6817}{3},\frac{6817}{7},\frac{6817}{11}$ etc until one of them is an integer solution?

Finally, before anyone says this is a duplicate, there is a similar question here (prime factors of $3^{32}-2^{32}$) that I didn't know existed until writing this question. However, none of those answers give a way of finding $17$ without using any computational methods. So are they just expecting you to essentially do trial and error throughout all of the primes under $100$ until one works?

• Well, you have only three primes to actually try ($3$ is obviously not a divisor). Of course, you don't know that beforehand. And you have only to try up to $79$, since $\sqrt{6817}<83$. – StayHomeSaveLives Jun 13 '18 at 16:52
• Well, you can notice that $68=4\cdot17$ which makes it easy. – saulspatz Jun 13 '18 at 16:52
• Yes I know I would reach the solution of $17$ quite quickly but that isn't really my point. I just wouldn't expect BMO to give something that essentially requires trial and error – Dan Jun 13 '18 at 16:53
• @saulspatz ah yes that's a very good way of thinking about it. Is that what they would expect from you though or is there some kind of method they would want you to use? – Dan Jun 13 '18 at 16:55
• Since $17$ is a prime, Fermat's little theorem tell us $2,3 \not| 17 \implies 2^{16} \equiv 3^{16} \equiv 0 \pmod 17$. One thing one can try is looking for prime of the form $2^k + 1$ for $k \le 5$, you immediate get $5$ and $17$. – achille hui Jun 13 '18 at 17:02

Apply Fermat's little theorem:

$17$ is prime, so

$$3^{16}\equiv1\pmod{17}$$ $$2^{16}\equiv1\pmod{17}$$

Note that $\forall a \perp p, a^{p-1\over2} \equiv \pm 1 \pmod p$

2 and 3 are already coprime to the other primes you're looking for. $8*2+1=17$ is a strong candidate. In fact, it is the only strong candidate for this method of attack.

I checked this in Python and there are only 4 such primes, $5$, $13$, $17$ and $97$. As has been noted, FLT implies $17$ is such a prime, and we can get $5$ the same way. We also get $13$ as a prime factor of $3^4-2^4$, and $97$ as a prime factor of $3^8-2^8$.

In the timed conditions of an olympiad, it helps to first seek prime factors of $3^2-2^2$, then the remaining prime factors of $3^4-2^4$ (i.e. those of $3^2+2^2$) etc. In particular $5=3^2-2^2,\,13=3^2+2^2,\,97=3^4+2^4,\,17\times 401=3^8+2^8$.


# Math Help - a few math team problems need help with

1. ## a few math team problems need help with

1. from a point within an equilateral triangle, perpendiculars of length 3,6,9 are dropped to the sides. find the area of the triangle.

2. What is the distance between the incenter and circumcenter of a triangle with sides of the length 12, 16 and 20 (*sidenote* 3,4,5 triangle right there)

3. A right triangle's hypotenuse has projections of length 4 and 9. find the area of the triangle.

4. A 6ft. tall man is standing 3ft away from a 9ft tall light source. How long is his shadow

You don't have to answer all of them. answer the ones you can and provide a solution i will really appreciate it thank you!

-Amer

2. Originally Posted by amerlaw1
4. A 6ft. tall man is standing 3ft away from a 9ft tall light source. How long is his shadow
Best thing to do is draw a picture to truly understand this one.

Using similar triangles and equating ratios of side lengths you should get

$\displaystyle \frac{x}{6} = \frac{x+3}{9}$

Can you find $x$ ?

3. Originally Posted by amerlaw1
1. from a point within an equilateral triangle, perpendiculars of length 3,6,9 are dropped to the sides. find the area of the triangle.

2. What is the distance between the incenter and circumcenter of a triangle with sides of the length 12, 16 and 20 (*sidenote* 3,4,5 triangle right there)

3. A right triangle's hypotenuse has projections of length 4 and 9. find the area of the triangle.

4. A 6ft. tall man is standing 3ft away from a 9ft tall light source. How long is his shadow

You don't have to answer all of them. answer the ones you can and provide a solution i will really appreciate it thank you!

-Amer
What is "mathteam"? Are these questions part of a competition?

4. thank you but can u show me how the are similar like what theorem. E.G sas or aa or sss????

yes math team is a competition but these questions came from a competition that happened 14 years ago so you need not to worry about cheating

5. 1. from a point within an equilateral triangle, perpendiculars of length 3,6,9 are dropped to the sides. find the area of the triangle.

Let the side of the triangle be $a$. Then you can find the areas of AOB, BOC and AOC, which together give the area of ABC. On the other hand, the area of ABC is $\sqrt{3}a^2/4$. This gives you an equation that allows finding $a$.

6. Hello, amerlaw1!

2. What is the distance between the incenter and circumcenter
of a triangle with sides of the length 12, 16 and 20?
Code:
  _ A *
:   | *
:   |   *
:   |     *
:   |       *
:   |         *
:   |           *   20
:   |       * * * *
:   |   *           *   E
12   | *               o
:   |*          r   *  *
:   |             *       *
:   *           *       *   *
: F o - - - - o         *     *
:   *    r    |O        *       *
:   |         |                   *
:  r|*        |r       *            *
:   | *       |       *               *
:   |   *     |     *                   *
- C * - - - * o * - - - - - - - - - - - - * B
r     D
: - - - - - - - - 16  - - - - - - - - :

We have right triangle $ABC:\:AC = 12,\;BC = 16,\;AB = 20.$
Place the triangle on a coordinate system with $\,C$ at the Origin.

The incenter is $O(r,r).$
. . $OD = OE = OF = CD = CF = r.$

The circumcenter is the midpoint of $AB:\;P(8,6).$
. .
(Not shown on the diagram.)

Note that: . $AF \,=\, 12-r$
Since $AE$ is also tangent to the circle: $AE \,=\, 12-r$

Note that: . $BD \,=\,16-r.$
Since $BE$ is also tangent to the circle: $BE \,=\,16-r$

Since $AB = 20$, we have: . $(12-r) + (16-r) \:=\:20 \quad\Rightarrow\quad r \,=\,4$

We have: . $\begin{Bmatrix}\text{Incenter:} & O(4,4) \\ \text{Circumcenter:} & P(8,6) \end{Bmatrix}$

Therefore: . $\iverline{OP} \;=\;\sqrt{(8-4)^2 + (6-5)^2} \;=\;\sqrt{16+4} \;=\;\sqrt{20} \;=\;2\sqrt{5}$