Could someone explain conditional independence? My understanding right now is that an example of conditional independence would be:

If two people live in the same city, the probability that person A gets home in time for dinner, and the probability that person B gets home in time for dinner are independent; that is, we wouldn't expect one to have an affect on the other. But if a snow storm hits the city and introduces a probability C that traffic will be at a stand still, you would expect that the probability of both A getting home in time for dinner and B getting home in time for dinner, would change.

If this is a correct understanding, I guess I still don't understand what exactly conditional independence is, or what it does for us (why does it have a separate name, as opposed to just compounded probabilities), and if this isn't a correct understanding, could someone please provide an example with an explanation?

The scenario you describe provides a good example for conditional independence, though you haven't quite described it as such. As the Wikipedia article puts it,

  $R$ and $B$ are conditionally independent [given $Y$] if and only if,
  given knowledge of whether $Y$ occurs, knowledge of whether $R$ occurs
  provides no information on the likelihood of $B$ occurring, and
  knowledge of whether $B$ occurs provides no information on the
  likelihood of $R$ occurring.

In this case, $R$ and $B$ are the events of persons A and B getting home in time for dinner, and $Y$ is the event of a snow storm hitting the city. Certainly the probabilities of $R$ and $B$ will depend on whether $Y$ occurs. However, just as it's plausible to assume that if these two people have nothing to do with each other their probabilities of getting home in time are independent, it's also plausible to assume that, while they will both have a lower probability of getting home in time if a snow storm hits, these lower probabilities will nevertheless still be independent of each other. That is, if you already know that a snow storm is raging and I tell you that person A is getting home late, that gives you no new information about whether person B is getting home late. You're getting information on that from the fact that there's a snow storm, but given that fact, the fact that A is getting home late doesn't make it more or less likely that B is getting home late, too. So conditional independence is the same as normal independence, but restricted to the case where you know that a certain condition is or isn't fulfilled. Not only can you not find out about A by finding out about B in general (normal independence), but you also can't do so under the condition that there's a snow storm (conditional independence).

An example of events that are independent but not conditionally independent would be: You randomly sample two people A and B from a large population and consider the probabilities that they will get home in time. Without any further knowledge, you might plausibly assume that these probabilities are independent. Now you introduce event $Y$, which occurs if the two people live in the same neighbourhood (however that might be defined). If you know that $Y$ occurred and I tell you that A is getting home late, then that would tend to increase the probability that B is also getting home late, since they live in the same neighbourhood and any traffic-related causes of A getting home late might also delay B. So in this case the probabilities of A and B getting home in time are not conditionally independent given $Y$, since once you know that $Y$ occurred, you are able to gain information about the probability of B getting home in time by finding out whether A is getting home in time.

Strictly speaking, this scenario only works if there's always the same amount of traffic delay in the city overall and it just moves to different neighbourhoods. If that's not the case, then it wouldn't be correct to assume independence between the two probabilities, since the fact that one of the two is getting home late would already make it somewhat likelier that there's heavy traffic in the city in general, even without knowing that they live in the same neighbourhood.

To give a precise example: Say you roll a blue die and a red die. The two results are independent of each other. Now you tell me that the blue result isn't a $6$ and the red result isn't a $1$. You've given me new information, but that hasn't affected the independence of the results. By taking a look at the blue die, I can't gain any knowledge about the red die; after I look at the blue die I will still have a probability of $1/5$ for each number on the red die except $1$. So the probabilities for the results are conditionally independent given the information you've given me. But if instead you tell me that the sum of the two results is even, this allows me to learn a lot about the red die by looking at the blue die. For instance, if I see a $3$ on the blue die, the red die can only be $1$, $3$ or $5$. So in this case the probabilities for the results are not conditionally independent given this other information that you've given me. This also underscores that conditional independence is always relative to the given condition -- in this case, the results of the dice rolls are conditionally independent with respect to the event "the blue result is not $6$ and the red result is not $1$", but they're not conditionally independent with respect to the event "the sum of the results is even".

The events would be conditionally independent, for example, if A always comes home by car and B commutes by subway/metro train. Assuming subway is not affected by a snow storm but road transport is, it can be said that they are conditionally independent.


Slope of a line segment. If $A(x_1, y_1)$ and $B(x_2, y_2)$, we know that slope $m = \frac {(y_2 - y_1)} {(x_2 - x_1)}$.

What decision can we take aout the line segment when, $m = \frac 0 0$, $m = \frac {dy} 0$, and, $m = \frac 0{dx}$?

If $A(0,0)$ and $B(0, 10)$, what would be the slope of the line?

This formula is true if $A\neq B$. Then, in the first case you are taking $A=B$ and the formula does not work. When $x_1=x_2$ for all $A\neq B$ the slope is not defined (or it can be regarded as infinite). Last case, we have a horizontal line.

Please be careful not to use $dx$ and $dy$ to mean the difference between the $x$ and $y$ coordinates. It's better to use $\Delta x$ and $\Delta y$ for these differences. (The Greek letter $\Delta$ is pronounced "delta".)

If you have two distinct points, say $P(x_1,y_1)$ and $Q(x_2,y_2)$ then there is a unique line passing through $P$ and $Q$. As you correctly say: the gradient of this line is given by
$$m = \frac{y_1-y_2}{x_1-x_2} = \frac{\Delta y}{\Delta x}$$

If $\Delta x = 0$ and $\Delta y = 0$ then $x_1=x_2$ and $y_1=y_2$. This means $P=Q$ and so $P$ and $Q$ are not distinct and there are many lines passing through a single point, and no single gradient.

If $\Delta x = 0$ and $\Delta y \neq 0$ then $x_1=x_2$. This means that $P$ and $Q$ lie directly above/below one another, i.e. the line through $P$ and $Q$ is a vertical line. If $x_1=x_2=k$ then the equation of this line will be $x=k$. If you want to be naughty then we could say that the gradient is infinite.

If $\Delta x \neq 0$ and $\Delta y = 0$ then $y_1=y_2$. This means that $P$ and $Q$ lie directly to the left/right of one another, i.e. the line through $P$ and $Q$ is a horizontal line. If $y_1=y_2=k$, then the equation of this line will be $y=k$. In this case the gradient is zero.

In the case $A(0,0)$ and $B(0,10)$ then $\Delta x = 0$ and $\Delta y \neq 0$. The equation of the line through $A$ and $B$ will be $x=0$, i.e. the $y$-axis.


Which of the numbers $1, 2^{1/2}, 3^{1/3}, 4^{1/4}, 5^{1/5}, 6^{1/6} , 7^{1/7}$ is largest, and how to find out without calculator? $1, 2^{1/2}, 3^{1/3}, 4^{1/4}, 5^{1/5}, 6^{1/6} , 7^{1/7}$.

I got this question in an Application of Derivatives test. I think log might be used here to compare the values, but even then the values are very close to each other and differ by less than 0.02, which makes it difficult to get some specific answer to this question. How to solve this by a definite method?

You can use calculus to find where the maximum of $f(x)=x^{1/x}$ occurs. You will find that it is at $x=e$. You will also find that $f(x)$ is increasing for $0< x<e$ and decreasing for $e<x$.

Unfortunately, the choice $e^{1/e}$ was not given. The two values of $x$ that you are given that bracket $e$ are $2$ and $3$, so the correct choice is either $2^{1/2}$ or $3^{1/3}$.

We can decide between the two of them by raising both sides to the sixth power.

\begin{align}
2^{1/2} &\stackrel{?}{=} 3^{1/3} \\
\left(2^{1/2}\right)^6 &\stackrel{?}{=} \left(3^{1/3}\right)^6 \\
2^3 &\stackrel{?}{=} 3^2 \\
8 &\stackrel{?}{=} 9
\end{align}

We see that $x=3$ gives us the larger function value, so the correct answer is

$$3^{1/3}$$

If you haven't been introduced to elementary calculus yet, you can take a look at this solution. Comparing integers is easier than comparing irrational numbers. Since $[1, 2, \cdots, 7] = 420$, we can take the $420$th powers of all these numbers will give us a bunch of integers to compare: $$1, 2^{210}, 3^{140}, 2^{210}, 5^{84}, 2^{70} 3^{70}, 7^{60}.$$ We see after some basic arithmetic that $3^{140}$ is the largest among these numbers. Taking the $140$th root, it is obvious that $3^{1/3}$ is the largest among the original bunch of numbers.


How to evaluate $45^\frac {1-a-b}{2-2a}$ where $90^a=2$ and $90^b=5$ without using logarithm? Let $90^a=2$ and $90^b=5$, Evaluate

$45^\frac {1-a-b}{2-2a}$

I know that the answer is 3 when I used logarithm, but I need to show to a student how to evaluate this without involving logarithm. Also, no calculators.


If Las Vegas is the capital of Fiji, then $x^2=4$. If Las Vegas is the capital of Fiji, then $x^2=4$.

I was asked to state either the above claim is true or false. I must give a proof if it is true and counter example if it is false.

I prove its contrapositive: if not $q$ then not $p$ in the truth value table which  is true always and is false only when $q$ or conclusion is false.

So since $x^2=4$ is false because the value of $x$ is unknown.
I say the claim is false.
Am I correct?

This is a vacuous truth, since the condition "Las vegas is capital of Fiji" is never satisfied, so for some $x$, this is equivalent to
$$ \text{False} \implies \text{True}
$$
and for some $x$, this is
$$ \text{False} \implies \text{False}
$$
Both statements are true, so this is true.

This is vacuously true by definition of material implication:
https://en.wikipedia.org/wiki/Material_implication_(rule_of_inference)

It is true because the law of the excluded middle demands implication to have a truthy or falsy value. The truth table of implication is such that if P is false, then regardless of the validity of Q, the whole statement is true. Vacuous truths, however, are not of much interest beyond this.


Why $f(x)=\sum_{n=0}^\infty \frac{f^{(n)}(0)\, x^n}{n!} $? Let $f:\mathbb R\longrightarrow \mathbb R$ a function that is $\mathcal C^\infty(\mathbb R) $. Suppose $$\sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!}\,x^k$$
converge and its radius is $R$. Why $$f(x)=\sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!}\,x^k$$
for all $x\in ]-R,R[$ ?

I know that for a fixed $n$, $$f(x)=\sum_{k=0}^n\frac{f^{(k)}(0)}{k!}\,x^k+o(x^n),$$
in a neighborhood of $0$, but a priori it won't be correct for $x$ too large (take for example the sinus or exponential, we have $$e^x=\sum_{k=0}^\infty \frac{x^k}{k!},$$
for all $x\in \mathbb R$, not only in a neighborhood of $O$. So why can we extend the formula to all $x\in\mathbb R$ ?

Ok, let forget $e^{-1/x^2}$. Consider for example $\sin(x)$.
Why $$\sin(x)=\sum_{k=0}^\infty \frac{(-1)^{n+1}}{(2n)!}x^{2n},$$
for all $x\in\mathbb R$ whereas $$\sin(x)=\sum_{k=0}^n \frac{(-1)^{n+1}x^{2k}}{(2k)!}+o(x^{2n})$$
in a neighborhood of $0$ only.

This is not true. The function
$$
f(x)=\cases{0& if $x=0$\\e^{-1/x^2}& otherwise}
$$
is $C^{\infty}$, and for any $k\in\Bbb N$ we have $f^{(k)}(0)=0$, so the series converges for all $x$, but only converges to $f(x)$ for $x=0$.

It depends on the size of the radius.

For some $\sum_{k=0}^{\infty}a_k\,x^k$ you will have $r=\lim_{k\to\infty}|\frac{a_k}{a_{k+1}}|$.

Calculating the radius for $e^x$ provides $r=\infty$.

But then consider the function $f(x)=\frac{1}{1-x}$. Its MacLaurin series $\sum_{k=0}^{\infty}x^k$ has a radius of convergence of $r=1$. But that given fraction function clearly is well-defined beyond too.

Just plot the graph of that latter function and you would understand that the series would be well-defined even for $x\in [-1,1)$.

--- rk


What is the significance of the slope of the tangent line of a function? Why is the derivative so important? As I finished calc 1. I can use the product rule and chain rule and resolve integrals. But I feel like its too mechanical for my taste. I know the procedure and I execute on paper without really understanding or experiencing the "ahaa moment".

For example, when I was learning geometry in elementary school, the "ahaa moment" for me was when I had to move furniture in my room and needed to find areas of stuff. I'm trying to find the equivalent application of the derivative and integral as I learn calculus. Could someone demystify this?

Thank you in advance.

A slope is a rate of change.  If a car moves at 30 miles per hour, and you graph its distance traveled as a function of time, the slope of that graph is 30 miles per hour.

Isaac Newton was the first person ever to show that the laws of nature that govern objects we see every day here on Earth are the same as the laws of nature that govern things in the heavens: planets, moons, comets (including the planet Earth as a whole).

In order to do that he had to think about the rates at which they move as a function of their locations.

Rates of change also occur in the following way: Newton asked himself whether the gravitational pull of the earth on the moon or other orbiting object is the same as if the whole mass of the earth were concentrated at the center.  (The bottom line, after much effort, turns out to be "yes".)  So how do you find the sum of the infinitely many infinitely small quantities involved?  The answer is that you ask how fast that sum changes as progressively more of the earth is taken into account.  This is not a rate of physical motion as time passes, but is something else.

Unfortunately far too much of the conventional mathematics curriculum is designed to prepare students for later courses, in such a way that you find out the motivations only if you take certain later courses that most of the students will never take.  It leaves students not understanding the whole thing.  Honest education does not do that.  A few professors here and there are working on calculus courses that are in that respect honest.  At least two professors at Macalester College have been working on that, and at various other places that I can't name right now.

An application, which if applied world wide on all roads, would make it impossible to go over the speed limit and go unnoticed.

If you place sensors with timers that correctly identify passing cars throughout every stretch of road spaced 1km apart and the worldwide speed limit is now 50 km/h = 50 km/3600 seconds, a car going at top legal speed (50km/h) would take 1/50th of an hour = 3600seconds/50 = 72 seconds to cross adjacent sensors.
If a car takes less than 72 seconds to cross adjacent sensors, then the car MUST have gone over the speed limit at some point between the sensors. This conclusion comes from the fact that we have a mapping between time and distance, which allows us to make accurate (in my example not exact) deductions about the collected information.

If it still isn't clear enough, I will demonstrate how exactly the program coordinating the sensors would go:

var max_speed=50
Sensor A:Car[x] Passes at Time Stamp 1:15:15PM
Sensor B:Car[x] Passes at Time Stamp 1:16:10PM
//average* speed=difference in distance/difference in time
//[f(x2)-f(x1)]/[x2-x1]=1km/55seconds
//1km/55seconds][60seconds/1min][60min/1h]=[3600/55]km/h=65.45km/h
var Car[x].speed=[1/Date(1:16:10)-Date(1:15:15)][3600]=65.45/h
65km/h>50km/h = EMIT SPEEEDING TICKET FOR Car[x]

*average speed: you might actually go at various instantaneous speeds throughout continuous length of road (even if you put it on cruise control).


If $f$ is holomorphic and satisfies $f(0)=0$ and $|f(z)| \leq \exp[(\Re z)^2 - (\Im z)^2]$, then $f=0$ If $f$ is holomorphic and satisfies $f(0)=0$ and $|f(z)| \leq \exp[(\Re z)^2 - (\Im z)^2]$, then $f=0$

I thought about using uniqueness, though I have a problem showing that I have a limit point of $0$.
I can show that I have a limit point of epsilon for any epsilon that I want, but I cannot show that there is even a single $z f(z)=0$ beside $z=0$.

Just to complete the story in the comments, one has $$\left|\frac{f(z)}{e^{z^2}}\right|\leq e^{\mathfrak{(R\mathrm z)^{2}-(\mathfrak{I}\mathrm{z})^{2}}}\cdot \frac 1{\left|e^{z^2}\right|}=e^{\mathfrak{R}(z^2)}\cdot\frac 1{e^{\mathfrak{R}(z^2)}}=1,$$ which implies $$\frac{f(z)}{e^{z^2}}=C,$$ by Liouville. Now $f(0)=0$ shows that $C=0.$ It follows that $f(z)=0.$ QED

Actually I understood it quite differently :
$\begin{array}{c}
|f(z)|\leq e^{(\Re z)^{2}-(\Im z)^{2}}=e^{\Re z^{2}}=|e^{z^{2}}|\\
0\leq\frac{|f(z)|}{|e^{z^{2}}|}\leq1
\end{array}$
now by Liouville:
$
\begin{array}{c}
\frac{|f(z)|}{|e^{z^{2}}|}=c\\
f(z)=c|e^{z^{2}}|\\
0=f(0)=c\Rightarrow f(z)=0
\end{array}$


Directional derivative of function with two variables containing a function and its derivative. Given $f(x,y)=g(3x+6y)$ and suppose $g'(15)=2$, then I would like to take the directional derivative at the point $(1,2)$ and in the direction of $u=\left(\frac12,\frac{\sqrt{3}}{2}\right)$.

Normally this would not be a problem but I can not see through what is going on in the function $f$. How am I supposed to interpret it?

\begin{align}
\partial_u f(1,2) &= \lim_{h\to 0} \frac{f((1,2) + hu) - f(1,2)}h \\
&= \lim_{h\to 0} \frac{f\left(1+\frac{h}2,2+\frac{h\sqrt{3}}2\right) - f(1,2)}h\\
&= \lim_{h\to 0} \frac{g\left(15 + h\left(\frac32 + 3\sqrt3\right)\right) - g(15)}h\\
&= \lim_{h\to 0} \frac{g\left(15 + h\left(\frac32 + 3\sqrt3\right)\right) - g(15)}{h\left(\frac32 + 3\sqrt3\right)} \cdot\left(\frac32 + 3\sqrt3\right)\\
&= g'(15)\left(\frac32 + 3\sqrt3\right)\\
&= 3+6\sqrt3
\end{align}

I now realise, that you guys were referring to the standard chain rule for one variable while I was trying to make sense of it all with the chain rule for multiple variables. All I had to do was consider the function like so: $f(g(3x+6y),g(3x+6)$. And then i could apply $'(f(g(x))=f'(g(x)*g'(x)$.


If x,y,z are positive reals, then the minimum value of $x^2+8y^2+27z^2$ where $\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=1$ is what If $x,y, z$ are positive reals, then the minimum value of $x^2+8y^2+27z^2$ where $\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=1$ is    what?

$108$ , $216$ , $405$ , $1048$

The function $t\mapsto t^3$ is convex on ${\mathbb R}_{>0}$. Given that $${1\over x}+{1\over y}+{1\over z}=1\qquad(*)$$ we therefore have by Jensen's inequality
$$x^2+8y^2+27 z^2={1\over x} x^3 + {1\over y}(2y)^3+{1\over z}(3z)^3 \geq\left({1\over x} x+ {1\over y}2y +{1\over z} 3z\right)^3 =216\ ,$$
where equality holds iff in addition to $(*)$ we have $x=2y=3z$. It follows that the minimum value we are looking for is $216$ and that it is taken at the point $(6,3,2)$.

x:y:z=3:2:1 then x=6,y=6/3 and z=6/2 ('.' 1^3=1, 2^3=8, 3^3=27 and 1+2+3=6)
substitute in the equation
6^2+8(3^2)+27(2^2)=216
u can exchange the value of x y z but he has asked for minimum value for expression.so taking these value exactly for x y and z would be appropriate.


True/False: $\mathbb{R}^2$ is a subspace of $\mathbb{R}^3$? The answer is False.

Since $\mathbb{R}^2$ is not a subset of $\mathbb{R}^3$.

However, can someone explicitly define the difference between a subset and subspace? I am somewhat struggling with the technicality of the following definition

Subspace: a subspace, U of a vector space V, is a subset of V, $U \subset V$, such that U is a vector space in its own right, over the same field.

Vector space: A vector space over a field is a set $V$ of objects that is closed under binary operation ('addition') and scalar multiplication

Also, what would make $\mathbb{R}^2$ a subspace of $\mathbb{R}^3$ if anything?

Thanks!

The set of things in $\Bbb{R}^3$ is $3$-component real vectors.  The set of thing in $\Bbb{R}^2$ is $2$-component real vectors.  (The component count is exactly what is being communicated by the "$n$" in $\Bbb{R}^n$.)  Since there are no $2$-component vectors in $\Bbb{R}^3$, no element of $\Bbb{R}^2$ is in $\Bbb{R}^3$.  So $\Bbb{R}^2$ is not a subset, and hence not a subspace, of $\Bbb{R}^3$.

Any set of elements $\in \mathbb R^3$ is by definition a subset of $\mathbb R^3$. A subspace is a particular subset which is a vector space, that is it is closed by multplication by scalars and by addition.

Therefore since we have that for any

$$\vec v\in \mathbb R^2 \implies \vec v \not \in \mathbb R^3 $$

then $\mathbb R^2$ can't be neither a subset nor a subspace of $\mathbb R^3 $.

What is true is that any plane through the origin is a subspace of $\mathbb R^3$.


Is every torsion-free abelian group isomorphic to $\mathbb{Z}^n$? Is every torsion-free abelian group isomorphic to $\mathbb{Z}^n$ for some natural $n$?

I think it is true just for finitely generated abelian torsion-free groups...

Every finitely-generated torsionfree abelian group is isomorphic to $\mathbb Z^n$ for some $n$, but the proof crucially relies on the finiteness hypothesis (as most of them use induction, one way or another).

In fact, there are torsionfree abelian groups that are not isomorphic to $\mathbb Z^{(I)}$ for any $I$, or to $\mathbb Z^I$ for any $I$ (the two possible generalizations one may think of for infinite $I$).

As stated in the comments, $\mathbb Q$ is one such example, but so is the group of $p$-adic integers $\mathbb Z_p$ or the additive group of the ring $\mathbb Z[1/p]$.

In $\mathbb Z^{(I)}$ or $\mathbb Z^I$, there are no elements that are divisible by arbitrarily high integers, which is what fails in these examples.

(If you know homological algebra, here's some food for thought : over $\mathbb Z$, torsion-free modules are precisely the flat modules; and modules of the form $\mathbb Z^{(I)}$ are precisely the projective modules. In these terms, your question amounts to "over $\mathbb Z$, does flat imply projective ?")

To further clarify the question and the mentioned comments and in order to provide a complete answer:

An elementary argument shows that the following proposition holds:

Proposition. Every finitely-generated torsion-free abelian group is isomorphic to $\mathbb{Z}^{n}$ for some $n\geq 1.$

proof. Suppose that $ G $ is generated by $ \{a_{1},a_{2},\ldots,a_{n}\}; $ i.e., we have:
$$G:=\Big\{\sum_{i=1}^{n}k_{i}a_{i}: k_{i}\in\mathbb{Z}\Big\}.$$

Let $ \bar{\mathbf{1}}_{i} $ be the element in $ \mathbb{Z}^{n} $ all of whose components are equal to zero except for the $ i $th component that equals $ 1. $ It is easy to verify that the function that maps each $ a_{i} $ to $ \bar{\mathbf{1}}_{i} $ is a group isomorphism.$\qquad\blacksquare$

And, as mentioned in the comments, the additive group of the rationals is an example of a torsion-free abelian group that is not finitely-generated.

Looking at $ \langle\mathbb{Q},+,0\rangle$ from another point of view, it is an ordered divisible group. It can be shown that an abelian group is torsion-free if and only if it is orderable (some hints are available in the link below about an argument that uses the proposition above). Finally, an interesting question might be the following:

Question. Is there an abelian divisible torsioned group?

More detailed explanations can be found in the following question:
Is there a natural example of a divisible torsioned (= periodic) abelian group?


Solving $|a+1|+|2a+5|=5$ How to solve this equation?

$$|a+1|+|2a+5|=5$$

Here is my solution but it seems that my answers are wrong.

$$|a+1|+|2a+5|=5$$

Case 1:

$$a+1+2a+5=5$$

$$a = \frac{1}{3}$$

Case 2:

$$a+1-2a-5=5$$

$$a=-11$$

HINT: There are three cases for solving $|a+1|+|2a+5|=5$, as follows

Case 1: $a< -\frac52$
$$-(a+1)-(2a+5)=5$$
Case 2: $-\frac52\le a\le -1$
$$-(a+1)+(2a+5)=5$$
Case 3: $a> -1$
$$(a+1)+(2a+5)=5$$
You can find feasible values of $a$ in above three cases.


Contradiction in sin(z) = 2 proof There is something I can't understand in the proof for $\sin(z)=2$.
So, if we know that $\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$,
we can end up with the pretty quadratic $(e^{iz})^2-4ie^{iz}-1=0$,
   and if we let $x = e^{iz}$ we get roots $x_{1,2}=i(2\pm\sqrt3)$.

That's great, as we can solve for $z.$ However, doesn't $e^{iz}=i(2\pm\sqrt3)$ imply that $\sin(z)=2\pm\sqrt3$ ?

This is confusing.

EDIT:
If $e^{iz}=i(2\pm\sqrt3)$, then $\cos(z)=0$  and $\sin(z)=2\pm\sqrt3$

If $e^{\imath z} = \imath(2+\sqrt{3}) \implies  e^{-y}\cos(x) = 0$, thus $ x = \frac{\pi}{2} \imath e^{-y}\sin(x) = \imath(2 \pm \sqrt 3 )$ thus $y = -\ln( 2 \pm \sqrt 3 )$

If $e^{iz}=i(2\pm\sqrt{3})$ then
$$
e^{-iz}=\frac1{e^{iz}}=\frac1{i(2\pm\sqrt{3})}=\frac{i(2\mp\sqrt{3})}{i(2\pm\sqrt{3})i(2\mp\sqrt{3})}=\frac{i(2\mp\sqrt{3})}{-(2^2-\sqrt{3}^2)}=-i(2\mp\sqrt{3})
$$
Now you can deduce
\begin{align*}
\sin(z)=\frac1{2i}\left(e^{iz}-e^{-iz}\right)=\frac1{2i}\left(i(2\pm\sqrt{3})+i(2\mp\sqrt{3})\right)=\frac1{2i}\left(4i\right)=2.
\end{align*}
and
\begin{align*}
\cos(z)=\frac1{2}\left(e^{iz}-e^{-iz}\right)=\frac1{2}\left(i(2\pm\sqrt{3})-i(2\mp\sqrt{3})\right)=\frac1{2}\left(\pm2\sqrt{3}i\right)=\pm\sqrt{3}i.
\end{align*}

If $a,b,c,d\in\mathbb R$ then you can say
$$
a+bi=c+di \Leftrightarrow a-c=(b-d)i
$$
Hence $a-c\in\mathbb R$ while $(d-b)i\in i\mathbb R$ and you can deduce $a=c$ and $b=d$. But this works just if and only if $a,b,c,d\in\mathbb R$. And I think you thought
$$
0+i(2\pm\sqrt{3})=e^{iz}=\cos(z)+\sin(z)i
$$
implies $\cos(z)=0$ and $\sin(z)=2\pm\sqrt{3}$. But this conclusion is just valid if $\cos(z),\sin(z)\in\mathbb R$. As you can see $\cos(z)=\pm\sqrt{3}i\notin\mathbb R$.

Further, you can check
$$
e^{iz}=\cos(z)+\sin(z)i=\pm\sqrt{3}i+2i=(2\pm\sqrt{3})i.
$$


Determining positive/negative definite of quadratic form using Hessian matrix method? The matrix A is given as:
\begin{bmatrix}0&1&1\\1&0&1\\1&1&0\end{bmatrix}
Given that the domain of the quadratic form $x^T Ax$ is restricted as the following,
$D={x\in R^3, x_1+x_2+x_3=0}$
determine whether the quadratic form is positive/negative definite or positive/negative semidefinite.
I know how to solve this kind of problem when there's no restriction/constraint, but I have no idea how to determine this when there is a restriction. The textbook talks about some bordered Hessian matrix method and some other Hessian matrix method but I have no idea how to apply these methods...

$A=\begin{bmatrix}0&1&1\\1&0&1\\1&1&0\end{bmatrix} = \mathbf {11}^T-I$
and you want to know the signature with the added restriction that we only consider $\mathbf x$ such that $\mathbf 1^T\mathbf x = 0$.
There are a few different approaches here.  Probably the simplest is to make use of the projection matrix
$P:= I-\alpha\mathbf {11}^T$, where $\alpha$ is selected so $P$ has rank $n-1$, i.e. $\alpha =\Big(\mathbf 1^T \mathbf 1\Big)^{-1} = n^{-1}$
check:  $P^2=P=P^T$
$B:= P^TAP$  and notice that if $\mathbf x \perp \mathbf 1$
$P\mathbf x = \mathbf x \implies\mathbf x^T B \mathbf x = \mathbf x^T A \mathbf x$
$B$ is real symmetric with $\mathbf 1$ in its kernel so you may in general orthogonally diagonalize it and consider the $n-1$ orthogonal eigenvvectors of interest to figure out its signature (or run $LDL^T$ factorization, etc.)
That said, your problem is particularly simple:
$B= P^TAP =  P^T\big(\mathbf {11}^T-I\big)P = -P^TP = -P $
since $-P$ has signature $\big(0,n-1\big)$ with only vectors $\propto\mathbf 1$ in its kernel this tells you that $\mathbf x^T A\mathbf x \lt 0$ for any non-zero $\mathbf x \perp \mathbf 1$

We have that
$$x^T Ax =2x_1x_2+2x_2x_3+2x_3x_1$$
and for any $x=(x_1,x_2,x_3)\neq 0$
$$(x_1+x_2+x_3)^2=0 \implies  2x_1x_2+2x_2x_3+2x_3x_1 =-(x_1^2+x_2^2+x_3^2)<0$$
therefore by this restriction the quadratic form is negative definite.


Smallest next real number after an integer This might be a silly question, but is it possible at all for n.00000...[infinite zeros]...1 to be the next real number after n? If not, why not?

Firstly, I know (I think) that $$\lim_{x\to \infty} \frac{1}{10^x} = 0$$ but I'm not talking about taking its limit. Surely I'm not required to.

The obvious rebuttal is that n.00000...[infinite zeros]...1 (let's just call this number c) is that c divided by two will be between n and c, which is obviously a closer number to n than c. But why is c necessarily divisible? There are special exceptions for other numbers. For instance, if b=0 in $\frac ab$, we say it's undefined.  Why can't $\frac c2$ be similarly undefined? Or something similar to the notion that infinity divided by two is still infinity?

OR, does c equal n.0, similar to how 0.999... = 1?

Apologies if this question has been asked a million times before (I was not able to find it asked quite this way) or if you find it stupid.

The set of real numbers are (usually) defined in a way that has nothing to do with decimal representations -- they are defined by their arithmetic and geometric properties. e.g. among other things, if $a$ and $b$ are distinct real numbers, then $(a+b)/2$ is a real number that is between them.

The set of decimals are defined as being sequences of digits: there is one place for every integer. e.g. $0$ corresponds to the one's place, $1$ corresponds to the ten's place, $2$ to the hundred's place, $-1$ to the tenth's place, and so forth. Each place gets a single digit (0 through 9) assigned to it. When we write a decimal like

  123.45

we implicitly mean that all of the remaining positions get filled with zeroes. i.e. in the above numeral, the thousands place contains a zero.

The key point is that each place corresponds to an integer: there aren't any other places. If we write $n.\overline{0}$, meaning that the $0$ to the right of the decimal place should be repeated infinitely, this means that we have written a $0$ in every place corresponding to a negative integer. There aren't any places remaining to the right of the decimal place to insert a $1$! So the notation $n.\overline{0}1$ makes no sense if we try to interpret it as expressing a decimal number.

We could define other sorts of radix notation that extend decimals to have additional places to the right of the decimal place, but then we have to figure out what to do with such things.

The ordinary decimals are useful because we have a way to interpret any decimal number that only has finitely many nonzero digits to the left of the decimal place as a real number. And we also have rules for doing arithmetic with them. There are some ambiguities -- e.g. does $1.\overline{0} + 0.\overline{9}$ add up to $1.\overline{9}$ because there are no carries? Or does it add up to $2.\overline{0}$ because there is a carry in every place to the right of the decimal point? -- but these ambiguities are okay because we are interpreting both possibilities as being the same real number.

But if we extend the decimals, we no longer have the ability to relate them to real numbers. And if we want to do arithmetic with such things, we're going to have to do a lot of work to define the arithmetic operations and figure out if they have any of the familiar algebraic properties we're used to and so forth.

We can construct algebras in this way in which every number has a "next" number, but such things are going to have very little to do with real numbers.

Just look at this in the first place: the reason why probably, .9999... = 1, no rounding!
{Perhaps one will argue about '0.9999...' being just a teensy amount less than 1. Well, but isn’t '.9999…' just 3 times '.3333…'? Everyone will agree with this one. And isn’t '.3333…' the same as 1/3? Yes, of course. And isn’t 3 times 1/3 equal to 1?}

Back to our problem: can n.00000...[infinite zeros]...1 be the next real number after n?
Impossible! When you see a number like '0.9999...' (i.e. a decimal number with an infinite series of 9s), there is no end to the number of 9s. Therefore, you cannot say "but what happens if it ends in an 8?", because it simply does not end. (This is also why 0.9999... equals 1). Similarly, 'AAAA...', an infinite series of "A"s followed by a "B" would NEVER have a "B", not in actual Mathematics, not in physical Mathematics. That is why you can never reach the end of all numbers by listing them. You can try out this!
But this is possible only in potential Mathematics, Mathematics full of imaginations, like the world has an end; time has a beginning and an end, e.t.c, potential Mathematics, that is it.


Proving that cows have same weight without weighing it! My friend gave me this problem and I have no clue how to go about it:

A peasant  has $2n + 1$ cows. When he puts aside any of his cows,
the remaining $2n$, can be divided into two sub-flocks of $n$ cows and each having
the same total weight. How can we prove that the cows all have the same weight?

How can I approach this?

Let $w_i$ denote the weight of cow $i$, $1\le i\le 2n+1$.
With $\mathbf e_i$ the $i$th member of the standard basis of $\mathbb R^{2n+1}$
let  $\mathbf w=\sum_i w_i\mathbf e_i$ and $\mathbf j=\sum_i \mathbf e_i$.
By assumption, for each $k$, $1\le k\le 2n+1$, there exists a vector $\mathbf a_k=\sum_ia_{k,i}\mathbf e_i\in \mathbb Z^{2n+1}\subset\mathbb R^{2n+1}$ with

$a_{k,k}=0$,
$a_{k,i}\in\{-1,1\}$ for all $i\ne k$,
$\langle \mathbf a_k,\mathbf j\rangle=0$,
$\langle \mathbf a_k,\mathbf w\rangle = 0$.

Then the vectors $\mathbf a_k+\mathbf j\equiv \mathbf e_k \pmod 2$, i.e., the $\mathbf a_k+\mathbf j+2\mathbb Z^{2n+1}$ are the standard basis of $\mathbb Z^{2n+1}/2\mathbb Z^{2n+1}\cong \mathbb F_2^{2n+1}$.
Assume $\sum_k q_k(\mathbf a_k+\mathbf j)=0$ with $q_k\in\mathbb Q$, not all $=0$. By multipying with the common denominator we may assume that all $q_k\in\mathbb Z$, by dividing out common factors we may assume at least one of the $q_k$ is odd. But then taking remainders $\bmod 2$ produces a linear dependence among the $\mathbf a_k+\mathbf j+2\mathbb Z^{2n+1}$. From this contradiction, we conclude that  the  $\mathbf a_k+\mathbf j$ are $\mathbb Q$-linearly independent and hence a basis of $\mathbb Q^{2n+1}\subset\mathbb R^{2n+1}$.
Thus we can write $\mathbf e_k=\sum_i c_{k,i}(\mathbf a_i+\mathbf j)$ with $c_{k,i}\in \mathbb Q$ and have
$$ 1=\langle \mathbf e_k,\mathbf j\rangle=\sum_ic_{k,i}(\langle \mathbf a_i,\mathbf j\rangle +\langle\mathbf j,\mathbf j\rangle)=(2n+1)\sum_ic_{k,i}$$
and hence
$$ \begin{align}w_k&=\langle \mathbf e_k,\mathbf w\rangle\\&=\sum_i c_{k,i}\langle \mathbf a_i,\mathbf w\rangle +\sum_i c_{k,i}\langle \mathbf j,\mathbf w\rangle\\
&=\rlap{\qquad0}\hphantom{\sum_i c_{k,i}\langle \mathbf a_i,\mathbf w\rangle}+\langle \mathbf j,\mathbf w\rangle\cdot \sum_ic_{k,i}\\&=\frac{\langle \mathbf j,\mathbf w\rangle}{2n+1}\end{align}$$
which does not depend on $k$.

We have $2n+1$ equations in $2n+1$ unknowns. This has a unique solution. As all the cows having the same weight is a solution, it is the only solution.


Codility - NumberOfDiscIntersections 100% I've been practicing some algorithm writing on the website codility.com. Specifically the task NumberOfDiscIntersections located here https://codility.com/programmers/lessons/4/

Here is the question: https://codility.com/programmers/task/number_of_disc_intersections/

I have a very efficient algorithm which solves it, but I only understand the first part. The second part is... math! And thus why I am posting here.

If you look in the code you'll see where I don't understand it. Can someone explain how one would come up with such an algorithm, I'd like to know (and a few other programmers too over at stackoverflow).

//  NumberOfDiscIntersections 100%
var A = [1, 5, 2, 1, 4, 0]; // should return 11

function solution(A) {
    var i,
        sum = 0,
        len = A.length,
        startArr = [],
        endArr = [],
        active = 0;

    // fill arrays with zeros
    for (i = 0; i < len; i += 1) {
        startArr[i] = 0;
        endArr[i] = 0;
    }

    // sort start and end boundaries of the discs into their own arrays
    for (i = 0; i < len; i += 1) {

        if (i < A[i])
            startArr[0]++;
        else
            startArr[i - A[i]]++;

        if (i + A[i] >= len)
            endArr[len - 1]++;
        else
            endArr[i + A[i]]++;
    }

    // <--- here is where I lose it, this for loop, I just simply do not understand why this works or how anyone could of gotten this
    for (i = 0; i < len; i += 1) {

        sum += active * startArr[i] + (startArr[i] * (startArr[i] - 1)) / 2;

        // over 10 000 000 return -1 as stated in the assignment
        if (10000000 < sum)
            return -1;

        active += startArr[i] - endArr[i];
    }
    // return the answer
    return sum;
}

console.log(solution(A));

The for loop iterates through the positions on the line.

At iteration i, the "active" discs (call these the set $A_i$) are those discs who have started (that is, their left boundary is to the left of i) but not ended (that is, their right boundary is on or to the right of i).

The number startArr[i] describes the number of discs which are activated at position i (meaning their left boundary is on position i; call these the set $B_i$).

It's clear that each of these discs in both sets mutually intersect. We know we have already counted the intersections of $A_i$ with itself. However, we do need to count the intersections of $A_i$ with $B_i$: this is the number active * startArr[i]. We also need to count the intersections of $B_i$ with itself: this is the number startArr[i] * (startArr[i] - 1) / 2 since $n*(n-1)/2$ is the number of ways to pick two things from a set of size $n$.

Finally, after adding these intersections, it updates the number of active discs. Indeed, the number of active discs is precisely the old number plus the ones which started at position i and minus the ones that ended at position i.

As to your question about how someone would "come up with this algorithm" -- I think that's a question that can have many answers and is definitely beyond the scope of this post.

I came up with a different solution. Another 100% solution that leverages counting by eliminating unnecessary steps. The core mentality of the algorithm is different. It just iterates on start and endpoints. I thought it's easier to understand because it only accumulates the connected discs on their ending point before removing them from the active list. I just wanted to share this solution too.
function solution(A) {
const startArr = {};
const endArr = {};

let min = Number.MAX_SAFE_INTEGER;
let max = Number.MIN_SAFE_INTEGER;

const indices = {};
for (let i = 0; i < A.length; i++) {
  if (min >= i - A[i]) {
    min = i - A[i];
  }

  if (max < i + A[i]) {
    max = i + A[i];
  }

  if (startArr[`${i - A[i]}`] === undefined || startArr[`${i - A[i]}`] === null) {
    startArr[`${i - A[i]}`] = 1;
  } else {
    startArr[`${i - A[i]}`] += 1;
  }

  if (endArr[`${i + A[i]}`] === undefined || endArr[`${i + A[i]}`] === null) {
    endArr[`${i + A[i]}`] = 1;
  } else {
    endArr[`${i + A[i]}`] = endArr[`${i + A[i]}`] + 1;
  }
  indices[`${i - A[i]}`] = true;
  indices[`${i + A[i]}`] = true;
}

let currentStartedActive = 0;

let calcFinal = 0;

const allKeys = Object.keys(indices);
allKeys.sort(function(a, b){return a - b});

for (let i = 0; i < allKeys.length; i++) {

  if (startArr[`${allKeys[i]}`] !== undefined && startArr[`${allKeys[i]}`] !== null) {
    if (startArr[`${allKeys[i]}`] > 0) {
      currentStartedActive += startArr[`${allKeys[i]}`];
    }
  }
  if (endArr[`${allKeys[i]}`] !== undefined && endArr[`${allKeys[i]}`] !== null) {
    if (endArr[`${allKeys[i]}`] > 0) {
      calcFinal += ((currentStartedActive - endArr[`${allKeys[i]}`]) * endArr[`${allKeys[i]}`]);

      const calculateInsider = endArr[`${allKeys[i]}`];

      if (calculateInsider > 1) {
        calcFinal += ((calculateInsider * (calculateInsider - 1)) / 2);
      }
      if (calcFinal > 10000000) {
        return -1;
      }
      currentStartedActive -= endArr[`${allKeys[i]}`];
    }
  }
}

return calcFinal;

}


Calc $\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty -\frac{t}{1+t^2}(\delta (\omega-t-\pi)-\delta(\omega-t+\pi))dt$ The answer to this integral:$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty -\frac{t}{1+t^2}(\delta (\omega-t-\pi)-\delta(\omega-t+\pi))dt$$

is $$\frac{1}{\sqrt{2\pi}}\left(-\frac{\omega-\pi}{1+(\omega-\pi)^2}+\frac{\omega+\pi}{1+(\omega+\pi)^2}\right)$$
It came from a Fourier transform convolution integral.

I have no idea how to compute it. Help?

Hint: remember that
$$ \delta(x)=\left\{\begin{array}{rl}
1&\text{ if }x=0,\\
0&\text{ else.}
\end{array}\right. $$


What does the Hodge conjecture mean? I read from the Internet that according to the Hodge conjecture, a certain harmonic differential form in a projective, non-singular algebraic variety is a rational linear combination of the cohomology classes of algebraic cycles. Could anyone explain me what is that particular differential form? And how do one defines the cohomology class of algebraic cycles? I have read Atiyah's and McDonald's book on commutative algebra, two first chapters on Liu's "Algebraic geometry and Arithmetic curves" and fundamental groups on algebraic topology.

First of all, the Hodge conjecture is not about one particular differential form. It says that any differential form which satisfies certain conditions will be a $\mathbb{Q}$-linear combination of algebraic forms. There are some particular forms which satisfy those conditions but have not been proven to be such a linear combination.1 However, it is my very-uninformed impression that the hardest case of the Hodge conjecture is not those cases, but rather the possibility that some differential form might just happen to satisfy the Hodge conditions for no good reason, and that such a form might prove to be a counterexample.

It's hard to answer this question without knowing your background. I'm going to assume that you've had a good course in differential geometry, and that you know what a complex manifold is.

Differential forms and submanifolds Let $X$ be a compact oriented manifold (nothing complex yet) and let $Z$ be a compact oriented closed submanifold. Let $n=\dim X$ and $k=\dim Z$. Write $\Omega^\ell(X)$ for the vector space of differential forms on $X$ of degree $\ell$.
Write $Z^{\ell}(X)$ for the closed forms, $B^{\ell}(X)$ for $d \Omega^{\ell-1}(X)$ and $H_{DR}^{\ell}(X)$ for the deRham cohomology $Z^{\ell}(X)/B^{\ell}(X)$.

We have a linear map $Z^k(X) \to \mathbb{R}$ given by $\eta \mapsto \int_Z \eta|_Z$. This map descends to $H_{DR}^k(X)$, because $\int_Z (d \alpha)|_Z = \int_Z d (\alpha|_Z) = \int_{\partial Z} \alpha|_{\partial Z} =0$. (Remember that $\partial Z=\emptyset$.)

By Poincare duality, every linear map $H_{DR}^k(X) \to \mathbb{R}$ is of the form $\eta \mapsto \int_X \omega \wedge \eta$ for some $\omega \in Z^{n-k}(X)$. Moreover, changing $\omega$ by a class in $B^{n-k}(X)$ does not change this map, so one can think of $\omega$ as a class in $H_{DR}^{n-k}(X)$. (The Wikipedia article on Poincare duality is less clear than I would like on this point. Suggestions?)

Let $\omega_{Z \hookrightarrow X}$ be the class in $H_{DR}^{n-k}(X)$ such that
$$\int_Z \eta|_Z = \int_X \omega_{Z \hookrightarrow X} \wedge \eta \quad (\dagger)$$
for any $\eta \in Z^k(X)$.

Explicit formulas for $\omega_{Z \hookrightarrow X}$ can be found in differential geometry texts. For our purposes, the important fact is $(\dagger)$. One thing which is good to know is that the differential form $\omega_{Z \hookrightarrow X}$ can be taken to be zero away from a neighborhood of $Z$.

We have defined $\omega_{Z \hookrightarrow X}$ to be in $H_{DR}^{n-k}(X)$. In fact, it will always lie in the image of $H^{n-k}(X, \mathbb{Z})$ within $H_{DR}^{n-k}(X)$. I will not try to explain this, since even defining this map requires a fair amount of algebraic topology and differential geometry. It turns out that, for $X$ compact and oriented, $\eta$ is in the image of $H^p(X, \mathbb{Z})$ if and only if $\int_{\alpha} \eta \in \mathbb{Z}$ when the cycle $\alpha$ runs over a basis of $H_p(X, \mathbb{Z})$. This is not the standard definition, but it might be the most elementary one. By the way, one of the highest voted unanswered questions on math.SE is about working with this condition.

Complex manifolds and algebraic classes Now suppose that $X$ is a complex manifold. Morally speaking, the Hodge conjecture describes which differential forms can appear as $\omega_{Z \hookrightarrow X}$ with $Z$ a complex submanifold of $X$.

Therefore, in this section of the answer, let $Z$ be a complex submanifold of $X$. Let the dimensions of $Z$ and $X$, as real manifolds, be $2k$ and $2n$. We will discuss conditions which $\omega_{Z \to X}$ should obey. In the following section, I will actually state the Hodge conjecture, which is a bit more technical than you would guess from this section.

First of all, as described above, $Z$ should be in the image of $H^{2n-2k}(X, \mathbb{Z}) \to H_{DR}^{2n-2k}(X)$.

Since $X$ is a complex manifold, it makes sense to multiple an element of the tangent bundle by a complex number, so the multiplicative group $\mathbb{C}^{\times}$ acts on $T_{\ast} X$. Thinking of differential forms as multilinear forms on $T_{\ast} X$, the group $\mathbb{C}^{\times}$ also acts on $\Omega^{\ell}(X)$. A differential form $\eta$ is called a $(p,p)$ form if $a(\eta) = |a|^{2p} \eta$ for $a \in \mathbb{C}^{\times}$.

I should probably explain the origin of this terminology. If we tensor the vector space of $\ell$-forms with $\mathbb{C}$, then the action of $\mathbb{C}^{\times}$ diagonalizes. We have $\Omega^{\ell}(X) \otimes \mathbb{C} = \bigoplus_{p=0}^{\ell} \Omega^{p, \ell-p}(X)$ where $\eta$ is in $\Omega^{p, q}(X)$ if $a(\eta) = a^p \overline{a}^q \eta$. This idea will surely be important in any proof of the Hodge conjecture, but to understand the statement you don't strictly need this paragraph.

It turns out that we can always take $\omega_{Z \to X}$ to be a $(n-k,n-k)$-form. (Recall that $\omega_{Z \to X}$ is only defined modulo exact forms, so I shouldn't say that it is a particular differential form.) Sketch of proof: Because $Z$ is a complex submanifold, the action of $\mathbb{C}^{\times}$ preserves $T_{\ast} Z$ within $T_{\ast} X$. Also, one can show that a top-dimensional form on an $m$-dimensional complex manifold is always an $(m,m)$-form. If you trace through the effects of this, you get
$$\int_X a(\omega) \wedge a(\eta) = \int_X a(\omega \wedge \eta) = |a|^{2n} \int_X \omega \wedge \eta$$
and also
$$\int_X \omega \wedge a(\eta) = \int_Z a(\eta)|_Z = \int_Z a(\eta|_Z) = |a|^{2k} \int_Z \eta = |a|^{2k} \int_X \omega \wedge \eta.$$
The second equality in the latter chain of equalities is where we use that $Z$ is a complex submanifold.

So $\int_X a(\omega) \wedge a(\eta) = |a|^{2n-2k} \int_X \omega \wedge a(\eta)$. From this, it follow that we can arrange that $a(\omega) = |a|^{2n-2k} \omega$. $\square$

So a reasonable guess as to what the Hodge conjecture might say is:

  (Not the Hodge conjecture) A cohomology class $\omega$ in $H^{2n-2k}_{DR}(X)$ is of the form $\omega_{Z \to X}$ for a complex submanifold $Z$ if and only if $\omega$  can be represented by an $(n-k,n-k)$-form and lies in the image of $H^{2n-2k}(X, \mathbb{Z}) \to H_{DR}^{2n-2k}(X)$.

The actual Hodge conjecture The actual Hodge conjecture is

  (The Hodge conjecture) Let $X$ be projective. A cohomology class $\omega$ in $H_{DR}^{2n-2k}(X)$ is of the form $\sum a_i \omega_{Z_i \to X}$, for some complex subvarieties $Z_i$ of $X$, and for some $a_i \in \mathbb{Q}$, if and only if $\omega$ can be represented by an $(n-k,n-k)$-form and lies in the image of $H^{2n-2k}(X, \mathbb{Q}) \to H^{2n-2k}_{DR}(X)$.

So we have the following changes. In most cases, I don't have a strong intuition for why these changes were needed, but this is the version which has been open for decades and is worth $10^6$ dollars. I believe that there are known counterexamples indicating the need for each of these changes, but I don't know them.

$X$ must be projective, meaning that it is a closed submanifold of $\mathbb{CP}^N$ for some $N$. There are many theorems which hold for projective manifolds and not for more general compact complex manifolds.
We are allowed a linear combination of several $Z_i$'s. This is because the conditions of being a $(n-k,n-k)$-form and of lying in the image of $H(X, \mathbb{Z})$ are both closed under addition, and the condition of representing a complex submanifold is not. (There are various positivity conditions for the latter.)
We allow the $Z_i$ to be subvarieties rather than complex submanifolds. This means that the $Z_i$ are locally defined by the vanishing of holomorphic functions, but are allowed to have singularities.
We use $\mathbb{Q}$ instead of $\mathbb{Z}$. The need for this modification was shown in

  Atiyah and Hirzebruch, Algebraic Cycles on Complex Manifolds,
  Topology 1 (1962) p. 25-45

Remark on Explicitness If you are given a complex manifold $X$ and a differential form $\omega$ in degree $2p$, testing whether $\omega$ is a $(p,p)$-form is straightforward. Testing whether $\omega$ is in $H(X, \mathbb{Q})$ is equivalent to checking $\int_{\alpha} \omega \in \mathbb{Q}$ for cycles $\alpha$ running over a basis of $H_{2p}(X, \mathbb{Z})$. Since, in general, integrals can only be computed numerically, and since there is no test for whether a floating point number is rational, this can be very hard. The same situation comes up in reverse if you triangulate $X$ and give a class in $H^{\ast}(X, \mathbb{Q})$ as a cocycle for the triangulation: In this case, it is easy to see that the cycle is in $H^{\ast}(X, \mathbb{Q})$, but the condition that it be representable by a $(p,p)$ form is equivalent to certain integrals vanishing. When I said that some form might satisfy the Hodge conditions for no good reason, I was thinking of the possibility that some complicated integral might be a rational number/might be zero for no good reason. I think it should be clear that this is hard to rule out!

Footnote 1: Here I am thinking of Grothendieck's Standard Conjectures. For example, the following is Grothendieck's Conjecture C: Let $X$ be projective. By Kunneth, we have $H_{DR}^{m}(X \times X) = \bigoplus_i H_{DR}^{i}(X) \otimes H_{DR}^{m-i}(X)$. Let $\pi_{i,j}$ be the projection $H_{DR}^{i+j}(X \times X) \to H_{DR}^i(X) \otimes H_{DR}^j(X)$. Let $\Delta \subset X \times X$ be the diagonal. Conjecture C states that $\pi_{i, 2n-i}(\omega_{\Delta \to X \times X})$ is of the form $\sum a_i \omega_{Z_i \to X}$. It is relatively straightforward to show that the $\pi_{i, 2n-i}$ operators preserve the conditions of the Hodge conjecture. But, while proving Conjecture C would definitely get you tenure, I do not believe that this sort of case is considered the hardest part of the Hodge conjecture.

The Hodge conjecture simply means that shapes fit inside shapes...

Hodge conjecture. Let X be a non-singular complex projective manifold. Then every Hodge class on X is a linear combination with rational coefficients  of the cohomology classes of complex subvarieties of X.
Let X be a non-singular complex projective manifold.

A manifold is a topological space (a shape).

Then every Hodge class on X is a linear combination with rational coefficients

We are combining something...

of the cohomology classes of complex subvarieties of X.

A variety is a set of solutions to functions (another way of defining a shape).
So it says we can combine (imaginary) shapes which are subshapes of X to get X.


Isomoprhic and equal symbol for abelian groups Let $A$ and $B$ be two abelian groups and $A$ and $B$ are isomorphic. Moreover suppose that $A$ and $B$ are not the subgroups of the same group. Is it correct to write $A = B$? Thank you.

You should never, ever claim the statement “$A=B$” is true unless $A$ is literally, element-for-element, the same thing as $B$...

... until you are mathematically experienced enough to abuse the notation $=$ responsibly.

It is certainly correct to write $A = B$, in the same way that it is perfectly correct to write $1 = 2$. These are meaningful statements even if they are false.

That said, if you want to assert that $A$ and $B$ are isomorphic, then the standard notations are $A \simeq B$ or $A \stackrel{\sim}{=} B$ and not $A = B$.


Show that $2^n<2^{\lceil n \log_23\rceil}-3^n<3^n-2^n$ Is there a way to show that (with integer $n>2$) $$2^{\lceil n \log_23\rceil}-3^n<3^n-2^n$$
I tried to figure a way with derivative or by looking how both side are growing, but I have some trouble with the ceiling function.

With $n+k= {\lceil n \log_23\rceil}<n \log_23+1$ we can use the Rhin bound (page 160):
$$|(n+k) \log2 - n \log3|>\frac 1{(n+k)^{13.3}}>\frac1{(n \log_23+1)^{13.3}}>\frac 1{n^a}$$
If we choose $a=15$ the above is true for $n>41$
Now, $$\frac 1{n^a}>\frac{1}{(\frac{3}{2})^n}$$
is true for $n>\frac{-aW_{-1}(\frac{-\log\frac{3}{2}}{a})}{log(\frac{3}{2})}$ or $n>196$ with chosen $a=15$ ($W$ is the productlog), and we also have
$$\frac{1}{(\frac{3}{2})^n}>\log(1+\frac{1}{(\frac{3}{2})^n})=\log(1+\frac{2^n}{3^n})$$
So for $n>196$ we have $$|(n+k)\log2 - n \log3|=\log(\frac{2^{n+k}}{3^n})>\log(1+\frac{2^n}{3^n})$$
or
$$\frac{2^{n+k}}{3^n}>1+\frac{2^n}{3^n}$$
$$2^{\lceil n \log_23\rceil}-3^n>2^n$$
Similarly we have
$$|n \log3-(n+k-1) \log2|>\frac 1{(n+k-1)^{13.3}}>\frac1{(n \log_23)^{13.3}}>\frac 1{n^a}$$
which also holds for $a=15$, and additionally we have:
$$\frac{1}{(\frac{3}{2})^n}=\frac{1}{2^{n\log_2\frac{3}{2}}}>\frac{1}{2^{\lceil n\log_2\frac{3}{2}\rceil}}>\log(1+\frac{1}{2^{\lceil n\log_2\frac{3}{2}\rceil}})$$
So for $n>196$ we have
$$|n \log3-(n+k-1) \log2|=\log(\frac{2\cdot 3^n}{2^{n+k}})>\log(1+\frac{1}{2^{\lceil n\log_2\frac{3}{2}\rceil}})$$
or
$$\frac{2\cdot 3^n}{2^{n+k}}>1+\frac{1}{2^{\lceil n\log_2\frac{3}{2}\rceil}}$$
$$2\cdot 3^n>2^{n+k}+2^n$$
$$2^{\lceil n \log_23\rceil}-3^n<3^n-2^n$$
This leads to ($n>196$):
$$\begin{array}{|c|}\hline 2^n<2^{\lceil n \log_23\rceil}-3^n<3^n-2^n\\\hline\end{array}$$
and with manual checking, the left inequality holds except for $n=\{1,3,5\}$ and the right inequality holds except for $n=\{2\}$

Start by showing that
$$2^{\lceil \log_23^n\rceil}=2^{\lceil n \log_23\rceil}<3^n$$
Then the rest follows!


Modification to Blum's protocol of flipping a coin over the telephone so that a player can't intentionally lose Blum's protocol, as described here, http://www.math2803.gatech.edu/wp-content/uploads/CoinFlip.pdf for flipping a coin over the telephone works well, except there is no way to ensure that Bob did not lie and say he lost at the end of the protocol. If Bob claims to have won, he must send the factorization of n to Alice, but there is no such verification for when Bob says he lost.

Is there any modification to this protocol so that Bob cannot intentionally lose?

Not really a modification of the protocol, but how's this for a coin toss based on factoring being hard:

Alice chooses two large random primes $p$ and $q$. She tells Bob their product $pq$.
Bob chooses a random bit $b\in\{0,1\}$. He sends that to Alice.
Alice reveals $p$ and $q$.
Bob wins if his bit is the same as bit 100 of $\min(p,q)$.

The problem with this is not how it works -- if the protocol is completed as written we end up with a random bit that neither party has a way to control.

However, what if the protocol doesn't complete? This one has the feature that Alice knows who has won before Bob does. If she doesn't like the result, she might drop the connection without sending message 3, claim that her computer crashed and she doesn't remember $p$ and $q$ anymore, or whatever.

Simply restarting the protocol in that case doesn't work -- if we assume the protocol works perfectly the second time around, Alice has just secured herself a 75% overall chance of getting her preferred result.

In order to guarantee honesty in completing the protocol, it would seem that we need a way to punish a party who stops participating in the middle of it. However, within the confines of the "coin throw" metaphor the only available way to do that would be to know what Alice's desired outcome is and dictate that she loses if she suddenly goes silent. But then, in case Bob wins, she could just as well state "I forfeit" instead of sending message 3 -- and then we're back to the situation in your link.

It seems conceivable that one could design a protocol where the two parties are about equally likely to be the first to be able to prove what the result is. But that won't really help -- if one of the players has a strong preference for one result but the other is honest/indifferent, we still get lopsided results if a player can force a restart by claiming technical difficulties.

First he cannot intentionally lose because in the paper the author say that  Bob has 50-50 chance to guess the property of the number that Alice chose. And Bob needs to tell Alice which property he chose (odd or even) before Alice reveal to Bob the number.


Permutation, Combinatorics Stuck here : there are 100 objects labeled 1, 2,...100. They are arranged in all possible ways. How many arrangements are there in which object 28 comes before object 29.

My approach : Consider object 28 & object 29 , a single object. Now we have a total of 99 objects which can be per mutated in 99! ways .
But the answer is 4950*98! .

What's wrong with my approach?

Your answer would be right if the question asked for number of arrangements where 28 comes exactly before 29. Here, 28 can come anywhere before 29. So obviously answer would be greater. For the exact answer, note that 28 and 29 are equally likely to come before the other one. Moreover, both cannot occur together (this is obvious here, but in general it is necessary to keep this in mind). So the correct answer = 100! / 2, which can also be written as 4950 * 98!

You can take object 28 and 29 as alike. So the permutation order i.e. 28 before 29 is not disturbed. This gives no. of arrangements as 100!/2! = 98!*99*100/2=98!*4950


Every orthogonal operator is diagonalizable? Answer is false and the rotation is a counterexample.
But I can't understand well.
Let $A=\begin {pmatrix}0&-1\\1&0\end{pmatrix}$ then it is rotation and also orthogonal operator. I think it can be diagonalizable by eigenvalue $i,-i$.

They (implicitly) meant "diagonalizable over the reals", and making a diagonal matrix whose entries are $i$ and $-i$ are not allowed when we are requiring all of our matrices' entries be real numbers. From the relevant Wikipedia article:

  In general, a rotation matrix is not diagonalizable over the reals, but all rotation matrices are diagonalizable over the complex field.

You should have been right that it is diagonalizable because there exists $X$ s.t. $A = X\Lambda X^{-1}$. There are also non-diagonalizable matrices that always have the form $A = XJX^{-1}$, where $J$ is the Jordan matrix of $A$.


Find independent $X$ and $Y$ that are not normally distributed s.t. $X+Y$ is normally distributed. It's a rather elementary fact that a sum of two independent normally distributed random variables $X$ and $Y$ is normally distributed (or, if you will, the convolution of two normal densities is a normal density). To what extent does this go the other way around? It seems that is $X$ and $Y$ are independent and $X$ is normally distributed, then $Y$ is normally distributed or constant.

If you drop both independence of $X$ and $Y$ and $X$ being normally distributed, it's pretty easy to e.g. take $X \sim \mathcal{N}(0,1)$, $Y = 1(X \geq 0)$ and consider $U=XY$, $V=X \,1(Y = 0)$. Now neither $U$ or $V$ are normally distributed but $U+V = X$.

However, if you require $X$ and $Y$ to be independent, but drop the requirement of $X$ being normally distributed, it's seems more difficult. Is there a counterexample in that case, where $X$ and $Y$ are not normally distributed but $X+Y$ is?

According to a theorem conjectured by P. Lévy and
proved by H. Cramér (see Feller, Chapter XV.8, Theorem 1),

  If $X$ and $Y$ are independent random variables and
  $X+Y$ is normally distributed, then both $X$ and $Y$
  are normally distributed.

I assume that $Y$ being a constant (and hence independent of $X$)
is considered as being accounted for in this theorem by
considering $Y$ to be a degenerate normal random variable with
variance $0$.

Consider the stable distribution, which I will denote as $\text{Stable}(\alpha, \beta, c, \mu)$. Let $X_1 \sim \text{Stable}(2, -1, \frac{1}{2}, 0)$ and $X_2 \sim \text{Stable}(2, 1, \frac{1}{2}, 0)$. Then the characteristic function of $X_1 + X_2$ is
\begin{align*}
\varphi_{X_1 + X_2}(t) &= \varphi_{X_1}(t)\varphi_{X_2}(t) \\ &= \exp\left(-\frac{1}{4}t^2(1+i\operatorname{sgn}(t)\Phi_2)\right)\exp\left(-\frac{1}{4}t^2(1-i\operatorname{sgn}(t)\Phi_2)\right) \\&= \exp\left(-\frac{1}{2}t^2\right)
\end{align*}
which is the characteristic function of $N(0, 1)$. Note that both $X_1$ and $X_2$ are with $\alpha = 2$, which corresponds to the normal distribution. In general, such example doesn't exist for the statement to hold (see Feller's $\textit{An Introduction Probability Theory and Its Applications}$ Volume II Chapter XV.8 Theorem 1 for a proof) .

Edits and Remarks: Another technique I considered was the cumulant generating function of a normal, which takes the form $K(t) = at + bt^2$ (a quadratic form without a constant term). Since the cumulant of a sum of RV's = the sum of the cumulants, it suffices to consider a RV's such that $K_{X_1}(t) = a_1t + b_1t^2 + h(t)$ and $K_{X_2}(t) = a_1t + b_1t^2 - h(t)$, where $h(t)$ must satisfy $h(0) = 0$. If we restrict $h(t)$ to be the set of polynomials this suffices to just letting $h(t)$ be a degree 3 or higher polynomial. Unfortunately, such a distribution is then impossible. We could then let $h(t)$ include fractional powers < 2, but the resulting distribution (inverse Laplace transform) would be super weird and I'm not sure if we can even define them in terms of elementary functions.


Why isn't $\lim_{n \to \infty} \int_{1/n}^{1} \frac{1}{x}dx$ equivalent to itself rewritten as a Riemann sum? I was comparing integrals to their equivalent riemann sums, specifically the harmonic series and I derived that:
$$\displaystyle{\lim_{n \to \infty}} \int_{1/n}^{1} \frac{1}{x}dx = \displaystyle{\lim_{n \to \infty}}\sum_{k=1}^{n} \frac{1}{k}$$
The issue is that they are not equal and I don't know why. I found when I plugged in large numbers for n into the above expressions, the difference between $\int_{1/n}^{1} \frac{1}{x}dx$ and $\sum_{k=1}^{n} \frac{1}{k}$ approached, gamma, the Euler Mascheroni.  I rewrote my equation to accomodate for the discrepancy:
$$\gamma +\displaystyle{\lim_{n \to \infty}} \int_{1/n}^{1} \frac{1}{x}dx = \displaystyle{\lim_{n \to \infty}}\sum_{k=1}^{n} \frac{1}{k}$$
And when I further simplified I found the main identity of gamma:
$$\gamma=\lim_{n \to \infty} \left ( -\ln(n)- \sum_{k=1}^{n} \frac{1}{k} \right ) $$
How could I have possibly known that there would be a constant difference between the two expressions without entering large numbers into my calculator?  And what error did I make in my initial derivation?

IIRC, the first term of all summations are equal to the integral of the function within the sum.  You can find the other terms of the sum by subtracting that integral from the sum.
Under your assumption:
$$\sum_{k=1}^{x} k = \frac{1}{2} x^{2}$$
This is incorrect and only an approximation of the function.
If you  calculate what function approximates
$$-\frac{1}{2} x^{2} +\sum_{k=1}^{x} k$$
You would find the second term of the function, $\frac{1}{2} x$

Why do you think they are not equal?
Everything indicates they are equal, the both regularize to $\gamma$.
Let's consider the transform $\mathcal{L}_t[t f(t)](x)$. It is notable by the fact that it preserves the area under the curve:
$$\int_0^\infty f(x)dx=\int_0^\infty \mathcal{L}_t[t f(t)](x) dx$$
But more interesting, it also works well with divergent integrals, allowing us to define the equivalence classes of divergent integrals. Particularly, by successfully applying this transform to $\int_1^\infty \frac1xdx=\int_0^\infty\frac{\theta (x-1)}{x}dx$, one can obtain the following equivalence class of divergent integrals (the first one and the third one turn out to be similar up to a shift):
$\int_0^\infty\frac{\theta (x-1)}{x}dx=\int_0^\infty\frac{e^{-x}}{x}dx=\int_0^\infty\frac{dx}{x+1}=\int_0^\infty\frac{e^x x \text{Ei}(-x)+1}{x}dx=\int_0^\infty\frac{x-\ln x-1}{(x-1)^2}dx$

On the other hand, applying the transform to $\int_0^1\frac1x dx=\int_0^\infty \frac{\theta (1-x)}{x}dx$ one can obtain another set of equal integrals:
$\int_0^\infty\frac{\theta (1-x)}{x}dx=\int_0^\infty\frac{1-e^{-x}}{x}dx=\int_0^\infty\frac{1}{x^2+x}dx=\int_0^\infty-e^x \text{Ei}(-x)dx=\int_0^\infty-\frac{x-x\ln x-1}{(x-1)^2 x}dx$

Now, having postulated equivalence of divergent integrals in each class, we can pick two integrals, one from each class and compare them. Well, it seems, the integrals in the second class are bigger by an Euler's constant:
$\int_0^{\infty } \left(\frac{1-e^{-x}}{x}-\frac{1}{x+1}\right) \, dx=\gamma$

And thus, we can conclude that $\int_0^1\frac1xdx=\gamma+\int_1^\infty \frac1xdx$. Surprising, is not it, given that one would naively expect $\ln 0=-\ln\infty$?
But we also have an identity $\gamma = \lim_{n\to\infty}\left(\sum_{k=1}^n \frac1{k}-\int_1^n\frac1t dt\right)$ and know the regularized value of harmonic series $\operatorname{reg}\sum_{k=1}^n \frac1{k}=\gamma$. Thus, we obtain
$$\int_0^1\frac1xdx=\gamma+\int_1^\infty\frac1xdx=\sum_{k=1}^\infty\frac1k.$$
So, your comparison technique is possibly wrong, but the integral is equal to the sum.


What do the open sets in $\mathbb R^4$ look like such that $ad - bc \neq 0$ J. M. Lee in his book on Smooth Manifolds (2nd Ed. p. 19) notes that the General linear group is an open subset of $\mathbb R^{n^2}$, because it's determinant is nonzero.  Even for figuring out what the elements NOT in $\mathbb R^4$ for the $ad - bc = 0$ is difficult for me to visualize.

With the change of variables $a=t+s$, $b=t-s$, $c=u+v$, and $d=u-v$, you find $$ad-bc=(t^2+u^2)-(s^2+v^2).$$
To get an idea, consider the first quadrant and let one axis represent $\sqrt{t^2+u^2}$, and the other, $\sqrt{s^2+v^2}$. These represent absolute value in the $(t,u)$ and $(s,v)$ planes respectively. The diagonal is where the determinant vanishes. Thus the set where the determinant is nonzero is split into two components.

There's still a bunch of details hiding behind the little word “thus” in the previous sentence, but that's the gist of one way to look at it.

It may help to note that, if you lock one of the variables $t$, $s$, $u$, $v$ to a fixed value, you get either a double cone (for the zero case) or a hyperboloid in the other three variables.

It has two components (I.e. two pieces), one piece for positive determinant and one for negative. The part you removed with determinant 0 has dimension 3 by algebraic geometry, so it has one dimension less than four-dimensional space.

So imagine some surface like a one-sheeted hyperboloid or a parabolic hyperboloid separraaing 3-d space into 2 pieces.


Find the smallest $n \ge 1000$ such the sum $ 1+11+111+⋯+11⋯11 (n$ digits) is divisible by $101$ I get another training problem, for a Romanian 6th grader competition, for which I have no answer.
Find the smallest $n \ge 1000$ such the sum $ 1+11+111+⋯+11⋯11 (n digits)$ it is divisible by 101. I am familiar with the sum, I know how to compute it, but I can see how I can reason about the divisibility by $101$.

I did a numeric analysis on it, and it looks that the solution is $n=1121$, while the first numbers for which the sum is divisible by 101 are $110,313, 403, 404, 514, 717, 807,808, 918$ . Also I did notice that $1111$ is divisible by $101$, and I also seen that the pattern $123456790$ keeps repeating on the sum.

Since $111100\ldots00$ is divisible by $101$, you can repeatedly remove the leading four $1$'s from $111\ldots 111$ until you get to one of $0,1,11,$ or $111$. And you can reduce $111$ still further to $10$. So you get the sum
$$1+11+10+0+1+11+10+0+\ldots$$

mod $101$. Can you take it from there?

Hint: In order to understand the sum, we should understand the terms that go into it. What is the $n$-digit number $11\cdots 11$ mod $101$? How many terms does it take for that sequence to repeat? Your observation that $1111\equiv 0\mod 101$ will be helpful here.


Does this sequence of function converges uniformly? I was practicing for my final and stumbled on this problem.

Let $f_n$:$[0,1]$ $\mapsto$ $R$ such that

$f(x)_n$ =
\begin{cases}
nx,  &  0\leq \text{ $x$ } \lt1/n\\
1, & 1/n\leq\text{ $x$ }\leq 1
\end{cases}

I could find its piecewise limit, which is

$f(x)$ =
\begin{cases}
0,  & \text{ $x$ =0}  \\
1, & \text{ $otherwise$ }
\end{cases}

I was thinking about using the $sup$$|f(x)_n-f(x)|<\epsilon$

then I realized there were more than one interval of both $f_n$ and $f$.

So I used $x$ to indicate the supremum of each interval

for $x=0$

Clearly   $sup$$|f(x)_n-f(x)|=0<\epsilon$

Since both function yield $0$

for $1/n\leq\text{ $x$ }\leq 1$

Clearly   $sup$$|f(x)_n-f(x)|=0<\epsilon$

Since both function yield $1$

Now I am stuck here

for $0\lt \text{ $x$ } \lt1/n$

What should i do with this interval?

And does $f(x)_n$ converges uniformly?

If you have some theorems under your belt, you know that this sequence of functions cannot converge uniformly, since each $f_n$ is continuous but $f$ is not. On the interval you are considering, try and take a very small neighborhood of $0$, say $(0,\epsilon/n^2)$, and consider the difference between $f_n$ and $f$ on that subinterval.

The sequence doesn't converge uniformly, since the uniform limit of a sequence of continuous functions is again a continuous function.


Does rotation in plane involve Euclid's parallel postulate? It is given a line $l$, a point $P$ not on $l$, and $PQ$ perpendicular to $l$, i.e., $Q$ is on $l$. Let $R$ be a point on $l$ with $QR = PQ$. Therefore, $<PQR = 90^{\rm o}$.

I can't figure out if Euclid's parallel postulate is involved when I rotate the object $PQR$ clockwise by $90^{\rm o}$. Any hint or reference is highly appreciated.

I'm quite positive rotation does not involve Euclid's fifth postulate. I'll try to present strict definition of rotation in synthetic setting.

Definition 1. An ordered pair $(A,B)$ of halflines having the same origin will be called a directed angle. Also denote $AB:=(A,B)$

Definition 2. We introduce a relation $\simeq$ among directed angles: We say $AB\simeq CD$ iff these angles are congruent (or equivalently have the same measure) and have the same orientation (in case $AB$ and $CD$ are not $0$ or $180$ degrees). Having the same orientation roughly speaking means that going from $A$ to $B$ and from $C$ to $D$ are both clockwise or both counterclockwise.

It can be proven that

Proposition 1. $\simeq$ is an equivalence relation.

Proposition 2. Given a halfline $A$ of origin $o$ and a directed angle $PQ$, there is a unique halfline $B$ of origin $o$ such that $AB\simeq PQ$.

Now if we fix a directed angle $PQ$ and a point $o$ on a plane, we can define a rotation around $o$ by a directed angle $PQ$ the following way: Obviously we map $o$ to $o$. Take $a\neq o$. By proposition 2 we can find a halfline $B$ of origin $o$ such that $AB\simeq PQ$, where $A$ is a halfline $\overrightarrow{oa}$. Next we find a unique point $b$ on $B$ such that $oa\equiv ob$. Finally we map $a$ to $b$.

What is the most important thing about rotations is that it can be proven in neutral geometry that they are isometries. It follows quite easily from lemma

Lemma. Let halflines $P,Q,P_1,Q_1$ all have the same origin. If $PP_1\simeq QQ_1$, then $PQ\simeq P_1Q_1$.

To prove that rotations are isometries you have to consider few cases but basically you apply the lemma and SAS congruence rule.

It seems that rotation indeed involves Euclids fifth postulate. Section 8 of this paper is all about that.


Why is the definition of "limit" difficult to understand at first? Tomorrow I teach my students about limits of sequences.  I have heard that the definition of limit is often difficult for students to understand, and I want to make it easier.  But first I need to know, why would the definition be difficult to understand?  Too many logical quantifiers?  The definition of "sequence" itself is vague?  The usual examples are not enough to develop intuition?

I hope this question is not too vague.

As far as I see it, there are two massive obstacles that a classroom must overcome when trying to come to grips with formal limits.

A big problem with understanding the limit definition, as you have pointed out, is the problem of quantifiers. There are so many, and the order in which they are employed is so important, that it can be difficult to keep track of. (And just when they think they understand, now they have to deal with uniform continuity, which to most will look exactly the same as continuity!)

To make matters worse, it's hard to describe a limit in a language that is precise enough to be useful to solve problems, but gentle enough to be swallowed easily. This is hardly surprising; literally thousands of years of mathematics was done before anyone really found the need to understand them completely.

A big problem with using the limit definition, is that it feels circular. This is often the first time students will have to consciously work ''forward'' to first convince themselves what the limit is before they can prove it.

For example, when you are solving $3x+4=5$ there is a mechanical list of procedures that one can go through to get to the answer. Even when doing something more technical, like verifying the trigonometric identity $\tan^2x + 1 = \sec^2x$, you can still start from what you're given and come up with the answer. Thoughtful, informed students will know this logic needs to be run in reverse to constitute a proof, but there is at least a foothold for one to grab onto; that original equation.

But when you are trying to find the limit of $x^2$ as $x\to 4$, if you don't have the intuition that the answer should be $16$, your work becomes very difficult. You can apply the limit definition to try to find a $\delta$, but the catch-22 is that you need to ``know'' what the limit is before you can even interpret which points are in the $\varepsilon$-neighborhood..

If you haven't done it already, please do look through Cauchy's rigorous definition of limits and continuity. If you are comfortable with the algebra of inequalities, the idea of limits becomes very much rigorous than intuitive. (Personally I found it a lot easier doing it the "Cauchy way")

See this. It discusses Cauchy's contribution to calculus and how he made calculus a rigorous mathematical field in a time where various (rather unknown) mathematicians logically (and beautifully) pointed various gaps in Newton's and Leibnitz's beautiful intuitive brain-child.


Natural deduction proof: $A \vee (B \wedge C) ├ (A \vee B) \wedge (A \vee C)$ I assume that I need to set a hypothesis somewhere in the process, but I don't know how.

1   A V (B Ʌ C)     Premiss
2   B Ʌ C           1 (VE)
3   B               2 (ɅE)
4   C               2 (ɅE)
5   A V B           3 (VI)

The above is the formulas that I have written so far, but I'm clearly stuck and not sure where / how to continue. (I also doubt if line 5 ($A \vee B$) is the right one)

How should I tackle this problem?

You got the $\lor E$ rule wrong. From $A \lor (B \land C)$ you can not directly infer $A$ and $(B \land C)$ - that would be $\land E$. Instead, you need to open two subproofs where you assume $A$ and $B \land C$ respectively, then when both subproofs yield the same conclusion $(A \lor B) \land (A \lor C)$, this will be the conclusion of $\lor E$, where the assumptions $A$ and $B \land C$ can be discarded. The idea is "If we know that either $A$ or $B \land C$ hold, and from both scenarios proposition $(A \lor B) \land (A \lor C)$ would follow, then we can conclude $(A \lor B) \land (A \lor C)$."
To continue the proof, you proceed in the same way for $C$ as you did for $B$.

Full proof:

1   A V (B Ʌ C)     Premiss
2   B Ʌ C           1 (VE)
3   B               2 (ɅE)
4   C               2 (ɅE)
5   A V B           3 (VI)
6   A V C           4 (VI)
7   (A V B) Ʌ (A V C)  5,6
8   A               1 (VE)
9   A V B           8 (VI)
10  A V C           8 (VI)
11  (A V B) Ʌ (A V C)  9,10

I'm not correct on the formalism but you were just about there.


Expression for a bounded function I have a bounded function,

$$
y=
    \begin{cases}
        1 & \text{if $x>1$} \\
        x & \text{if $0\leq x\leq 1$}\\
        0 &\text{if $x < 0$}
    \end{cases}
$$
Does anyone know any simple math function to represent $y$? (not using a piece-wise function)

For example, Heaviside function is a similar approach.

Thanks

Let $H$ denote the unit step function.

$xH(x)$ is zero when $x$ is negative and equal to $x$ when $x$ is positive. $xH(x-1)$ is zero when $x$ is less than 1 and equal to $x$ otherwise. If I'm not mistaken, $$xH(x) - (x-1)H(x-1)$$ is the function you want.

$$
\int \rm rect\left( x- \frac12\right)\rm dx,
$$
but be careful when choosing $\rm{const}$...


Prove that if A is an upper triangular matrix with distinct values on the main diagonal, then A is diagonalizable. I know that for a matrix to be diagonalizable, the eigenvectors of its eigenvalues must be linearly independent. However, I am unable to prove the theorem in the title.

It is clear that the eigenvalues of this matrix are listed in the diagonal entries. To see this, consider the matrix $\lambda I-A$ which is also triangular.

Now this matrix must have $n$ different eigenvalue and must correspond to $n$ different eigenvectors. The linear independency could be proved by using linearity of matrix multiplications.

Given the matrix $A$ is a $k × k$ upper triangular matrix with distinct diagonal entries, $a_1, ~a_2, \cdots, ~a_k$.

The determinant of an upper triangular matrix is the product of its diagonal entries.

So $$f(t)= \det(A-tI)=(a_1-t)(a_2-t)\cdots(a_k-t) $$
Setting that to $~0~$, your $~k~$ eigenvalues are all distinct with multiplicity of $~1~$.

The dimension of your eigenspace must be $~1~$.

So by the test for diagonalizability, since your characteristic polynomial splits and the dimension of your eigenspace is equal to the algebraic multiplicity for each eigenvalue, $A$ is diagonalizable.


Interval related to increasing/decreasing and concavity/convexity Why do some people use closed intervals when describing the intervals where a function is increasing/decreasing or concave/convex?

For example, given the function $f(x)= x^2-5x+6$, it says the interval of increase is $[5/2, \infty)$. Why is this written as a closed interval, and not an open one?

Concavity, on the other hand, uses open intervals.

It just depends on what points you are interested in. Sometimes closed intervals are the ones you're making statements about, sometimes it's open intervals. The concavity property only applies to the open interval, so that's what is used.

Increasing or decreasing compares the function value at 2 points in the interval.

If $f'\gt 0$ on $(a,b)$ and $f$ is continuous on $[a,b]$ then if $x$ is such that $a \lt x \lt b$ then $f(x)\lt f(b)$ so $f$ IS increasing on $[a,b]$.

On the other hand, concavity is generally an attribute at a specific point, so if $f ' ' \gt 0$ for $x \lt a$ and $f ' ' \lt 0$ for $x \gt a$, we wouldn't say $f$ is concave up or down at $x = a$.

The reason I put the modifier "generally" in there is in the case where $f ' '(a) = 0$ but $f' ' \gt 0$ for $x \lt a$ AND $f' ' \lt 0$ for $x \gt a$. Then we still say $f$ is concave up at $a$. (Think of $f(x) = x^4$.)


Solving the functional equation $f(x) = f(x / \phi) f(x / \phi^2 - 1)$ I'm trying to find a function $f(x)$ such that the spacing between consecutive roots looks like the infinite Fibonacci word:

$$1, \phi^{-1}, 1, 1, \phi^{-1}, 1, \phi^{-1}, 1, 1, \phi^{-1}, 1, 1, \phi^{-1}, \ldots$$

If I'm not mistaken, any solution to the functional equation $f(x) = f(x / \phi) f(x / \phi^2 - 1)$ must have roots at the points that I want.

And I simply have no idea where to go from here.

How can I solve this functional equation?

Update. I've found that this one similar problem has an easy solution. Change the denominators of $\phi$ and $\phi^2$ both to $2$, so that we have the equation $g(x) = g(x/2) g(x/2 - 1)$. A change of variables gives us this equation:

$$g(2x) = g(x) g(x - 2)$$

Which differs from this double-angle formula only by scaling on the $x$-axis:

$$\sin 2 \theta = \sin \theta \sin (\theta + \pi/2)$$

Thus, we have the easy solution $g(x) = \sin (-\pi x / 4)$. It's not obvious how to apply this solution to the original problem, however.

Substituting $(1+ϕ)x$ for $x$ in your functional equation and transforming according to properties of $ϕ$ leads to the relation $f((1+ϕ)x)=f(ϕx)\cdot f(x-1)$. For $x=1-ϕ$ this implies $f(-ϕ)=f(-1)\cdot f(-ϕ)$, so we must have either $f(-ϕ)=0$ or $f(-1)=1$.


Having extreme difficulty understanding conditional statements. everyone. I'm having a very difficult time understanding conditional statements, and was hoping someone could help me understand them.
I took discrete math this last spring and remember struggling with them, but at some point had to let go and just say "it is what it is, I guess." I'm now taking a new course and conditionals are being thrown back in my face. I've watched several YouTube videos, read back over my discrete math textbook, did a google search and read the websites that came up in the first page and a half. Anything I do, I can't seem to grasp the meaning as a whole. Simply saying "if p, then q" or "p implies q," or "p is sufficient for q," or "q if p" does not make things clear.
I understand a conditional statement is a compound statement made of individual propositions that are either true or they aren't true. I can also see how compound statements such as "It's raining outside AND it's cloudy" could, as a whole statement, be true.
I've seen different definitions for what "if p, then q" mean, and they sometimes seem to contradict one another. So I'm going to ask it here. What is a conditional statement, and what does it mean?
Further, in a conditional statement:

Why does a true hypothesis and a true conclusion make the conditional true?
Why does a True hypothesis and a false conclusion make the conditional false?
Why does a false hypothesis and a true conclusion make the conditional true?
Why does a false hypothesis and a false conclusion make the conditional true?

Right now, I don't exactly know what questions I need to specifically ask to make it clear - all I know is I'm not getting it, and I'm exhausted with the run-around, lack of clarity, and simply not understanding. Hoping someone can help me.
Thank you and hope you're all well.
5.

Suppose that you’re told, If you score at least $85$ on the exam, you will get an $A$. There are four possibilities:

you score at least $85$ and get an $A$;
you score at least $85$ and don’t get an $A$;
you score below $85$ and get an $A$; or
you score below $85$ and don’t get an $A$.

Which of these outcomes contradict the statement? Certainly not the first one! The second one, however, definitely does: you scored at least $85$, but you did not get the promised $A$. Now what about the last two?
The thing to realize here is that taken literally, the statement says nothing about what will happen if you don’t score at least $85$; it merely promises you an $A$ if you do score at least $85$. In everyday contexts we generally don’t take such statements literally: we understand this one to mean (or at least very strongly imply) also that if you fail to score at least $85$, you will not get an $A$. But it does not actually say this, and in a formal logical context we interpret it literally. And since it says nothing about what will happen if you score below $85$, you can get any letter grade after scoring below $85$ without contradicting the statement: in that case there is nothing to contradict, because no prediction or promise was made. Since neither outcome — getting an $A$ or not getting an $A$ — contradicts it in this case, we say that it’s true.
In short, the truth values for these implications are based on the idea that the statement is false if and only if the facts actually contradict it. In the example that would be the case in which you scored at least $85$ but did not get the promised $A$. In general, for an implication $p\to q$, the only situation that absolutely contradicts it is the one in which $p$ is true, but $q$ is nevertheless false. It certainly isn’t contradicted when $p$ and $q$ are both true, and it makes no promises at all about $q$ when $p$ is not true.
There is one other difference between this logical implication and ordinary English usage. Ordinarily when we say that if $p$ is true, then $q$ is true, we are thinking of some causal connection between $p$ and $q$. In formal logic of the kind with which you’re dealing here we don’t care whether there’s any relationship between $p$ and $q$ at all: the truth value of the statement $p\to q$ is to be determined solely on the basis of the truth values of $p$ and $q$.

I'm not certain if this should be accepted as an answer, but I FINALLY found a video on YouTube that helped me understand things: https://www.youtube.com/watch?v=_uJ8rXDe6hs


Use the range for $\theta$ to determine the indicated function value Problem:

  $$\sin\theta = \frac {1}{2}; \frac {\pi}{2} \leq \theta \leq \pi, \text{find} \cos\theta$$

So I have that $\sin\theta = \frac {1}{2}$ and that the range for $\theta$ is $\frac {\pi}{2} \leq \theta \leq \pi$.

I'm assuming I need to find the $\theta$ for which $\sin\theta = \frac {1}{2}$ so I can enter that value into the cos function but I'm not sure how to go about it.

I know $\sin\frac {\pi}{2} = 1$ and $\sin\pi$ = 0. So I assumed.. maybe $\sin\frac{3\pi}{4}$ would be $\frac{1}{2}$ but I don't think that's correct. How would I go about solving this?

I see that @Mike post contains valuable points but I'd like you to note some other ones:

  If $~~\sin(t)=\sin(s)$ then $t=2k\pi+s, ~~\text{or}~~~~t=2k\pi+\pi-s$.

Now consider that that angle is in $[\pi/2,\pi]$ so we have one choice here. Here $s=\pi/6$ and indeed $k=0$ gives it to us. That is $\pi-\pi/6=5\pi/6$. Since we'd like the angle to be in second quadrant, so the sing of $\cos$ is in fact negative so $$\cos(5\pi/6)=\sqrt{1-\sin^2(5\pi/6)}=\sqrt{1-1/4}=|\frac{\sqrt{3}}{2}|=-\sqrt{3}/2.$$

Solving $\sin\theta = \frac {1}{2}$, we get $\theta = \frac {\pi}{3}$ or $\frac {2\pi}{3}$.

Edit: my mistake and should be $\theta = \frac {\pi}{6}$ or $\frac {5\pi}{6}$

Note that only the latter fits the given range.

Thus, $\cos\theta = \cos \frac {5\pi}{6} = \cos (\pi - \frac{\pi}{6}) = … = - \cos \frac {\pi}{6} = -\frac {\sqrt 3}{2}$


Adding similar elements basic misunderstanding $(10^n) + 9  (10^n)$

I don't understand the process behind converting this to

$10 *(10^n)$

how does one logically get from the first step to the second.


Solve $\int\limits_0^{1/\sqrt{2}} \frac{au^2}{5(1-u^2)^2}du = 1$ for $a$ Problem:
The function $f_U(u) = \frac{au^2}{5(1-u^2)^2}$ is a probability density for the random variable $U$, which is non-zero on the interval $(0, \frac{1}{\sqrt{2}})$. I am supposed to find the value $a$.
I understand that that amounts to solving the equation $\int_0^{\frac{1}{\sqrt{2}}} \frac{au^2}{5(1-u^2)^2}du = 1$ for $a$.
Hint:
The hint I am given is to use integration by parts on the left hand side of $$\int_0^{\frac{1}{\sqrt{2}}} \frac{1}{1-u^2}du = \log(1 + \sqrt2)$$
My Attempt:
I don't understand how to use this hint. I know how to integrate by parts.
If the standard expression for integrating by parts is $st\bigg\rvert_0^{\frac{1}{\sqrt{2}}} - \int_0^{\frac{1}{\sqrt{2}}}tds$, then I guess I am supposed to find the appropriate $s$ and $dt$ in the expression $\dfrac{u^2}{(1-u^2)^2}$? In particular, I am supposed to choose $s$ and $dt$ such that $tds = \dfrac{1}{1-u^2}$?
I am led to believe that this is not a particularly nasty integral, though the online integral calculators do some sort of partial fraction decomposition that looks like a mess.
Another idea I had was to do a trigonometric substitution, but I don't think that will work.

HINT:
Let $u=\sin\theta\implies du=\cos\theta \ d \theta$ $$\int_0^{\frac{1}{\sqrt{2}}} \frac{au^2}{5(1-u^2)^2}du =\int_0^{\pi/4}\frac{a\sin^2\theta }{5\cos^4\theta}\cos\theta d\theta$$
$$=\frac a5\int_0^{\pi/4}\frac{(1-\cos^2\theta) }{\cos^3\theta} d\theta$$
$$=\frac a5\int_0^{\pi/4}(\sec^3\theta-\sec\theta) \ d\theta$$
$$=\frac a5\left(\frac12\sec\theta\tan\theta-\frac12\ln|\sec\theta+\tan\theta|\right)_0^{\pi/4} $$
$$=\frac{a}{10}\left(\sqrt{2}-\ln(\sqrt{2}+1)\right)$$


How to write negation of statements? How to write negation of following statements in words?

1. Any integer is either positive or negative.
2. There is a child who is loved by everyone.
3. The connector is loose or the machine is unplugged.
4. No politician cheat voters.

And how to write negation of following statement in symbols?

5. (∀x)(∃y)(x^2 <y)

For 3rd one my answer is "The connector is not loose and the machine is not unplugged" and for 4th one my answer is "politician cheat voters". I am not sure...Are they correct?

Let me give this a go. The first one is trickiest because of the "either-or" construction.

There is an integer that is both positive and negative, or neither positive nor negative.
(a) There is no child who is loved by everyone. (b) For each child, there is someone who does not love the child.
The connector is not loose and the machine is not unplugged. (You already said it.)
There is a politician who cheats voters.
$(\exists x)(\forall y)(x^2 \geq y)$

Indeed, it is a rule that $(\neg \forall x)(\phi) = (\exists x)(\neg \phi)$ where $\phi$ is a proposition. This should be intuitively clear: if $\phi$ holds for not all $x$, then there must be an $x$ such that $\phi$ does not hold. It is a good exercise to write your original statements in formal symbols and then negate them. For example:

$(\forall x \in \mathbb{Z})((x > 0 \wedge x \nless 0) \vee (x < 0 \wedge x \ngtr 0))$

This seems a bit silly, but your either-or construction forces me to write it like this. If the original statement were

"Any integer is positive or negative",

then I could have written

$(\forall x \in \mathbb{Z})(x > 0 \vee x <0),$

which is equivalent in this case because being positive and being negative are already mutually exclusive. The negation of 1. in formal symbols is

\begin{eqnarray*} \neg(\forall x \in \mathbb{Z})((x > 0 \wedge x \nless 0) \vee (x < 0 \wedge x \ngtr 0)) & = & \\
(\neg \forall x \in \mathbb{Z})((x > 0 \wedge x \nless 0) \vee (x < 0 \wedge x \ngtr 0)) & = & \\
(\exists x \in \mathbb{Z})\neg((x > 0 \wedge x \nless 0) \vee (x < 0 \wedge x \ngtr 0)) & = & \\
(\exists x \in \mathbb{Z})(\neg(x > 0 \wedge x \nless 0) \wedge \neg(x < 0 \wedge x \ngtr 0)) & = & \\
(\exists x \in \mathbb{Z})((\neg(x > 0) \vee \neg(x \nless 0)) \wedge (\neg(x < 0) \vee \neg(x \ngtr 0))) & = & \\
(\exists x \in \mathbb{Z})(x \ngtr 0 \vee x < 0) \wedge (x \nless 0 \vee x > 0)
\end{eqnarray*}

With one more step you can that this is the negation of statement 1. in words. Use the rules of passage.

Write the negation of each statement
Some telephone can take photographs
All houses have two stories
Some cars are hybrids
All golf course are green
Some drivers are not safe


What's wrong in $\int_{-2}^1 x^3dx=-\frac{1}{2}\int_0^4 udu$ What's wrong in $$\int_{-2}^1 x^3\mathrm dx=-\frac{1}{2}\int_0^4 u\mathrm du \ ?$$

I set $u=x^2$, therefore $du=2xdx$. But when $x$ traverse $[-2,1]$, then $u$ traverse $[0,4]$ and thus
$$\int_{-2}^1 x^3\mathrm dx=\frac{1}{2}\int_{4}^0 u\mathrm du=-\frac{1}{2}\int_0^4 u\mathrm du.$$

But $\int_{)2}^1 x^3 \mathrm dx=-\frac{15}{4}$ whereas $-\frac{1}{2}\int_{0}^4u\mathrm du=-4$, therefore something is wrong here, but I don't see what's wrong...

May be you can see the problem differently. The best thing is to see what happen we you set $u(x)=x^2$. Therefore $x^3= \frac{1}{2}u(x)u'(x)$ and you know that an antiderivative of a function of type $\frac{1}{2}u(x)u'(x)$ is $\frac{u^2(x)}{4}$.

Since $u(x)=x^2$, you get that the antiderivatives of $x^3$ is $\frac{x^4}{4},$
and thus
$$\int_{-2}^1 x^3dx=[\frac{x^4}{4}]_{-2}^1=[\frac{u^2(x)}{4}]_{-2}^{1}=\frac{u^2(1)}{4}-\frac{u^2(-2)}{4}=[\frac{y^2}{4}]_{u(1)}^{u(-2)}=\int_{u(1)}^{u(-2)}\frac{y}{2}dy$$
$$=\frac{1}{2}\int_4^1\frac{y}{2}dy=\int_{1}^{4}-\frac{y}{2}dy=-\frac{1}{2}\int_1^4 ydy.$$

$u=x^2$,  if $x \in [-2,1]$ then $u \in [4,1]$.

the rest is OK.


Count good sets with given conditions We need to find the numbers of good sets in a sequence. The good set is:

A good set is a sequence of $P$ positive integers which satisfies the following 2 condition :

If an integer $L$ appears in a sequence then $L-1$ should also appear in the sequence
The first occurrence of $L-1$ comes before the last occurrence of $L$

Example : Let $P=3$ then answer is $6$

Explanation : The total number of output sets are $6$

One of the solution set is:

[1,1,1], [1,1,2], [1,2,1], [1,2,2], [2,1,2], [1,2,3]

For [$1,2,3$]= The first occurrence of $1$ comes before the last occurrence of $2$ and the last occurrence of $3$.

Here's one way to attack it:

Let $P(n)$ denote the number of good tuples of length $n$. Claim: $P(n) = n!$. Here is a  proof sketch using induction on $n$.

$P(1) = 1$, OK. Suppose it's true up to and including $n-1$. You can map each of the $(n-1)!$ good tuples of length $n-1$ to a unique good $n$-tuple as follows:

Let $\mathbf{x} = (x_1, \ldots, x_{n-1})$ be a good tuple. For each $i=1,2,\ldots, n$ we augment $\mathbf{x}$ to $(x_1, \ldots, x_{i-1}, x*, x_i, \ldots, x_{n-1})$ by setting $x^*$ to be the largest value in $\{1,2,\ldots, n\}$ that keeps $(x_1, \ldots, x_{i-1}, x*, x_i, \ldots, x_{n-1})$ good.

For example:

$(1,1)$ gives 3 good tuples: $(\underline{1}, 1, 1), (1, \underline{2}, 1), (1,1,\underline{2}) $.

$(1,2)$ gives 3 good tuples: $(\underline{2}, 1, 2), (1, \underline{2}, 2), (1,2,\underline{3})$.

The extra bookkeeping is to:

show that these mappings are indeed good
show that these mappings are unique
show that if an $n$-tuple is not produced by this mapping, then it is not good

Here are the 24 good $4$-tuples that I found:

  [1, 1, 1, 1] [1, 1, 1, 2] [1, 1, 2, 1] [1, 1, 2, 2] [1, 1, 2, 3] [1,
  2, 1, 1] [1, 2, 1, 2] [1, 2, 1, 3] [1, 2, 2, 1] [1, 2, 2, 2] [1, 2, 2,
  3] [1, 2, 3, 1] [1, 2, 3, 2] [1, 2, 3, 3] [1, 2, 3, 4] [1, 3, 2, 3]
  [2, 1, 1, 2] [2, 1, 2, 1] [2, 1, 2, 2] [2, 1, 2, 3] [2, 1, 3, 2] [2,
  2, 1, 2] [2, 3, 1, 2] [3, 1, 2, 3]

When P=1, there is 1 good set.

[1]

When P=2, there are 2 good sets.

[1,1] and [1,2]

When P=3, there are 6 good sets.

[1,1,1], [1,1,2], [1,2,1], [1,2,2], [2,1,2], [1,2,3]

This pattern looks like it might be P!

Check if there are 4! = 24 sets for P = 4.

[1,1,1,1] ... [1,2,3,4]


Is there a simple math behind splitting multiple bills evenly across many people? So, let's say you have 5 friends, and went on a trip together and over different occasions, different people paid for different things, with a plan of combining all the bills together at the end and splitting them evenly across all.

What is the best way of achieving this mathematically?

If you add up the total and divide among the number of people you get the amount each person should have paid. If you add up the bills each person has paid and subtract from the amount they should have paid you have the amount each person owes. These amounts should total to 0.

In terms of optimising, I understand that you want to split this up into person-to-person debts rather than person-to-group and group-to-person debts in such a way as to minimise the number of person-to-person debts. This looks rather like a bin-packing problem, so it is probably NP-complete to optimise.

(From a social point of view, the best solution is probably to have one trusted person collect from those who owe to the group and pay to those who are owed).

If you are interested in broader questions about mathematical insights into fairness questions that arise in fair division, cost allocation, apportionment, etc. take a look at this book for a good introduction: Equity in Theory and Practice, H. Peyton Young, Princeton U. Press, 1994.