matching

Algorithm to match preferred partners into groups of three

What's a good algorithm to solve this problem? I have three groups of people - group A, group B, and group C. There are the same number of people in each group. They each have a list of people in the other groups that they're willing to work with. I want to group all these people together in groups of 3 (one from A, one from B, and one ...

How to get color combination compatible to both Excel and SSRS

Hi, Can any one let me know How to get color combination compatible to both Excel and SSRS Thanks in advance ...

Matching inexact company names in Java

I have a database of companies. My application receives data that references a company by name, but the name may not exactly match the value in the database. I need to match the incoming data to the company it refers to. For instance, my database might contain a company with name "A. B. Widgets & Co Ltd." while my incoming data might re...

How to best match two strings?

Hi, do you know any good algorithms that match two strings and then return a percentage in how many percent those two strings match? And are there some, that work with databases too? ...

How do I do a fuzzy match of company names in MYSQL with PHP for auto-complete?

My users will import through cut and paste a large string that will contain company names. I have an existing and growing MYSQL database of companies names, each with a unique company_id. I want to be able to parse through the string and assign to each of the user-inputed company names a fuzzy match. Right now, just doing a straight-...

RegEx and matching codes right to left

Stuggling a little bit with the RegEx, I've got 4 codes in a string CODE4:CODE3:CODE2:CODE1 each code is optional apart from CODE1 So I could have ab:bc:de:fg or bc::fg of ab:::fg In each case of the above CODE1 = fg dnd for the dear life of me I can't work out the RegEX Would be easy to do as a standard string parse, but unfor...

SQL Precedence Matching

Hi All, I'm trying to do precedence matching on a table within a stored procedure. The requirements are a bit tricky to explain, but hopefully this will make sense. Let's say we have a table called books, with id, author, title, date, and pages fields. We also have a stored procedure that will match a query with ONE row in the table. ...

String matching

Hello, Let me explain the problem: Let's say I have a library, the library contains many books, each book contains chapters, each chapter contains string (and the string begins and ends with dot "."). The sequence again, library -> book -> chapter -> string. I extracted the strings from books, let's call them "books strings". I have a...

How do I find similar column names using linq?

Hi I am trying to learn Linq, so I am not sure if this can be done. I am working on an import project So I decided to import data using DataSets. My challenge at this point: Having 2 DataTables with different schema, one of which contains my destination schema, and the other one my source schema. What I need to do is perform some...

2/3D Geometry: How to optimally align two lists of points

The problem I am trying to solve is as follows: Given two lists of equal length containing points, find a mapping that minimizes the sum of distances between pairs. The reason I'm trying to do this is to find the closest points in two polygons for a genetic algorithm I'm building, that would ideally line up two genes based on the output ...

Algorithm for matching lists of integers

For each day we have approximately 50,000 instances of a data structure (this could eventually grow to be much larger) that encapsulate the following: DateTime AsOfDate; int key; List<int> values; // list of distinct integers This is probably not relevant but the list values is a list of distinct integers with the property that for a ...

Finding the most optimal 2x2 matches between heterogeneous collections

I've got a problem: I have a class A and a class B, whose instance objects can be inspected programatically to be similar or different from one another in varying amounts. For instance they may match perfectly, or be quite different (even though the classes are different, they can still represent the same information and be scored iden...

n-dimensional matching algorithm

Hi all, Looking for some advice here. Does anyone know a good place to start looking into matching algorithm in a n-dimensional space. For example, any dating site out there must be using some sort of algorithm to match 2 people. What I have read is that we can map characteristics of a person in a n-dimensional array with a point syst...

Match between column values returned from LIKE constraint in SQL

Hi! I am trying to match column values returned, but values are returned as a result of pattern matching: select app.employees.id, app.employees.name, app.employees.current_bp, app.designation.designation from app.employees, app.designation where app.employees.id like 'khsn?' = app.designation.desig_id like 'khsn?'; As you can see,...

php & mysql subscribe to search/matching queries

I have a real estate website that has several categories. And i want the users to be able to subscribe via email to a certain list of offers, they can either be offers from a category ... or offers from a search list. How can i store they're subscription the best way in mysql ... and also how do i go about and do the notification. The ...

Compiling C++ Code With Boost's regex_match

Given this code: #include <iostream> #include <vector> #include <fstream> #include <sstream> #include <boost/regex.hpp> using namespace std; using namespace boost; int main ( int arg_count, char *arg_vec[] ) { if (arg_count !=2 ) { cerr << "expected one argument" << endl; return EXIT_FAILURE; } string ...

matching text in quotes (newbie)

Hi, I'm getting totally lost in shell programming, mainly because every site I use offers different tool to do pattern matching. So my question is what tool to use to do simple pattern matching in piped stream. context: I have named.conf file, and i need all zones names in a simple file for further processing. So I do ~$ cat named.loca...

C#: finding instances of a string within a string

Hi, Suppose I had the string "1 AND 2 AND 3 OR 4", and want to create an array of strings that contains all substrings "AND" or "OR", in order, found within the string. So the above string would return a string array of {"AND", "AND", "OR"}. What would be a smart way of writing that? EDIT: Using C# 2.0+, string rule = "1 AND 2 AND 3...

Bipartite Matching

How can I implement a bipartite matching algorithm (probably based on a max-flow algorithm) in C or C++ ? To be specific, I have this input in a file: (1,3) (1,5) (2,5) (M,F) --> where M represents id of MALE and F is id of FEMALE. I need to find the maximum number of matches and show matched couples. Like: matches: 1&3 , 2&5 I h...

Matching algorithm

Odd question here not really code but logic,hope its ok to post it here,here it is I have a data structure that can be thought of as a graph. Each node can support many links but is limited to a value for each node. All links are bidirectional. and each link has a cost. the cost depends on euclidian difference between the nodes the mini...