SN Applied Sciences

, 2:31 | Cite as

A novel approach for agricultural decision making using graph coloring

  • S. KannimuthuEmail author
  • D. Bhanu
  • K. S. Bhuvaneshwari
Research Article
Part of the following topical collections:
  1. Engineering: Sustainable Inventive Systems


This article presents a novel approach for agricultural decision making using graph coloring algorithm. Farmers’ welfare depends on the Agricultural production and balancing the demand so that they get more profit in crop cultivation. If production increases, demand decreases. If demand decreases, profit in crop cultivation decreases (loss in crop cultivation many times). If more crops of same kind are cultivated by the farmers in the nearby area, demand of the particular crop decreased. Farmers will receive less profit if demand is decreased which will decrease the cost of yields. To evade this problem, a novel approach is devised to give better yield production, balancing the demand as well as to make the farmer to earn more amount of money. Graph Coloring algorithm is used to assist the farmer that what crop to be cultivated without loss of investing the amount in crop cultivation as well as balancing the demand of the crop. Experimental results show that proposed approach outperforms well in terms of running time efficiency.


Agriculture Decision making Graph coloring Mathematical analysis Under-utilized crops 

1 Introduction

9.5% (119 billion out of 1252 billion people approximately) of people are doing Agriculture in India. Agricultural growth can help decrease poverty and uplift our economy, thus showing beneficial for everyone. Due to the complexity in Agricultural techniques, the need for timely information is also gaining more importance. For instance, most of the people are not having awareness about which crop to be cultivated according to the climate conditions and which pesticide should be used to protect the crop from pests and disease carriers, such as mosquitoes, ticks, rats and mice. To resolve this problem, Information Technologies can be applied in the area of agriculture for gathering and recording data required for problem solving and for better decision making processes. This makes Information Technology (IT) essential for our agricultural growth and therefore for improving the entire economic outlook.

Discovering the patterns, relationships and interpretation from agricultural data is a challenging task. In this way, it is important to build up a novel system and exploit the merits of existing procedures and tools for information analysis and knowledge extraction from the datasets [1, 2, 3]. The impending challenge of making an effort to provide food security in the future should not be under-estimated. Although many opinions expressed by the research communities to develop underutilized crops for food security, there is a need to clearly specify the best methodology for developing underutilized crops. In this paper, a novel approach proposed to make effective decisions by using graph coloring algorithm.

The major advantages of using this novel approach are listed below:
  • Food Security

  • Effective domestication of under-utilized crops

  • Decision making system for giving suggestion about what crops to be cultivated based on the soil and atmospheric conditions.

The remaining part of the research work is organized as specified below. Segment two discusses about the related techniques pertaining to the decision making system in agriculture. The basic concept of graph coloring is explored in section three. Proposed decision making system is given in section four. In section five, analysis of the proposed system is given. Section six and seven presents the discussion and conclusion respectively.

2 Related works

Rapid increase of human population leads to the need for
  • more production in agriculture

  • necessity for improvement of managing the world agricultural resources

  • domestication of under-utilized crops

The major challenge in agricultural field is to make the right decisions to accurately evaluate crop development and supply of food. Anurag & ShashiKant [4] proposed a decision support system for agriculture framework to meet the increasing demands. The model involves social-economical, GIS, MCDR, Expert system help to decision maker to solve agriculture related problems.

Koleshko et al. [5] proposed an intellectual mobile hardware and software micro sensory system called ISPB which facilitate to identify patterns related to information, e.g., of biomatters, soil and food products. ISPB is particularly significant for the application areas such as food industry, precision agriculture, biotechnology and social bio-safety. The sensor used in this system is for measuring the light polarization. When polarized light penetrates, the plane of polarization is twisted through angle depending on the concentration of individual components in a biological fluid. A refractive index of blood components heavily rest on the polarizability of protein structures.

Sugahara [6] presented applications that facilitate greater performance in farm tools and processes involved in agriculture, and traceability in agricultural products, transportation and marketing through mobile enabled technology devices such as RFID, wireless Internet, and cellular telephony for labeling, traceability and identity protection.

Climate change causes less and more erratic rainfall, especially in areas where food security is very low. The poor people from rural and dry areas will affect more and will need cheap accessible methodologies to adapt to unpredictable weather. Biodiversity and a healthy soil are more important to ecological approaches to form farming more droughts - resistant and more elastic to intense happenings [7].

Mayes et al. [8] discussed the possibilities for underutilized crops to improvise security aspects of food manufacturing process. In addition, issues in food security, diversification, and identification of underutilized crops and developments of new crops are discussed.

Cruz et al. [9] proposed a method using PCA–GA to exemplify agricultural crops. This technique utilizes the Principal Components Analysis (PCA) in a pre-processing stage and Genetic Algorithm (GA) for improvising the performance of the classifier. The PCA–GA approach is mainly applied for generating data mining models, pertaining to classification and establishes meaningful associations. The experimental estimation shows better classification rates and generates characterization models for agricultural crops. The agricultural researchers and farmers are benefitted from the outcome of this model.

To make agricultural decisions, weather and soil conditions are regarded as important factors. Effective soil state predictions can significantly improve the decision making process of the agricultural community. Temperature of the Soil and forecasting moisture is commonly performed using a land-surface model (LSM). This technique models the heat transfer and flow of moisture in the atmosphere and the soil subsurface. Myers et al. [10] presented regression tree algorithm (Cubist), a machine learning approach to forecast soil state based on existing conditions of soil state and atmosphere.

Nowadays, agriculture field are turned over into an up-to-the-minute business. Advanced techniques are used in this field to make effective decision making. Miller et al. [11] proposed a statistical approach to extract hidden patterns which makes use of data mining and remote sensing. Agricultural statistics produced by the abovementioned approach is applied to direct standards and strategic that will take our nation’s food from the farm to shelf.

It is essential to amplify the food production to meet the demands of growing population of the world and the problems encountered due to the change in the climatic conditions. Mayes et al. [12] discussed the approaches to handle un-utilized crops to exaggerate the improvement of food and nutrition security. They also presented research proofs to put forward that crop specific individuality and physiological rejoinder contributed to underutilized crops resilience in the face of climate change.

3 Graph coloring

Graph coloring is the one of the primary concept in graph theory and it is used in solving complex problems of diversified applications [13, 14, 15, 16, 17, 18, 19]. Graph coloring originate its name from the map-coloring application. The main task is to assign labels to vertices.


A graph G(V,E) is k-coloring if labeling f: V(G) → S, where \(\left| S \right|\) = k. Here labels are colors. A color class is formed using all the vertices of one particular color. A k-coloring is acceptable if adjacent vertices have diverse labels. A graph G(V,E) is k-colorable if and only if it has a proper k-coloring.

Algorithm: Greedy approach for graph coloring [20]

A graph G is given with edge set E, vertex set V = {v1, v2, V3 …., vn} and adjacency lists

Av, construct a function \(c:V \to {\mathbb{N}}\) such that if the edge e = (vi, vj) \(\in\) E, then c(vi) \(\ne\) c(vj).

(1) Initialize

Set c(vj) \(\leftarrow\) 0 for all 1 \(\le\) j \(\ge\) n

c(v1) \(\leftarrow\) 1

j \(\leftarrow\) 2

(2) c(vj) \(\leftarrow\) min(k \(\in {\mathbb{N}}\left| k \right\rangle 0\) and c(vi) \(\ne k\forall\) vi \(\in\) Avj

(3) Are we finished? Is j = n?

• If so, stop: we’ve constructed a function c with the desired properties.

• If not, set j \(\leftarrow\) (j + 1) and go to step (2).

Applications of graph coloring can be realized in many domains. Some of the applications are given below.
  • Register allocation: Compiler is the system software used to translate higher-level language into machine code. One of the steps in machine translation is allocating registers to the frequently accessed values of the program while keeping other values in memory. This problem can be modeled by applying graph coloring concept. In this methodology the compiler creates an interference graph in which vertices are considered as symbolic registers and an edge that connects two nodes, if they are needed at the same time. If the graph is k-colorable, then the frequently used variables can be stored in k-registers.

  • Scheduling algorithms: Consider we have a collection of jobs to complete, and varied number of workers, the task is to assign every worker with a job during some time slot. This can be done by using graph coloring approach. The scheduling of jobs can be done in any order, nevertheless pairs of jobs are in conflict that they are not been assigned in the same time period.

  • Graph coloring can be used in pattern matching.

4 Proposed algorithm

Firstly, extraction of land details with soil and weather condition is done. The crop to be cultivated based on those conditions is retrieved from the crop database. Construction of graph is done by using land information. Allocation of crop to be cultivated is done by using graph coloring algorithm. The primary constraint in graph coloring algorithm is that we need to color the nodes in such a way that the adjacent two nodes should not be coloured with same color. In this scenario, each land region is considered as node and each crop is considered as color.


A graph G(V,E) is k-coloring if labeling f: V(G) → S, where \(\left| S \right|\) = k and here, labels represent crops whereas nodes represent land region. A color class is formed with group of vertices sharing same color. A k-coloring is acceptable if neighboring vertices have diverse labels. A graph G is said to be k-colorable if and only if it satisfies k-coloring property. In this approach, greedy coloring is used to color the vertices.


The greedy coloring pertaining to a vertex ordering v1,v2,v3,v3,…., vn of graph (G) is achieved by coloring vertices in the same order assigning the smallest-indexed color to vi which is not already used on its lower-order neighbors.

5 Analysis

This section presents the mathematical analysis and experimental evaluation of the proposed approach.

5.1 Mathematical analysis

The core element of the proposed approach is Graph Coloring algorithm [21, 22]. This section presents the theoretical analysis of the graph coloring algorithms used in this approach. A straightforward approach for finding a vertex coloring is to search systematically among all mappings from the set of vertices to the colors and this technique is often called brute force method. But brute force approach incurs large running time and tends to exponential. Hence, greedy based coloring algorithm is used in this approach.

For the number of colors, it is clear that in Greedy coloring algorithm, the value of C is atmost \(\left| C \right|\), which equals the number of neighbours of vi among v1, v2,…., vi−1. In particular, Algorithm establishes \(_{X} \left( G \right) \le \Delta \left( G \right) + 1.\)

For the running time, note that in greedy algorithm take at most O(1 + deg vi) operations. Summing over all vertices, the total time spent in algorithm asymptotically bounded by n + (deg v1,deg v2 + … deg vn) = n+2 m, Thus, Algorithm takes time O(n + m).

5.2 Experimental evaluation

This work is implemented by using java language and the experimentation was done in a system running with 2.33 GHz Intel® Core™ 2 Quad CPU and 2 GB RAM, on Windows 7. The research was carried by using synthetic data and it is observed that proposed approach give better results when compared to the brute-force based approach. Figures 1 and 2 shows the input and the output for the system respectively.
Fig. 1

Proposed approach

Fig. 2

Input for the system

Figure 3 shows the plot between Number of vertices and Running time for both brute force and greedy approaches. It clearly visualizes that the Greedy produces better running time than the brute force. Figure 4 shows the comparison between brute force and greedy approach in terms of increasing the number of edges. Experimental result shows that greedy approach outperforms well when compared to the brute force approach in all aspects (Fig. 5).
Fig. 3

Sample output

Fig. 4

Comparison between brute force and greedy approach by varying number of vertices

Fig. 5

Comparison between brute force and greedy approach by varying number of edges

6 Discussion

Technological development in agriculture has many forms such as generation of better seed varieties, improvement of planting techniques to mimic post-harvest losses. With the help of Information Communication Technologies (ICTs), we can create efficiencies in agricultural markets by taking effective planting decisions such as when to grow, where to plant and what to grow [23]. Maximizing the profit is not only the motive for farmers. Farmers cultivate crop because they enjoy the lifestyle and they possess deep settled values and beliefs around living. They also contribute to the society and national economy. In this research, an algorithmic approach for making effective decision (e.g.., what to grow) is proposed. This method is used to balance the demand in market as well as farmers may get benefited by getting acceptable profits for their crops. The mathematical analysis and experimental evaluation of this work show that graph coloring based approach outperforms well in terms of efficiency.

7 Conclusion

This wok deals with the issues in the cultivation or domestication of under-utilized crops, which assists and suggests the farmer in cultivating crops which has a high demand at a particular season. Graph theory is used here to prevent the farmers to cultivate same crops in nearby lands at a particular season, since it creates less demand for the crops. This novel approach insists the farmer to balance the demand of the crop so that people in a country obtain the yield with moderate cost and farmers also will sell their crop with acceptable cost. This work can be extended to apply optimization algorithm to select best solution among many solutions returned.


Compliance with ethical standards

Conflict of interest

On behalf of all authors, the corresponding author states that there is no conflict of interest.


  1. 1.
    Aishwarya R, Gokulapriya A, Kannimuthu S (2017) Certain investigation on graph theory and its applications. Int J Sci Res 6(5):580–582Google Scholar
  2. 2.
    Kannimuthu S, Premalatha K (2013) Discovery of high utility itemsets using genetic algorithm. Int J Eng Technol 5(6):4866–4880Google Scholar
  3. 3.
    Kannimuthu S, Premalatha K (2015) UP-GNIV: an expeditious high utility pattern mining algorithm for itemsets with negative utility values. Int J Inf Technol Manag 14(1):26–42Google Scholar
  4. 4.
    Agrahari Anurag, Tripathi ShashiKant (2012) A theoretical framework for development of decision support system for agriculture. Int J Eng Sci 1(6):50–55Google Scholar
  5. 5.
    Koleshko VM, Gulay AV, Polynkova EV, Gulay VA, Varabei YA Intelligent systems in technology of precision agriculture and biosafety. In: InTech Publication Google Scholar
  6. 6.
    Sugahara K (2009) Traceability system for agricultural products based on RFID and mobile technology. In IFIP, International Federation for Information Processing (ed) Computer and computing technologies in agriculture II, vol 3. Springer, Boston, pp 156–162CrossRefGoogle Scholar
  7. 7.
    Tirado R, Cotter J (2010) Ecological farming: drought-resistant agriculture. Greenpeace Research Laboratories University of Exeter, UKGoogle Scholar
  8. 8.
    Mayes S, Massawe FJ, Alderson PG, Roberts JA, Azam-Ali SN, Hermann M (2011) The potential for underutilized crops to improve security of food production. J Exp Bot 63(3):1075–1079CrossRefGoogle Scholar
  9. 9.
    Cruz GBD, Gerardo BD, Tanguilig BT III (2014) Agricultural crops classification models based on PCA–GA implementation in data mining. Int J Model Optim 4(5):375–382CrossRefGoogle Scholar
  10. 10.
    Myers W, Linden S, Wiener G (2009) A data mining approach to soil temperature and moisture prediction. In: Proceedings of 7th conference on artificial intelligence and its applications to the environmental sciencesGoogle Scholar
  11. 11.
    Miller D, McCarthy J, Zakzeski A (2008) A Fresh approach to agricultural statistics: data mining and remote sensing. In: Section on government statistics—JSM 2009, pp 3144–3155Google Scholar
  12. 12.
    Massawe FJ, Mayes S, Cheng A, Chai HH, Cleasby P, Symonds R, Ho WK, Siise A, Wong QN, Kendabie P, Yanusa Y, Jamalluddin N, Singh A, Azman R, Azam-Ali SN (2015) The potential for underutilised crops to improve food security in the face of climate change. Procedia Environ Sci 29:140–141CrossRefGoogle Scholar
  13. 13.
    Tatsuoka Maurice M (1986) Graph theory and its applications in educational research: a review and integration. Rev Educ Res 56(3):291–329CrossRefGoogle Scholar
  14. 14.
    Priyadarsini PLK (2015) A survey on some applications of graph theory in cryptography. J Discrete Math Sci Cryptogr Taylor Francis 18(3):209–217MathSciNetCrossRefGoogle Scholar
  15. 15.
    Akiyamam J, Egawa Y, Enomoto H (1989) Graph theory and applications. Annals of Discrete Mathematics, vol 38. ElsevierGoogle Scholar
  16. 16.
    Andersen A (2011) GraphShop: an interactive software environment for graph theory research and applications. Graduate Thesis, Utah State UniversityGoogle Scholar
  17. 17.
    Mathai J, Mathai PP, Babu I (2017) A survey on role of graph theory in various approaches. J Comput Math Sci 8(6):261–268Google Scholar
  18. 18.
    Sirmacek B (2018) Graph theory: advanced algorithms and applications. IntechOpen Publishers, New YorkCrossRefGoogle Scholar
  19. 19.
    Bondy JA, Murty USR (1982) Graph theory with applications. Elsevier, New YorkzbMATHGoogle Scholar
  20. 20.
    Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to algorithms, 3rd edn. MIT Press, CambridgezbMATHGoogle Scholar
  21. 21.
    Halim S, Halim F (2013) Competitive programming the new lower bound of programming contests. Lulu PublicationGoogle Scholar
  22. 22.
    Edmonds J (2008) How to think about algorithms, 1st edn. Cambridge University Press, Cambridge, NYCrossRefGoogle Scholar
  23. 23.
    Bauer A, Bostrom AG, Ball J, Applegate C, Cheng T, Laycock S, Rojas SM, Kirwan J (2019) Combining computer vision and deep learning to enable ultra-scale aerial phenotyping and precision agriculture: a case study of lettuce production. Hortic Res 6(70):1–12Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of CSEKarpagam College of EngineeringCoimbatoreIndia
  2. 2.Department of CSEKarpagam Institute of TechnologyCoimbatoreIndia

Personalised recommendations