Real life applications
1. Dominating sets in graph
Let's take an example, where we want to open up a departmental store. So, our goal should be opening minimum number of stores that would capture maximum area. We will take help of graphs here and convert this into a question of dominating sets in graph.
Here our set of vertex is V={V1, V2, V3, V4, V5}Let us first consider a candidate for dominating set as S1={V1, V2, V3}. We can observe that every element of set V is adjacent with at least one element of S1. So, is S1 our final dominating set? No, because it is not unique.
Let us consider another candidate for dominating set S2={V1, V2}. If we compare set V and S2, then it is observed that elements of set V are also adjacent with elements of set S2. So we will consider set S2 as our option for dominating set as it has the minimum number of elements possible in a dominating set. Remember, we had to find a solution which would give maximum output with minimum resources.
Similarly, dominating sets in graphs can be used in other applications such as:
School bus routing - As it is not practically possible to stop the bus for every student, instead we can use vertex of the graphs as bus stops and recognize minimum number of stops, which would be convenient for maximum number of people.
2. Vertex/Edge Coloring
We are taking an example here, where we want to schedule exams for Computer Science course with following course numbers: 1007, 3137, 3157, 3203, 3261, 4115, 4118, 4156
Consider that there are no students who have the following courses in common:
1007-3137
1007-3157, 3137-3157
1007-3203
1007-3261, 3137-3261, 3203-3261
1007-4115, 3137-4115, 3203-4115, 3261-4115
1007-4118, 3137-4118
1007-4156, 3137-4156, 3157-4156
Therefore, we have to find the minimum number of slots required to conduct exams for all the courses and all the students.
As there are 8 courses, the maximum slots that could be required would 8, but the challenge is to find the minimum number of slots.
Such complex problems, can be easily solved using vertex/edge coloring in graphs.
In a graph, let us represent the courses with the vertices and edges between the vertices where students are mutually excluded. From this graph we can see that courses 3157, 3203, 4118 cannot be put under same color. Similarly courses 3157, 3261, 4118 also cannot be put under same color. Therefore, we would need a minimum of 3 colors. From this we can conclude that we would need minimum of 3 exam slots.
We can observe that vertices with similar color are not adjacent to each other.
👏🏻
ReplyDelete