Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2008 January 25

From Wikipedia, the free encyclopedia
Mathematics desk
< January 24 << Dec | January | Feb >> January 26 >
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.


January 25

[edit]

Math

[edit]

I dont like math it is not too helpful but on the same token I want to work for NASA! —Preceding unsigned comment added by Kop the man (talkcontribs) 03:01, 25 January 2008 (UTC) Can some one please at least help me like math? —Preceding unsigned comment added by Kop the man (talkcontribs) 03:07, 25 January 2008 (UTC)[reply]

What kind of things do you like? Only things that are helpful?  --Lambiam 04:31, 25 January 2008 (UTC)[reply]
I don't know what kind of things do you like. Daniel5127 (talk) 05:43, 25 January 2008 (UTC)[reply]
Mathematics requires one do a lot of careful work to get useful results, but those results need only be derived once, so if your the type that willing to do work now for benefit later then you *should* like math. I also enjoy challenges, which is probably part of the reason I like math. I can find some aspects of it to be very tedious, but I most enjoy being able to pose and sometimes answer my own questions :). I would say my favortie kind of mathematical work is what I like to call; Exploratory analysis. I have "explored" Polynomials, Polyhedra, Polygons, Graph Theory type graphs, Trignonmetric Identities, and more, basically I look for patterns and explore the different possibilities within the fields described above. A math-wiki (talk) 11:38, 25 January 2008 (UTC)[reply]
Also, what mathematics courses have you taken? I could recommend some good explorations based on your mathematical knowledge level. A math-wiki (talk) 12:10, 25 January 2008 (UTC)[reply]
Why do you dislike math? Do you have trouble understanding it? Is it boring/usually boring/sometimes boring? Does it seem useless? Do you usually get the wrong answer to problems, or the right one? Answering any of these questions would help. I've always been good at math, and rarely bored by it, so I've always liked it by default. Black Carrot (talk) 18:57, 25 January 2008 (UTC)[reply]
Also, what do you want to do at NASA? Different jobs require different mathematical backgrounds. Black Carrot (talk) 18:58, 25 January 2008 (UTC)[reply]
NASA must have janitors ... —Tamfang (talk) 01:13, 26 January 2008 (UTC)[reply]
There are books that may convey some of the beauty that makes mathematicians do what they do; I have in mind Mathematical Snapshots by Hugo Steinhaus and The Penguin Dictionary of Curious and Interesting Geometry by David Wells. Since I was already a math freak for many years before reading these books, my opinion of them may be skewed. —Tamfang (talk) 01:13, 26 January 2008 (UTC)[reply]

Stochastic matrix (few questions)

[edit]

I am trying to understand Stochastic matrix.

The article has an example of the cat and mouse:

1. You have a timer and a row of five adjacent boxes.

2. The cat is in the first box.

3. The mouse is in the fifth box.

4. The cat and the mouse both jump to a random adjacent box when the timer advances.

5. If the cat is in the second box and the mouse in the fourth one, the probability is one fourth that the cat will be in the first box and the mouse in the fifth after the timer advances.



So in the above example the article generates some jargon:






P is a matrix that shows, for each pair of states before and after, what the probability is of going at the clock tick to the state after as the next state, coming from the before state. The numbering is given in the article. That is why there are entries 1/2 in row 1, 3rd and 5th.  --Lambiam 09:16, 25 January 2008 (UTC)[reply]
I have moved part of your answer in question 1. I hope you won't mind. --Obsolete.fax (talk) 07:38, 26 January 2008 (UTC)[reply]
Yes, but it is more than just a "diagram". In mathematics, a matrix is a rectangular array of numbers or other entries. Before you can understand stochastic matrix, you need to understand how a matrix is defined, and how two matrices can be added or multiplied together. All this is explained in our article matrix (mathematics). Gandalf61 (talk) 09:56, 26 January 2008 (UTC)[reply]
A matrix is a kind of mathematical object, just like number, vector, etcetera. (There are also mathematical objects called diagrams, but they do not include matrices.) The presentation of a matrix as a rectangular table is a traditional convenient way of representing them on paper, but it is just a representation of the matrix and not the mathematical object itself, just like the sequence of digits "144" represents a number but is not that number. In the article Stochastic matrix the variable P stands indeed for the matrix displayed as the right-hand side in the definition P = .... --Lambiam 10:12, 26 January 2008 (UTC)
—Preceding unsigned comment added by Obsolete.fax (talkcontribs) 13:10, 26 January 2008 (UTC)[reply]
  • State 1: cat in the first box, mouse in the third box: (1, 3)
  • State 2: cat in the first box, mouse in the fifth box: (1, 5)
  • State 3: cat in the second box, mouse in the fourth box: (2, 4)
  • State 4: cat in the third box, mouse in the fifth box: (3, 5)
  • State 5: the cat ate the mouse and the game ended: F.

The before state with the cat in the second box and the mouse in the fourth box is State 3. The after state with the cat in the first box and the mouse in the fifth box is State 2. The probability of transitioning, given that the system is in State 3, to State 2, is the entry found in row 3, column 2, of P, which is 1/4. From State 3 the system can go into each of States 1, 2, 4 and 5, and these four possible transitions all have equal probability. From State 1 the system can only transition to States 3 and 5, because the cat must move to the second box; depending on whether the mouse goes right or left it survives (State 3) or is eaten (State 5). --Lambiam 09:16, 25 January 2008 (UTC)[reply]

Can you elaborate, please? I don't understand where State 1 is in your explanation? --Obsolete.fax (talk) 13:07, 26 January 2008 (UTC)[reply]

Okay, let's go over this again. In State 1, the cat is in box 1 and the mouse is in box 3. From State 1, two alternatives can happen. The cat can go to box 2 and the mouse can go to box 4 - this takes us to State 3. Or the cat can go to box 2 and the mouse can also go to box 2 - this takes us to State 5. These two alternatives have equal probability. Is that clear ? Do you see why the entries in the first row of the matrix P are 0, 0, 1/2, 0, 1/2 ? Gandalf61 (talk) 18:13, 27 January 2008 (UTC)[reply]
I followed you so far Gandalf61. Please could you explain the following:
Is it true that entries in the first row, represent what will happen after the corresponding State, in this case, State 1?
Is it true that State 2 and State 4 which is mentioned earlier cannot happen after State 1?
--Obsolete.fax (talk) 04:59, 28 January 2008 (UTC)[reply]
I think it is now more appropriate to continue this dialogue at User talk:Obsolete.fax, so I have posted a response there. Gandalf61 (talk) 10:18, 28 January 2008 (UTC)[reply]

Point in Polygon

[edit]

I am currently implementing a GIS system and in this process I have encountered a few problems from computational geometry that may be interesting. Here is the first one.

I have a simple polygon with a few million vertices and some tenthousand points. I want to know for each point whether it is inside or outside the polygon. This is the Point in polygon problem.

So far, I am doing a bounding box intersection, which cuts away most of the points. After that I do a full test using raycasting on the remaining points. Naturally, each test takes quite some time for such a large polygon. I am looking for some additional method to instantly classify most of the points, so that only a tiny fraction of the original points have to go through the full raycasting test.

The tricky algorithms that I have found so far (grids and similar) seem to require too much preprocessing (remember, millions of vertices but only thousands of points). I was thinking about computing a maximum inscribing box, but some of the polygons are oddly shaped and would yield useless boxes.

What I really want is to find a way to compute a polygon that reasonably resembles the form of the original polygon with only a few dozen points, but remains completely inside the original polygon. Any ideas? Thorbadil (talk) 20:28, 25 January 2008 (UTC)[reply]

I had a similar problem with a GIS system once and I started by dropping all the points that, when removed, did not change the polygon (sounds stupid, but this got rid of lots of them) I then removed points that "almost" didn't change the shape of the polygon (i.e. angle changes that were small). I also considered the size of the line segment between two points, and if it was a small fraction of a pixel, I dropped it (you can adapt this for every zoom level).
But maybe you won't like that. If the shapes are convex, you could just drop points. If they have concavities, (which I assume they must for the bounding box to be less useful) you have a much harder problem. I'll enjoy seeing any more insightful ideas on this page! Pdbailey (talk) 20:56, 25 January 2008 (UTC)[reply]
I considered using a Douglas Peucker compressor (btw. why is there no article?) which is a bit more clever way to remove the points which almost do not change the polygon when left out. The problem is, that I need 100% accurate results, so the simplified line must be either completely outside or inside the polygon to be of any use for me. Thorbadil (talk) 21:15, 25 January 2008 (UTC)[reply]
The reason there's no article regarding the compressor is that you haven't added one yet :) ... w/o much thought, the best I can do is to generate random points, find those that are on the inside, and then (and this requires angled rays) find those where the line segment that connects them does not cross a boundary. All of these triangles (w/ interior points and interior line segments connecting them) are on the interior and this should save you some time, but isn't exactly what you were hoping for. Pdbailey (talk) 21:24, 25 January 2008 (UTC)[reply]

Why do you want to do this? i.e. what's the bigger picture? And if the points are on a regular grid (say 100x100 = 10,000 points), isn't it actually rather easy (well, as easy as solving the point in polygon problem 100 times) with some record keeping along the way? Pdbailey (talk) 21:55, 25 January 2008 (UTC)[reply]

I want to automatically assign geocoded addresses to administrative or postal regions. I will throw the polygons representing the regions in an rtree and then fetch candidate polygons for each point from it. I am only worried about the case where I have few, very large polygons, like countries. Thorbadil (talk) 22:23, 25 January 2008 (UTC)[reply]
Can't you just cut your large regions into a number of smaller regions, say by intersecting with a grid of horizontal and vertical lines. That should reduce the number of points in each region tested dramatically.
I'm sure this is a know problem, some of the systems in mentioned in Spatial database may do it for you and there is bound to be an extensive literature on the subject.
Anyway my off the top of my head solution.
  1. Divide your region up using a quadtree. Start with the bounding box, divide it into 4 rectangles along the midlines. For each rectangle create a polygon consisting of the country boundary inside the rectangle and appropriate internal edges of the rectangle.
  2. Now recurse. For each rectangle which the polygon intersects dividing it into 4 and repeat. For rectangles when the polygon does not intersect label them as inside (I) or outside (O).
  3. Stop when you just have 1 point on the country boundary in the box. Label as cut (C).
When you want to test a point test whether it in the bounding box, if so find which of the four it lies in. Test against that rectangle and repeat. For the leaves (C) you will have at most 7 points so the polygon intersection test is simple.
I've used quadtree here as its simpler to implement, but most probably not as efficient as a good rtree. Somehow I think the above is similar to what your proposing.--Salix alba (talk) 23:50, 25 January 2008 (UTC)[reply]

I solved the Point in polygon problem some years ago in connection with determining which ambulance station was responsible for a specific adress. The region of each ambulance station was a polygon specified by the coordinates of its vertices. I used the winding number algorithm. Your problem is that the polygon is too complicated for this solution to be fast. However, describe your complicated polygon as the common limit of a decreasing finite sequence of simpler outer polygons, and an increasing finite sequence of simpler inner polygons. Most points is outside one of the outer polygons, or inside one of the inner polygons, and then you are done. Only when the point is very close to the limit polygon do you have to compute the complicated case. Am I clear? Bo Jacoby (talk) 14:00, 27 January 2008 (UTC).[reply]

Inverse of sinc(x)

[edit]

Dear Wikipedians:

What is the inverse function of ?

In other words, is it possible to find an explicit expression for ?

If not, why not?

Thanks.

76.68.9.132 (talk) 23:04, 25 January 2008 (UTC)[reply]

I'm no expert, but wouldn't it be , or am I just thinking to simplistically? Paragon12321 (talk) 01:26, 26 January 2008 (UTC)[reply]
No, he is not talking about the multiplicative inverse. The word inverse here (used with functions) has another meaning. Wikipedia has an article on inverse functions. And to answer the question, in order to find the inverse, you need to be able to solve for x but that is not possible (at least in terms of elementary functions). Furthermore, this function is not one-to-one (because of sin(x)) so its inverse wouldn't even be a function (if we found it). We need to first restrict the domain and the range before we try to find the inverse.A Real Kaiser (talk) 01:56, 26 January 2008 (UTC)[reply]
A graph of the original function can be seen in the article on the sinc function. Its inverse (on some restricted part) cannot be expressed as a closed expression in terms of elementary functions. One could invent a name for it, like has been done for the Lambert W function, but I've never seen this discussed.  --Lambiam 10:23, 26 January 2008 (UTC)[reply]
Thanks. Now I know 76.65.12.133 (talk) 15:00, 26 January 2008 (UTC)[reply]