Jump to content

Wikipedia:Reference desk/Mathematics

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Fly by Night (talk | contribs) at 15:13, 3 January 2011 (→‎Percentages and Probability: Thanks for that Meni.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Welcome to the mathematics section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


December 28

Acyclic Undirected Graph

Is there a way to tell if an undirected graph is acyclic (or cyclic) based on the properties of its adjacency matrix? I know some linear algebra, but I am new to graph theory. Thanks in advance.

--Russoc4 (talk) 01:47, 28 December 2010 (UTC)[reply]

In a very literal sense, yes - the matrix contains all necessary information to run a cycle search algorithm. However, if I get the gist of your question, you want to know if a property of the matrix that is typically used in linear algebra relates to cycles in the graph. A graph is cyclefree when the number of connected components (c) and edges (e) is equal to the number of nodes (n): n = c + e. The number of nodes is the dimension of the adjacency matrix, the number of edges is half of the total sum of all matrix elements. For the number of connected components, there is an obscure connection to linear algebra in the Laplacian matrix, but nothing more direct comes to my mind. —Preceding unsigned comment added by 94.220.87.6 (talk) 04:26, 28 December 2010 (UTC)[reply]
Is it enough to say acyclic graphs have more nodes than edges? (or as you say, half the number of edges, I assume because the matrix is symmetrical and visually redundant) --Russoc4 (talk) 03:07, 29 December 2010 (UTC)[reply]
You have to account for the number of connected components, as 94.220.87.6 noted above. For a simple example, imagine a graph consisting of a cycle and a bunch of isolated vertices—such a graph has more vertices than edges, but is not acyclic. However, if you know the graph is connected, then it is acyclic if and only if the number of edges is less than the number of vertices. See tree (graph theory) for more information; a tree, which always has n − 1 edges, minimizes the number of edges in a connected graph on n vertices, and so any connected graph on n vertices having n or more edges is not a tree and thus has a cycle. —Bkell (talk) 03:28, 29 December 2010 (UTC)[reply]
The graphs I'm dealing with are connected. Thanks for your help! --Russoc4 (talk) 01:40, 31 December 2010 (UTC)[reply]

The cyclomatic number tells you that. It's a matter of simple arithmetic to know how many cycles an undirected graph has. Given a connected graph G, the cyclomatic number of G, denoted by μ(G), is given by the number of edges, minus the number of vertices, plus one: μ(G) = #V – #E + 1. It is true that

  • μ(G) ≥ 0,
  • μ(G) = 0 if and only if G is a tree.

In terms of homology theory, the cyclomatic number tells you the rank of the first homology group. In particilar μ(G) = Rank( H1(G,Z) ). Fly by Night (talk) 02:12, 31 December 2010 (UTC)[reply]

Hmmm. I think you mean #E-#V+1=0 for a tree, but thanks for the info. --Russoc4 (talk) 01:13, 3 January 2011 (UTC)[reply]


December 29

Inverse of an infinite tridiagonal matrix

Is there a particular condition for when we can define the inverse of an 'infinite' tridiagonal matrix? I'm not sure if the definition even really makes sense, but I want to look at a matrix over a basis over , so infinite in 2 directions, and I want the matrix ('M', say) to satisfy . Obviously because of countability we could reformulate the problem so that we only need to look at a basis over , but the form of the matrix (can we call it a matrix, if it's infinite dimensional?) wouldn't be as nice. Anyway, my problem involves looking at whether or not is invertible, the matrix in question having only s on the diagonal and +1s on the subdiagonal. Is there going to be any specific way to tell when it's singular? I am aware for finite tridiagonal matrices we have only got to solve a set of simultaneous equations to find a solution, but I'm not sure when the infinite dimensional case is or isn't soluble. Ta all :) Spalton232 (talk) 04:08, 29 December 2010 (UTC)[reply]

Matrix threory is not likely to be helpful to you in this case; too many of its fundamental results depend on induction from one of the corners, which cannot even get started in the doubly-infinite case. You'd be better off with abstract linear algebra, simply looking at the linear transformations and ask if they are invertible. And that can depend not only on the coefficients, but also which vector spaces you're working with. For example, do you allow vectors with infinitely many nonzero entries?
In your particular problem, I think your transformation will not be invertible for any nonzero . If your vectors must have finitely many entries, then there's no vector that maps to for any (because the difference between the highest and lowest significant index always increases as you apply the map). On the other hand, if you allow infinitely many nonzero entries, then you can find nonzero input vectors that map to 0. –Henning Makholm (talk) 16:26, 1 January 2011 (UTC)[reply]

so what's a fractal dimension anyway?

and why is it a "dimension". Could you give some examples?

If you have an L shaped tetris block that is 1 unit deep like this (the numbers are how many units deep):

[1]
[1]
[1][1]

you can turn it along three dimensions getting either from the original to, turning clockwise in the first dimension (the plane of your screen)

[1][1][1]
[1]

or you can get from the original to, turning about the plane of the table your screen is sitting on:

[1]
[1]
[2]

or you can get from the original to, turning about the plane cast by your eyes if you look up and down the exact center of your monitor, so that if you had laser vision you would cut it in two vertically:

[3][1]

fine. Great. Now please give me an example of doing the same thing with fractal dimensions. You can use any fractal you want, though of course you might have to inline some pictures instead of ascii art! Up to you... 88.182.221.18 (talk) 14:54, 29 December 2010 (UTC)[reply]

Fractal dimensions are not based on how many ways you can turn something. See Fractal dimension. PrimeHunter (talk) 14:59, 29 December 2010 (UTC)[reply]
For what it's worth, ordinary dimension is not based on the number of ways you can turn something either. A better explanation for why your Tetris-piece example shows that (three-dimensional) space has dimension 3 is that it is possible to have three mutually perpendicular lines in that space (the three axes you're rotating around)—the rotation itself has nothing to do with it. —Bkell (talk) 15:08, 29 December 2010 (UTC)[reply]
The last ASCII-art image seems wrong to me. IMHO it should be
 [3][1] 
--CiaPan (talk) 15:12, 29 December 2010 (UTC)[reply]

Sorry, fixed it!! Now, could you please do the same three operations on the following self-similar fractal, based on the cantor set:

Step 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Step 2: aaaaaaaaaaaaaaaaaaaaaaaaaaa                           aaaaaaaaaaaaaaaaaaaaaaaaaaa
Step 3: aaaaaaaaa         aaaaaaaaa                           aaaaaaaaa         aaaaaaaaa
Step 4: aaa   aaa         aaa   aaa                           aaa   aaa         aaa   aaa

So, for me, it would be obvious to call the white-space dimensions, like this:

Step 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Step 2: aaaaaaaaaaaaaaaaaaaaaaaaaaa111111111111111111111111111aaaaaaaaaaaaaaaaaaaaaaaaaaa
Step 3: aaaaaaaaa222222222aaaaaaaaa111111111111111111111111111aaaaaaaaa222222222aaaaaaaaa
Step 4: aaa333aaa222222222aaa333aaa111111111111111111111111111aaa333aaa222222222aaa333aaa

So it seems, like if I have the following fractal diagram: aaa333aaa222222222aaa333aaa111111111111111111111111111aaa333aaa222222222aaa333aaa

I should be able to "rotate" the 1, 2, and 3's. What would I get? Wouldn't the possible "orientations" be:

aaa333aaa222222222aaa333aaa111111111111111111111111111aaa333aaa222222222aaa333aaa to
aaa222aaa333333333aaa222aaa111111111111111111111111111aaa222aaa333333333aaa222aaa or to
aaa333aaa111111111aaa333aaa222222222222222222222222222aaa333aaa111111111aaa333aaa or to
aaa111aaa333333333aaa111aaa222222222222222222222222222aaa111aaa333333333aaa111aaa or to
aaa222aaa111111111aaa222aaa333333333333333333333333333aaa222aaa111111111aaa222aaa or to
aaa111aaa222222222aaa111aaa333333333333333333333333333aaa111aaa222222222aaa111aaa 

It seems to me, like given any simple fractal: http://www.google.fr/images?q=simple+fractal Like I should just be able to "grab it" and rotate the fractal about fractal dimensions in much the same way as I described above!!

Am I just going crazy, or does what I say even make ANY sense whatsoever??? Thanks!!! 88.182.221.18 (talk) 17:55, 29 December 2010 (UTC)[reply]

I don't think you understand what dimension means, let alone fractal dimension. The concept of "dimension" has nothing to do with rotations. "Rotating a fractal about fractal dimensions" is completely nonsensical. —Bkell (talk) 18:27, 29 December 2010 (UTC)[reply]
you're right, a two-dimensional paint program could not possibly refer to something more limited when it says "rotate", then you refer to when you pick up an object in front of you and rotate it to orient in a different direction. Obviously, and as you correctly write, dimensions have nothing to do with rotation. The only thing you have to specify when rotating an object is how many degrees you're doing the rotation by: dimensions have absolutely nothing to do with the rotation. There is, after all, only one way to rotate a playing die clockwise by 180 degrees, just as there is only one way to rotate an object clockwise by 180 degrees in Microsoft Paint. 87.91.6.33 (talk) 19:36, 29 December 2010 (UTC) 87.91.6.33 (talk) 19:34, 29 December 2010 (UTC)[reply]
No, to rotate an object in 3D you need to specify an axis of rotation. In 4D you need to specify one or two planes of rotation. In general, a rotation is translation plus an orthogonal linear transformation of determinant 1. -- Meni Rosenfeld (talk) 20:26, 29 December 2010 (UTC)[reply]
Thanks Meni. Obviously what I (IP has changed) meant by "plane" in 3D rotation can be interpretered as the appropriate axis instead. Could you please answer my question about Fractals? I can give you many further examples if it would help you. But the basic idea is this: the biggest dimension (level1) branches off into 5 smaller versions of the big picture (level2), those branch off into 5 (level3), those branch off into 5 level4's etc. So, you grab one level2 branch: there are at least TWO ways of promoting it to level1. Okay, it's level1 now, but there had been two dimensions hanging off of it: level3 and level4. You could make level3 be now level4, and level4 stay level 4. You could make level3 be level4 and level4 be level 3. You could make what had been level3 and level4 both be now level3. Etc. You understand. So, I want to learn about this kind of rotation using Fractal dimensions, Meni Rosenfeld. Thank you for your help. Maybe looking at a Fractal picture like this: http://api.ning.com/files/c-kkgOyXZLgfrSt8QT3WaqogZ8vBLYCqKC1At2ZLAYMrjg7bV1lcMX0N9h-uHkZImWby0qQFa44IIIrXwFXZ34cqt7hU*7w*/fractal_plant_image_s1.png can help you think while you look at what I wrote. 87.91.6.33 (talk) 22:08, 29 December 2010 (UTC)[reply]
What Meni meant there was you can actually rotate a 4D object in two different ways at different speeds at the same time. Also if constructing a fractal by making smaller copies the stages are not dimensions. Fractal dimension describes the idea, have you gone through why for instance the dimension of the Cantor set is log32? The idea you have of moving a fractal around is the idea of getting the symmetry group (mathematics) of the shape. Rotations are elements of a group so it is part of the same idea. Dmcq (talk) 23:56, 29 December 2010 (UTC)[reply]
In the real world the concept of a rotating a rigid body does not apply unless it is always rotating. If you rotated a sphere the equator would shrink and crack if it was rigid because of relativity, it only works because in our world things aren't rigid. Dmcq (talk) 19:48, 29 December 2010 (UTC)[reply]

Irreducible quartic polynomials with Galois group A4

Hello everyone,

I could use some help getting started with this problem - I have a lecturer who has given a thousand different lemmas and theorems and corollaries and no clue as to what to use when. Unfortunately, whilst I have a very effective toolbox for galois theory, I can't seem to find the right screwdriver. The problem is as follows:

Let P be an irreducible quartic polynomial over K with , whose Galois group is . Show that its splitting field can be written in the form , where L/K is a Galois cubic extension and a, b ∈ L.

It's probably not a hard problem, but I'm struggling to get going - what should I do? Thankyou very much! Otherlobby17 (talk) 19:52, 29 December 2010 (UTC)[reply]

The crucial result is the appropriately-named fundamental theorem of Galois theory. The required field L corresponds to the subgroup V of . L/K is Galois because V is normal, and cubic because V has index 3. The full splitting field has Galois group V as an extension of L, and looking at the subgroups of V (and using the quadratic formula) shows that it's of the given form. Feel free to ask again if you have trouble filling in any of the details. Algebraist 20:10, 29 December 2010 (UTC)[reply]

Homology and Cohomology

Let M be a smooth manifold. Let Ωk(M) denote the space of differential k-forms on M, Γk(M) the space of closed differential k-forms on M and Λk(M) the space of exact differential k-forms on M. the spaces Ωk(M), Γk(M) and Λk(M) are very useful, for example the k-th de Rham cohomology of M is given by the quotient space Γk(M)/Λk(M). But what is the homology and cohomology of the spaces Ωk(M), Γk(M) and Λk(M) themselves? Fly by Night (talk) 22:20, 29 December 2010 (UTC)[reply]

You can only ask for the cohomology of something that forms a chain complex.
With Ωk(M), you have an exterior derivative d to Ωk+1(M), with d2 = 0. The cohomology is then given by the sequence of groups ker(d)/im(d), where it is understood that we take the appropriate versions of d (in the appropriate indices).
If you look only at closed forms, then you are looking at a chain complex, where the maps d are just the zero maps, by definition. Hence the cohomology of that complex is itself. Same for the exact forms. It's not something you're going to want to work with, as these spaces are going to be infinite dimensional most of the time. --SamTalk 16:57, 30 December 2010 (UTC)[reply]
Or did you mean something else when you asked for the cohomology of the "spaces themselves"? If you want to look at the de Rham cohomology of those treated as spaces, well, they are just vector spaces. The Rham cohomology should just be and 0 in higher dimensions, by the Poincaré Lemma (there are slight subtleties associated to the fact that these spaces are infinite dimensional, but in any case you can consider the corresponding Čech cohomology and treat it as giving you the right answer). --SamTalk 17:04, 30 December 2010 (UTC)[reply]
Thanks for your comments. What I wanted was the homology and cohomology of the spaces Ωk(M), Γk(M) and Λk(M) themselves. So the underlying manifolds are Ωk(M), Γk(M) and Λk(M) themselves. In terms of the de Rham cohomology, we have a cochain complexes given by
I had thought that the space of differential k-forms is retractable and so, by the Poincaré lemma, must have trivial cohomology groups. Then by Poincaré duality, the homology groups must be trivial. But I wasn't sure if the infinite dimensionality caused problems. As for closed and exact, I guess you're right: they're vector spaces so they must have trivial co/homology groups. What about the relative homology groups over some coefficient ring R:
Or What about the homology groups
I guess that in this last pair, we have vector spaces and trivial topologies yet again. Fly by Night (talk) 20:16, 30 December 2010 (UTC)[reply]


December 30

matrices

in the multiplication of two matrix. why we multiply rows elements to column elements to getting answer — Preceding unsigned comment added by Dev follower of maths (talkcontribs) 05:00, 30 December 2010 (UTC)[reply]

The best way to think of matrices is that they're a way of coding linear transformations between vector spaces. Then matrix multiplication corresponds to taking the composition of two linear transformations. If you don't have that piece of the puzzle, the whole thing looks kind of unmotivated. --Trovatore (talk) 05:39, 30 December 2010 (UTC)[reply]
You can try this out for yourself using reflections and rotations as in our article on Matrix transformations. Try combining rotations of 90 degrees with reflections in a plane to make the arithmetic easy. You will see that multiplying the matrices gives the correct matrix for the combined transformation, and that the order of multiplication is often important. Dbfirs 20:35, 30 December 2010 (UTC)[reply]
I'm guessing that the OP wants to know about the use of matrices in applied mathematics. For example, take a look at pages 1, 2, 3, … of this book. Fly by Night (talk) 22:22, 30 December 2010 (UTC)[reply]
Linear transformations are the right way to think about them, whether your aims are applied or not. Otherwise it just looks arbitrary. --Trovatore (talk) 22:43, 30 December 2010 (UTC)[reply]
Did you take a look at that link? I can't really put the applied uses in terms of linear algebra. Matrices with entries mi,j where mi,j is the cost of product i from warehouse j. Then you multiply it by matrices that involve tax and stuff like that. In accountancy they use matrices to work out profit margin over repeated monthly cycles, including tax and labour, etc. I don't think we can frame that in terms of vector spaces and linear algebra in any meaningful way. In those applications it's just a new kind of multiplication. It's a means to an end. Fly by Night (talk) 03:52, 31 December 2010 (UTC)[reply]
If you can't put that in terms of linear algebra, you're not trying hard enough. --Trovatore (talk) 03:53, 31 December 2010 (UTC)[reply]
Maybe you could help me by explaining how... Fly by Night (talk) 18:39, 31 December 2010 (UTC)[reply]

Excellent question! Think of it like this:

That's matrix multiplication. When you figure out how to fill in the blanks, then you have the answer to your question. Michael Hardy (talk) 01:12, 31 December 2010 (UTC) </math>[reply]

December 31

Drawing Lines.....

Here's my problem:

We have two points A and B, and based on their positions (We could supply any two pairs of coordinates), we need to draw a line that is centered on, and perpendicular to a line connecting A and B. This line needs to be 10 pixels long, and if possible, can be moved up and down the line connecting A and B by adjusting some kind of percent as a variable.

http://img151.imageshack.us/img151/2341/linesb.png

Hopefully the picture should make my written explanation more clear. I am looking for a formula for the coordinates of the endpoints to the above mentioned line (C and D).

Input of Function

F(x1,y1,x2,y2,percent)

I hope i have made the problem clear enough. Thanks in advance for the help.

74.117.245.62 (talk) 03:43, 31 December 2010 (UTC)[reply]

If you have three points p = (p1,p2), q = (q1,q2) and r = (r1,r2) (pq) then the line at right angles to the chord joining p and q that passes through r is given by the points (x,y) which satisfy the equation
You can assume that r lies on the midpoint of the chord joining p and q so that
In fact, you can construct a one-parameter family of lines given by
where 0 ≤ λ ≤ 1. When λ = 0 you have the line passing through q that is perpendicular to the chord joining p and q. When λ = 1 you have the line passing through p that is perpendicular to the chord joining p and q. So you just need to plot all of the lines
and ½ – ε ≤ λ ≤ ½ + ε for a number 0 ≤ ε ≤ 1 of your choosing. This will give you a strip of carpet at right angles to the chord joining p and q that is centred at the midpoint of that chord. I hope that helps. Fly by Night (talk) 04:20, 31 December 2010 (UTC)[reply]

Okay.... I understand MOST of this, I basically select my lambda which locates your point "R" by mathematically setting the "contribution" of my named points "A" and "B". Then i can use the other equation you gave to get a general equation going through point R with the appropriate vector (perpendicular to the line AB).... but then whats the rest of it? Is it some sort of restriction on the domain of this general equation? or.... ?

74.117.245.62 (talk) 04:28, 31 December 2010 (UTC)[reply]

You talk about a "strip of carpet".... seeming to indicate a rectangular area or a parallelogram.... what i need is a line segment... so i need to know how to restrict x somehow in the equation right?

74.117.245.62 (talk) 04:30, 31 December 2010 (UTC)[reply]

Pardon my multiple posts, im just trying to work this out mathematically. Since we are working in pixels, this creates a special situation i think (All x,y should be integers). We have the point R = (r1,r2), and when x = r1 in the equation of the perpendicular line, then y = r2. Therefore to get the points "C" and "D" in my picture i need to plug in x = r1 +- 5 and round off/up/down to get the respective y coordinates? This seems to work well except for in the special case where the line is vertical. Is this correct?

74.117.245.62 (talk) 04:41, 31 December 2010 (UTC)[reply]

I see. I misunderstood the problem slightly. I thought you wanted the width of the blue line in your link to be fixed. Changing the range of values of λ changes the thickness of that line. Changing r changes where the red line crosses the blue line. What you need to do is fix a λ to give a single line and then restrict the domain of x and y. As for the pixelation, well, I wanted to give a mathematical solution and was hoping that you would be able to do the computer side. I'm useless with programming; so I can't help with that. Sorry. Fly by Night (talk) 18:36, 31 December 2010 (UTC)[reply]
If I understand you, then no, that's not quite right. It sounds like that would only work for a 45 degree line, and then the length would be 10*SQRT(2), not 10. StuRat (talk) 07:19, 31 December 2010 (UTC)[reply]
If processing time is not an issue, you can do this a rather simplistic way. The algorithm is: Calculate distance from A to B. Imagine a line of that length from the origin (0,0) as A and a new B at (Length, 0) - so it is perfectly horizontal. The X coordinate of C and D will be percent*length. The Y coordinate for C will be 5. For D it will be -5. You now have all the coordinates for a horizontal bar with A at the origin. You need to rotate it to the proper angle, leaving A at the origin. The angle of rotation is easily calculated with trignometry. The cosine of the angle is the x offset between A and B (x for B minus x for A) divided by the distance between them (which we already calculated). Sine would be the y offset between A and B divided by the distance. With cosine and sine, given any coordinate (x,y), the rotated coordinate is (x*cos - y*sin, y*cos + x*sin) -- if I am remembering it correctly. Now, you've rotated it to the correct angle, but A is at the origin. Add A's x to very x and A's y to every y and you'll offset it to the proper location. -- kainaw 13:52, 31 December 2010 (UTC)[reply]

Fly by Night, It's okay, what you gave me was useful still. :) Kainaw, your method seems like it would work... but i have difficulty understanding clearly how to proceed with the rotation part. I will do my best and bust out the distance formula etc on this and see where i get....

74.117.245.62 (talk) 19:22, 31 December 2010 (UTC)[reply]

Okay, i THINK i get it...

Is this correct?

74.117.245.62 (talk) 19:53, 31 December 2010 (UTC)[reply]

You don't need to use arccos because you don't need the angle. You only need the cosine and sine (you are calculating the angle from cosine and then calculating the cosine from the angle). Distance will be sqrt((bx-ax)2+(by-ay)2). Before rotation, C will be at coordinate (pct*distance, 5). D will be at (pct*distance,-5). I'm going to call pct*distance P. So, C is at (P,5) and D is at (P,-5). Now, rotate. C will be at (P*cos-5*sin, 5*cos+P*sin). Note, cos is (bx-ax)/distance and sin is (by-ay)/distance. You don't actually use a cos or sin function. D will be at (P*cos+5*sin, -5*cos+P*sin). Then move C and D by adding A to them. C will be at (P*cos+5*sin+Ax, 5*cos+P*sin+Ay). -- kainaw 20:18, 31 December 2010 (UTC)[reply]

Right, i just calculated θ for simplified looking equations, that's all. Your solution makes sense, thanks! 74.117.245.62 (talk) 20:23, 31 December 2010 (UTC)[reply]

I'm not sure that we need to use trigonometry; even though it is very natural. In your picture, you have points A and B. Now imagine you set off in a straight line from A to B. We can express your position as ( 1 – t ) A + tB, where for t = 0 you're at A and at time t = 1 you're at B. The line joining C and D can be thought of as you carrying a pole at right angles to your direction of travel. The vector BA has its tail at A and its head at B. Let us write A = (a1, a2) and B = (b1, b2). A vector perpendicular to BA is given by

This vector is parallel to the line joining C and D in your picture. We need to normalise it, meaning that we'll make it have unit length. That will make the calculations easier. Let

Let's make ( 1 – t ) A + tB. Let p(t) denote the point between A and B after times t. When t = 0 you're at A and at time t = 1 you're at B.

Then your lines is parametrised by the following:

where 0 ≤ t ≤ 1 choses where the line joining C to D hits the line joining A to B. In the picture, 10% means t = 0.1, 50% means that t = 0.9 and 90% means that t = 0.9. The variable s tells you how far, on either side of the line from A to B, you want the line from C to D to extent. If you chose s = 0 then you'll just have a point on the line from A to B. If you chose –2.5 ≤ s ≤ 2.5 then the line will be of length 5 with half on either side. I hope this makes sense. Fly by Night (talk) 02:35, 1 January 2011 (UTC)[reply]

pseudocode to rotate an array by 90 degrees as a square

so here is an array:
123
456
789

you can rotate it 90 degrees clockwise
741
852
963

can you give me pseudocode to rotate a two-dimensional array clockwise or counterclockwise by 90 degrees?

This question is being posted in three steps, to slowly cook the frog and get what I'm really interested in. (I'm the fractal guy from above). Please bear with me! —Preceding unsigned comment added by 87.91.6.33 (talk) 10:06, 31 December 2010 (UTC)[reply]

Pseudocode is more the computing reference desk, what's wrong with Rotation matrix or Group (mathematics)for your purpose? Dmcq (talk) 10:35, 31 December 2010 (UTC)[reply]
the second answer is simple enough: I can't wrap my head around the idea of a group :( :(. I'm just too dumb. Maybe I shouldn't be doing what I'm doing then, but whatever. Look, I know my question above seems simplistic, but I am just laying the groundwork for my 2nd and 3rd followup which introduce something that I simply can't wrap my head around. remember, I don't need real code, just pseudocode, something like (for 90 degree clockwise):
for each row and each column in the new matrix:
New Matrix Row i, Column j = Old matrix Row ???,column ????...

even though it is simplistic, could someone tell me that? 87.91.6.33 (talk) 11:25, 31 December 2010 (UTC)[reply]

Sorry I see, that was an actual array and you want a bit of programming. Okay
for each row and each column in the new matrix:
New Matrix Row i, Column j = Old matrix Row (upper bound - j + lower bound) ,column i
cheers Dmcq (talk) 12:30, 31 December 2010 (UTC)[reply]
okay, so let's step through it with a 2x2 matrix:1
12
34

meaning: 
old row 1 column 1 = 1
old row 1 column 2 = 2
old row 1 column 1 = 3
old row 1 column 2 = 4

now let me use your formula
new row 1 column 1 = old row (2 - 1 + 1=) 2 column 1
new row 1 column 2 = old row (2 - 2 + 1=) 1 column 1
new row 2 column 1 = old row (2 - 1 + 1=) 2 column 2
new row 2 column 2 = old row (2 - 2 + 1=) 1 column 2
yielding
31
42

great it looks good!  So, onward and upward!!

Question Part 2

now let's have a 3-dimensional "cube" array just as the above is a 2-dimensional "square" array. For simplicity I'll just use 2x2x2 cube. front slice (facing you):

12
34

the slice behind it:

56
78

Now could you please give me the pseudocode for rotating THAT by 90 degrees clockwise. There are a few possibilities: clockwise just like the above (ie the side facing you) clockwise from side to side as it remains flat on the table (if it is resting on the table, not lifting it from the table, just spinning it clockwise 90 degrees) clockwise from front to back, so that the right and left side just spin around without changing from staying on your right and on your left respectively.

so, what are the respective three pseudocodes for those three manipulations? Thanks! 87.91.6.33 (talk) 13:46, 31 December 2010 (UTC)[reply]

For clarity, are you writing a Rubik's cube program? If that is the case, we can provide more specific help.
As for rotation - the code for each rotation is unique. You can't have a single "90 degree rotation" function that handles any rotation possible. You need one function to rotate the face. You need one to rotate each side. You need one to rotate the top and one to rotate the bottom. It is very easy to write these functions. It is a very trivial matter of looking at the array and writing new[x][y] will have value of old[...][...]. -- kainaw 15:06, 31 December 2010 (UTC)[reply]
Nooononono, this isn't where it's going!!! ONE function to rotate the cube by 90 degrees (obviously the function can take the axis of rotation, x, y, or z) is EXACTLY what I'm looking for! Or, if not one function that takes the axis of rotation, then three exmaples of pseudocode, one for each function. 87.91.6.33 (talk) 15:28, 31 December 2010 (UTC)[reply]
also, just to be explicit: this is a solid cube (like playing dice), not a Rubik's cube or something else. 87.91.6.33 (talk) 15:33, 31 December 2010 (UTC)[reply]
So, you want to rotate the whole cube. You have a 3-dimensional array. I will use computer-based arrays since you are referring to pseudocode. The old array looks like {{{1,2},{3,4}},{{5,6},{7,8}}}. Index 0,0,0 is 1. Index 0,0,1 is 2. index 0,1,0 is 3. Index 0,1,1 is 4... and so on. You want to rotate it so you get {{{5,1},{7,3}},{{6,2},{8,4}}} (as one example of a rotation). As such, the new index 0,0,0 has a 5. That used to be in the old index 1,0,0. So, new(0,0,0) = old(1,0,0). The new index 0,0,1 has a 1. That used to be the old index 0,0,0. So, new(0,0,1) = old(0,0,0). It is very trivial to do this for every index. You do not need a "formula". However, a computer language that allows for advanced list manipulation (like Lisp) will make the process much easier. -- kainaw 15:48, 31 December 2010 (UTC)[reply]
Um, I do need the formula. The formula is exactly what interests me about this whole thing. Even though you say I need to do it by hand for 27 numbers, obviously there is a formula for what I am calculating in my head... could you write it down for me explicitly, i.e. as a pseudocode loop... —Preceding unsigned comment added by 87.91.6.33 (talk) 16:53, 31 December 2010 (UTC)[reply]
Okay I'll bite
Choose a,b,c to be a permutation of 1,2,3
ub =upper bound and ul = lower bound
for every index a and index b and index c
 New Matrix i of index a, j of index b, k of index c =
   Old matrix ub+lb-j of index a, i of index b, k of index c
cheers Dmcq (talk) 22:14, 31 December 2010 (UTC)[reply]
First of all, thank you for taking my request seriously. I migh be able to answer this myself by stepping through your pseudocode, but it's probably faster to just ask you: could you explain in words what happens when you choose a permutation of 1,2,3? Thank you for your response, your time and effort, and taking my request seriously. Oh, and: Happy New Year!!! 87.91.6.33 (talk) 01:57, 1 January 2011 (UTC)[reply]
Considering the array as a 3-D cube which is what I believe you mean with the first two indexes mapping to horizontal axis and the third to up and down then the array is rotated a right angle clockwise round the vertical axis through the centre. Dmcq (talk) 09:32, 1 January 2011 (UTC)[reply]
Okay, so you just decided on the axis of rotation for me, and wrote the code with that in mind? How did you write it? (If I wanted to generalize to rotations about the other two axis...) And also, below, the much-anticipated followup!! —Preceding unsigned comment added by 87.91.6.33 (talk) 09:38, 1 January 2011 (UTC)[reply]
The code doesn't change index c so it is the axis rotated about. The various permutations of 1,2,3 will give six different rotations, either a clockwise or anticlockwise 90° rotation around each axis. There's other possible rotations for instance along an axis between opposite corners but this doesn't give them, you only asked for 90° rotations. Dmcq (talk) 09:51, 1 January 2011 (UTC)[reply]

Question Part 3

And now comes the hard part. Please give me code to rotate the following FOUR dimensional cube:

12
34

and behind it

56
78

and atwixt the cube above is the cube below:

9A
BC

and behind it (atwixt 56/78):

DE
FG

NOTE: I only changed to letters near the end for the sake of "ascii art" - A, B, C, etc is just 10, 11, 12, etc.

The word "atwixt" is the word I'm using for the fourth dimension, like behind or next to or above for the first three dimensions.

So, could someone give me formulas for rotating the 4-dimensional cube as written, about the front-back axis, the up-down axis, the side-to-side axis, and the atwixt-to-atwixt axis.

Hard Part 2

Forget four: please give me the pseudocode for rotating an n-dimensional "cube" array as described above. I would specify which axis, i.e. dimension number 1, 2, 3, 4, ... and the pseudocode should tell me how to apply a 90 degree clockwise rotation on that dimension. This is what I was really getting at throughout my question, but I think my gradual, boil-the-frog approach has the greatest chances of getting me a correct answer! Thank you!! 87.91.6.33 (talk) 09:46, 1 January 2011 (UTC)[reply]

For rotations of 90° where two axis are given and you want to leave the other indexes along the pseudocode above just need extra letters added and the various end indexes unchanged. However note that for 4-D such a rotation is a rotation with a plane as an axis - you have two indexes which don't change. A second independent rotation within the first rotations axis plane could be done at the same time. Dmcq (talk) 09:59, 1 January 2011 (UTC)[reply]
wait, what. I don't understand any of that. where do planes come in, or TWO axis? Doesn't one axis and the words "90 degrees clockwise" define a unique rotation? If it doesn't, could you give a counterexample? Then I'll ask about the rest of your paragraph! (which I very much appreciate). 87.91.6.33 (talk) 10:02, 1 January 2011 (UTC)[reply]
When you rotated your 2-d array everything moved. When you rotated your 3d array one of the indexes in the new matrix was the sane as in the old one, it defined a line with increasing values of the 3rd index going up the line. In 4D two of the indexes would be the same if you used the same pseudocode. The two unchanged indexes define a 2d plane. So the rotation is about a plane, not a line. You can rotate the 2D plane the first rotation is about - so one can do two independent rotations at the same time each about an axis formed by the plane of the other rotation. Dmcq (talk) 10:53, 1 January 2011 (UTC)[reply]
In fact on the tesseract page at the top it shows a simple rotation and halfway down it shows a double rotation. Not all that easy to see but nice to look at. Dmcq (talk)
To illustrate what Dmcq is saying, here is your tesseract, dissected to show its 2x2 layers in a 2x2 grid:
1 2
3 4
5 6
7 8
9 A
B C
D E
F G
Here is how it appears after we rotate the first and second co-ordinates through 90 degrees, keeping the third and fourth co-ordinates fixed:
3 1
4 2
7 5
8 6
B 9
C A
F D
G E
Here is how it appears after we instead rotate the third and fourth co-ordinates through 90 degrees, keeping the first and second co-ordinates fixed:
9 A
B C
1 2
3 4
D E
F G
5 6
7 8
And here is how it appears after we do both of these rotations at the same time:
B 9
C A
3 1
4 2
F D
G E
7 5
8 6
Gandalf61 (talk) 14:28, 1 January 2011 (UTC)[reply]
Thanks guys!!! I'm getting my head around the answers. Meanwhile: Gandalf, is there a transformation ("rotation") you could apply to your Grid that would cause "1234" to be rotated so that 1 is in upper-left grid square (which starts with 1234), 2 goes to upper right (which had held "5678"), 3 to lower-left, 4 to lower-right? I don't honestly know what part of these grid locations the numbers should go into, or what should happen to the other numbers. It just seems to make sense for me that there should be a way to "rotate" the dimensions so that 1234, move to the outer dimension... Is there such a "rotation"? What is the complete result? Thanks! 87.91.6.33 (talk) 22:28, 2 January 2011 (UTC)[reply]
You can rotate it to this:
1 5
9 D
2 6
A E
3 7
B F
4 8
C G
but you can't get 1,2,3,4 to the far corners, they'd be too far from each other. If you express the numbers as binary starting from 0 it becomes more obvious, so 7 for instance is 0111. Plus there is an orientation constraint. Dmcq (talk) 22:58, 2 January 2011 (UTC)[reply]
Indeed. Note that this transformation swaps the first and third co-ordinates and also swaps the second and fourth co-ordinates. So it is the result of reflections in two hyper-planes, and is therefore a rotation. And we can see that it is a rotation of order 2 - if you do the rotation twice, you get back to the starting position. The two hyper-planes intersect in the fixed plane of the rotation, which passes through the cells labelled 1, 6, B, G. Gandalf61 (talk) 09:25, 3 January 2011 (UTC)[reply]

You will enjoy learning the J (programming language). Consider this:

   i. 2 2 2 2
 0  1
 2  3

 4  5
 6  7 


 8  9
10 11

12 13
14 15
   |."1 i. 2 2 2 2
 1  0
 3  2

 5  4
 7  6


 9  8
11 10

13 12
15 14
   |."2 i. 2 2 2 2
 2  3
 0  1

 6  7
 4  5


10 11
 8  9

14 15
12 13
   |."3 i. 2 2 2 2
 4  5
 6  7

 0  1
 2  3


12 13
14 15

 8  9
10 11
   |."4 i. 2 2 2 2
 8  9
10 11

12 13
14 15


 0  1
 2  3

 4  5
 6  7

Bo Jacoby (talk) 17:02, 1 January 2011 (UTC).[reply]

Number of possible letters games

How many unique letters games are possible? --Omniintelligentia (talk) 10:40, 31 December 2010 (UTC)[reply]

It would be better if you just asked the question directly, rather than send us to a web site where we try to determine what you mean. As best as I can figure, you are asking this:
How many combinations of 9 letters are possible, where:
1) Repeats are allowed.
2) Each combo must have at least 4 consonants and 3 vowels.
I assume they mean that AEIOU are the 5 vowels and the remaining 21 letters are consonants. So, this gives us these 3 possibilities:
A) 3 vowels, 6 consonants: Chances are 53 × 216
B) 4 vowels, 5 consonants: Chances are 54 × 215
C) 5 vowels, 4 consonants: Chances are 55 × 214
Just add those together to get the final answer. StuRat (talk) 15:55, 31 December 2010 (UTC)[reply]
That's wrong, StuRat. You have to consider the order of the letters. Eg. in the first case the 3 vowels and 6 consonants can be in any order, which would mean 53·126· possibilities. – b_jonas 18:10, 1 January 2011 (UTC)[reply]
That depends on what you mean by "unique". Dbfirs 21:40, 2 January 2011 (UTC)[reply]

Nature of SL(2,F5)

1. How can one prove that the subgroup of SL(2,F5) of order 24 is normal in SL(2,F5)?

2. Is f: SL(2,F5)/{+/- I} --> A5 defined by mapping g/{+/-I} (where g is an element in SL(2,F5)) to gK/{+/-I} a valid isomorphism?

3. Would I be right in thinking that there are no subgroups of SL(2,F5) isomorphic to A5?

Thanks! —Preceding unsigned comment added by 131.111.222.12 (talk) 13:23, 31 December 2010 (UTC)[reply]

ii

Why, when you take the imaginary unit i and take it to the power of itself, you get approximately 0.2077, or something to that effect? 75.73.225.224 (talk) 14:54, 31 December 2010 (UTC)[reply]

ii is an example at Exponentiation#Computing complex powers. The value you have in mind corresponds to k = 0 there: e−π/2 = 0.20787957635... PrimeHunter (talk) 15:14, 31 December 2010 (UTC)[reply]
so . Proof that follows directly from the identity for x=π/2 --Omniintelligentia (talk) 16:31, 31 December 2010 (UTC)[reply]
That's one solution. The real answer is multi-valued because
where k is a whole number. So, in fact,
where n is a whole number. Take a look at Branch point. Fly by Night (talk) 20:19, 31 December 2010 (UTC)[reply]
Fascinating. I just asked because that's what my calculator said, but then again, the answer to 78-94 is not "Low battery". 75.73.225.224 (talk) 21:21, 31 December 2010 (UTC)[reply]
You can't trust your calculator. Ask it what sin–1(0) is and it'll return zero. This is because it gives you the principal value. But sin–1(x) is another multi-valued function because sin(πn) = 0 for any whole number n. This means that sin–1(x) is multi-valued:
All the best! Fly by Night (talk) 23:54, 31 December 2010 (UTC)[reply]
I think that sin in the calculator refers to arcsin which is defined as the unique solution to sin(x)=0 on interval of So with such restriction, the calculator is correct, however since we are talking about complex numbers here, you are right about the multivalued inverse sin. (Igny (talk) 01:42, 1 January 2011 (UTC))[reply]
To be useful, a calculator is supposed to give you answers, even if they're not entirely correct, instead of riddles and excuses. That's why a simple four-banger calculator (that cannot handle values greater than 108), when you enter an operation that would overflow, signals an error but also gives you the correct value divided by 108. – b_jonas 18:05, 1 January 2011 (UTC)[reply]

Behaviour of a function similar to a periodic function

Suppose a is a complex number with |a| > 1. Show that any analytic function f on with must be constant, but that there is a non-constant meromorphic function f on with f(az) = f(z) .

The first approach I can see is to use something like the identity principle or principle of isolated zeros - everything bunches up at zero as f(z)=f(z/a), but sadly the function is not defined at the origin so it isn't that simple.

My second thought was to use something like the logarithm to change the periodicity f(z)=f(az) to something of the form g(z)=g(z+b), where I have some more useful theorems for this situation. Could anyone suggest anything? And hopefully once I've come up with a solution to the first part, an example for the second may present itself. Thankyou! Estrenostre (talk) 21:57, 31 December 2010 (UTC)[reply]

Since you only ask for suggestions, I'm only going to do some prodding: for the first part, you've thought about theorems which require entire functions; what must f do in order to not be entire? In particular, if f is not entire, what must be true of values near the origin, and what implications does this have for its holomorphicity a bounded distance from the origin? While this won't solve the second part, it should give you an intuition for why allowing meromorphicity instead is helpful. Invrnc (talk) 06:59, 1 January 2011 (UTC)[reply]
For the second part, you may find a review of elliptic functions inspiring. –Henning Makholm (talk) 15:12, 1 January 2011 (UTC)[reply]
But can we get use out of the concept of entirety when we've punctured the plane at the origin? The two ways to get around the issue I can see are either to ignore the missing point at the origin (but I'm not sure this is valid; we could take something like 1/z and cause some problems I expect) or to 'define the function at the origin' and then work in the whole complex plane. I've never really seen 'entire' except in all of C so I'm not sure what goes and what doesn't sorry! Estrenostre (talk) 03:18, 2 January 2011 (UTC)[reply]
No, as you note, the function isn't entire; that is, it's not continuous at the origin. But when it comes to analytic functions, discontinuities only come in a few flavors. You might think about the implications of each of these cases separately.--71.175.63.136 (talk) 07:49, 2 January 2011 (UTC)[reply]

January 1

Graph Theory

I was solving problems from a Graph theory text book and came across this problem: (1) Prove that removing opposite corner squares from an 8 by 8 checkerboard leaves a subboard that cannot be partitioned into 1 by 2 and 2 by 1 rectangles. (I assume the problem asks for removing only 1 pair of corner squares). (2) Using the same argument, make a general statement about all bipartite graphs. Can someone help me with this please. Thanks -Shahab (talk) 14:29, 1 January 2011 (UTC)[reply]

Explicitly making this a question about a checkerboard (rather than an arbitrary 2n by 2n grid) actually makes it easier, since the checkerboard comes pre-equipped with a helpful colouring. Algebraist 14:33, 1 January 2011 (UTC)[reply]
I keep thinking of Ike somehow... --Stephan Schulz (talk) 14:42, 1 January 2011 (UTC)[reply]
You think he saw everything as black and white? ;-) Dmcq (talk) 15:22, 1 January 2011 (UTC)[reply]
To expand on Algebraist's comments:
1) Opposite corners come in the same color on an 8×8 checkerboard, and initially there are the same number of black squares as white (32 each).
2) Therefore, removing one opposite set leaves you with a color imbalance (30 white squares and 32 black or vice-versa).
3) Since removing a 1×2 rectangle will always remove both a black and a white square, that will maintain the color balance. So, after one rectangle is removed, a full checkerboard would have 31 black squares and 31 whites, for example.
4) If you do the math on removing 1×2 squares from a checkerboard with one pair of opposite corners removed, you find you eventualy end up with only two black squares or two whites, which can't posibly form a rectangle, due to the way the board is laid out.
OK, so how do we generalize this ?
A) The general rule appears to be that you can't remove balanced color rectangles (or squares) from a larger imbalanced-color square (or rectangle), and end up with nothing.
B) Note that this doesn't necessarily mean that you always can remove balanced color rectangles (or squares) from a larger balanced-color square (or rectangle), such as removing 6×1 rectangles from a chessboard. At a minimum, the larger product must be a multiple of the smaller product. So, in our example, the 62 squares we had left did divide evenly by the 2 squares we removed at a time, while it would not divide evenly by the 6 squares in a 6×1 removal scheme. Of course, being a multiple, alone, isn't sufficient to ensure that the configuration allows them to be removed exactly. There's the color imbalance issue, but also the problem of physically fitting the removal patches on the board so they don't overlap or fall off an edge.
C) Think of which rectangular or square boards have opposite corners the same color (it helps to have a checkerboard in front of you when you do this, so here's one: chessboard). Now, can you come up with a formula to describe the relationship between the X and Y directions that gives you opposite corners the same color ? Hint: It's more complex than just X=Y.
D) Similarly, think of squares or rectangles that can be removed which have "balanced color". Is there any square or rectangle that has more blacks than white or vice-versa ? (And, if so, is it always imbalanced in the same direction, or not ?).
StuRat (talk) 16:11, 1 January 2011 (UTC)[reply]

January 2

Countable union of countable sets cannot have cardinality

Could anyone direct me to a proof, using Zermelo-Fraenkel axioms, that a countable union of countable sets cannot have cardinality ? I've searched online but can't manage to track one down! Thankyou :) Simba31415 (talk) 03:24, 2 January 2011 (UTC)[reply]

Suppose ω2 (the smallest ordinal of size ) is a countable union of countable sets. If we had choice, we could simultaneously count all the sets to get an injection from ω2 to ω×ω, which of course is impossible, since ω×ω is countable. Without choice, we can't do that, but what we do have is explicit well-orders for all the sets (since they're subsets of the well-ordered set ω2). The Mostowski collapse lemma gives explicit bijections from these well-ordered sets to the corresponding ordinals. Since the sets are countable, these are countable ordinals, and so we have a injection from ω2 to ω×ω1, which is impossible since the latter set has cardinality . Algebraist 04:31, 2 January 2011 (UTC)[reply]

Method of Characteristics

I am trying, without success, to understand the method of characteristics for solving PDEs. I am working with the following example.

"Consider with . The initial curve B is the x axis (x=t, y=0) and the initial data along b is h(t)=cosh(t). The characteristics satisfy

and , and ." (There is more to the problem but this should be sufficient for my question.)

What I cannot understand is where the initial conditions for x(0) and y(0) come from. I have looked through my notes and other examples countless times but just cannot see it. I have every confidence I am being incredibly dim but could someone please enlighten me? Thank you. asyndeton talk 20:16, 2 January 2011 (UTC)[reply]

The initial curve B is the x axis (x=t, y=0)... :) Hence, your initial conditions. 86.164.58.246 (talk) 12:07, 3 January 2011 (UTC)[reply]

January 3

Percentages and Probability

Let's say you hold an election and the sample size is s1. You achieve an approval rating of A%. Then, you analyse the results from randomly selected subsets of the electorate. Assume that you randomly selected s2 people and they tell you how they actually voted.

  • What is the probability of getting an approval rating of A% in this smaller sub-sample?
  • What is the probability of the approval rating being within ±d% of the original approval rating?

Fly by Night (talk) 00:19, 3 January 2011 (UTC)[reply]

If you want an exact result, you need to sum the values of the Hypergeometric distribution. Note that if and are coprime and , then the probability of having exactly A is 0.
For an approximation, you can use the normal distribution with and . -- Meni Rosenfeld (talk) 09:25, 3 January 2011 (UTC)[reply]
Thanks for that Meni. Fly by Night (talk) 15:13, 3 January 2011 (UTC)[reply]