My next programming project
Feb. 27th, 2004 01:22 amI've decided it's time to get a real program written. This will get the virgin-coder stink off me.
Just as it's been too long since I spoke French, I haven't played with math in way too long. The last thing that caught my eye was a couple years ago, after finding the answer to a riddle Robert Morris presented to Cliff Stohl in Cuckoo's Egg:
Provide the next member of this series: 1, 11, 21, 1211, 111221, ...
The answer is 312211. How? Each new element is just a translation of the last element. We started with 1, which we can describe as a single one or one-one. 11. The third element is then two ones, or 21. Fourth is one two and one one.
I was bored one day at Genuity and I figured out the series for several iterations. I came to some simple conclusions:
I've decided I want to make a program that will spit out finite iterations of this series. At first I'd make the program ask for a starter number (with a default of 1) and then ask for which chunks you want to see in the series. This would prevent a program that doesn't know when to stop. A later version of the program would let you zoom in on sections of one element and see what it came from on the previous element.
I realize this is geek silliness. I'm still fascinated by the series. I want to get a few big stacks and compare changes. What if I use 25 instead of 1? (1215, 11121115, 31123115, 1321132115... notice how the five starts to look like a chaperone?)
Now that I've declared my intentions, I realize I'm also looking at my own documentation. This will be a good undertaking for my brain. Anyone else intrigued?
For the rest of you, it's Friday. Enjoy a warm weekend (which is what Boston is supposed to have coming) and hope my kitty won't try to steal your seat. I get up to ditch my drink and come back to find Nisa totally hogging my seat for its heat.
Just as it's been too long since I spoke French, I haven't played with math in way too long. The last thing that caught my eye was a couple years ago, after finding the answer to a riddle Robert Morris presented to Cliff Stohl in Cuckoo's Egg:
Provide the next member of this series: 1, 11, 21, 1211, 111221, ...
The answer is 312211. How? Each new element is just a translation of the last element. We started with 1, which we can describe as a single one or one-one. 11. The third element is then two ones, or 21. Fourth is one two and one one.
I was bored one day at Genuity and I figured out the series for several iterations. I came to some simple conclusions:
- No matter which numeric digit you make the first element (say, 4 instead of 1), the highest digit beside the prime element's value will be 3;
- You get exponential growth in the number of digits in an element with interesting plateaus;
- It gets really hard to keep track of what you're doing when you use pen and paper;
- Genuity was a silly company with a great music server. The day that server died was the day I decided to look for another job.
I've decided I want to make a program that will spit out finite iterations of this series. At first I'd make the program ask for a starter number (with a default of 1) and then ask for which chunks you want to see in the series. This would prevent a program that doesn't know when to stop. A later version of the program would let you zoom in on sections of one element and see what it came from on the previous element.
I realize this is geek silliness. I'm still fascinated by the series. I want to get a few big stacks and compare changes. What if I use 25 instead of 1? (1215, 11121115, 31123115, 1321132115... notice how the five starts to look like a chaperone?)
Now that I've declared my intentions, I realize I'm also looking at my own documentation. This will be a good undertaking for my brain. Anyone else intrigued?
For the rest of you, it's Friday. Enjoy a warm weekend (which is what Boston is supposed to have coming) and hope my kitty won't try to steal your seat. I get up to ditch my drink and come back to find Nisa totally hogging my seat for its heat.