Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2010 February 28

From Wikipedia, the free encyclopedia
Mathematics desk
< February 27 << Jan | February | Mar >> March 1 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


February 28

[edit]

Explicit Euler's Method

[edit]

Hello everyone, reviewing for a numerics exam, I came across the following statement in my book. Consider the initial value problem with y(0)=0. This ODE can be solved by separating the variables and we get the nontrivial solution . But when we apply the explicit Euler method we only get zeros as the computed solution. Can someone please explain this conundrum? What in the world is going on? Thanks! 174.29.98.151 (talk) 00:37, 28 February 2010 (UTC)[reply]

That differential equation does not satisfy the Lipschitz condition, and the solution to your IVP is not unique. See the Picard–Lindelöf theorem for more.(Igny (talk) 01:38, 28 February 2010 (UTC))[reply]
The article Envelope (mathematics) has some information on this type of situation.--RDBury (talk) 06:37, 28 February 2010 (UTC)[reply]
You've encountered a singular solution. By the way, neither Mathematica (DSolve) nor Maxima (ode2) can find it and even don't warn! The general solution given by separation of variables is a family of parabolas, all tangent to the line y=0. Whenever a solution family has a common envelope, it may also be a solution by itself. Namely, separating the variables, you've divided by y while implicitly assuming that y≠0. That's where the information is lost. — Pt(T) 12:38, 28 February 2010 (UTC)[reply]

How to qualify when n is even

[edit]

Obviously, when n is even has a different domain (all values except 0). So when stating the equivalence , is the standard practice to add that qualification "when n is odd" or is often assumed to only refer to the part of the domain where x is positive unless otherwise specified? 71.161.56.189 (talk) 00:34, 28 February 2010 (UTC)[reply]

As functions of x the two expressions have different domains and are therefore not technically the same function when n is even. If you want to be completely correct then you might add "(x>0)" so the even/odd issue doesn't even come up. But this kind of thing is a minor issue since most people know not to try to use negative values in a log function without specifically being told.--RDBury (talk) 06:32, 28 February 2010 (UTC)[reply]
Would another way of handling this be to say conventionally that "f(x)=g(x)" means that they are equal when x is in the domain of both functions? (in this case, and ) --COVIZAPIBETEFOKY (talk) 13:22, 28 February 2010 (UTC)[reply]
Yes, in that case, for even n, g is the restriction of f to the positive real line, or equivalently, f is an extension of g to the set of all non-zero reals. -GTBacchus(talk) 18:34, 28 February 2010 (UTC)[reply]

Difference between Needleman-Wunsch and Smith-Waterman

[edit]

I understand the concepts behind both the Needleman–Wunsch algorithm and the Smith–Waterman algorithm. However, they look pretty much the same to me. I see very superficial differences (NW adds gap costs and SW subtracts gap costs). I am left wondering what is the real difference? Is it merely that Smith-Waterman went the extra step of backtracking through the Wagner-Fischer algorithm to find a "best fit" substring? -- kainaw 04:25, 28 February 2010 (UTC)[reply]

The NW algorithm is used for global alignment, and the SW for local alignment. They are used in different contexts. For example, if one is looking for a small motif in a large sequence, SW is a good algorithm, since SW will find all occurrences of the motif in the large sequence. If one applies NW in this case, the motif may be stretched in a weird way (by inserting gaps) and the purpose will be lost. On the other hand, NW is a good algorithm when one is sure that two sequences are very similar and one just wants to examine the dissimilarities which are important. --[[User:MoneyFromAir|MoneyFromAir] —Preceding undated comment added 02:34, 2 March 2010 (UTC).

If you like, Smith-Waterman has no negative weights so "starting a sequence in the wrong position" isn't penalised, hence the local alignment. x42bn6 Talk Mess 02:05, 3 March 2010 (UTC)[reply]
What I never really noticed until just now is that the NW algorithm sets the top/left roes to 0 1 2 3... while the SW algorithm sets them all to 0. So, that is a huge difference. I noticed it when looking why you get local alignment with SW. Thanks. -- kainaw 03:48, 3 March 2010 (UTC)[reply]

Hermitian Matrices

[edit]

I am trying to write a proof that given a Hermitian matrix A,



This is what I have so far. I know that for a Hermitian matrix B,


So if I define the matrix which is basically a perturbation of matrix A, then the eigenvalues of A also get perturbed by the same amount. The eigenvalues of B are . Then I say that because A is Hermitian, B is also Hermitian (which is not true if is a arbitrary complex constant). So and then by the inverse eigenvalue theorem we have


This is just a basic outline with details missing. But my problem is that I need to show this for any arbitrary constant lambda (including complex values) but that one step I take (where I say that B is also Hermitian because A is Hermitian) is wrong. So any help in patching this proof up would be appreciated. Thanks! -Looking for Wisdom and Insight! (talk) 10:37, 28 February 2010 (UTC)[reply]

Hint: B might not be Hermitian, but it is normal. -- Meni Rosenfeld (talk) 13:37, 28 February 2010 (UTC)[reply]

Methods of making vectors for data

[edit]

To avoid original research, I'm searching for papers/books that describe methods for converting data to vectors. There is the simple method of making a set of boolean vectors. For example, gender would become gender_m and gender_f with each set to 1 or -1. What is it called when you turn a vector that has 2 values into something like 1 for 'm' and -1 for 'f' (and possibly 0 for unknown)? Further, what if multiple values are set in a circle where the degree of rotation selects a value? The best example I can think of off the top of my head is a data field that contains a person's movie genre choice with four options: comedy, action, drama, romance. In this case, comedy=0, action=90, drama=180, romance=270 - which places comedy opposite drama and action opposite romance. If I had some "official" names of these methods, I could find papers and add cited information to the appropriate articles. -- kainaw 23:15, 28 February 2010 (UTC)[reply]

The closest thing I can think of at the moment is the idea of an enumerated type in computer programming. To me it would seem more natural, in your example, to say comedy=0, action=1, drama=2, and romance=3, and this is often how enumerated types are implemented. —Bkell (talk) 00:43, 1 March 2010 (UTC)[reply]
I agree, but that doesn't allow for vector comparison. In vector comparison, you want similar topics to be similar vectors and opposite topics to be opposite vectors. Almost everyone uses boolean-style vectors, but I'm interested in ones that use multiple values. -- kainaw 03:40, 1 March 2010 (UTC)[reply]
I'd call it something like "decomposition into independent axes", but that's a description rather than a name. You need to find a certain number of axes such that any data point can be described by its position on each of those axes (ideally with no redundancy - that's the "independent" bit). There are different ways of doing that, depending on what you are starting with. In most real life cases that can't be done in any useful way. For example, you will be able to find films that are funny and dramatic or action filled and romantic (there aren't many, but they are out there if you look for them). You can definitely find people that like both action and romance or both comedy and drama. You may find Opponent-process theory interesting, it's not quite what you are looking for, but closely related. --Tango (talk) 03:58, 1 March 2010 (UTC)[reply]
I agree. I do not feel that vector comparison of data is an optimal way to compare data. However, it is very common. So, in an attempt to learn as much about it as possible (and to cite as much as possible in related Wikipedia articles), I have to study stuff that I do not agree with. -- kainaw 04:37, 1 March 2010 (UTC)[reply]
Map each of the four values into a complex fourth root of unity: comedy=1, action=i, drama=−1, romance=−i. This smoothly generalizes male=1, female=−1. Bo Jacoby (talk) 08:00, 1 March 2010 (UTC).[reply]
As an added bonus, you get an automorphism that will turn any romance movie into an action movie, and vice versa. :-) —Bkell (talk) 09:54, 1 March 2010 (UTC)[reply]
Every remote control needs a complex conjugate button! --Tango (talk) 05:10, 2 March 2010 (UTC)[reply]
It sounds as though you want to rank objects in some linearly-ordered way for each of several attributes. How about a "multidimensional spectrum" (a plausible-sounding phrase I just made up but perhaps has been used before), like a political spectrum, for example? —Bkell (talk) 10:01, 1 March 2010 (UTC)[reply]
Thanks all. With your suggestions, I found that the process is singular value decomposition. The exact method depends on the implementation, but SVD is basis of the implementations that I've found. -- kainaw 03:30, 6 March 2010 (UTC)[reply]