Dataset Viewer
Auto-converted to Parquet Duplicate
prompt
stringlengths
8
41.8k
chosen
stringlengths
11
20.1k
rejected
stringlengths
0
18.8k
I want to estimate the KL divergence between two continuous distributions $f$ and $g$. However, I can't write down the density for either $f$ or $g$. I can sample from both $f$ and $g$ via some method (for example, Markov chain Monte Carlo). The KL divergence from $f$ to $g$ is defined like this: $$\operatorname{D\_{...
I assume you can evaluate $f$ and $g$ up to a normalizing constant. Denote $f(x) = f\_u(x)/c\_f$ and $g(x) = g\_u(x)/c\_g$. A consistent estimator that may be used is $$ \widehat{D\_{KL}}(f || g) = \left[n^{-1} \sum\_j f\_u(x\_j)/\pi\_f(x\_j)\right]^{-1}\frac{1}{N}\sum\_i^N \left[\log\left(\frac{f\_u(z\_i)}{g\_u(z\_i)...
**Here is a python implementation for KL estimation for gaussian samples vs. close form calculation:** ``` import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm def kl_divergence(p, mu1, sigma1, mu2, sigma2): return (1.0 / len(p)) * sum(np.log(norm.pdf(p[i], mu1, sigma1)) - np....
Given a word, treat every letter as its number in English alphabet (so `a` becomes 1, `b` becomes 2, `z` becomes 26 and so on), and check if all of them, including duplicates, are pairwise [coprime](https://en.wikipedia.org/wiki/Coprime_integers). The input is exactly one word of lowercase English letters. The output ...
[MATL](https://github.com/lmendo/MATL), 10 bytes ================================================ ``` 96-YF&fdA& ``` Outputs `1` for coprime, `0` otherwise. [Try it online!](https://tio.run/##y00syfn/39JMN9JNLS3FUe3/f/XcxDx1AA) Or [verify all test cases](https://tio.run/##y00syfmf8N/STDfSTS0txVHtf4RLVEXIf/XcxDx1LvW...
[Japt](https://github.com/ETHproductions/japt), 14 bytes ======================================================== ``` ;à2 e_®nR+CÃrj ``` [Try it online!](https://ethproductions.github.io/japt/?v=1.4.6&code=O+AyIGVfrm5SK0PDcmo=&input=LW0gWwpbJ20nLCdhJywnbiddLApbJ2wnLCdlJywnZCddLApbJ20nLCdhJywnbicsJ2EnXSwKWydtJywnbycs...
Consider the [two Dirichlet characters](https://en.wikipedia.org/wiki/Dirichlet_character#Modulus_3) of $\mathbb{Z}/3\mathbb{Z}$. $$ \begin{array}{c|ccr} & 0 & 1 & 2 \\ \hline \chi\_1 & 0 & 1 & 1 \\ \chi\_2 & 0 & 1 & -1 \end{array} $$ I read the L-functions for these series have special values * $ L(2,\chi\_1) \in ...
We have: $$L(2,\chi\_1)=\sum\_{j=0}^{+\infty}\left(\frac{1}{(3j+1)^2}+\frac{1}{(3j+2)^2}\right)=-\int\_{0}^{1}\frac{(1+x)\log x}{1-x^3}\,dx$$ and integration by parts gives: $$\begin{eqnarray\*}\color{red}{L(2,\chi\_1)}&=&-\int\_{0}^{1}\frac{\log(1-x)}{x}\,dx+\frac{1}{3}\int\_{0}^{1}\frac{\log(1-x^3)}{x}\,dx\\&=&-\frac...
We see that \begin{align} \frac{1}{2\pi i}\oint\_{C\_N}\frac{\pi\cot(\pi z)}{(3z+1)^2}{\rm d}z &=\operatorname\*{Res}\_{z=-1/3}\frac{\pi\cot(\pi z)}{(3z+1)^2}+\sum^\infty\_{n=-\infty}\frac{1}{(3n+1)^2}\\ &=-\frac{4\pi^2}{27}+\sum^\infty\_{n=-\infty}\frac{1}{(3n+1)^2}\\ &=0 \end{align} and \begin{align} \frac{1}{2\pi i}...
A disk of radius $r\_1$ is cut from a disk of radius $r\_2$, $(r\_2>r\_1)$ from the middle of the bigger disk . If the annular ring left has mass $M$ then find the moment of inertia about the axis passing through its centre and perpendicular to its plane.
I suppose your disk has uniform density. Then the mass of the whole disk is $$M\frac{\pi r\_2^2}{\pi (r\_2^2-r\_1^2)}=M\frac{r\_2^2}{r\_2^2-r\_1^2}$$ and the mass of the smaller disk is $$M\frac{\pi r\_1^2}{\pi (r\_2^2-r\_1^2)}=M\frac{r\_1^2}{r\_2^2-r\_1^2}$$ The momentum of inertia of the whole disk is $$\frac{1}...
Without working out all the details of the answer for you, the basic concept is that $$I\_{total-axis-1} = \sum\_j \left(I\_{j-axis-1} \right).$$ That is, the moment of inertia of an extended object about a certain axis (e.g., axis-1) is the sum of moments of inertia of pieces of that object about the same axis. If yo...
The game is the following: player1 is hiding the coin in his hand and the player2 has to guess where is the coin. If he guesses that it is in the right hand of the player1, he obtains €2 (player1 looses €2). If player2 guesses that the coin in the left hand then he obtains €1 (player1 looses €1). If player2 didn't gues...
Yes, one says that there is no pure strategy Nash equilibrium, that is, there are no pure strategies for the players that form a Nash equilibrium. There is, however, always a mixed strategy Nash equilibrium in a two-player zero-sum game. These terms are all explained at Wikipedia.
In a 1935 paper on economic prediction, [Oskar Morgenstern](http://en.wikipedia.org/wiki/Oskar_Morgenstern) posed the following problem: > > Sherlock Holmes, pursued by his opponent, Moriarty, leaves London for > Dover. The train stops at a station on the way, and he alights there > rather than travelling on to Do...
First off, I'd like to confess, I'm not a physicist, but this question, the one I'm about to ask, has been bothering me for quite some time. I have some basic knowledge of science and I'm afraid I can't get technical/mathematical at this point. If the question fails to meet the standards of Physics SE, kindly do let me...
Here's another way in which time dilation is not equivalent to cooling. Let's put the chemical reaction on a spaceship inside a spherical shell of radius 10 light seconds with walls that are impenetrable to spaceships. Let's park the spaceship in the center of the shell. If the physicist on the spaceship manipulates ...
While this particular analogy might not be the best one, gravity and temperature are somehow related. Check "Unruh effect" and "Hawking radiation".
[Poincaré's recurrence theorem](https://en.wikipedia.org/wiki/Poincar%C3%A9_recurrence_theorem) remained as far as I know, unproven until 1919 when Caratheodóry proved it. Why then did it represent an issue to Boltzmann? Boltzmann died in 1906, did he not know about this? I believe he did, because his ergodic hypothesi...
The famous H-theorem was (and is still taught in schools of physics around the world) and is proof that, for a closed system, and under particular assumptions, the entropy should increase or remain constant. This section here <https://en.wikipedia.org/wiki/Ludwig_Boltzmann#second_thermodynamics_law_as_a_law_of_disorder...
Boltzman did know about Poincare's theorem. It was pointed out to him by Zermelo. Boltzmann immediately recognized that his H Theorem was technically wrong, having contained an assumption of molecular chaos. He thus realized that entropy increase was a statistical matter. The H Theorem nevertheless remains a useful com...
Problem Statement ================= Seven women and nine men are on the faculty in the mathematics department at a school. How many ways are there to select a committee of five members if at least one woman must be on the committee? Solution I ---------- My first thoughts to solve this problem were to find out how m...
Hint: Rewrite $$2\log\_{2}x-\frac{1}{2}\log\_{2}3\rightarrow\log\_{2}x^2-\log\_{2}3^{1/2}=\log\_{2}\frac{x^{2}}{3^{1/2}}$$
Remember that by definition, $\log\_43$ is the real number, say $z,$ such that $4^z=3.$ Put another way, $(2^2)^z=3.$ Put yet another way, $2^{2\cdot z}=3.$ Translated back into terms of logarithms, $$2z=\log\_23,$$ so that $$\log\_43=z=\frac12\log\_23.$$ This may have been what you've done already, though your post d...
Surprisingly, we haven't had any challenges on graph colouring yet! Given an undirected graph, we can give each vertex a colour such that no two adjacent vertices share the same colour. The smallest number *χ* of distinct colours necessary to achieve this is called the *chromatic number* of the graph. For example, th...
Python 2.7 - ~~122~~ ~~109~~ ~~111~~ ~~109~~ ~~108~~ 103 ======================================================== ``` f=lambda n,e,m=1:any(all(t*m//m**a%m!=t*m//m**b%m for(a,b)in e)for t in range(m**n))and m or f(n,e,m+1) ``` Usage: ``` print f(5, [(1, 2), (2, 3), (3, 4), (4, 5), (5, 1)]) ``` Brute force by incr...
Python 3 - 162 ============== Uses the same brute-force approach, but uses the itertools library for hopefully faster combination generation. Solves the complete 8-graph in < 1 min on my fairly ordinary machine. ``` import itertools as I def c(n,v): for i in range(1,n+1): for p in I.product(range(i),repeat=n): ...
You may write a program or function that receives an *odd, positive integer* `n`, where `n >= 3`, as either a function argument, command line arguments, or on STDIN (or equivalent for your system), and prints to STDOUT (or system equivalent) an ASCII spiral that spins inward clockwise where the **top** edge is exactly ...
C, ~~125~~ 121 bytes ==================== **Golfed version** This has no variable `k`. The variable `k` is used in the ungolfed version just to aid readability. Also `for` loop conditionals are rearranged and one set of unnecessary `{}` removed. Another set of `{}` can be removed by migrating `puts("")` inside the bra...
CJam, 72 bytes ============== ``` li_2/:M;)__*{1$mdM-\M-_2$)=2$0<*@_*@_0>-_*e>mQ_M>2*@@+M+2%+'#S+N+N+=o}/; ``` This is fairly direct conversion of my C solution to CJam. Not as short as you would normally expect from a CJam solution, but this one really suffers from the memory restriction. The common benefits of bui...
Has anyone ever proven that there exists a proof or disproof that there are finitely many Fermat primes. I know that it's an unsolved problem whether there are finitely or infinitely many Fermat primes but my question is only whether it has been proven to be possible to prove or disprove it. If so, how can I access suc...
It's a $\Large{\Pi\_2}$ statement of an incomplete theory (Peano arithmetic) so we can't a priori say "there exists a proof or disproof of this theorem". If it was $\Large \Sigma\_1$ statement then there would certainly exist a proof of it were true - but not necessarily if it were false. If it was a statement from a ...
Currently no such proof exists. I doubt that one ever will. A simple search for "Fermat Prime" will tell you a lot.
I have to prove that: > > $$ \frac{1}{a+b} + \frac{1}{b+c} + \frac{1}{c+a} > \frac{3}{a+b+c},$$ > where $a, b , c$ are positive real numbers. > > > I am thinking about using arithmetical and geometrical averages: $$A\_{3} = \frac{a\_{1}+a\_{2}+a\_{3}}{3},$$ $$G\_{3} = \sqrt[3]{a\_{1}×a\_{2}×a\_{3}},$$ $$A\_{3}...
Since $a > 0$, $b > 0$, and $c > 0$, we have $$ 0 < a +b < a+b + c, $$ and therefore upon dividing both sides of this inequality by $(a+b)(a+b+c) > 0$, we get $$ 0 < \frac{1}{a+b+c} < \frac{1}{a+b}, $$ which implies $$ \frac{1}{a+b} > \frac{1}{a+b+c}. \tag{1} $$ Similarly, we have the inequalities $$ \frac{1}{b+c} > \f...
By AM-HM inequality $$\frac13 \left(\frac1{a+b}+\frac1{b+c}+\frac1{c+a}\right)\ge \frac{3}{(a+b)+(b+c)+(c+a)}.$$ Hence $\displaystyle \frac1{a+b}+\frac1{b+c}+\frac1{c+a}\ge \frac{9}2\frac1{a+b+c}$. Because $\dfrac92>3$ the problem is solved.
So I'm pretty new to abstract mathematics being a biologist an all. My biggest issue is that I can't really wrap my head around how to solve problems. So I have the problem: Let $X$ be the set of all pairs $(a,b)$ where $a, b \in \mathbb R\times\mathbb R$. Define a relation $(a, b) ∼ (c, d) \iff b − a = d − c$. Sho...
Your intuition is correct, but is not a formal proof. In this simple case, also a formal proof is simple. For the transitivity, as an example, you can write something as: If $ (a,b) \sim (c,d)$ and $(c,d)\sim (e,f)$ than, by definition of $\sim$ we have: $$ b-a=d-c \qquad \land \qquad d-c=f-e $$ so, by the transitivi...
As for the geometrical interpretation, let's assume that one fixes a point $(x\_0, y\_0)$. Then all points $(x,y)$ equivalent to this one by definition satisfy $y-x=y\_0-x\_0$, i.e., one gets an equation for a line $y=x+(y\_0-x\_0)$.
Why do we chose exponential function as a trial solution for second order linear differential equation with constant coefficient ? Can any other function be taken as a trial solution ?
The exponential function $e^{\lambda x}$ is special because its derivative is a multiple of itself. Thus, substituting it into the ODE gives a quadratic equation in $\lambda$, which is easy to solve. In general, this method gives us ALL the possible solutions to the ODE, and so using other functions as guess solutions ...
If $y'=ay$ consider $z=e^{-ax}y$. We have $z'=-ae^{-ax}y+e^{-ax}y'=e^{-ax}(y'-ay)=0$ It is elementary then that $z=A$ where $A$ is a constant and therefore $y=Ae^{ax}$ Now suppose $$y''-(a+b)y'+aby=0$$ and take $p=y'-ay; q=y'-by$ so that we find $$p'-bp=0; q'-aq=0$$ whence (from the first result) $$y'-ay=p=Ae^{bx}; ...
I attacked the [Question](http://papers.xtremepapers.com/CIE/Cambridge%20International%20A%20and%20AS%20Level/Mathematics%20(9709)/9709_s14_qp_11.pdf) and the [marking scheme](http://papers.xtremepapers.com/CIE/Cambridge%20International%20A%20and%20AS%20Level/Mathematics%20(9709)/9709_s14_ms_11.pdf) Question 3. --- *...
When you took $2x$ out, it would be $$\frac{1}{256x^8}(8x^4+1)^8$$ instead of $$\dfrac{1}{256x^8}(4x^4+1)^8$$ Now, your answer will be multiplied by a factor of$2^2$ which will finally give the answer to be $7$.
The binomial expansion will have a constant term when the powers of $x$ $$ \left( 4x^3\right)^{p} \left( \frac{1}{2x} \right)^{q} $$ total to $0$. That is $$ x^{3p-q} = x^{0}. $$ Therefore $$ q = 3p. \tag{1} $$ Each term in the binomial expansion has order 8. Using Pascal's triangle $$ \left( 4x^{3} \right)^{8} + 8 ...
If you take $(3x+5)^2$ and differentiate it with respect to $3x+5$ it's just $2(3x+5)$. Can someone explain to me how this would actually work out? I understand normal derivatives with respect to say, $x$, where at some point $x$, $f '(x)$ is the slope at that $x$ value. But how would this work out in this situation?
It's very useful to understand that just because you have used a particular variable $x$ in a derivative or an integral does not mean you are stuck having to do all your derivatives or integrals with respect to the same variable. You can, in fact, take a derivative of *the same thing* but with respect to a different v...
$\dfrac{df}{d(3x+5)}\cdot\dfrac{d(3x+5)}{dx}=\dfrac{df}{dx}$, by the chain rule. Dividing, we get: $\dfrac{df}{d(3x+5)}=\dfrac{df}{dx}\div\dfrac{d(3x+5)}{dx}=f'(x)\div3=\dfrac{f'(x)}3$. So, in summary, the derivative of $f$ with respect to $3x+5$ is just $\dfrac{f'(x)}3$.
Question: A survey of $1000$ people determines that $80\%$ like walking and $60\%$ like biking, and all like at least one of the two activities. What is the probability that a randomly chosen person in this survey likes biking but not walking? What I did was use the formula: $$P(A \land B) = P(A)P(B) = 0.8\cdot 0.6 ...
$P(A\cap B) = P(A) P(B)$ only if $A$ and $B$ are **independent**. In your case, $A$ and $B$ are not independent, since you know that if a person doesn't like walking (i.e., you have information about $A$), then they must like biking (i.e., from that information, you can conclude something about $B$).
Here it is easier to draw a contingency table: From the given informations you get * 800 persons like walking * 600 person like biking * 1000 persons like at least one of walking and biking This will end up in this table: \begin{array}{|c|c|c|} \hline &\mathrm{biking}&\text{not biking}\\ \hline \text{walking}&400&4...
I am not sure if it's a known probem: There is a set of some elements. For the purpose of this explanation that can be a subset of natural numbers, let's say $\{1, 2, ..., 20\}$. Let's call it $SET$. There are also given subsets of the $SET$. That subsets don't have to be disjoint and sum of them doesn't have to cove...
Now I am using the PD codes for the two links. I am using SnapPy with the following code ``` In[1]: LS1=Link([[1,18,2,5],[5,2,6,3],[3,13,4,12],[12,4,11,1],[32,36,31,33],[33,31,34,30], [23,34,24,35],[35,24,36,25],[26,10,25,11],[27,14,26,13],[6,28,7,27], [18,32,17,19],[19,29,20,28],[7,20,8,21],[9,15,10,14],[17,30,16,29]...
Using SnapPy with the first link as [![enter image description here](https://i.stack.imgur.com/r4yAP.jpg)](https://i.stack.imgur.com/r4yAP.jpg) and using the following code ``` M=Manifold() M.volume() M.fundamental_group() M.identify() ``` I am obtaining the following output ``` 14.655449507 Generators: a,b,c...
Given that $$A=\begin{bmatrix}4 & 1\\ -9 & -2 \end{bmatrix}$$ and $$A^{100}=\begin{bmatrix}a & b\\ c & d \end{bmatrix}$$ What is $a$? I tried to multiply it again and again but it seems lengthy. Is there a shorter method?
Uhh. Did you notice something like a series for $a$? It goes like $$4,7,10,13......$$ Compare it with an AP of first term=$4$, Common difference=$3$. Thus $a=4+99\*3$ which makes it $301$
1. Jewar, you give the green chevron to a proof which is not a proof; understanding mathematics is a long way... 2. The good question would be: what is $A^{100}$ ? Indeed $A=I\_2+U$ where $U^2=0\_2$. Then $A^k=I\_2+k U$.
Use the Cauchy-Schwarz inequality to show that (acos(θ)+bsin(θ))$^2$ $\leq$ a$^2$ +b$^2$ for all a,b,θ ∈ $\mathbb{R}$ What I was trying to do was to take the smaller of either a or b and prove that (acos(θ)+bsin(θ))$^2$ $\leq$ a$^2$ if a were smaller than b. Then I created two vectors $\vec{v}$, $\vec{u}\in \mathbb{R^...
Let $u=(a,b)$ and $v=(\cos\theta,\sin\theta)$. The left hand side is $|u\cdot v|^2$ and the right hand side is $|u|^2|v|^2$. Apply Cauchy-Schwarz.
Take $u=(a,b)$ and $v=(\cos(\theta),\sin(\theta))$. Then, $$||u||^2=a^2+b^2, \quad ||v||^2=\cos^2(\theta)+\sin^2(\theta)=1, \quad \langle u,v\rangle=a\cos(\theta)+b\sin(\theta).$$ Hence, by Cauchy-Schwarz, $$|\langle u,v\rangle|^2 \leq ||u||\cdot||v|| \implies (a\cos(\theta)+b\sin(\theta))^2 \leq a^2+b^2$$
I have $a\_n=\frac{n^3}{n^3+n}$. I have to show it's convergent with limiting value 1. If we use our rules then we get: $$\lim\_{n\to \infty}\frac{n^3}{n^3+n}=\lim\_{n\to \infty}\frac{\frac{n^3}{n^3}}{\frac{n^3}{n^3}+\frac{n}{n^3}}=\lim\_{n\to \infty}\frac{1}{1+\frac{n}{n^3}}=1.$$ But how do I show convergence here?
$|a\_n-1|=\frac n {n^{3}+n} <\frac 1 {n^{2}} <\epsilon$ if $n >\frac 1 {\sqrt {\epsilon}}$.
Hint : Prove that $a\_{n} = \frac{n^{3}}{n^{3}+n} = \frac{1}{1+\frac{1}{n^{2}}}$ is increasing, which guarantees $a\_{n}$ tends to $\sup\limits\_{n \in \mathbb{N}} a\_{n}$,since it's bounded, then show that it's supremum is 1.
Observables correspond to hermitian operators on the quantum state. But in the Everett interpretation, the wave function doesn’t collapse since we consider the entire universe as a single quantum state at time $t$, so observation only happens “within that quantum state” (or something like that). This confuses me. G...
Even in traditional interpretations of quantum mechanics it is easier to define what is an observable than what is an observation: it is a property of a quantum system or subsystem that we in principle have access to through observation (whatever the latter means). If we say that this is a decomposition in orthogonal...
Real observables are hermitic operators always. If they were not, it would be eigenstates from this operator that would have complex values. No matters the interpretation
*This is a repost of a question i had written incorrectly earlier.* How do I integrate this without substitutions ? $$ \frac{x^2+3}{x^6\left(x^2+1\right)} $$ I got: $$ \frac{1}{x^6}+\frac{2}{x^6\left(x^2+1\right)}, $$ but wasn't able to eliminate the 2.
If you don't want to go the formal partial fractions route, you can systematically chip away at the denominator as follows: $$\begin{align} {x^2+3\over x^6(x^2+1)}&={3(x^2+1)-2x^2\over x^6(x^2+1)}\\ &={3\over x^6}-{2\over x^4(x^2+1)}\\ &={3\over x^6}-{2(x^2+1)-2x^2\over x^4(x^2+1)}\\ &={3\over x^6}-{2\over x^4}+{2\ove...
$$\frac{x^2+3}{x^6(x^2+1)}=\frac{2x^4-2x^2+3}{x^6}-\frac{2}{x^2+1}=2x^{-2}-2x^{-4}+3x^{-6}-2\cdot\frac{1}{x^2+1}.$$
![Lemma 8.4](https://i.stack.imgur.com/5oFcN.jpg) ~~ I am trying to understand this Lemma 8.4's proof. I understand what is happening until just after the line that says $$a=1a=(mu+nv)a=mua+nva.$$ At this point I do see why $mua \in G(p\_1)$ since $n(mua)=u(mna)=u(0)=0$ so $\mathrm{ord}(mua) \mid n=p\_1^{r\_1}$ so $mua...
The relationship between $\mathbb C$ and $\mathbb R^2$ becomes clearer using Clifford algebra. Clifford algebra admits a "geometric product" of vectors (and more than just two vectors). The so-called complex plane can instead be seen as the algebra of geometric products of two vectors. These objects--geometric produc...
Since everyone is defining the space, I figured I could give an example of why we use it (relating to your "Electrical Engineering" reference). The $i$ itself is what makes using complex numbers/variables ideal for numerous applications. For one, note that: \begin{align\*} i^1 &= \sqrt{-1}\\ i^2 &= -1\\ i^3 &= -i\\ i^...
You are given a string. Output the string with one space per words. Challenge ========= Input will be a string (not `null` or empty), surrounded with quotes(`"`) sent via the `stdin`. Remove leading and trailing spaces from it. Also, if there are more than one space between two words (or symbols or whatever), trim it...
KDB(Q), 28 bytes ================ ``` " "sv except[;enlist""]" "vs ``` Explanation =========== ``` " "vs / cut string by space except[;enlist""] / clear empty strings " "sv / join back with space ``` Test ==== ``` q)" "sv except[;enlist""]" "vs"12...
golfua, 42 bytes ================ ```lua L=I.r():g('%s*\"%s*','"'):g('%s+',' ')w(L) ``` Simple pattern matching replacement: find any double quotes (`\"`) surrounded by 0 or more spaces (`%s*`) & return the single quote, then replace all 1 or more spaces (`%s+`) with a single space. A Lua equivalent would be ```lu...
How many ways can you split the numbers 1 to 5 into two groups of varying size? For example: '1 and 2,3,4,5' or '1,2 and 3,4,5' or '1,2,3 and 4,5'. How many combinations are there like this? What is the formula?
Great question. It seems to me that there are two decisions that should be made. The first is to determine the size of the two groups. After that decision has been made, we must then decide which elements will go in which groups. Suppose we split the $5$ numbers into a group of size $1$ and a group of size $4$. How ma...
Here's another way of looking at the problem of splitting the numbers into group A and group B: For every number, there are two choices: into group A or group B. If there are n numbers, then there are $2^n$ combinations. We know that the order of the groups isn't important. For example, using the numbers in the origi...
I am following a subject on Elliptic Curves and have come accross the notion of **a uniformizer**. Wikipedia tells me that an element is a uniformizer of a Discrete Valuation Ring, if it generates the (only) maximal ideal. This seems sort of clear, but I have no idea how to apply it to elliptic curves. Consider the fol...
As this is homework, I'll try not to say too much. Recall the definitions: The local ring of $C$ at $P=(\alpha,\beta)\in C(k)$ is $k[C]\_{\mathfrak{p}}$, where $k[C]=k[x,y]/(y^2-x)$ and $\mathfrak{p}=(x-\alpha,y-\beta)k[C]$. Its maximal ideal is $\mathfrak{m}\_P=\mathfrak{p}k[C]\_{\mathfrak{p}}$. A *uniformizing eleme...
I'm attending the same course as you, and was trying to find the same answers when Google turned up your question. I just emailed the lecturer with this question, and he suggested Silverman's "The arithmetic of Elliptic Curves", in particular chapter II (without II.4: differentials), algorithm III.2.3, and propositions...
Let's assume i have a random variable $Z\_1$ that is the sum of two independent variables $X\_1$ and $Y\_1$. So $$Z\_1 = X\_1 + Y\_1$$. I know that $Var(Z\_1) = Var(X\_1) + Var(Y\_1)$, because X and Y are independent. Now I have $Z\_2 = X\_2 + Y\_2$, where $X\_2$ and $Y\_2$ are not dependent but $X\_1$ and $X\_2$ and ...
The answer can be a lot more straightforward. How would you find the surface area of a cylinder $x^2+y^2=a^2$ of radius $a$ between bounds of $z$ that are constant values $z\_1, z\_2$? As you already know, it is $2 \pi a |z\_2 - z\_1|$ and it comes from integral $\displaystyle \int\_0^{2\pi} \int\_{z\_1}^{z\_2} a \ dz ...
When you say *Area* is it safe to assume you mean surface area? The shape in question is the intersection between two cylinders, one centred around the $z$ axis with radius $a$ and the other centred around the $y$ axis with radius $a$. Since the radii are equal I think this simplifies it somewhat. I just plotted it in...
It says that $\mathbb{C}$ is not in the center of $\mathbb{H}$. Definition of $\mathbb{K}$-algebra for a ring if $Z(R)=K$. However, you can do this $(a+bI+cJ+dK)(e+fi)=(e+fi)(a+bI+cJ+dK)$. So I don't see how $\mathbb{H}$ is not a $\mathbb{C}$-algebra. Unless assuming I=i. Which, is weird.
For a ring $R$ to be a $F$-algebra it suffices that $F\subseteq Z(R)$. For example extension fields of $F$ are surely all $F$-algebras. IOW the field $F$ does not have to be equal to the center. Aaron's comment explains what is wrong, if we identify $i=I$. But if we don't do such an identification (or identify the com...
We wish to show that the center of $\mathbb H$ is just $\mathbb R$. Let $z=a+bI+cJ+dK$. If $z$ were in the center, we could subtract off the real part to get something else in the center, so we might as well assume that $a=0$ (just to simplify computations). We can compute the commutator $[z,I]=zI-Iz$, and similarly $...
> > Suppose $A$ and $B$ are subsets of $\mathbb{R}$, both nonempty, with the speical property that $a \leq b$ for all $a \in A$ and for all $b \in B$. Prove: sup$(A)$ $\leq$ inf$(B)$. > > > I have an objection to this problem. What if $A$ is a monotone increasing sequence that is not bounded above and $B$ is also...
> > Suppose $A$ and $B$ are subsets of $\mathbb{R}$, both nonempty, with the speical property that $a \leq b$ for all $a \in A$ and for all $b \in B$. Prove: sup$(A)$ $\leq$ inf$(B)$. > > > **Steps for the proof** * Since $B\neq\emptyset$, let $b$ be some element of $B$, show that $$ \sup(A)\leq b\tag{1}. $$ * S...
If sup A > inf B then a>inf B for some a, and thus a>b for some b (for if it wasn't then inf B would not be the infimum of B)
I'm trying to construct a nowhere continuous function while it is Riemann integrable. There's a nowhere differentiable while continuous function, but I don't know about the latter one?
This is not possible. [Lebesgue's criterion for Riemann integrability](https://en.wikipedia.org/wiki/Riemann_integral#Integrability) says that a bounded function is Riemann-integrable if and only if it is continuous except on a null set.
Riemann integration is too weak for this, there is a theorem which states that it is Riemann integrable when the discontinuities are at most countable or in a set of measure zero, so nowhere continuous is too strong. For Lebesgue integral, $1\_{\mathbb R\setminus \mathbb Q}$ is nowhere continuous but integrable (of ...
I've been taught that binning a continuous variable into categories is almost never a good idea, because you lose information in the process. But now I'm facing a situation where I have an age variable that is "mostly continuous", which is to say that about 90% of the values represent age in years, and the remaining 10...
I'd say interact continuous age with a dummy "continuous age is available", and categorical age with a dummy "continuous age is not available". That way you'll be using as much of the information you have as possible. Of course if the effect of age is something you'd like to be able to summarize with just one point est...
You can treat age as an interval censored variable. Some survival routines do this in a straight forward way for the response variable, if age is a predictor then I don't know if there are ready made tools available. But you could still do it using maximum liklihood.
According to what I was taught, if current was dispersed “uniformly,” current density would remain constant. So, in a conductor, the 'current density should be the same at all points.' But, given that electrons flow at random (their time between collisions differs from that of other electrons), how can current density ...
"Are there any fluctuations at all in reality?" In reality, there is [Johnson-Nyquist noise](https://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise): thermal current/voltage fluctuations in the conductor. This is routinely measurable with sensitive equipment, and is something that affects our ability to construct...
The average drift velocity is proportional to the electric field strength. For the potential difference between the two ends of a uniform wire to be independent of the radius, the electric field must also be not a function of the radius.
Can someone walk me through how to find the normal to a curve at a specific point? Taking one example from my Calculus Textbook, it states **Find the equation of the normal to the curve $sqrt(y)+xy^2=5$ at the point (4,1)**? Now, I know a Normal is perpendicular to a tangent line, and has a reverse-signed reciprocal s...
There are two basic approaches here: 1. Rewrite the defining equation for your curve to make one coordinate a function of the other. In this case it is easy to reach $$ x = \frac{5-\sqrt y}{y^2}$$ which you can differentiate symbolically to find a tangent vector and then produce the equation for the normal (goes throu...
We call $ \mathbf {r} $ the curve. To find the normal vector in a point $ p $ of the curve you derive the vector$ \mathbf {r'}/||\mathbf {r'}||$ and calculate in $ p $ the derivate. In your case first find a parametrization of the curve.
Given an integer \$ n \$ \$ (n \ge 1) \$, return/output the total number of set bits between \$ 1 \$ and \$ n \$ inclusive. To make the problem more interesting, **your solution must run with a time complexity of** \$ \mathcal{O}((\log n)^k) \$ **or better, for some constant** \$ k \$ **(AKA poly-logarithmic time compl...
[Charcoal](https://github.com/somebody1234/Charcoal), 28 bytes ============================================================== ``` NθIΣE⮌↨θ²⁺×÷θX²⊕κX²κ×ι⊕﹪θX²κ ``` [Try it online!](https://tio.run/##VYw5DsIwFER7TuHyWzJNRJcOaFwEWYELGOdLWPGSeOP4JosoMsVIo5k36iOD8tLUyt2U0yPbNwaYaXsSQbsENxkTPLOFTk7QY8EQEa5ysZmRhlJGhMkRXtp...
Python 3.8 (59 bytes) ===================== ```python f=lambda n:n and(r:=2**(m:=len(bin(n))-3))*m/2+n%r+1+f(n%r) ``` Here is my attempt 2, since `dingledooper` noted that my previous attempt was not polylog time complexity. Also, the golfiness can probably be improved by using walrus operator in python3.8 I used ...
I want to know what makes linear approximation so important (or useful). What I am aware of in my current state of limited understanding is that linear approximation is one of the applications of a derivative and that it is used to approximate the value of a function at a point. **Please forgive my naivete.** Here I g...
I'll give a classic example in physics. A pendulum. A simple swinging pendulum. The differential equation that describes the angle, $\theta$ a pendulum is from center is: $$\ddot{\theta}(t)+k\sin(\theta(t))=0$$ This differential equation is NOT solvable exactly. However you may make the small angle approximation $\...
Most "continuous"\* problems to be solved by a computer are solved by some sort of approximation procedure. Some such problems include evaluating a function like $e^x$, solving an algebraic equation like $x^5-x-1=0$, calculating an integral, and solving differential equations. Linear approximation is basically the simp...
And does the resulting $A^TA$ matrix always have an inverse to solve for $\vec{w}$ in $$A^TA\vec{w}=A^T\vec{t}$$ ?
Yes it is always square. Consider $A $ be a $ m\times n$ matrix. The dimensions of $A^T $ will be $ n \times m$ Hence $A^TA$ will have dimensions $ n \times n$ which is clearly a square matrix. However in some cases when $A=0$ we cannot find a inverse.
It's always square.If $A \in \mathbb{R}^{n \times m}$ then $A^{T} \in \mathbb{R}^{m \times n}$ so $A^{T}A \in \mathbb{R}^{m \times m}$ The inverse will only exist if $A$ is full rank since $\textrm{Rank}(A) = \textrm{Rank}(A^{T}A)$ However the minimum norm solution to $\|Ax - b\|^{2}$ is given by the solution to $A^{...
We are given an algorithm that, in each step takes a set $\left\{a, b, c\right\}$ It takes any two variables $a, b$ at random and changes them to $0.6 + 0.8b$ and $0.8a - 0.6b$. The initial value of the algorithm is $\left\{3, 4, 12\right\}$. Prove that the algorithm cannot reach $\left\{x, y, z\right\}$ where $|x - 4|...
Let's think about this for a second. What is $$\frac{d}{dx} \int\_0^x dx \, f(x)$$ Oh! Did you mean $$\frac{d}{dx} \int\_0^x dt \, f(t)$$ I hope you see why the former is nonsense.
In addition to what Marty said i think the latter integral (too lazy to type!) is considered wrong mainly because the limits of integration are a function of x as well. A big contradiction to the equality of former integral and latter integral is when you differentiate the integral. Just try that thing out in bot...
How do I convert probabilities between time scales? My current understanding is that I can use the following: $p\_{\text{new}} = 1 - (1 - p\_{\text{orig}})^{\text{int}\_{\text{new}} / \text{int}\_{\text{orig}}}$ so I would get: $p\_{\text{new}} = 1 - (1 - 0.1)^{0.1/1}$ Is this accurate, and if so, what is the name...
Under appropriate assumptions, this is correct. Specifically, for this calculation to work out, we must assume that the following events are independent and equally likely (where we have a stopwatch reading out in seconds): * An event occurs when the stopwatch reads between $0$ and $0.1$. * An event occurs when the s...
You're on the right track. Here's a hint that might help clarify your thinking: Suppose the probability that the event happens in some interval of .1 seconds is $p$. Then the probability that it **doesn't** happen in some interval of .1 seconds is $1-p$. The probability that it doesn't happen in **ten consecutive inte...
Question: Carla has x sunflowers and 8 dandelions. The sunflowers have 9 seeds per plant and the dandelions have 12 seeds per plant. What percentage of Carla's seeds come from the dandelions? If we know the answer to the above question is 64, what is the value of unknown variable x? Answer: Carla has x sunflowers, and ...
To solve this problem, we need to determine the value of x, which represents the number of peppers needed for mild curries. Let's break down the information given: Number of peppers needed for very spicy curries: 3 Number of peppers needed for spicy curries: 2 Number of peppers needed for mild curries: x Previous numb...
To solve this problem, we need to determine the value of x, which represents the number of peppers needed for mild curries. Let's break down the information given: Number of peppers needed for very spicy curries: 3 Number of peppers needed for spicy curries: 2 Number of peppers needed for mild curries: x Previous numb...
I'm just reading the book "R in a Nutshell". And it seems as if I skipped the part where the "." as in "sample.formula" was explained. ``` > sample.formula <- as.formula(y~x1+x2) ``` Is sample an object with a field formula as in other languages? And if so, how can I find out, what other fields/functions this objec...
There are some exceptions (S3 method dispatch), but generally it is simply used as legibility aid, and as such has no special meaning.
The dot in **sample.formula** doesn't separate **sample** from **formula**, other than visually. It is just a variable name. R variables names can consist of alphanumerics and dot (.) and underscore (\_) with one exception. Here is the actual rule: "*A syntactically valid name consists of letters, numbers and the dot...
Given a continuous function $f:[0,1]\rightarrow\mathbb{R}$, $f(0)=0$, how can one show that $P(\underset{0\leq t\leq1}{\sup}\left|B\_{t}-f(t)\right|<\varepsilon)>0$, where $P$ is the probability measure under which $(B\_{t})\_{t\geq0}$ is a standard Brownian Motion. Any help would be much appreciated.
Let $f: [0,1] \to \mathbb{R}$ be a continuous function. Since $[0,1]$ is compact, $f$ is uniformly continuous on $[0,1]$, i.e. we can choose $n \in \mathbb{N}$ such that $$|f(s)-f(t)| < \frac{\varepsilon}{2} \quad \text{for all $|s-t| \leq \frac{1}{n}$.}$$ If we set $t\_j := j/n$ for $j=0,\ldots,n$, then $$\begin{al...
Here is a proof (this is a combination of an exercise from Steele's stochastic calculus, and a lemma which I learned from Freedman's 'Brownian motion and diffusion processes'.) It is the case that $P( \sup\_{0 \leq s \leq 1} |B\_s| \leq \epsilon) > 0$ for any $\epsilon > 0$. I've written a proof here: [How to show tha...
What general tips do you have for golfing in [INTERCAL](https://en.wikipedia.org/wiki/INTERCAL)? I'm looking for ideas which can be applied to code golf challenges and are also at least somewhat specific to INTERCAL (i.e. "remove comments" is not a useful answer). I know exotic languages can be really useful to win go...
Focus on doing as much work as possible in one statement ======================================================== INTERCAL's statement identifiers are rather verbose; `DO` is two noise characters on every statement, the statement's name itself also tends to be quite long, and you have to throw in a `PLEASE` every now ...
CLC-INTERCAL (sick) can `ABSTAIN` and/or `REINSTATE` non-existing label. ======================================================================== C-INTERCAL (ick), on the other hand, makes it compiler error.
Is $\ p\_n^{\pi(n)} < 4^n$ where $p\_n$ is the largest prime $\leq n$? Where $\pi(n)$ is the prime counting function. Using PMT it seems asymptotically $\ p\_n^{\pi(n)} \leq x^n$ where $e \leq x$
Using $$\pi(x) \le 1.25066 \frac{x}{\log x}$$ for all $x>1$ (from Rosser and Schoenfeld), you have $$(p\_n)^{\pi(n)} \le e^{1.25066 n} < 3.5^n$$ for all $n\ge 2$.
Yes, Asymptotically you have $$(p\_n)^{\pi(n)} \leq n^{n/\log n} = e^n$$
Please help me to prove that the equation $3^n + 4^m = 5^k$ where $n$, $m$, $k$ are positive integer numbers has only the solution $n=m=k=2$. I know how to prove it for $n=m=k$. If $3^x + 4^x = 5^x$ then $(3/4)^x + 1 = (5/4)^x$, and this equation has at most one solution since the function $(3/4)^x + 1$ decreases and...
Considering the equation modulo 3 and 4 separately, we see that $2 | n \implies n = 2a$ and $2 | k \implies k = 2c$ for some positive integers $a, c$. Rewriting, we get $$\begin{align} 3^{2a} + 4^m &= 5^{2c}\\ 2^{2m} &= (5^c)^2 - (3^a)^2\\ 2^{2m} &= (5^c + 3^a)(5^c - 3^a)\end{align}$$ We thus allow $5^c + 3^a = 2^y$ ...
Reducing the equation mod $3$ shows that $k$ must be even, and reducing mod $4$ shows the same for $n$, so let's rewrite the whole thing as $$3^{2n}+2^{2m}=5^{2k}$$ and show that $(n,m,k)=(1,2,1)$ is the only solution in positive integers. Now $$2^{2m}=5^{2k}-3^{2n}=(5^k-3^n)(5^k+3^n)$$ implies $5^k-3^n=2^a$ and $...
The question is Use the Midpoint Rule with n=6 to approximate the value of $\int\_{a=0}^{ b=1} e^{x^2} dx$ I understand i need to find delta x, which is 1/6. When it comes to finding the values to plug in for $f(x)$ i got $M=1/6[f(1/12)+f(1/4)+f(5/12)+f(7/12)+f(3/4)+f(11/12)]$ which after plugging in these answers i ...
For the Midpoint Rule, we suppose that $|f''(x)| \le k$, for some $k \in \mathbb{R}$, where $a \le x \le b$. Then, the error estimate is given by: $$|E\_M| \le k\dfrac{(b-a)^3}{24 n^2} \tag 1$$ We have: $$f(x) = e^{x^2} \rightarrow f'(x) = 2 x e^{x^2} \rightarrow f''(x) = 2 e^{x^2} + 4 x^2 e^{x^2}$$ Where does the ...
We use midpoint rule while approximating the value of definite integrals. **Midpoint rule to find approximate integration:** $\boxed {\displaystyle \int\_A^b f(x) dx\approx M\_n = \Delta x \left[ f(\overline{x}\_1)+f(\overline{x}\_2)+.....+f(\overline{x}\_n)\right]}$ Here, the interval $[a, b]$ is divided into $n$ e...
I am new at computing limits with infinitesimals and I am having trouble solving this one: $$\lim\_{x\to0} \frac{\ln(1+x)+\ln(1-x)}{x^2}$$ I tried to substitute by means of equivalent infinitesimals and I came up with this: $$\lim\_{x\to0}\frac{x-x}{x^2}$$ But I do not know how to continue. The result must be $-1$. ...
You can't substitute a function with an equivalent if sums are involved. Here it's better to use Taylor expansion: $$ \ln(1+x)=x-\frac{x^2}{2}+o(x^2) $$ so your limit becomes $$ \lim\_{x\to0}\frac{(x-x^2/2)+(-x-x^2/2)+o(x^2)}{x^2} $$ As you see, $x$ and $-x$ cancel out, but there's something of the order of $x^2$ rema...
$$\lim\_{x\to0} \frac{\ln(1+x)+\ln(1-x)}{x^2}=\lim\_{x\to0} \ln(1-x^2)^{1/x^2}=\lim\_{t\to\infty} -\ln(1-\dfrac1t)^{-t}=-1$$
In a certain model the displacement operator for the normal modes in a lattice is given by $$u\_{s}=\sum\_{\textbf{k}}\left(\frac{\hbar}{2mn\omega\_{k}}\right)^{1/2}(a\_{k}e^{iksb}+a\_{k}^{+}e^{-iksb}).$$ Here, $a$ and $a^{+}$ denote the usual creation and annihilation operators for bosons and $b$ is a real constant. I...
> > I understood the law of conservation of charge as follows:- > > > The net charge of an isolated system will always remain constant. > > > You're missing a crucial distinction between **local** conservation of charge and **global** conservation of charge. The statement as you have given it is a correct encaps...
Conservation of charge is better understood as a special case of the [continuity equation](https://en.wikipedia.org/wiki/Continuity_equation): $$ \frac{\partial Q\_{system}}{\partial t} = \dot{Q}\_{incoming} - \dot{Q}\_{outgoing} $$ This formula becomes a conversation law if $Q\_{incoming}=Q\_{outgoing}=0$ (i.e. the sy...
Let$A=[a\_{i,j}]$ be a $n\times n$ rowed square matrix$\left(1\leq i,j\leq n\right)$,where $a\_{ij}=u\_{i}v\_{j}$ and $u\_{i}\in R$ and $v\_{j}\in R$. Also,$A$ also satisfies the equation $A^{5}=16A$. Find value of $trace(A)$.
Notice that this matrix has the rank $1$ or $0$. In the last case the trace is $0$ and in the former case we have $0$ is an eigenvalue of $A$ with multiplicity $n-1$ and $\lambda\ne0$ is an eigenvalue with multiplicity $1$. Since the polynomial $x^5-16x=x(x^4-16)$ annihilates this symmetric real matrix then the possibl...
There is lack of information. If $A$ is the null matrix, you have $trace(A)=0$ and also $A^5=16A$... If $A=kI$, then $k^4=16$, $k=\pm 2$, thus $trace(A)=\pm 2\times n$. EDIT: I missed the point that $a\_{ij}=u\_iv\_j$, thus the restriction on the rank of $A$...
Let me expose my problem, I am trying to perform the explicit variation of the [Gibbons-Hawking-York boundary term](http://en.wikipedia.org/wiki/Gibbons%E2%80%93Hawking%E2%80%93York_boundary_term), $$S\_{GH}=\int\_{\partial M} d^{n-1}x\sqrt{\left|h\right|}K$$ The problem I have is that in the calculation of $\delta\sqr...
I got the answer reading a book from E. Poisson, what I was doing was indeed wrong, you have to start with the induced metric given by $$ h\_{ab}= g\_{\mu\nu}e^{\mu}\_a e^{\nu}\_b $$ where $$e^{\mu}\_a=\frac{\partial x^{\mu}}{\partial y^a}$$ are the tangent vectors to curves of the hypersurface. Then, you just replace...
as far as i know these two expressions are used synonymically. and your coordinates $h\_{\mu \nu}=g\_{\mu \nu}-\sigma n\_{\mu}n\_{\nu}$ arent gaussian coordinates in general. gaussian are for example flrw metrics like $ds^2=-dt^2+h\_{ij}(t)dx^idx^j$ with *spacelike* $i,j$ where there is no mixed time/space basis term...
I was studying for some quizzes when I encountered this problem. It goes like this: > > Find the area of the largest triangle cut from the first quadrant by a line tangent to the curve $y = e^{-x}$ > > > My work: This is how I imagined the problem: [![enter image description here](https://i.stack.imgur.com/UsZd...
Presumably, you want the area of the triangle in the first quadrant bounded by the tangent line and the axes. Based on that assumption, if $(x,y) = (t,e^{-t})$ is the point of tangency, the area is not $\frac{1}{2}xy$. Instead, leaving $t$ unknown, find the equation of the tangent line in terms of $t$, then find th...
Let's just deal with some general strictly decreasing convex (enough) differentiable function $f$. Then the formula for a tangent line at point $t$ is $$y = f'(t)(x-t)+f(t).$$ By setting $x = 0$ and $y = 0$, we get that tangent line at $t$ intersects the axes at points $(a(t),0)$ and $(0,b(t))$ where \begin{align} a(...
Suppose I have two rigid bodies A and B and they are connected by a spring which is attached off-center (thus possibly causing torques). Due to the spring a force $f$ acts on A and a force $-f$ acts on B (at the respective attachment points) in direction of the spring as in Fig. 1. How can I show the conservation of mo...
The angular and linear momentum of the two masses A and B are not necessarily conserved individually; it is the momenta of the system $S\_{AB}$ that is conserved. If you know the conditions of the system at any particular time $t$, draw a free body diagram and work out the momentums for the system. Knowing that these v...
To prove the conservation of quantities, you need to be able to compute the motion of the system so that you can directly compute these quantities from the time dependent coordinates and verify that they do not change with time. However I don't think that the motion of this system is integrable: it looks like a multip...
Why is the parametrization of the helix is $s \mapsto (\cos 2 \pi s, \sin 2 \pi s, s )$? Could anyone explain to me how we can parametrize the helix to get this parametrization?
Here is an intuitive explanation : Imagine you have a parametrization for a circle $(sin(2\pi t), cos(2\pi t))$, but when you move along the circle, you are also going upwards with some constant velocity with regard to the angle velocity, and you go up for exactly $1$ when you complete one round of the circle.
First, one should know that in 2D, as $t$ runs from $0$ to $2\pi$, the point $(\cos t, \sin t)$ traces the unit circle counterclockwise, starting from and ending at the point $(1,0)$. Thus, to form a helix, simply generalize this to 3D by moving up along the $z$-axis as you trace the circle around.
The function TREE(k) gives the length of the longest sequence of trees T1, T2, ... where each vertex is labelled with one of k colours, the tree Ti has at most i vertices, and no tree is a [minor](https://en.wikipedia.org/wiki/Graph_minor) of any tree following it in the sequence. TREE(1) = 1, with e.g. T1 = `(1)`. T...
Julia, 569 bytes, [Loader's Number](http://googology.wikia.com/wiki/Loader%27s_number) ====================================================================================== ``` r,/,a=0,div,0;¬x=x/2;r<s=r?s:0;y\x=y-~y<<x;+x=global r=(x%2!=0)<1+(+¬x);!x=¬x>>+x;√x=S(4,13,-4,x);S(v,y,c,t)=(!t;f=x=r;f!=2?f>2?f!=v?t-(f>v)%...
Python, 359 (184 without whitespace) 224 212 bytes, ~$$H\_{ψ(ψ\_Ι(0))[7]}(8)$$ ============================================================================== ```python *S,n=0,2,9 while S: i=r=d=0 for a in S[::-1]: i-=1 if d<S[-1]-a: r=r or i;d+=S[-1]-a-d>1 if[k+d for k in S[i:]]<S[r:]:break p=i+1 S.pop...
I understand mathematically why it is the case that the **H** must be in the opposite direction to the magnetization of the bar magnet, but I'm not quite sure what this means intuitively. This is due to $\nabla.\bf{H} = - \nabla.\bf{M}$, so $- \nabla.\bf{M}$ acts like a source of "fictional magnetic charge". But if our...
Sorry for my poor english. My native language is french. We reason in steady state and therefore we look for an operating point (no oscillations a priori!) In general, the problem is complicated because the demagnetizing field is not uniform. However, we can illustrate what happens with the simple case of a sphere f...
There is a "structural" difference between the field in the very middle of a "static dipole" of two "magnetic charges" and that of a current loop for their fields point oppositely to each other even though their respective far fields look the same both in the sense of direction and in shape. This structural difference...
Let $A$ and $B$ be two events such that $P((A \space $U$ \space B)^c) = 0.6$ and $P(A \cap B) = 0.1$. Let $E$ be the event that either $A$ or $B$ but not both will occur. Find $P(E \mid A \space $U$ \space B)$. What I have tried: $P((A \space $U$\space B)^c) = 0.6 = 1-P(A \space $U$\space B) \space$. Therefore, $\spac...
TLDR; Let's define $Q\_X(0.9) = c$ as the reserved costs. And $2c$ will be the costs reserved for two variables $X$ and $Y$. For the specific case in the question, the probability for $X+Y$ to exceed $2c$ is larger than 10%, namely 13.16%. This is because the probability for $X$ and $Y$ to exceed $2c$ is already indi...
As distributions get more right-tailed, the $90^{th}$ percentile of $X+Y$ approaches the $\frac{3}{\sqrt{10}}$th quantile of $X$, roughly the $95^{th}$ percentile. In other words, the top 10% of combined losses will come from roughly 5% in which the first loss is as high as possible, and 5% in which the second loss is ...
Give an example of a map $T:\mathbb{R}^2\rightarrow\mathbb{R}^2$ with both of the following properties: a. $T(kx)=kT(x)$ for all $x\in \mathbb{R}^2, k\in \mathbb{R}$ b. $T$ fails to be a linear transformation I am really stuck on this. I can only find matrices that are not linear transformations and don't fulfill th...
$$T(x\_1,x\_2) = \big((x\_1^2x\_2)^{1/3},x\_1+x\_2\big)$$
What about $f(x,y) = \begin{cases} (0,0) & x \ne 0 \\ (x,y) & x = 0\end{cases}\\$ Conceptually, the given condition requires that if we restrict $f$ to any line through the origin, it is linear. Since each of those lines only overlaps at the origin, we can construct $f$ easily by constructing its value on each of tho...
A client would like to sort out his filesystem (~ 1,000,000,000 files), which has been fed by numerous workers over the years, each with their own unknown naming convention, e.g.: * [DATE]-[CLIENT]-[FILENAME] * [TYPE]-[CLIENT].[DATE][FILENAME] * ... Here are four examples (out of ~1,000,000,000 files) to make things ...
This is not at all a typical clustering problem, so I doubt *any* of these algorithms will help. If you want to try clustering, you will need to do appropriate **feature extraction**. Don't expect things to work on the raw data. But I guess once you have good features, the problem will already be solved. Instead of tr...
Your problem here isn't in choosing an appropriate clustering algorithm, its defining an appropriate similarity metric. Edit distance and jaro winkler distance will cover a lot of ground for you, but you should still anticipate needing to do a fair amount of pre-processing and customization here. Also, as great as text...
1.let $X$ be a random variable , $A\subset B$ is that $\mathbb{E} [X|A] \leq \mathbb{E}[X|B]$ true in general ? 2 what about If $X$ is Gaussian random variable , $A\subset B$ is that $\mathbb{E} [X|X \leq 0] \leq \mathbb{E}[X| X\leq c]$ where $c>0$?
The first point is not true. Consider $X$ being a uniform rv on $\{0,1\}$, then $$1=E(X|\{X \in \{1\}\})>E(X|\{X \in \{0,1\}\})=\frac 1 2.$$ The second one is true for $c \ge 0$ since $$\mathbb{E} [X|X \leq 0] = \int\_{-\infty}^0 xf(x)dx \leq \int\_{-\infty}^cxf(x)dx=\mathbb{E}[X| X\leq c]$$ This follows from the fa...
Just add as a slight generalization of the problem: Assume $\mathbb{P}\{0 < X \leq c\} > 0$. Consider $$ \begin{align} \mathbb{E}[X \mid X \leq c] &= \mathbb{E}[X \mid X \leq 0, X\leq c]\mathbb{P}\{X \leq 0 \mid X \leq c\} \\ &~~~~+ \mathbb{E}[X \mid 0 < X \leq c, X\leq c]\mathbb{P}\{0 < X \leq c \mid X \leq c\} \\ ...
> > Which is bigger, $ \log\_{1000} 1001$ or $\log\_{999} 1000 $? > > > I've tried using the identity of $\log\_n x = \dfrac 1 {\log\_x n} $, but didn't find a solution though. Any suggestions? or clues I can use?
The question is, for $n=1000$, which is larger $$\frac{\ln(n+1)}{\ln n}\qquad\text{or}\qquad\frac{\ln(n)}{\ln(n-1)}?$$ Or equivalently, is $$\ln\ln(n+1)-2\ln\ln n+\ln\ln(n-1)$$ positive or negative? Let $f(x)=\ln\ln x$. Then $$f'(x)=\frac{1}{x\ln x}.$$ This is decreasing for $x>1$, and so $f$ is concave. Then $f(n+1)-...
Let $x\ge2$. If we write $a^2=x-1$ and $b^2=x+1$ with the understanding that $a,b\ge1$, then we see that $$1\lt\sqrt3=\sqrt{4-1}\le\sqrt{x^2-1}=ab=\sqrt{x^2-1}\lt x$$ Thus we have $0\lt\log(ab)\lt\log x$ as well as $0\le\log a\lt\log b$. In particular, the positivity of the logs implies $(\log(ab))^2\lt(\log x)^2$, w...
I happened to glance at my watch today at exactly 11:11:11 (and today is 1/11; too bad it's not 2011), and that got me thinking: *I know! I should make a code golf question out of this! I'm a dork.* Anyway, your challenge is to take an hour, minute, and second as input, and output the next "interesting" time. Here, I ...
J, ~~113~~ ~~99~~ 90 -------------------- Probably still quite golfable. ``` f=:t#:[:(>:^:([:(3&g+:2&g=.[:*/]=(]$)${.)@(":@{.,3}.7":100#.1,])t#:])^:_)1+(t=.24,2$60)#.] ``` Takes a vector `(h m s)` as input, and returns a vector in the same format as output. Examples: ``` f 0 0 0 0 1 0 f 4 14 14 4 14 41 f...
Lua === I've got four different solutions, as I wasn't sure about some of the requirements. **Version 1: removal of 0s, command line input as well as os.time() backup (315)** Minimised: ``` z=arg if z[1] then y={hour=z[1],min=z[2],sec=z[3],day=1,month=1,year=1}end h,g,e,u=os.date,os.time(y),":",tonumber while 1 do ...
Let $x\_n=Sup\lbrace x^n: 0<x<1 \rbrace$. Then what will be the limit of $x\_n$ as $n\to\infty$ ? I think the answer will be either $0$ or $1$. But I am not getting the rigorous argument about the answer. I know that we have to use the fact : $\lim\_{n\to\infty}x^n=0$ provided $0\leq x<1$.
for $n>0$, $x\mapsto x^n $ is increasing at $(0,1) $ thus $$x\_n=\sup\_{x\in(0,1)}\{x^n\}=\lim\_{x\to1^-}x^n=1$$ and $$\lim\_{n\to+\infty}x\_n=1$$
Note that $x \mapsto x^n$ is increasing on $(0,+\infty)$. So in fact $x\_n =1$ for all $n$.
Let $\{a\_n\}$ be sequence of real numbers s.t $\lim\limits\_{n \to \infty} {a\_n}^\frac{1}{n} =\frac{1}{4}$ Evaluate $$ \lim\_{n \to \infty} \frac{\log (1 + a\_n)}{\sin (a\_n + \frac{\pi}{2})}$$
Since $\lim a\_n^{1/n} = 1/4 < 1$, by the root test, the series $\sum\_{n = 1}^\infty a\_n$ converges. Hence, $\lim a\_n = 0$, which implies $\lim \log(1 + a\_n)/\sin(a\_n + \pi/2) = \log(1)/\sin(\pi/2) = 0$.
We have from the hypothesis: $$\lim\_{n\to\infty}a\_n=0$$ and since in this case we have $$\lim\_{n\to\infty}\log(1+a\_n)=0$$ then the desired limit is simply $0$ (there isn't an indeterminate form.)
Challenge ========= Given a rectangular grid of printable ascii characters as a string or through standard input, write a function or program that collapses the non-space characters into a pile on the bottom. The rules: ---------- * The output has the same dimensions and characters as the input. * A non-space charac...
JavaScript (ES6), ~~100~~ ~~90~~ 88 bytes ----------------------------------------- ```js f=s=>s==(l=s.search` `,s=s.replace(eval(`/(\\S)([^]{${l-1},${l+1}}) /`),` $2$1`))?s:f(s) s=` (__) (oo) /------\\/ / | || *...
JavaScript, 286 bytes ===================== ```js b=>eval('f=b=>b==null||" "==b;b=b.split`\n`.map(b=>[...b]);a:for(;;){for(c=0;c<b.length-1;c++)for(g=b[c],d=0;d<g.length;d++){h=g[d];if(!f(h)){e=0;f(b[c+1][d])?e=2:f(b[c+1][d-1])?e=1:f(b[c+1][d+1])&&(e=3);if(e){b[c+1][d+e-2]=h;b[c][d]=" ";continue a}}}break}b.map(b=>b.j...
The question is > > If $x$ and $y$ are prime numbers , which of the following *can not* be their sum? $5$,$9$,$13$,$16$ or $23$. > > > The answer is $23$. How did they get this? As far as I can tell is that when prime numbers are added I am suppose to get an even value for example $5+7 = 12 $ or $7+7 = 14 $ or ...
List the first few primes $2,3,5,7,11,13,17,19,23,\ldots$, and observe that $5=2+3$, $9=2+7$, $13=2+11$ and $16=5+11$.
Since $2$ is a also a prime, the sum of two primes is not necessarily even.
In a pizzeria you can order a pizza in the following way: You can pay $2$ dollars for crust of the pizza. You can add a topping to the crust of the pizza for $1$ dollar each. Pizzeria offers n different toppings. You have $k+2$ dollars and you want to spend all this money on pizza so you pay $2$ dollars for the c...
$$\frac{\csc A}{\csc A- \sin A}$$ $$=\frac1{1-\sin^2A}(\text{multiplying the numerator & the denominator by }\sin A )$$ $$=\frac1{\cos^2A}=\sec^2A$$
$$\frac{\csc A}{\csc A - \sin A} = \frac{\csc A}{\csc A - \sin A}\cdot\frac{\csc A}{\csc A} = \frac{\csc^2 A}{\csc^2 A -\sin A\csc A}$$ $$ = \frac{\csc^2 A}{\csc^2 A -1}=\frac{\csc^2 A}{\cot^2A}=\tan^2 A\csc^2A=\tan^2 A(\cot^2A+1)$$ $$=\tan^2 A \cot^2 A + \tan^2 A = 1 + \tan^2 A = \sec^2 A$$
I have to calculate $$I=\int \_0^1\left\{nx\right\}^2dx , \:\:\:\:\: n \in \mathbb N, n \ge 1$$ Where {a} is $frac(a)$. I know that $\left\{nx\right\}^2 = (nx - [nx])^2$ so $$I\:=\int \_0^1\:\left(n^2x^2-2nx\left[nx\right]+\left[nx\right]^2\right)dx=\frac{n^2}{3}-2n\int \_0^1\:x\left[nx\right]dx+\int \_0^1\:\left[nx...
Fractional part of $ x^2 $ is periodic with period one.and $ frac((nx)^2 )$ is periodic with period $ 1/n$.So the integral can be rewritten as $$\int\_0^{n\*1/n} frac((nx)^2) dx$$ which is same as $$n\int\_0^{1/n} frac((nx)^2) dx$$ in the interval $(0,1/n)$ $ frac((nx)^2) $ is $(nx)^2$ itself.So you could rewrite the i...
\begin{align} \lfloor nx \rfloor = m &\iff m \le nx < m+1 \\ &\iff \dfrac mn \le x < \dfrac{m+1}{n} \\ \end{align} Let \begin{align} I\_m &= \int\_{x=\frac mn}^{\frac{m+1}{n}}\{nx\}^2 dx \\ &= \int\_{x=\frac mn}^{\frac{m+1}{n}}(nx - m)^2 dx & \left(\text{Let $y = x - \dfrac mn$.}\right) \\ &= n^2\int\_{y=0}^{\...
I am having trouble understanding what the following statement means: $$x^2=4 \implies x=2 \hspace{1em} \text{or} \hspace{1em} x=-2.$$ How can we relate this statement to a material conditional? I am trying to see it as a material conditional. So on the left hand side we have the equation $A(x)$ which takes different...
Related post : [What's the difference between material implication and logical implication?](https://math.stackexchange.com/questions/68932/whats-the-difference-between-material-implication-and-logical-implication) --- An " implies" sentence is a material conditional sentence that is logically true. One can use $X \...
I think the real problem here is psychological. In undergraduate mathematics you learn "logical reasoning" two ways. One is essentially simple common sense, writing statements in English and parsing their meaning. The other is formal reasoning with truth tables and implications. They rarely mix well at an elementary l...
This is the problem I have: We have a graph $G$. $G$ is a connected and weighted graph. $e$ is one of the edges with the smallest weight in $G$. How do I prove that $e$ is also in some of the minimum weight subtrees of $G$?
Your claim is true, but a much stronger claim is true also. The only $n$ such that any two years $n$ years apart have the same leap/nonleap status are those that are multiples of **400**. For an $n$ that is divisible by $4$ but not by $400$ you can find different years $n$ apart as one of the pairs $(1700,1700+n)$, $...
For every 400 year period, there are four centurial years, three of which the leap year is ommitted, and on the fourth it is maintained. Hence, the minimal period of the Gregorian calendar must be greater than or equal to 400 years. Now, the minimal period must have an integer value for the number of weeks in it. We ...
Find all values $a\in\mathbb{R}$ such that vector space $V=P\_2(x)$ is the sum of eigenvectors of linear transformation $L: V\rightarrow V$ defined as $L(u)(x)=(4+x)u(0)+(x-2)u'(x)+(1+3x+ax^2)u''(x)$. $P\_2(x)$ is the space of polynomials of order $2$. **Attempt:** First, we find the matrix of $L$ (choose a standard ...
More precisely, $V$ *has a basis consisting of eigenvectors*. It means the linear map is diagonalizable. However, your analysis is not complete: if $a\ne0$ and $a\ne1/2$, the matrix has three distinct eigenvalues, so it is diagonalizable. For $a=0$, you have to see whether the eigenspace relative to $2$ has dimension...
You are asked when $V$ is a direct sum of the eigenspaces of the operator $L$. This means that every vector can be written (uniquely) as a sum of eigenvectors of $L$ associated to different eigenvalues. Alternatively, by the identification of matrices and linear transformations, you need to find when every vector in $\...
> > Let $φ:\mathbb{C[x,y,z]}\to \mathbb{C[t]}$ by $φ(f(x,y,z))=f(t,t^2,t^3)$. Find generators for ker($φ$). > > > This is a scan of my work so far, with my conjecture boxed at the top. I want to be able to write k(x,y,z) in the form $(x^2-y)f(x,y,z)$+$(x^3-z)g(x,y,z)$+$(y^3-z^2)h(x,y,z)$ for some polynomials f,g, ...
You have the homomorphism $\phi:\mathbb{C}[x,y,z]\to \mathbb{C}[t]$ defined by $$\phi(p(x,y,z))=p(t,t^2,t^3)$$ Let $I$ be the kernel of $\phi$. By definition, $I=\{p \in \mathbb{C}[x,y,z]\mid p(t,t^2,t^3) = 0\}$. Let $J$ be the ideal of $\mathbb{C}[x,y,z]$ given by $$J=(x^2-y,x^3-z)$$ It's easy to verify that each of...
**Lemma**: Let $R$ be a commutative ring and $n$ be a fixed positive integer. Then for any polynomial $p(x\_1, x\_2) \in R[x\_1, x\_2]$, there's $q(x\_1, x\_2), r(x\_1) \in R[x\_1, x\_2]$ such that $p(x\_1,x\_2) = (x\_1^n - x\_2)q(x\_1,x\_2) + r(x\_1)$ *Proof*: Induct on the highest degree of $x\_2$ in $p(x\_1, x\_2)$...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
12