Foxmaths! 2.0

September 23, 2008

A Different Sort Of Pi

Filed under: Maths — Tags: , , — Fox @ 6:17 pm

So, in the previous post, I posed a question and claimed no answer. But a very interesting answer it turned out to be.

Consider the sequence defined by a_n = Sign( Sin(n) ) for n = 1, 2, 3, 4, … We start at n = 1, to avoid the fact that Sin(0) = 0, which technically has no sign. Computing the first terms of this sequence

1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, …

Which is nearly a complete mess. However, looking through said mess, you may notice a pattern. The 1’s and -1’s always come in groups of 3 or 4. If we go through and group like terms and count, we get the following sequence.

3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, …

Now this is increasingly interesting. Looking at the terms above, observe that we have 27 threes and 4 fours. Taking the average,

\frac{ 27*3 + 4*4 }{27 + 4} = \frac{97}{31} \approx 3.12903

Intrigued yet? Taking the first 1000 terms of the sign sequence, we get 273 threes and 45 fours, for an average of 3.141509434.

So it seems that the running average of ‘likeness-counts’, I guess we’ll call them, converges to pi.

Which is neat. And, at least after the fact, certainly seems intuitive. Though I wouldn’t mind an explanation of this that minimizes handwaving. Hmmm.

Favorite Function

Filed under: Maths — Tags: , , , — Fox @ 4:06 pm

The other day, I asked my roommate, also a mathematician by trade, if you could pick a function to know, to understand the ins and outs of, to see all the subtleties of its structure and behavior, what function would you pick?

He quickly answered, the Riemann Zeta Function. Especially, says he, if he could understand the connection to the Riemann Hypothesis.

Certainly an interesting answer – the Riemann Hypothesis is one of the biggest, or at least the most famous, popular math problems in the world today.

Which, in my opinion makes that answer rather dull and predictable. Far more interesting in my mind are the complex behaviors of well known, elementary, functions.

For example, consider 2^n , for integer values of n. This gives, in order, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, …

Specifically, I’d like to look at two things. First, look at the first digit of each number. 1, 2, 4, 8, 1, 3, 6, 1, 2, 5, 1, 2, 4, 8, 1, 3, 6. Clearly, we can separate this out into groups of {1, 2, 4, 8}, {1, 3, 6}, {1, 2, 5}, and the pattern looks to be some arrangement of those three groups, repeated to infinity.

The obvious question then is, does this pattern continue indefinitely? Clearly not, as 2^46 = 70368744177664 , giving us a 7 and breaking the chain. That being so, does this establish a new pattern? When is that one broken? Is there a pattern to when apparent patterns are violated? I am intrigued.

Bonus question, what is the lowest power of 2 such that all digits 1 – 9 will have been first digits before that point? For the digits 1 – 7, the answer as shown above is 46. And what if we extend to the having the numbers 10 – 99 as the first two digits? And so on and so on.

Secondly, it’s interesting to me to consider the number of digits. Looking at the number of digits in successive powers of 2, we have 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, …

Perhaps meaningless to you, except maybe for the fact that they go in groups of three and four. Grouping in terms of same number, we have 4, 3, 3, 4, 3, 3, 4, 3, 3, 4. Pairs of 3’s separated by 4’s, another pattern, which will certainly be violated in much the same way as the one previously. But where exactly, why, and how often? There must be a pattern, even if the only description of it is ’size of groups of powers of 2 with same numbers of digits’. But is there something better?

This one is especially interesting to me, because I have a hunch that the answer is directly related to approximations of ln(2) and ln(10).

The last function I’d like you to consider is Sin(n), for whole numbers of n. I won’t give specific values, because they’re effectively meaningless decimals. However, note of course that Sin(x) = 0 when x = n*\pi , for integer values of n. No integer n (except for 0, which we are not considering) will ever be a multiple of pi. However, once n goes from below a multiple of pi to above it, Sin(n) switches sign. Sign switches in this sequence then are associated with how close a given integer is to a multiple of pi. So, it is of interest to me to consider the sequence of signs for Sin(n). This is given by, for n = 1, 2, 3, …

1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, …

Though I think it is perhaps easier to interpret using 0’s for -1’s and 1’s for 1’s.

1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, …

Again, we see a relatively simple pattern that is, ultimately, violated. This is anticipated. As I said, the sequence of sign switches is associated with how close an integer is to a multiple of pi. As pi is irrational, there will be no neat or pattern associating pi with integers in this way. So the pattern of this sequence is tied deeply to the nature of pi.

Which makes me wonder, given the sequence in its full form, what can we determine about pi?

I don’t really have any answers to any of these questions. My point is simply this … there are a whole host of questions and problems out there, all waiting to be discovered and investigated. Even in simple, well known math. You just have to stop for a moment, and think.

And now I must rush to Thermal.

A Guard’s Delima, Answered

Filed under: Maths — Tags: — Fox @ 3:22 pm

In a previous post, I posed this problem.

“There is a prison, with three prisoners. We’ll call them, for your solving-convenience, prisoners A B and C. And it just so happens, by decree, that two of the three prisoners are to be released. Prisoner A, being an inquisitive sort, asks the guard to name one of the two prisoners, not him, who is to be released. The guard refuses, saying that before A was told a name, his probability of being released would be 2/3. However, after knowing the name of someone to be released, A would become one of two people who is to be released, thus reducing his probability of being released to 1/2. The guard is certainly kind hearted, but is he correct?”

And here is, at least, my attempt at an answer, to explain what is wrong with the guard’s analysis, and what the correct analysis of the situation actually is. As Mark CC likes to say, the worst kind of math is no math at all, but I would have to add, it really needs to be the right math as well. More below the fold.
(more…)

Sick

Filed under: Personal — Tags: — Fox @ 3:48 am

Very very sick.

Awful sick.

To sick to do arithmetic.

September 17, 2008

Puzzler: Monty Hall, Call Your Office

Filed under: Maths — Tags: , — Fox @ 4:05 am

I’m trying to get back into the swing of things here. School and work has been absolutely swamping me. And yet, I still feel this desire to write about maths.

Unfortunately, because the only math class I’m taking right now is probability, probability is on the brain. And so, a question that caught my interest from a recent homework assignment.

There is a prison, with three prisoners. We’ll call them, for your solving-convenience, prisoners A B and C. And it just so happens, by decree, that two of the three prisoners are to be released. Prisoner A, being an inquisitive sort, asks the guard to name one of the two prisoners, not him, who is to be released. The guard refuses, saying that before A was told a name, his probability of being released would be 2/3. However, after knowing the name of someone to be released, A would become one of two people who is to be released, thus reducing his probability of being released to 1/2. The guard is certainly kind hearted, but is he correct?

By posting this as a puzzler, answer to follow, I’m hoping to encourage myself to actually write here with some regularity.

September 5, 2008

A Bit On Calculation

Filed under: Maths — Tags: , — Fox @ 9:22 pm

This is not my usual sort of thing, but it struck me as interesting. So here you go.

I’ll skip the underlying probability behind de Mere’s Problem, and instead ask right off, which is larger

1 - {(\frac{5}{6})}^4

or

1 - {(\frac{35}{36})}^{24}

The problem is, without explicitly calculating decimal expansions of anything, how do you determine which of the two is larger?
(more…)

September 2, 2008

Random Doctor Moment

Filed under: Personal — Tags: — Fox @ 9:17 pm

Rose Tyler: Look at you, beaming away like you’re Father Christmas!
The Doctor: Who says I’m not, red-bicycle-when-you-were-twelve?
Rose Tyler: What?

Rubik’s Cube Puzzlers

Filed under: Maths — Tags: , , — Fox @ 1:01 am

I’m currently taking a sort of mini-course on how to solve a Rubik’s cube. Which is all kinds of interesting, but for the moment, I’m really wondering two things.

To begin with, just how scrambled can a cube (traditional, 3×3x3) really be? It of course depends on your definition of scramble. For the purpose of this puzzler though, let’s define, for a given face, the amount of ’scrambled-ness’ as the maximum number of same color squares on that face. The ’scrambled-ness’ of the cube then, is the sum of the scrambledness of the faces. So, a completely solved cube has, on each face, 9 squares of the same color. The total scrambled value for a solved cube then would be 9 + 9 + 9 + 9 + 9 + 9 = 54. The question then would be, what is the minimum achievable scramble-value? For example, the cube I’m looking at now has 3 green squares on the top face, no more than 2 same squares on the front and left face, 4 yellow squares on the front, 4 red squares on the bottom, and 3 blue squares on the right. So it has a scramble-value of 3 + 2 + 2 + 4 + 4 + 3 = 18. And I know I’ve seen scrambled states with no more than 3 same-squares on a given side. So what is the minimum possible scramble-value? This seems to be a very careful application of the pigeon hole principle, just off hand.

In a similar thread, how small can you make the scramble value of all the faces of the cube? As I said, I’ve seen states with each face having no more than 3 same-cubes, which is very likely the minimum, but … proof?

The third thing to consider is a 7×7x7 cube. The thing that is interesting about a 3×3x3 cube is that it has a single solved state. If your cube is solved, you know that every little cube is exactly where it started, with respect to all the other cubes. This is because, due to the small dimension, every single small cube interacts to such a high degree with every other small cube, to make it necessary. However, in higher order cubes, 4×4x4, etc, there are small cubes in the main body that, technically, have more freedom, namely the cubes on a given face that are not along the edge. They only have a single colored face exposed, and thus, technically, could all be rearranged within their face of the main cube, and still yield a ’solved’ cube. So, theoretically, these higher dimensional cubes could have multiple ’solved’ states. But, given the mechanics of how you can twist and permute a given puzzle, how many of these states are actually achievable?

Questions, questions.

Blog at WordPress.com.