1
   

Graph Theory Problem

 
 
Reply Thu 27 Oct, 2005 06:20 am
My team is working on a computer algorithm for this problem. Does anyone know if this is a classic graph theory problem or where I might find some solutions for this...

We would like to write an algorithm that allows a manager to rank a product by asking him/her which product is better as compared to another product. However, the algorithm should minimize the number of comparison questions that are presented to the manager.

For exmaple, if a manager has 5 products represented by A, B, C, D, E, we would like to know which product is the best, which is 2nd best, which is 3rd best, and so on.

The algorithm should gather information from the manager by asking him/her questions in a sequential fashion that are in the form of...

Is A better than B?
Is B better than C?
Is C better than D?
Is D better than E?

However, the problem is that the algorithm should be able to infer the answer to some questions based on the answers give to previous questions. For example, if the manager answers that....

A is better than B (which be represented by A > B) and
B is better than C (which be represented by B > C)

the algorithm should infere that A is better than C, and therefore not ask the manager to answer the question "Is A better than C".

This algorithm should work for N number of products.

thanks for any insight.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 461 • Replies: 5
No top replies

 
stuh505
 
  1  
Reply Thu 27 Oct, 2005 06:57 am
Just write a recursive loop to check this
0 Replies
 
Thomas
 
  1  
Reply Thu 27 Oct, 2005 07:32 am
Michwell: What you're looking for is a topological sort. If your computer is running a Unix or Linux system, you can invoke its tsort command and solve the problem without any programming of your own at all.
0 Replies
 
raprap
 
  1  
Reply Thu 27 Oct, 2005 08:30 am
This is a simple ranking problem using a directed diagraphs and Markovian matrix power

First take the managers responses to the yes/no ranking problems and create a directed diagraph,

So if A->B->C->D->E is the
Let a yes be a 1 and no a 0 and create the following matrix

__A_B_C_D_E
A|0_1_0_0_0
B|0_0_1_0_0
C|0_0_0_1_0
D|0_0_0_0_1
E|0_0_0_0_0

The row suns of this matrix to determine product standing. In the first case all products are equal (except for E); however, if this matrix is squared from the row sums it becomes apparent that A, B, C are superior. Cubed A and B are superior. To the fourth power A is superior.

This process can also be expanded if you are looking for features, Say A is better than B for reason A, but B is better than A for another. The matrix can be created and multiplied by itself to determine the products ranking from the sum of the rows of the power matrix.

BTW I've seen this process used to handicap race horses.

Rap
0 Replies
 
raprap
 
  1  
Reply Thu 27 Oct, 2005 08:30 am
This is a simple ranking problem using a directed diagraphs and Markovian matrix power

First take the managers responses to the yes/no ranking problems and create a directed diagraph,

So if A->B->C->D->E is the
Let a yes be a 1 and no a 0 and create the following matrix

__A_B_C_D_E
A|0_1_0_0_0
B|0_0_1_0_0
C|0_0_0_1_0
D|0_0_0_0_1
E|0_0_0_0_0

The row suns of this matrix to determine product standing. In the first case all products are equal (except for E); however, if this matrix is squared from the row sums it becomes apparent that A, B, C are superior. Cubed A and B are superior. To the fourth power A is superior.

This process can also be expanded if you are looking for features, Say A is better than B for reason A, but B is better than A for another. The matrix can be created and multiplied by itself to determine the products ranking from the sum of the rows of the power matrix.

BTW I've seen this process used to handicap race horses.

Rap
0 Replies
 
stuh505
 
  1  
Reply Thu 27 Oct, 2005 09:27 am
i don't understand what you're talking about with the powers, but if you simply sum each row while weighting the column values by the inverse column index, this number will indicate the relative order.

how does this relate to Markov?
0 Replies
 
 

Related Topics

Evolution 101 - Discussion by gungasnake
Typing Equations on a PC - Discussion by Brandon9000
The Future of Artificial Intelligence - Discussion by Brandon9000
The well known Mind vs Brain. - Discussion by crayon851
Scientists Offer Proof of 'Dark Matter' - Discussion by oralloy
Blue Saturn - Discussion by oralloy
Bald Eagle-DDT Myth Still Flying High - Discussion by gungasnake
DDT: A Weapon of Mass Survival - Discussion by gungasnake
 
  1. Forums
  2. » Graph Theory Problem
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 06/21/2025 at 10:02:11