<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Assistance in making decisions to promote planting and conservation of maize in the state of Puebla of Mexico through Answer Set Programming</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luis A. Montiel</string-name>
          <email>luis.montielmo@udlap.mx</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Claudia Zepeda</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pedro Wesche</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Javier A. Cervantes</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad de las Am</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>onoma de Puebla</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present some examples which show how preference ordered disjunction adds useful features to answer set programming, as well as an interesting example of how it can be useful for modeling a real problem about agriculture. In this paper, we present a mathematical formalization for the problem of making decisions to promote planting and conservation of maize in some geographical zone inside the country of Mexico; we present modeling semantics that we consider necessary for the mathematical formalization of this problem using Answer Set Semantics.</p>
      </abstract>
      <kwd-group>
        <kwd>Agriculture</kwd>
        <kwd>Ordered Disjunction</kwd>
        <kwd>Preferences</kwd>
        <kwd>Answer Set Programming</kwd>
        <kwd>Data Mining</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <sec id="sec-1-1">
        <title>At the present time Maize is one of the most important crops around the world, it is</title>
        <p>
          a major source of food for humanity and the livestock sector [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Currently it is very
important to support technological development in agriculture in order to increase
yields (production per hectare) of crops that are important to satisfy the food demand
of humanity in the world [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ].
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>A problem present in Mexico is that the total production of maize in the country</title>
        <p>
          is not enough to meet food demand of all Mexican population; Mexico has faced
the need to import foreign corn mainly from U.S. and Canada since it is cheaper to
import corn than to produce national maize in Mexico [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ][
          <xref ref-type="bibr" rid="ref18">18</xref>
          ].
        </p>
      </sec>
      <sec id="sec-1-3">
        <title>Given experts recommendations and needs [20][18], and experts works [8][15][14] we identify that is possible to de¯ne The maize ¯tting zone problem and give a solution to it in order to support agriculture in the area of corn:</title>
        <p>3. Given a geographical area for each land zones belonging to it, to identify the attributes
(geographical, climatic, technological, economic, soil, hydrological land use and
vegetation) that de¯ne it.
4. To relate this land attributes in function of classes, races and varieties of maize and
their yields produced.
5. To determine which land zones report high or low yields for each variety of corn and to
explain the necessary and su±cient conditions to obtain high yields in each land zone.
6. To produce corn in land zones selecting the best race of maize that ¯ts each land zone to
obtain high yields of production preserving an ecosystem that does not harm nature and
that sati¯es the nutrimental needs of producers and population of a given geographical
area.
7. To replicate these conditions in land zones with low yields of corn
8. Continuous monitoring of implementation of the model in reality for di®erent classes of
producers by experts, and feedback to the mathematical model with the results. Taking
care not to a®ect the quality of life for producers who have their sustenance on their own
crops.</p>
        <p>
          Recently work [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ][
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] has been done trying to solve the problem The maize
¯tting zone problem. There is great diversity of climatic and geographic attributes,
attributes that represent the technologies necessary to grow, control pests and diseases
of maize, and attributes of phenotypes according to breeds and varieties of existing
corn and classes to which they belong. The data type for these attributes are strings,
integers, real numbers, percentages, however in the works we have reviewed
percentage and numerical attributes are handled through ranges between values in order to
facilitate the categorization of these attributes, because of this it is possible to map,
one to one, quantitative information to qualitative data. Due to the complexity in
the relation between the attributes involved in these problems we require to
handle incomplete knowledge. The problems show variables of uncertainty for example
climate and pest or disease control attributes for the corn, and also we require the
use of preferences for example preferences according to the classes of seeds to grow
depending on the environment. Because we are dealing with these attributes and the
type of rules that will arise in these problems, we identi¯ed that it is possible to use
        </p>
      </sec>
      <sec id="sec-1-4">
        <title>Answer Set Programming [10][9] as a means to formalize this problem in an expressive language. We identi¯ed the need of using an ASP extension that use preferred rules [7][4][21] for handling preference conditions.</title>
      </sec>
      <sec id="sec-1-5">
        <title>There is now software that e±ciently computes ASP [12][19], this is the reason we believe it is possible to propose a real solution that can be implemented based on this programming paradigm.</title>
        <p>2</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Background</title>
      <sec id="sec-2-1">
        <title>In this section we introduce all the necessary terminology and relevant de¯nitions in</title>
        <p>
          order to make this paper self-contained.1
1 We assume that the reader has familiarity with basic concepts of classical logic, logic
programming, answer set semantics, and lattices. For details the reader can refer to [
          <xref ref-type="bibr" rid="ref1 ref13 ref6">1,6,13</xref>
          ].
2.1
        </p>
        <p>
          Extended Logic Programs
We consider extended logic programs which have two kinds of negation, strong
negation : and default negation not. A signature L is a ¯nite set of elements that we call
atoms, where atoms negated by : are called extended atoms. Intuitively, not a is true
whenever there is no reason to believe a, whereas :a requires a proof of the negated
atom. In the following we use the concept of atom without paying attention if it is an
extended atom or not. A literal is either an atom a called positive literal, or the
negation of an atom not a called negative literal. Given a set of atoms fa1; :::; ang, we write
not fa1; :::; ang to denote the set of atoms fnot a1; :::; not ang. An extended normal
rule (rule, for short) r is a rule of the form a Ã b1; : : : ; bm; not bm+1; : : : ; not bm+n
where a and each of the bi are atoms for 1 · i · m + n. If m + n = 0 the rule is an
abbreviation of a Ã &gt; such that &gt; is the proposition symbol that always evaluates
to true; the rule is known as a fact and can be denoted just by a. If n = 0 the rule
is an extended de¯nite rule. We denote a rule r by a Ã B+; not B¡ where the set
fb1; : : : ; bmg and the set fbm+1; : : : ; bm+ng are denoted by B+ and B¡ respectively.
A constraint is a rule of the form Ã B+; not B¡. We denote by head(r) the head
a of rule r and by body(r) the B+; not B¡ of the rule r. An extended normal logic
program P is a ¯nite set of extended normal rules and/or constraints. By LP we
denote the signature of P , i.e. the set of atoms that appear in the rules of P . If all
the rules in P are extended de¯nite rules we call the program P extended positive
logic program. In our logic programs we will manage the strong negation : as it is
done in Answer Set Programming (ASP) [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. Basically, each atom :a is replaced by
a new atom symbol a0 which does not appear in the language of the program and
we add the constraint Ã a; a0 to the program. For managing the constraints in our
logic programs, we will replace each rule of the form Ã B+ not B¡ by a new rule of
the form f Ã B+; not B¡; not f such that f is a new atom symbol which does not
appear in LP .
2.2
        </p>
        <p>
          Logic Programs with Ordered Disjunction
Logic programs with ordered disjunction (LPODs) are extended logic programs
augmented by an ordered disjunction connector £ which allows to express qualitative
preferences in the head of rules [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. A LPOD is a ¯nite collection of rules of the form
r = c1 £ : : : £ ck Ã b1; : : : ; bm; not bm+1; : : : ; not bm+n where ci (for 1 · i · k) and
each of the bj (for 1 · j · m + n) are atoms. The rule r states that if the body is
satis¯ed then some ci must be in the answer set, if possible c1, if not then c2, and
so on, and at least one of them must be true. Each of the ci represents alternative,
ranked options for problem solutions the user speci¯es according to a desired order.
If k = 1 then the rule is an extended normal rule. The semantics of LPODs is based
on the following reduction.
        </p>
        <p>
          De¯nition 1 (£-reduction). [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] Let r = c1 £ : : : £ ck Ã b1; : : : ; bm; not bm+1;
: : : ; not bm+n be an ordered disjunction rule and M be a set of atoms. Let P be an
LPOD and M be a set of atoms. The £-reduct rM is de¯ned as
£
r£M := fci Ã b1; : : : ; bmjci 2 M and M \ (fc1; : : : ; ci¡1g [ fbm+1; : : : ; bm+ng) = ;g.
The £-reduct P£M is de¯ned as P£M = Sr2P r£M .
        </p>
        <p>
          De¯nition 2. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] Let P be an LPOD and M a set of atoms. Then, M is an answer
set of P if and only if M is a minimal model of P M . We denote by SEMLP OD(P )
£
the mapping which assigns to P the set of all answer set of P .
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>One interesting characteristic of LPODs is that they provide a mean to represent preferences among answer set by considering the rule satisfaction degree [3].</title>
        <p>
          De¯nition 3. [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] Let M be an answer set of an LPOD P . Then M satis¯es the rule
r = c1 £ : : : £ ck Ã b1; : : : ; bm; not bm+1 : : : ; not bm+n:
{ to degree 1 if bj 62 M for some j (1 · j · m), or bi 2 M for some i (m + 1 · i · m + n),
{ to degree j (1 · j · k) if all bl 2 M (1 · l · m), bi 62 M (m + 1 · i · m + n), and
j = minfr j cr 2 M; 1 · r · kg.
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>The degrees can be viewed as penalties: the higher the degree the less satis¯ed we</title>
        <p>
          are. If the body of a rule is not satis¯ed, then there is no reason to be dissatis¯ed
and the best possible degree 1 is obtained [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The satisfaction degree of an answer
set M w.r.t. a rule, denoted by degM (r), provides a ranking of the answer set of an
        </p>
      </sec>
      <sec id="sec-2-4">
        <title>LPOD, and a preference order on the answer set can be obtained using some proposed combination strategies [3].</title>
        <p>3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Important computational aspects for MaizeFitZone problem</title>
      <sec id="sec-3-1">
        <title>In order to show that it is possible to model MaizeFitZone problem througth An</title>
        <p>swer Set Programming we need to focus our attention in subproblems (5) and (6).
Subproblem (5) presents the problem of determining for a geographical zone its
agricultural production potential. Subproblem (6) presents the problem of locating seeds
candidates who best ¯t the needs of farmers based on the agricultural production
potential of the geographical zone where they are located. Subproblems (5) and (6)
describes the use of an integrated database MaizeBioGeoClimAgriTechDB obtained
from subproblems (1) to (4). Subproblems (7) and (8) describes the solution in real
life once the mathematical model of the main problem has been implemented.</p>
      </sec>
      <sec id="sec-3-2">
        <title>MaizeFitZone problem (1) to (4). We identify that it is possible to link Geo</title>
        <p>graphical, Weather and Agricultural techonology databases in order to cross
information on the di®erent corn seeds (Creole or Improved), their yields in each municipality
and locality, and the relevant attributes (climatic, soil, etc.) involved to obtain certain
level of production (low, medium, high, very high for example). Let us call this linked
information GeoClimAgriTechDB.</p>
      </sec>
      <sec id="sec-3-3">
        <title>From GeoClimAgriTechDB it is possible relate land attributes in function of maize</title>
        <p>classes and their yields produced, however to relate land attributes in function of
races and varieties of maize and their yields produced it is necessary to integrate</p>
      </sec>
      <sec id="sec-3-4">
        <title>GeoClimAgriTechDB database with Biological properties of maize database, so it is</title>
        <p>possible to know in a general level the candidates of races and varieties of maize seeds
that could be presented in the land zone and the probability of appearing in it. Let
us call to this integrated database MaizeBioGeoClimAgriTechDB .</p>
      </sec>
      <sec id="sec-3-5">
        <title>To see more detalied information about the MaizeBioGeoClimAgriTechDB database see technical report[16].</title>
      </sec>
      <sec id="sec-3-6">
        <title>MaizeFitZone problem (5). Recent work addresses this problem [8][15][14].</title>
        <p>
          The computer systems developed by INIFAP Puebla [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] and Chiapas [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]
calculate agricultural production potential in given geographic areas, that is, the level
of ¯tness for a plant to be cultivated successfully. The Puebla system provides the
potential for various crops (monocultures), however there is no documentation about
the mathematical model employed. The Chiapas system provides the potential for
varieties of native and improved maize seeds (also monocultures) and uses climatic
and soil information; documentation about the mathematical model employed exists
[
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>
          In order to discern from classes(Creole or Improved), races and varieties of corn
seeds yields produced for each municipality and locality the relevant attributes
involved to obtain certain level of production (low, medium, high, very high for
example) and to explain the necessary and su±cient conditions to obtain high yields in
each land zone from MaizeBioGeoClimAgriTechDB, it is possible to run datamining
algorithms to discover patterns in the information such as C4.5 [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] or ID3 [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], expose
these patterns to agronomists experts to discern interesting patterns.
        </p>
      </sec>
      <sec id="sec-3-7">
        <title>There exists e±cient software that implements data mining algorithms such as</title>
      </sec>
      <sec id="sec-3-8">
        <title>ID3 and C4.5 that it is easy to use such as WEKA software [11].</title>
      </sec>
      <sec id="sec-3-9">
        <title>Let us call to the combination of the subproblems MaizeFitZone problem (4) and</title>
        <p>MaizeFitZone problem (5) the maize zone production potential problem .</p>
      </sec>
      <sec id="sec-3-10">
        <title>MaizeFitZone problem (6). Once the potential of agricultural production (the</title>
        <p>level of ¯tness for a plant to be cultivated successfully) has been computed, in the</p>
      </sec>
      <sec id="sec-3-11">
        <title>Chiapas System [15][14] a suggestion of improved seeds candidates who best ¯t the needs of the user is given, this computed from a set of geographical, climatic, and technological attributes values given as input by the user.</title>
        <p>Once a solution is given for maize zone production potential problem and based
on this solution, given a geographical zone, let us call maizes best ¯tting zone
problem to the problem of selecting the races and varieties of maize to be planted
that ¯ts each land zone to obtain high yields of production preserving an ecosystem
that does not harm nature and that sati¯es the nutrimental needs of producers and
population of a given geographical area.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Computational modeling Answer Set Programming</title>
      <p>approach for maize ¯tting zone problem</p>
      <sec id="sec-4-1">
        <title>This section determines the knowledge that is required to provide a knowledge mod</title>
        <p>
          eling, and using the model of recent work [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] we show that it is possible to model
the knowledge that is required to provide the knowledge modeling of MaizeFitZone
problem.
4.1
        </p>
        <p>Knowledge Sources
We de¯ne the maize agricultural knowledge to cultivate maize plants as the union
of the following knowledge:
1. Agronomists experts' knowledge.
2. The knowledge generated by centuries-old traditions and experience of the rural
poor
3. Patterns and knowledge discovered from MaizeBioGeoClimAgriTechDB database
using knowledge discovering techinques such as data mining.</p>
        <p>in order to generate a mathematical model to solve MaizeFitZone problem
e±ciently and accurately.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Now we present the argumentation that shows that it is possible to model Maize</title>
      </sec>
      <sec id="sec-4-3">
        <title>FitZone problem using Answer Sets programming using extended semantics handling preferences in disjunctive rules.</title>
      </sec>
      <sec id="sec-4-4">
        <title>To model Agronomist experts' knowledge and experience of the rural poor rep</title>
        <p>resent the same problem since experience of the rural poor can be structured in the
same way Agronomist experts' knowledge have been structured.</p>
      </sec>
      <sec id="sec-4-5">
        <title>It is possible to provide a mathematical model for maizes best ¯tting zone problem</title>
        <p>
          using Answer Sets[
          <xref ref-type="bibr" rid="ref10 ref9">10,9</xref>
          ] based on work and documentation form INIFAP Chiapas
[
          <xref ref-type="bibr" rid="ref14 ref15">15,14</xref>
          ] to show how it is possible to model Agronomist experts' knowledge.
        </p>
      </sec>
      <sec id="sec-4-6">
        <title>It is possible to run datamining algorithms to discover patterns from the infor</title>
        <p>
          mation contained in MaizeBioGeoClimAgriTechDB such as C4.5 [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] or ID3 [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], and
from this kind of algorithms is possible to generate a logic program, for instance an
        </p>
      </sec>
      <sec id="sec-4-7">
        <title>ASP program for example from a classi¯ctation tree to generate in a direct way, at least an ordered disjunctive logic program.</title>
      </sec>
      <sec id="sec-4-8">
        <title>In order to model maize ¯t problem ¯rst part of this problem (maize zone pro</title>
        <p>
          duction potential problem)is modeled from natural language to ASP rules, and the
second part, maizes best ¯tting zone problem is modeled using a C4.5 tree obtained
from implicit knowledge in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] in order to generate a preferred ordered disjunctive
program.
4.2
        </p>
        <p>Modeling of maize zone production potential problem : Answer Sets
approach</p>
      </sec>
      <sec id="sec-4-9">
        <title>The works [15][14] present the scienti¯c and technological agronomist experts' knowl</title>
        <p>edge on how is determined for a given geographical zone if the potential of production
in order to cultivate native maize seeds is very good, good, intermediate or low.</p>
        <p>As input of the problem, part of extensional data base (this knowledge is included
in MaizeBioGeoClimAgriTechDB knowledge base), we have the following facts:
{ From processing and analysis of climate we have the data:
² precipitation(Zone; Day; V alue):
² evaporation(Zone; Day; V alue):
² temperature(Zone; Day; V alue):
² precipitationByYear(Zone; Y ear; V alue):
² evaporationByYear(Zone; Y ear; V alue):
² temperatureByYear(Zone; Y ear; V alue):
{ From generation and classi¯cation of images (geographical data):
² zone(Zone):
² locality(Locality):
² localityInZone(Zone; Locality):
² terrainSlope(Zone; V alue):
² soilDepth(Zone; V alue):
² soilTexture(Zone; V ale):
{ From user input attributes for a locality:
² organicMatter(L; V alue):
² pending(L; V alue):
² rainfedQuality(L; V alue):
² altitude(L; V alue):
² cultureCycle(L; V alue):
² moistureRegime(L; V alue):
² soilTexture(Zone; V ale):</p>
      </sec>
      <sec id="sec-4-10">
        <title>Where value is a cualitative value or an integer in a range inside [0; 1000]</title>
        <p>
          The rules that gives insigth to model this problem are based in this expert
knowledge[
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]:
potentialProductivity(Z; veryGood) Ã zone(Z); growingSeasonPeriod(Z; middle);
soilDepthCentimeter(Z; veryDeep); not abnormal(Z):
potentialProductivity(Z; good) Ã zone(Z); growingSeasonPeriod(Z; long);
(soilDepthCentimeter(Z; shallow)_
soilDepthCentimeter(Z; veryDeep));
not abnormal(Z):
potentialProductivity(Z; intermediate) Ã zone(Z); growingSeasonPeriod(Z; middle);
soilDepthCentimeter(Z; shallow);
not abnormal(Z):
potentialProductivity(Z; intermediate) Ã zone(Z); growingSeasonPeriod(Z; short);
soilDepthCentimeter(Z; veryDeep);
not abnormal(Z):
potentialProductivity(Z; low) Ã zone(Z); (growingSeasonPeriod(Z; short)_
soilDepthCentimeter(Z; shallow)
_abnormal(Z)):
abnormal(Z) Ã zone(Z); erosion(Z):
abnormal(Z) Ã zone(Z); naturalResourcesDegradation(Z):
abnormal(Z) Ã zone(Z); droughtChance(Z):
        </p>
      </sec>
      <sec id="sec-4-11">
        <title>For example the rule:</title>
        <p>potentialProductivity(Z; veryGood) Ã zone(Z); growingSeasonPeriod(Z; middle);
soilDepthCentimeter(Z; veryDeep);
not abnormal(Z):</p>
      </sec>
      <sec id="sec-4-12">
        <title>Can be read as: the agricultural potential of production for a given zone Z is very</title>
        <p>good if there is evidence that there exists in the zone Z a middle growing season
perdiod and very deep soil depth, and there is no evidence that in zone Z there exists
a risk of erosion, and there is no evidence that in zone Z there exists natural resources
degradation risk, and there is no evidence that in zone Z there exists drought risk.</p>
      </sec>
      <sec id="sec-4-13">
        <title>For the following rule:</title>
        <p>potentialProductivity(Z; low) Ã zone(Z);
(growingSeasonDays(Z; short) _
soilDepthCentimeter(Z; shallow)
_ abnormal(Z)):</p>
        <p>It can be shown that c Ã l1; : : : ; lm; (lm+1 _ : : : _ lm+n) where li are literals for
n; m ¸ 0 can be replaced by the rules contained in the set fc Ã l1; : : : ; lm; lm+j j1 ·
j · ng.</p>
      </sec>
      <sec id="sec-4-14">
        <title>If we have the predicate growingSeasonDays(Z; LengthDays) it is possible to</title>
        <p>create a rule that discern the value for growingSeasonPeriod(Z; value) from this
predicate. For example:
growingSeasonPeriod(Z; long) Ã Zone(Z);
growingSeasonDays(Z; LengthDays);
LengthDays ¸ 146:
(1)
(2)
(3)
(4)</p>
      </sec>
      <sec id="sec-4-15">
        <title>For the sentence [15][14]:</title>
        <p>We determined the growing season (duration, start and end), which is the number of days
during the year in which there is availability of water or moisture and a suitable temperature
for crop development.</p>
        <p>we propose the rule:
growingSeasonDays(Z; LDaysGSD) Ã LDaysGSD := maxfLengthDaysjZone(Z);
growingSeason(Z; StartDay; F inishDay);
LengthDays := F inishDay ¡ StartDay;
not waterAvailabilityInadequate(Z;
StartDay; F inishDay);
not temperatureInadequate(Z;
StartDay; F inishDay)g:
(5)
where the last rule can be read as: the growing season days length for a given zone</p>
      </sec>
      <sec id="sec-4-16">
        <title>Z is the maximum growing season days period length for a zone Z from the starting</title>
        <p>day to the ¯nishing day of the period, in which for this zone Z and this period, there
is no evidence that there exists water availability inadequate, and there is no evidence
that there exists temperature innadequate.</p>
      </sec>
      <sec id="sec-4-17">
        <title>Equation (5) can be easily translated to the following rules:</title>
        <p>setConditions(Z; LengthDays) Ã Zone(Z);
growingSeason(Z; StartDay; F inishDay);
F inishDay := LengthDays + StartDay;
not waterAvailabilityInadequate(Z; StartDay; F inishDay);
not temperatureInadequate(Z; StartDay; F inishDay):
betterSetConditions(Z; LnDays) Ã setConditions(Z; LnDays);</p>
        <p>setConditions(Z; Y ); LnDays &lt; Y:
growingSeasonDays(Z; LnDays) Ã setConditions(Z; LnDays);
not betterSetConditions(Z; LnDays):
(6)</p>
        <p>The condition about water availability inadequate is present for a period of time
[StartDay; F inishDay] and a zone Z if there exist evidence that for zone Z water
resources are inadequate, or for zone Z in the period [StartDay; F inishDay] the
humidity is inadequate. So the following rule is generated:</p>
      </sec>
      <sec id="sec-4-18">
        <title>The de¯nition of temperature inadequate given for a zone Z for a period of time</title>
        <p>[StartDay; F inishDay] is de¯ned using the given temperature for every day in the
given zone and period. The temperature for a given day and zone is part of extensional
data base.</p>
      </sec>
      <sec id="sec-4-19">
        <title>Humidity inadecuate given for a zone Z for a period of time [StartDay; F inishDay]</title>
        <p>is present if for the zone Z and period of time [StartDay; F inishDay] there exist
excess of humidity or de¯cit of humidity. This gives the following rule:
humidityInadecuate(Z; StartDay; F inishDay) Ã Zone(Z);
(excessHumidity(Z;
StartDay; F inishDay) _
deficitHumidity(Z;
StartDay; F inishDay)):
(8)</p>
        <p>
          For the sentence [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]: We estimated the water balance resulting from dividing the
precipitation between the ETP, as support for determining the growing seasons and periods
of excess and water de¯cit.
        </p>
        <p>waterBalance(Z; Day; V alue) Ã Zone(Z);
potentialEvapotranspiration(Z; Day; P ET V alue);
precipitation(Z; Day; P recipitationV alue);
P recipitationV alue := V alue ¤ P ET V alue:
(9)</p>
      </sec>
      <sec id="sec-4-20">
        <title>Rule de¯ned in (9) there is a division that can be rewritten in terms of multipli</title>
        <p>cation, in order to simulate the multiplication in answer set, multiplication can be
replaced by a predicate multiplication(A,B,AB) in the extensional data base where
the third argument is the result of multiplicate the ¯rst two arguments.</p>
      </sec>
      <sec id="sec-4-21">
        <title>De¯nition of predicates growingSeason(Zone; StartDay; F inishDay),</title>
        <p>
          excessHumidity(Zone; StartDay; F inishDay) and
deficitHumidity(Zone; StartDay; F inishDay) depends on the de¯nition of
waterBalance(Zone; Day; V alue) (rule (9)). Works [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ][
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] does not provide the
way how they are related, however we believe that is easy to construct the de¯nition
of these predicates if they are de¯ned as an statistical function.
        </p>
      </sec>
      <sec id="sec-4-22">
        <title>For the sentence [15][14]:</title>
        <p>For each year level and estimated daily potential evapotranspiration (ETP) from the
evaporation data multiplication by a constant factor of 0.75. The ETP is multiplied by the
constant factor of 0.5. We identi¯ed periods of moisture surplus or de¯cit (duration, start
and end).</p>
      </sec>
      <sec id="sec-4-23">
        <title>We model the rule:</title>
        <p>potentialEvapotranspiration(Z; Day; V alue) Ã Zone(Z)
evaporation(Z; Day; EvaV alue);
V alue := EvaV alue ¤ 0:75 ¤ 0:5:
(10)</p>
        <p>In (10) there is a multiplication of rational numbers, since 0:75 ¢ 0:5 = 0:375, it
is possible to handle rational numbers knowing the range value of evaporation for
every day in a similar way that in rule (9) and mapping each rational number to an
integer proportional value. Potential evapotranspiration for a year is de¯ned in terms
of potential evapotranspiration of a day by a statistical function.</p>
        <p>
          For the sentences [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]:
{ If the slope is less than 15 percent to prevent soil erosion and degradation of natural
resources in general.
{ If there are no droughts lasting over 45 days.
{ If the probability of occurrence of a drought is not greater than 66 percent.
the following rules are generated:
soilErosion(Z) Ã zone(Z)
        </p>
        <p>terrainSlopePercent(Z; S); S &gt; 15:
naturalResourcesDegradation(Z) Ã zone(Z)</p>
        <p>terrainSlopePercent(Z; S); S &gt; 15:
droughtChance(Z) Ã zone(Z)
longerDroughtLengthDays(Z; S); L &gt; 45
droughtProbabilityPercent(Z; E); E &gt; 66:
(11)
(12)</p>
      </sec>
      <sec id="sec-4-24">
        <title>Rules in (11) are de¯ned in terms of terrain slope, however this de¯nition can</title>
        <p>be extended with more predicates related with this de¯nition. In (12) de¯nition of
longerDroughtLengthDays can be declared in a similar way than in rule (6).</p>
      </sec>
      <sec id="sec-4-25">
        <title>The predicate droughtProbabilityPercent can be de¯ned as the top value of</title>
        <p>the range probability for the number of years a drought may occur for a given zone</p>
      </sec>
      <sec id="sec-4-26">
        <title>Z. For example:</title>
        <p>droughtProbabilityPercent(Z; 45) Ã zone(Z);
numberOfYearsDroughtMayOccur(Z; 4):
(13)</p>
        <p>
          Modeling of maizetech ¯t zone problem using Answer Set
In [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] once is determined for a given geographical zone the potential of
production in order to cultivate native maize seeds, given some diagnosis data by the user
(culture cycle, moisture regime, altitude, rainfed quality, pending, organic matter,
soil texture), the system computes what seeds are more appropriate to plant in the
geographical zone. Since in [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ][
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] is not clearly stated how this part is modeled, we
evaluated of possible chances from the system by manual inspection and using data
mining techniques (C4.5 algorithm) a decision tree, from this tree we can build rules
as the following one:
seed(v537c) £ seed(v538c) £ seed(hv521c) Ã locality(L);
organicMatter(L; OrgMatP ercent);
OrgMatP ercent &gt; 3;
pending(L; P enP ercent);
P enP ercent &lt; 5;
rainfedQuality(L; highRiskOfDrought);
altitude(L; AltV alue);
AltV alue &lt; 1200;
cultureCycle(L; springSummer):
(14)
        </p>
      </sec>
      <sec id="sec-4-27">
        <title>Note that there is a preference depending of the class of maize seed.</title>
        <p>5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In this work we provide ASP modeling for AgriFitZone problem. We propose to use
an ASP approach using preferences. Once necessary and su±cient conditions have
been determined to give solution for AgriFitZone, it is possible to provide assistance
to farmers in making decisions to promote planting and conservation of maize through
the implementation of the mathematical model (in this case using ASP) according
to the classes of producers, environmental conditions and geographical location. In
future work we plan to research about planning on agricultural cultivation of maize
using possibilistic logic programs.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Chitta</given-names>
            <surname>Baral</surname>
          </string-name>
          .
          <article-title>Knowledge Representation, reasoning and declarative problem solving with Answer Sets</article-title>
          . Cambridge University Press, Cambridge,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Elizabeth</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Boll</surname>
            and
            <given-names>Daniel C.</given-names>
          </string-name>
          <string-name>
            <surname>St. Clair</surname>
          </string-name>
          .
          <article-title>Analysis of rule sets generated by the cn2, id3, and multiple convergence symbolic learning methods</article-title>
          .
          <source>In CSC '95: Proceedings of the 1995 ACM 23rd annual conference on Computer science</source>
          , pages
          <volume>48</volume>
          {
          <fpage>55</fpage>
          , New York, NY, USA,
          <year>1995</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Brewka</surname>
          </string-name>
          , Ilkka NiemelÄa, and
          <article-title>Tommi SyrjÄanen. Logic Programs with Ordered Disjunction</article-title>
          .
          <source>Computational Intelligence</source>
          ,
          <volume>20</volume>
          (
          <issue>2</issue>
          ):
          <volume>333</volume>
          {
          <fpage>357</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Brewka</surname>
          </string-name>
          , Ilkka NiemelÄa, and
          <article-title>MirosÃlaw Truszczyn¶ski. Preferences and Nonmonotonic Reasoning</article-title>
          .
          <source>AI Magazine</source>
          ,
          <volume>29</volume>
          (
          <issue>4</issue>
          ):
          <volume>69</volume>
          {
          <fpage>78</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Pedro Reyes C. El</surname>
          </string-name>
          <article-title>Maiz y su cultivo</article-title>
          . AGT Editor, S. A.,
          <string-name>
            <surname>Mexico</surname>
            ,
            <given-names>D.F.</given-names>
          </string-name>
          ,
          <source>¯rst edition</source>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>B. A.</given-names>
            <surname>Davey</surname>
          </string-name>
          and
          <string-name>
            <given-names>H. A.</given-names>
            <surname>Priestly</surname>
          </string-name>
          . Introduction to Lattices and Order. Cambridge University Press, second edition,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>James</given-names>
            <surname>Delgrande</surname>
          </string-name>
          , Torsten Schaub, Hans Tompits, and
          <string-name>
            <given-names>Kewen</given-names>
            <surname>Wang</surname>
          </string-name>
          .
          <article-title>A classi¯cation and Survey of Preference Handling Approaches in Nonmonotonic Reasoning</article-title>
          .
          <source>Computational Intelligence</source>
          ,
          <volume>20</volume>
          (
          <issue>2</issue>
          ):
          <volume>308</volume>
          {
          <fpage>334</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Hilario</given-names>
            <surname>Garc</surname>
          </string-name>
          <article-title>¶³a-</article-title>
          <string-name>
            <surname>Nieto</surname>
            ,
            <given-names>Oscar J</given-names>
          </string-name>
          . Garc¶
          <article-title>³a-Silva, Ceferino Ortiz-Trejo, Rom¶an de Jesu¶s Barajas, and Germ¶an S¶anchez-</article-title>
          <string-name>
            <surname>Altamirano</surname>
          </string-name>
          .
          <source>Sistema de Consulta del Potencial Agroproductivo del Estado de Puebla</source>
          ,
          <year>2002</year>
          . December,
          <year>2002</year>
          .
          <article-title>INIFAP and FUPPUE and SDR</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Michael</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>Nicola</given-names>
            <surname>Leone</surname>
          </string-name>
          .
          <article-title>Logic programming and knowledge representation - the a-prolog perspective</article-title>
          .
          <source>Arti¯cial Intelligence</source>
          <volume>138</volume>
          (
          <issue>1-2</issue>
          ), pages
          <fpage>3</fpage>
          {
          <fpage>38</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Michael</given-names>
            <surname>Gelfond</surname>
          </string-name>
          and
          <string-name>
            <given-names>Vladimir</given-names>
            <surname>Lifschitz</surname>
          </string-name>
          .
          <article-title>The stable model semantics for logic programming</article-title>
          . In R. Kowalski and K. Bowen, editors,
          <source>5th Conference on Logic Programming</source>
          , pages
          <volume>1070</volume>
          {
          <fpage>1080</fpage>
          . MIT Press,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. Mark Hall, Eibe Frank, Geo®rey Holmes, Bernhard Pfahringer,
          <string-name>
            <given-names>Peter</given-names>
            <surname>Reutemann</surname>
          </string-name>
          , and
          <string-name>
            <surname>Ian</surname>
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Witten</surname>
          </string-name>
          .
          <article-title>The weka data mining software: an update</article-title>
          .
          <source>SIGKDD Explor</source>
          . Newsl.,
          <volume>11</volume>
          (
          <issue>1</issue>
          ):
          <volume>10</volume>
          {
          <fpage>18</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Nicola</surname>
            <given-names>Leone</given-names>
          </string-name>
          , Thomas Eiter, Cristinel Mateis, Gerald Pfeifer, Georg Gottlob, Simona Perri, Wolfgang Faber, Christoph Koch, and
          <string-name>
            <given-names>Francesco</given-names>
            <surname>Scarcello</surname>
          </string-name>
          .
          <article-title>The dlv system for knowledge representation and reasoning, 2002</article-title>
          . http://www.dbai.tuwien.ac.at/proj/ dlv/.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. John W. Lloyd.
          <article-title>Foundations of logic programming</article-title>
          . Springer-Verlag New York,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Walter</surname>
          </string-name>
          Lopez-Baez and et al.
          <article-title>Zonas potenciales y recomendaciones tecnicas para producir maiz en chiapas, mexico</article-title>
          .
          <source>Technical report</source>
          , INIFAP Chiapas, Mexico,
          <year>March 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Walter</surname>
          </string-name>
          Lopez-Baez,
          <article-title>Aurelio Lopez-Luna, Bulmaro Coutin~o-</article-title>
          <string-name>
            <surname>Estrada</surname>
          </string-name>
          , Robertony CamasGomez, Bernardo
          <string-name>
            <surname>Villar-Sanchez</surname>
          </string-name>
          ,
          <article-title>Jaime Lopez-Martinez, Victor Serrano-Altamirano, Ausencio Zamarripa-Moran, Pedro Cadena-In~iguez</article-title>
          , and
          <string-name>
            <surname>Carlos</surname>
          </string-name>
          Sandoval-Morado. Sistema de Zonas Potenciales y Recomendaciones tecnicas para la Produccion Sustentable de Maiz en el estado de Chiapas, Mexico,
          <year>2007</year>
          . INIFAP and
          <string-name>
            <surname>Fundacion Produce Chiapas</surname>
            ,
            <given-names>A. C.</given-names>
          </string-name>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Luis</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Montiel</surname>
          </string-name>
          , Claudia Zepeda, Pedro Wesche, and
          <string-name>
            <surname>Javier</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Cervantes</surname>
          </string-name>
          .
          <article-title>Assistance in making decisions to promote planting and conservation of maize in the state of puebla of mexico through asp</article-title>
          .
          <source>Technical report</source>
          , Universidad de las Americas Puebla,
          <year>August 2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>J. Ross Quinlan</surname>
          </string-name>
          .
          <source>C4</source>
          .
          <article-title>5: Programs for Machine Learning</article-title>
          . Morgan Kaufmann, San Mateo, CA,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Gerardo</surname>
            <given-names>Reyes</given-names>
          </string-name>
          , Jimena Guerra, and Gilberto Calder¶on. Condiciones de cultivo del ma¶
          <article-title>³z criollo en comunidades de puebla, tlaxcala e hidalgo: Un an¶alisis de las economias de autoconsumo</article-title>
          . In BUAP, editor, Aportes, volume
          <volume>10</volume>
          , pages
          <fpage>63</fpage>
          {
          <fpage>82</fpage>
          . Benemerita Universidad Auto¶noma de Puebla, Puebla, Mexico, ¯
          <article-title>rst edition</article-title>
          , May
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>Tommi</given-names>
            <surname>Syrjnen</surname>
          </string-name>
          and
          <string-name>
            <given-names>Ilkka</given-names>
            <surname>Niemel</surname>
          </string-name>
          .
          <source>The smodels system</source>
          ,
          <year>2001</year>
          . http://www.tcs.hut. fi/Software/smodels/.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>D.</surname>
            Vega-Valdivida and
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Ram</surname>
          </string-name>
          <article-title>¶³rez-Moreno. Situaci¶on y perspectivas del ma¶³z en m¶exico</article-title>
          .
          <source>Research report</source>
          , Universidad de Chapingo,
          <year>March 2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Claudia</surname>
            <given-names>Zepeda</given-names>
          </string-name>
          , Mauricio Osorio, Juan Carlos Nieves, Christine Solnon, and
          <string-name>
            <given-names>David</given-names>
            <surname>Sol</surname>
          </string-name>
          .
          <article-title>Applications of Preferences using Answer Set Programming</article-title>
          .
          <source>In Proc. of the 3rd Intl. Workshop in Advances in Theory and Implementation</source>
          , volume
          <volume>142</volume>
          <source>of CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>