@Jeff Do not worry too much about communication. It is dirt-cheap. Ok not dirt cheap, but it is very cheap. We did a basic gaussian quadrature benchmarking, where you have basically n weighted partitions which you have to sum up. And what we did was divided 1million partitions over 100 processors and compared with a million partitions over single processor and the result was consistently > 99.98 times faster. So less than 0.02% percent slowdown, so do not worry too much about it.
Finite element methods on the other hand do slow down and saturate over ~32 network nodes due to the large amount of data that is transferred there.
Suppose I know that $$\lim_{N \rightarrow \infty} \int_0^{Nx} \frac{\sin\theta}{\theta} d\theta$$ is $\pi/2$. Does this mean that my sequence of functions $f_N(\theta) = \int_0^{Nx} \frac{\sin\theta}{\theta} d\theta$ converges uniformly to $\pi/2$?
user19161
@Matt Not sure why that guy wants to do this, it is just wasting space on the internet.
StackExchange is a CC-BY-SA so it is not exactly plagiarizing. But it can be pulled up on the the grounds that it does not license its own site CC-BY-SA. (Unless it does, though I did not see a specific license page anywhere.)
Apart from that, it is pretty harmless in the sense that it is neither a better system nor is it advertising in a better manner.
As for the rip-off site: it is a piece of shite and it's needless garbage lying around on the internet. Sites like the one I linked to have no right to exist.
Now I need JM's help since we don't want SE to link to garbage like that. Going to flag my previous comment for deletion.
Before we broke the line integral up, since $\frac{1-\cos(z)}{z^2}$ has a removable singularity at $z=0$, I moved the contour so that it didn't contain $z=0$
That is okay since the integrand vanishes at $z=\infty$ and the movement was a finite amount and the region enclosed contains no singularities.
@MonkeyD.Luffy Yes. The difference between the two integrals is the two pieces connecting the ends near $z=\infty$ (since there are no singularities contained in that long rectangle)
The upper contour is counter-clockwise (so we add the residues it contains) while the lower contour is clockwise (so we subtract the residues it contains)
@MonkeyD.Luffy yes, whether I moved the line integral up or down, the answer would come out the same
@MonkeyD.Luffy I think the residue of the one function is the negative of the residue of the other function at $z=0$
@MonkeyD.Luffy consider the long thin rectangle whose top contour is left to right along the real line, whose bottom contour is right to left along the line $y=-1/2$ and whose left and right ends are arbitrarily far out near $+\infty$ and $-\infty$
@hhh It is possible that an LP problem has no solution. consider the two equations $x+y>1$ $x+y<-1$ and then there is a degenerate solution which you have already described.
@hhh What exactly is a "solution"? In my mind a solution is an object that is found to satisfy a given hypothetical property. By the law of the excluded middle, a problem ("find an object with property P") either has a solution or it does not have a solution.
@BenjaLim Sorry, I had to go there. If you right click on the rendered LaTeX and select "Show Math As > TeX Commands" you should see {\huge\int} f(z)\,\mathrm{d}z
@BenjaLim you could also use {\Large\int} and {\large\int} to get less extreme sizing.
@anon good Q. I think you are right in that. Degecrazy is only a computational or more-implementation issue so the problem must still have a solution or no solution.
so the answer is "Yes".
The LP problem always has a solution or no solution according to the law of excluded middle.
@anon Yes, I would also like to know the definition of the "solution" of LP. Can a LP problem have two solutions?
(Is a set a solution? Or many solutions? Investigating my book on this...perhaps def -issue.)
A solution is a particular object that satisfies the property. A solution set is the set of all solutions. A general solution is a symbolic expression used to generate or explicitly construct the entirety of the solution set. Sometimes a text will drop "general" and simply use "solution" to mean the general solution, though this should be clear from context.
But the Q is "Does there exist optimization problems with two optimal solutions?"
I would answer "Yes", for example, $\max |x| s.t. |x|\leq 1$ namely points $(1,1)$ and $(-1,1)$.
But if you define the term "solution" here as a set, then there does not exist optimal solutions but optimal solution. In which case, the answer is "No".
Solution is a singular noun and does not refer to a collection of things typically, unless one uses it to refer to a general solution (in which case technically we're still only referencing a single thing, an expression).
Hmm, I was going to edit that, not delete it.
In your situation solution should mean exactly one solution and no more. Hence multiple optimal solutions are possible.
@jay (or anyone) C question: declaration inside of a function "realtype *z;". Then an assignment inside of the function is "z = data->z;" Is z an array with elements of type realtype? If so, how does the function know the size of the array?
Some detail. In main(), structure data is declared as "UserData data;" and type UserData is defined as typedef struct { // realtype dx, hdcoef, hacoef; int npes, my_pe, my_base, local_N; MPI_Comm comm; realtype z[NEQ+4]; } *UserData;
I feel it hard-learning to read just theoretical book about things such as Naive-Simplex, Revised-SImplex, Full-tableau-Simplex, Dual Simplex, etc-simplex -- about pages 100 in the Bertsimas.
@hhh it is hard learning simplex from theoretical textbooks. especially if you haven't read straight through from the beginning (like a novel). But, alas, I cannot help you (I just wanted to sympathize).
@jay but that's the size of data.z. what is the size of the array z in the function?
(Precisely, my book uses notations such as $\bar{c}_j = c_j -\bf{c}^{'}_{B}\bf{B}^{-1}\bf{A}_{j}$ -- but I think I have somehow skipped the definition (p.84).
The vector -sign means here, not vector, but apparently optimal solution. While bolding means a vector and the sign $'$ means something different -- I wish someone else was reading the book
Introduction to linear Optimization, Dimitris Bertsimas, John N. Tsitsiklis)
no. i don't. My understanding is that "realtype *z" is just a pointer to a variable of type realtype (which is just a long int). and that pointer is just to a single slot.
unless... i think i just figured it out (after I sent that last message)....
unless it's because you're setting the pointer z to point to the same place that data.z is pointing to! Is that it?
And one more thing is this: http://chat.stackexchange.com/transcript/message/5935745#5935745 http://chat.stackexchange.com/transcript/message/5935753#5935753
@jay i have it. i'll dig it outta my closet. but sometimes it's helpful to talk to someone even after reading a book. i mean, i knew that pointers get passed around means you're accessing the same memory space. but not having the experience meant i didn't make the connection.
What does word "nonbasic indices" in LP -problem mean?
(p.83 in the book, perhaps something to do with the matrix $A$: $\min c'x$ so that $Ax\leq b$, $x\gel 0$)
err not \gel but \geq
<--- I am stuck to this word nonbasic.
Nonbasic variable means apparently a variable that is not in the basis but what does the basis mean in the simplex -problem? Does it mean the matrix $A$?
I ask "why" for the "Recall that... statement", I cannot recall what the author is speaking there.
"Reduced cost. In linear programming, it is the sum of the direct cost (c_j) of a nonbasic variable (j) and the indirect costs from induced changes in the levels of the basic variables (to satisfy the equations). For a dual price vector, p, the reduced cost vector is is c - pA."
@WillHunting Not yet "nonbasic indices in LP -problem", it has something to do with the "reduced cost" $$\bar{c}_j = c_j - \bf{c}'_j \bf{B}^{-1}\bf{A}_j$$ where $A_j$ is a shadow price (looked up from the MIT -material):
where $y_i$ is the shadow price that I can understand...
(Standard form usually has the X in text-books i.e. $\min c'x$ so that $Ax\leq y$. In its dual, X and Y get swapped where you switch the primal problem from considering amounts into dual problem that considers valuations)
Now the shadow prices are the $y_i$ terms
Now $A_j$ (Bertsimas notation) corresponds to $y_i$ (MIT -notation), I think.
$c$ is a cost. $\bar{c}$ is an optimal cost -- but what the non-basic index or non-basic cost is, I don't know yet.
1. DUNNO: "direct cost (c_j) of a nonbasic variable (j)"
<--- I don't understand the terms. What are they in the standard form LP -problem?
Does it relate to the Simplex method -base? If you have N -amount of restrictions, you have N -basic variables. The variables in base gets changed in the procedure
... I cannot still see it totally but it may mean the base that is in the simplex method when executing the algorithm.
user19161
8:56 PM
@hhh You might be better off asking this on main, since it seems nobody in chat can give you a good answer now.
"The variables corresponding to the columns of the identity matrix are called basic variables while the remaining variables are called nonbasic or free variables. If the nonbasic variables are assumed to be 0, then the values of the basic variables are easily obtained as entries in b and this solution is a basic feasible solution."
Now I understood the terms basic and nonbasic! BUT now I need to understand what it has to do with the "nonbasic indices"...have to remember a lot to dig this phrase.
$d_j=1$ apparently infers an $unit$ -matrix (ones in diagonal, otherwise zero).
But
2.DUNNO: why $d_i=0$ (p.83, Bertsimas)?
The unit-matrix means that you move every term in the element $x$ of the polyhedron by the same amount, we are finding the optimization "feasible direction" $\bf{x}+\theta \bf{d}$
**1. DEF** "Let $\bf{x}$ be an element of a polyhedron P. A vector $d\in \mathbb R^n$ is said to be a feasible direction at $\bf{x}$, if there exist a positive saclar $\theta$ for which $\bf{x}+\theta \bf{d}\in P$." (p.83, Bertsimas)
Now this is the first time discussion about $d$ in this book and after that it states that odd statement "Recall...$d_i=0$ for all other nonbasic indices $i$. Then
...I drop out here because I cannot understand the premises about the direction $\bf{d}$.
I try to formulate my idea fully here before asking in the main, the next thing book explains is the "reduced cost" but I cannot yet understand this foreshadowing with the "feasible direction".
**Perhaps I could ask**
1. "Explain the 'feasible direction' in the deduction of the 'reduced cost' in the Simplex -method"
2. Explain the nonbasic 'feasible directions' $d_i$ where $i$ is nonbasic in Simplex -method, why $d_i = 0$?
3. Help me to understand the optimality conditions in Simplex method