ALGORITHM OF PACKING ITEMS INTO PATH-GRAPH WITH CONSTRAINTS ON ADJACENT NODES
Description
A path-graph is a graph that can be arranged in a linear sequence that two nodes are adjacent if they are consecutive in a sequence, nonadjacent otherwise [1]. In this paper, we will think of the situation that there is a path-graph of nodes and a set of positive numbers which are less than a constant number . Every node in the graph will be packed with a number in the set satisfying following constraints. First, sum of numbers in two adjacent nodes must be less than . And first and last node has number limits that will be packed in each nodes. Then we want to check if the set of numbers is feasible to the path-graph or not. We will call the positive numbers ‘items’. The classic method of checking all possible cases can be done. But it takes too much computing time in the worst case. Algorithm we introduce reduces the complexity from to .
Files
Files
(99.7 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:e0673dd7385fb856be51814303b30641
|
99.7 kB | Download |