Fingerprint generation

There is a group of people [say, 1874 of them] representing different companies [say, 236 of them] in the world. My task is to determine in which company each person works best. The trick is that I can’t just ask the person “Where do you work” and get an answer, but I have a questionnaire with a number of questions (say 290 questions) and the exact answers that I should expect from the employees of each company. Some companies may have the same answers, so in the end, even if I can’t determine exactly which company the person works for, I would have to narrow it down and say that he / she should work in one of these companies.

Using multi-valued maps and some other data structures, I went on to identify all the companies that I can identify with one question [query]. Using these queries to represent the root of the data tree structure, I need to build the rest of the tree using other queries / questions, like branches, to identify the rest.

Any tips / help / suggestion?

+5
source share
3 answers

, , , , / , . , btilly.

( ) - -, , , , trie - .

, : , , , , - / ; . http://en.wikipedia.org/wiki/Trie#Compressing_tries .


, :

, - ( - , ; - - Python Python set, -), , .

, , , , - - . - , -. 1) , 2) , 3) .

1), -.
2), / - .
3), , , , .

, , 580 - ( , 2 ), .

+2

, . , . , , . node . yes (), , "" , node. , , , .

:

, , , , .

, "" " ?", .

, "" . . " ?", "" "" "". , , .

node "". , . " ?" .

:

Ask: "Are you a mammal?"
 |
 +- yes -> Ask: "Do you have stripes?"
 |          |
 |          +- yes -> Guess: Zebra
 |          |
 |          +- no --> Guess: Bear
 |
 +- no --> Ask: "Do you like to smile?"
            |
            +- yes -> Guess: Crocodile
            |
            +- no --> Guess: Salmon
+2

Creating an expert system using Prolog is one possible solution. Have you considered this option?

In this way, you can even add some Natural Language Processing features to facilitate user interaction.

0
source

All Articles