| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

11-07-04, 22:08
|
|
Registered User
|
|
Join Date: Nov 2004
Location: Portugal
Posts: 2
|
|
|
Finding numbers
|
|
For you pros out there, maybe what I'm going to ask is just a silly question (it must be - I know, I know...), but that one is the sole reason I'm here. And I must warn the generous ones who might help me that I'm a complete moron concerning math, software, statistics and db issues (among other things, which I wont tell so that you don't laugh too loud...)
I want to find a software that allows me to search for numbers in this particular situation: given several number sequences, I want to know how many sequences have the same numbers.
Also, I would like to be able to search for sequences inside the sequences. Let me be clear: if the sequences are 10 numbers long, I want to start searching one number, than 2 and so on.
My intuition, and my ignorance, both tell me this is something very simple from a programming point of view, and maybe Excel or Access or another well known software might do the trick, but I'm too stupid to figure it out (or just to lazy, which ends to be the same).
So, if a compassion soul could help me, the angels will ring their bells (or whatever they do for the occasion).
Thank you very much in advance.
(pardon my English, I'm Portuguese)
|
Last edited by Valupi; 11-07-04 at 22:12.
|

11-08-04, 00:36
|
|
Resident Curmudgeon
|
|
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
|
|
Is basic pattern matching what you want to do? It would help me a lot to help you if I understood a real world example of what you are trying to do, because I don't clearly understand that yet.
If you want to do basic pattern matching, there are literally thousands of common variations. Depending on what kind of match you are trying to find, the method you use to search for patterns and the way you compare how closely given patterns match each other varies immensely.
This is not a small field of study, there are many people who've devoted significant parts of their careers to finding ways to find better pattern matches.
-PatP
|
|

11-08-04, 09:31
|
|
Registered User
|
|
Join Date: Nov 2004
Location: Portugal
Posts: 2
|
|
|
|
Thank you very much, PatP. I will try to be the most clear.
Take this sequences for example:
a) 2, 24, 43, 44, 78, 104, 203, 539
b) 4, 12, 43, 56, 78, 99, 124, 266
c) 6, 15, 33, 52, 78, 86, 100, 376
d) 2, 10, 43, 50, 78, 190, 245, 666
Now, I want to find the one where is this sequence: 2, 43, 78, 666
I want to be able to identify it, and also find which ones have some of the numbers I'm looking for, although not all of them. For example, I would also want to know how many and which ones have the number 2, and the sequence 2, 78, etc.
Sorry, I can't use the technical words from this field of knowledge to explain myself better, so I don't know if this is basic pattern matching or some other thing. (of course, if I could use them I would not be here in the first place, since I would know all about this apparently - for me - very basic question...)
|
|

12-28-04, 16:44
|
|
Registered User
|
|
Join Date: Jan 2002
Location: Bay Area
Posts: 473
|
|
Searching comma-delimited strings of integers (copied from your examples) for numbers that occur in a set of integers can be done with Excel.
I created an Excel function that parses the string into an array of integers, and another array stores the target set of integers, which should be in cells in row #1 starting in column B. The function compares the two arrays and displays targets found in a comma-delimited string. The function can be copied to cells below as needed.
You will see "Application.Volitile" in the code; this causes the function to recalculate whenever the worksheet calculates. You will see the results updated whenever you make a change to the numbers that would give different results.
I used Excel 2000 for the attached solution. This works for me and I hope it works for you. The function's VBA code can be viewed by pressing Alt+F11 after the workbook has been opened.
Jerry
|
|

12-28-04, 16:49
|
|
Purveyor of Discontent
|
|
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
|
|
I have a similar function in access that operates on a nearly identicle premise if you want that too. The code is obviously VERY similar as they're both VBA.
How's your handle on arrays?
|
|

12-28-04, 17:04
|
|
Registered User
|
|
Join Date: Aug 2003
Location: West
Posts: 98
|
|
Is this a school assignment?
|
|

12-28-04, 17:12
|
|
Purveyor of Discontent
|
|
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
|
|
Quote:
|
Originally Posted by Ida Hoe
Is this a school assignment?
|
Most of the posts outside the MSSQL and Oracle forums are 
|
|

12-28-04, 17:33
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
we hardly ever see schoolwork assignments in the mysql forum either
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|