?

Log in

Strings of numbers - Hungry? Have some pi [entries|archive|friends|userinfo]
grad students in mathematics

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| MathWorld AMS ]

Strings of numbers [May. 11th, 2006|12:52 pm]
grad students in mathematics

mathgrads

[wannabehasbeen]
Please excuse me, I'm neither a graduate nor a mathmetician, but I am a student. With a problem of sorts.

Possibly an interesting one.

I have a few thousand numbers. They're all muddled up. But the range is only 70 or so: at the moment they range from roughly -35 to +35. In these numbers, there are lots of strings of numbers that repeat. Possibly pretty ones. I'd like to find these repeated strings with a computer. Whats the longest string of numbers that repeats? Whats the most frequently repeated string of four or more numbers? The second most? Why can't excel tell me this? Or can it? What about SSPS?

e.g.

132546352542545351643214435221

If I can shoot aliens in 3D and build a railway from alaska to moscow, whay can't I find out that 254 comes up there twice?

Anyone?
LinkReply

Comments:
From: digana
2006-05-11 10:42 am (UTC)
I don't know about Excel... OpenOffice.Org can probably do it... but what you're asking for is pretty basic and should be available in any sort of program that can manipulate strings. Heck, you can use Standard Template Library C++ classes to do it, and write the code for yourself to give you the statistics that you want. I suppose your question is that you want someone to have already coded this particular problem for you.

Hm... since you want statistics, perhaps you should be using statistical software. Check out GNU R. I'm not familiar with it myself, but I'm sure it has all the capabilities you are looking for. You'll have to look for help from someone other than me on how to use it, though. Read the manuals, then ask around in the mailing lists if you get stuck.
(Reply) (Thread)
[User Picture]From: bookboy
2006-05-11 11:46 am (UTC)

String tokeniser

You need a high-level programming language which incorporates a string tokeniser, such as Perl or Java.
(Reply) (Thread)