Unit-1 Introduction To Ai
Unit-1 Introduction To Ai
INTRODUCTIO
N TO
ARTIFICIAL
INTELLIGENCE
What is AI
?
What is AI ?
Artificial Intelligence (AI) is a branch of Science which deals with
helping machines
find solutions to complex problems in a more human-like fashion.
This generally involves borrowing characteristics from human
intelligence, and applying them as algorithms in a computer friendly
way.
A more or less flexible or efficient approach can be taken
depending on the requirements established, which influences how
artificial the intelligent behavior appears
Artificial intelligence can be viewed from a variety of perspectives.
From the perspective of intelligence artificial intelligence is
making machines "intelligent" -- acting as we would expect people to
act.
The inability to distinguish computer responses from human responses
is called the
Turing test.
Intelligence requires knowledge
Expert problem solving - restricting domain to allow including
significant relevant knowledge
What is AI
?
Object-oriented languages are a class of languages more recently
used for AI programming. Important features of object-oriented
languages include: concepts of objects and messages, objects bundle
data and methods for manipulating the data, sender specifies what is
to be done receiver decides how to do it, inheritance (object hierarchy
where objects inherit the attributes of the more general class of
objects). Examples of object-oriented languages are Smalltalk,
Objective C, C++. Object oriented extensions to LISP (CLOS -
Common LISP Object System) and PROLOG (L&O - Logic & Objects) are
also used.
Artificial Intelligence is a new electronic machine that stores large
amount of information and process it at very high speed
The computer is interrogated by a human via a teletype It
passes if the human cannot tell if there is a computer or human at the
other end
The ability to solve problems
It is the science and engineering of making intelligent machines,
especially intelligent computer programs. It is related to the similar
task of using computers to understand human intelligence -
History of Artificial
Intelligence
Artificial Intelligence is not a new word and not a new technology for
researchers. This technology is much older than you would imagine.
Even there are the myths of Mechanical men in Ancient Greek and
Egyptian Myths. Following are some milestones in the history of AI
which defines the journey from the AI generation to till date
development
-
History of Artificial
Intelligence
Maturation of Artificial Intelligence (1943-1952)
Year 1943: The first work which is now recognized as AI was done by
Warren McCulloch and Walter pits in 1943. They proposed a model
of artificial neurons.
Year 1949: Donald Hebb demonstrated an updating rule for
modifying the
connection strength between neurons. His rule is now called Hebbian
learning.
Year 1950: The Alan Turing who was an English mathematician and
pioneered Machine learning in 1950. Alan Turing publishes "Computing
Machinery and Intelligence" in which he proposed a test. The test can
check the machine's ability to exhibit intelligent behavior equivalent
to human intelligence, called a Turing test.
-
History of Artificial
Intelligence
The first AI winter (1974-1980)
The duration between years 1974 to 1980 was the first AI winter
duration. AI winter refers to the time period where computer
scientist dealt with a severe shortage of funding from
government for AI researches.
During AI winters, an interest of publicity on artificial intelligence
was decreased.
A boom of AI (1980-1987)
Year 1997: In the year 1997, IBM Deep Blue beats world chess
champion, Gary Kasparov, and became the first computer to beat a
world chess champion.
Year 2002: for the first time, AI entered the home in the form of
Roomba, a vacuum
cleaner.
Year 2006: AI came in the Business world till the year 2006. -
Companies like Facebook, Twitter, and Netflix also started using
AI.
History of Artificial
Intelligence
Deep learning, big data and artificial general intelligence (2011-present)
Year 2011: In the year 2011, IBM's Watson won jeopardy, a quiz show,
where it had to solve the complex questions as well as riddles.
Watson had proved that it could understand natural language and
can solve tricky questions quickly.
Year 2012: Google has launched an Android app feature "Google now",
which was able to provide information to the user as a prediction.
Year 2014: In the year 2014, Chatbot "Eugene Goostman" won a
competition in the
infamous "Turing test."
Year 2018: The "Project Debater" from IBM debated on complex
topics with two master debaters and also performed extremely well.
Google has demonstrated an AI program "Duplex" which was a
virtual assistant and which had taken hairdresser appointment on call,
and lady on other side didn't notice that she was talking with the
machine. Now AI has developed to a remarkable level. The
concept of Deep learning, big data, and data science are now
-
trending like a boom. Nowadays companies like Google, Face book,
IBM, and Amazon are working with AI and creating amazing devices.
The future of Artificial Intelligence is inspiring and will come with high
intelligence.
Branches of
AI
1. Game Playing
You can buy machines that can play master level chess for a few hundred
dollars.
There is some AI in them, but they play well against people mainly through
brute
force computation--looking at hundreds of thousands of positions. To
beat a world champion by brute force and known reliable heuristics
requires being able to look at 200 million positions per second.
2. Speech Recognition
In the 1990s, computer speech recognition reached a practical level for
limited
purposes. Thus United Airlines has replaced its keyboard tree for
flight information by a system using speech recognition of flight
numbers and city names. It is quite convenient. On the other hand, -
-
Applications of
AI
1. AI in Astronomy
Artificial Intelligence can be very useful to solve complex universe
problems. AI technology can be helpful for understanding the universe
such as how it works, origin, etc.
2.AI in Healthcare
In the last, five to ten years, AI becoming more advantageous for
the healthcare industry and going to have a significant impact on
this industry.
Healthcare Industries are applying AI to make a better and faster
diagnosis than humans. AI can help doctors with diagnoses and can
inform when patients are worsening so that medical help can reach
to the patient before hospitalization.
3. AI in Gaming
AI can be used for gaming purpose. The AI machines can play
strategic games like chess, where the machine needs to think of a
large number of possible places.
-
Applications of
AI
4. AI in Finance
AI and finance industries are the best matches for each other. The finance
industry is implementing automation, chatbot, adaptive intelligence,
algorithm trading, and machine learning into financial processes.
5. AI in Data Security
The security of data is crucial for every company and cyber-attacks are
growing very rapidly in the digital world. AI can be used to make your
data more safe and secure. Some examples such as AEG bot, AI2
Platform, are used to determine software bug and cyber-attacks in a
better way.
6. AI in Social Media
Social Media sites such as Facebook, Twitter, and Snapchat contain billions of
user profiles, which need to be stored and managed in a very efficient way.
AI can organize and manage massive amounts of data. AI can analyze lots of
data to identify the latest trends, hashtag, and requirement of different
users.
-
Applications of
AI
7. AI in Travel & Transport
AI is becoming highly demanding for travel industries. AI is capable of
doing various travel related works such as from making travel
arrangement to suggesting the hotels, flights, and best routes to the
customers. Travel industries are using AI- powered chatbots which can
make human-like interaction with customers for better and fast
response.
8.AI in Automotive Industry
Some Automotive industries are using AI to provide virtual assistant to
their user for better performance. Such as Tesla has introduced
TeslaBot, an intelligent virtual assistant.
Various Industries are currently working for developing self-driven
cars which can make your journey more safe and secure.
9. AI in Robotics:
Artificial Intelligence has a remarkable role in Robotics. Usually,
general robots are programmed such that they can perform some
experiences
repetitive without
task, pre- the help of AI, we can
but with - create intelligent
programmed.
robots which can perform tasks with their own
Humanoid Robots are best examples for AI in robotics, recently the
intelligent Humanoid robot named as Erica and Sophia has been
developed which can talk and behave like humans.
10. AI in Entertainment
We are currently using some AI based applications in our daily
life with some entertainment services such as Netflix or Amazon.
With the help of ML/AI algorithms, these services show the
recommendations for programs or shows.
11. AI in Agriculture
Agriculture is an area which requires various resources, labor, money,
and time for best result. Now a day's agriculture is becoming digital,
and AI is emerging in this field. Agriculture is applying AI as
agriculture robotics, solid and crop monitoring, predictive analysis.
AI in agriculture can be very helpful for farmers.
-
Applications of
AI
12. AI in E-commerce
AI is providing a competitive edge to the e-commerce industry, and
it is becoming more demanding in the e-commerce business. AI is
helping shoppers to discover associated products with recommended
size, color, or even brand.
13.AI in education:
AI can automate grading so that the tutor can have more time to
teach. AI chatbot
can communicate with students as a teaching assistant.
AI in the future can be work as a personal virtual tutor for students,
which will be accessible easily at any time and any place.
-
AI Problem &
Techniques
Followin are problems that can be solved by
g AI.
someFollowing using
categories of problems are considered as AI
problems.
Ordinary Problems
1.Perception
Vision
Voice Recognition
Speech Recognition
2.Natural Language
Understanding
Generation
Translation
3.Robot Control
-
AI Problem &
Techniques
Followin are problems that can be solved by
g AI.
someFollowing using
categories of problems are considered as AI
problems.
Formal Problems
Game Playing
Solving complex mathematical Problem
Expert Problems
Design
Fault Finding
Scientific Analysis
Medical Diagnosis
Financial Analysis
-
AI Problem &
Techniques
There are three important AI techniques:
Search — Provides a way of solving problems for which no direct
approach is available. It also provides a framework into which any
direct techniques that are available can be embedded.
-
Thanks
!!!
-
Chapter 2: Problem
Spaces &
The objective
Search
of this lesson is to provide an overview
problem
of representation techniques i.e.
Representing AI problems as a mathematical model
Representing AI problems as a production system
Defining AI problems as a state space search
Thislesson also gives in depth knowledge about searching
the
techniques BFS and DFS search algorithm with
advantages
0 0
4 0 1
1 3 8
0 3 3
3 0 5
3 3 2
4 2 7
0 2 3
2 0 5
Solution 3
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Water Jug Problem of 8,5 and 3
The Ltr Jug
following is a problem which can be solved by using state
space search technique. “we have 3 jugs of capacities 3,5, and
8 liters respectively. There is no scale on the jugs. So it is only
their capacities that we certainly know. Initially the 8 liter jug
is full of water, the other two are empty. We can pour water
from one jug to another, and the goal is to have exactly 4 liters
of water in any of the jug. There is no scale on the jug and we
do not have any other tools that would help. The amount of
water in the other two jugs at the end is irrelevant.
Formalize the above problem as state space search . You should
1. Suggest suitable representation of the problem
2. State the initial and goal state of this problem
3. Specify the production rules for getting from one state to
another
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Water Jug Problem of 8,5 and 3
Ltr Jug
Solution:-
The state space for this problem can be defined as
x -represents the number of liters of water in the 8-liter
jug
y -represents the number of liters of water in the 5-liter
jug
Therefore, x =0,1,2,3,5,6,70r
z –represent the8number of liters of water in he 3-liter jug
y=0,1,2 ,3,4 or 5
The initial statez=0,1,2 or 3.The goal state is to get 4 liter of water
is ( 8,0,0)
in any jug.
The goal state can be defined as (4,n,n) or (n,4,n) for any value of
n
The initial state (i,j) is (3,3) i.e. three missionaries and three
cannibals on side A of a river and ( 0,0) on side B of the river.
1 2 3 1 2 3 1 2 3
7 8 4 7 8 4 7 4
6 5 6 5 6 8 5
1 2 3
8 4
7 6 5
2 8 3
1 6 4
7 5
1 2 3
8 4
7 6 5
2 8 3 1 2 3
1 4 8 4
7 6 5 7 6 5
2 3 1 2 3
1 8 4 8 4
7 6 5 7 6 5
Actions: It gives the description of all the available actions to the agent.
Solution: It is an action sequence which leads from the start node to the
goal node.
Optimal Solution: If a solution has the lowest cost among all solutions.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Search and Control
Strategies
Properties of Search Algorithms:
Breadth-first Search
Depth-first Search
Depth-limited Search
Iterative deepening depth-first search
Uniform cost search
Bidirectional Search
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Issues in the design of search
programs
Issues in the design of search programs :
The direction in which to conduct search (forward versus backward reasoning). If the search
proceeds from start state towards a goal state, it is a forward search or we can also search from the
goal.
How to select applicable rules (Matching). Production systems typically spend most of their time
looking for rules to apply. So, it is critical to have efficient procedures for matching rules against
states.
How to represent each node of the search process (knowledge representation problem).
Advantages:
BFS will provide a solution if any solution exists.
If there are more than one solutions for a given problem, then BFS will
provide the minimal solution which requires the least number of steps.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Breadth-first Search
Disadvantages:
It requires lots of memory since each level of the tree must be saved into
memory to expand the next level.
BFS needs lots of time if the solution is far away from the root node.
Example:
In the below tree structure, we have shown the traversing of the tree using
BFS algorithm from the root node S to goal node K. BFS search algorithm
traverse in layers, so it will follow the path which is shown by the dotted
arrow, and the traversed path will be:
S---> A--->B---->C--->D---->G--->H--->E---->F---->I---->K
Advantage:
DFS requires very less memory as it only needs to store a stack of the
nodes on the path from root node to the current node.
It takes less time to reach to the goal node than BFS algorithm (if it
traverses in the right path).
Example:
In the below search tree, we have shown the flow of depth-first search, and
it will follow the order as:
It will start searching from root node S, and traverse A, then B, then D and
E, after traversing E, it will backtrack the tree as E has no other successor
and still goal node is not found. After backtracking it will traverse node C
and then G, and here it will terminate as it found goal node.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Depth-first Search
Space Complexity: DFS algorithm needs to store only single path from the
root node, hence space complexity of DFS is equivalent to the size of the
fringe set, which is O(bm).
BFS stands for Breadth First Search. DFS stands for Depth First Search.
BFS is more suitable for searching vertices which are DFS is more suitable when there are solutions away from
closer to the given source. source.
The Time complexity of BFS is O(V + E) when The Time complexity of DFS is also O(V + E) when
Adjacency List is used and O(V^2) when Adjacency Adjacency List is used and O(V^2) when Adjacency
Matrix is used, where V stands for vertices and E stands Matrix is used, where V stands for vertices and E stands
for edges. for edges.
Advantages:
Depth-limited search is Memory efficient.
Disadvantages:
It does not care about the number of steps involve in searching and only
concerned about path cost. Due to which this algorithm may be stuck in an
infinite loop.
Example:
Time Complexity:
Let C* is Cost of the optimal solution, and ε is each step to get closer to the
goal node. Then the number of steps is = C*/ε+1. Here we have taken +1, as we
start from state 0 and end to C*/ε.Hence, the worst-case time complexity of
Uniform-cost search isO(b1 + [C*/ε])/.
Space Complexity:
The same logic is for space complexity so, the worst-case space complexity of
Uniform-cost search is O(b1 + [C*/ε]).
Optimal:
Uniform-cost search is always optimal as it only selects a path with the lowest
path cost.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Iterative deepening depth-first
Search
5. Iterative deepening depth-first Search:
Disadvantages:
The main drawback of IDDFS is that it repeats all the work of the
previous phase.
Example:
Completeness:
This algorithm is complete is if the branching factor is finite.
Time Complexity:
Let's suppose b is the branching factor and depth is d then the worst-case
time complexity is O(bd).
Space Complexity:
The space complexity of IDDFS will be O(bd).
Optimal:
IDDFS algorithm is optimal if path cost is a non- decreasing function of
the depth of the node.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Bidirectional Search
6. Bidirectional Search Algorithm:
Advantages:
Bidirectional search is fast.
Bidirectional search requires less memory
Example:
In the below search tree, bidirectional search algorithm is applied. This
algorithm divides one graph/tree into two sub-graphs. It starts traversing
from node 1 in the forward direction and starts from goal node 16 in the
backward direction.
The algorithm terminates at node 9 where two searches meet.
Here h(n) is heuristic cost, and h*(n) is the estimated cost. Hence heuristic
cost should be less than or equal to the estimated cost.
Greedy best-first search algorithm always selects the path which appears best at that moment. It is
the combination of depth-first search and breadth- first search algorithms. It uses the heuristic
function and search. Best-first search allows us to take the advantages of both algorithms. With the
help of best-first search, at each step, we can choose the most promising node. In the best first
search algorithm, we expand the node which is closest to the goal node and the closest cost is
estimated by heuristic function, i.e.
f(n)= g(n).
Disadvantages:
It can behave as an unguided depth-first search in the worst case scenario.
It can get stuck in a loop as DFS.
This algorithm is not optimal.
Example:
Consider the below search problem, and we will traverse it using greedy
best-first search. At each iteration, each node is expanded using evaluation
function f(n)=h(n) , which is given in the below table.
Algorithm of A* search:
Step1: Place the starting node in the OPEN list.
Step 2: Check if the OPEN list is empty or not, if the list is empty then
return failure and stops.
Step 3: Select the node from the OPEN list which has the smallest value of
evaluation function (g+h), if node n is goal node then return success and
stop, otherwise
Step 4: Expand node n and generate all of its successors, and put n into the
closed list. For each successor n', check whether n' is already in the OPEN
or CLOSED list, if not then compute evaluation function for n' and place
into Open list.
Advantages:
A* search algorithm is
the best algorithm than
other search algorithms.
A* search algorithm is optimal and complete.
This algorithm can solve very complex problems.
Disadvantages:
It does not always produce the shortest path as it
mostly based on heuristics
and approximation.
A* search algorithm has some complexity issues. Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
The main drawback of A* is memory
A * Search
Example:
In this example, we will traverse the given graph using the A* algorithm.
The heuristic value of all states is given in the below table so we will
calculate the f(n) of each state using the formula f(n)= g(n) + h(n), where
g(n) is the cost to reach any node from start state.
Here we will use OPEN and CLOSED list.
Points to remember:
A* algorithm returns the path which occurred first, and it does not search
for all remaining paths.
The efficiency of A* algorithm depends on the quality of heuristic.
A* algorithm expands all nodes which satisfy the condition f(n)
=149+100=249
Put these node in START list and sort the list
hence START = [ K(172),L(243),I(249),B(258),D(285)]
Remove Bestnode from START i.e K which is not our goal
node and hence generate its successor i.e M and calculate
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
its f values Pune.
A* Algorithm Example
F(A-C-F-J-K-M) = g(m)+h(m)
=172+0=172
Put these node in START list
and sort the list
Therefore START =
[ M(172),L(243),B(258),D(2
85)]
Remove Bestnode from START i.e M which is our
goal node
AND-OR graphs are useful for certain problems where the solution
involves decomposing the problem into smaller problems. This is called
Problem Reduction.
Here, alternatives involves branches where some or all must be satisfied
before we can progress.
In case of A* algorithm, we use the open list to hold nodes that have been
generated but not expanded & the closed list to hold nodes that have been
expanded.
It requires that nodes traversed in the tree be labelled as, SOLVED or
UNSOLVED in the solution process to account for AND node solutions
which requires solutions to all successor nodes.
A solution is found when the start node is labelled as SOLVED.
AO* is best algorithm for solving cyclic AND-OR graphs.
AND
OR
Disadvantages:
Sometimes for unsolvable nodes, it can’t find the optimal path. Its
complexity is than other algorithms.
OR
A1*A2 A3 A1 A2*A3
1 1
1
In figure the top node A has been expanded producing two area one leading to B
and leading to C- . The numbers at each node represent heuristic cost (h at that
node (cost of getting to the goal state from current state). For simplicity, it is
assumed that every operation(i.e. applying a rule) has unit cost, i.e., each arc with
single successor will have a cost of 1 and each of its components. With the
available information till now , it appears that C is the most promising node to
expand since its h = 3 , the lowest but going through B would be better since to
use C we must also use D and the cost would be 9(3+4+1+1). Through B it
would be 6(5+1).
Thus the choice of the next node to expand depends not only on a value but also
on whether that node is part of the current best path form the initial node.
Step 1: Evaluate the initial state, if it is goal state then return success and
Stop.
Step 2: Loop Until a solution is found or there is no new operator left to
apply.
Step 3: Select and apply an operator to the current state.
Step 4: Check new state:
a. If it is goal state, then return success and quit.
b.Else if it is better than the current state then assign new state
as a current state.
c. Else if not better than the current state, then return to step2.
Step 5: Exit.
Stochastic hill climbing does not examine for all its neighbor before moving.
Rather, this search algorithm selects one neighbor node at random and
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
decides whether to choose it as a current state or
Pune.examine another state.
Hill Climbing
Problems in Hill Climbing Algorithm:
1 2 3 1 2 3 1 2 3
H=4 7 8 4 7 8 4 7 4
H=2 H=3
6 5 6 5 6 8 5
1 2 3 1 2 3 1 2 3
7 8 H=1 8 4 7 8 4 H=3
H=5
6 5 4 7 6 5 6 5
2 3 1 2 3
Search tree for 8
1 8 4 H=0 8 4
H=2 puzzle problem by hill
7 6 5 Goal State 7 6 5 climbing procedure
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Tower of Hanoi Problem
Problem Statement:
First, evaluate the difference between Initial State and final State.
Select the various operators which can be applied for each difference.
Apply the operator at each difference, which reduces the difference
between the current state and goal state.
Solution:
To solve the above problem, we will first find the differences between initial
states and goal states, and for each difference, we will generate a new state
and will apply the operators. The operators we have for this problem are:
Move
Delete
Expand
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Means-Ends Analysis
1. Evaluating the initial state: In the first step, we will evaluate the initial state and
will compare the initial and Goal state to find the differences between both states.
2. Applying Delete operator: As we can check the first difference is that in goal state
there is no dot symbol which is present in the initial state, so, first we will apply the
Delete operator to remove this dot.
3. Applying Move Operator: After applying the Delete operator, the new state occurs
which we will again compare with goal state. After comparing these states, there is
another difference that is the square is outside the circle, so, we will apply the
Move Operator.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Means-Ends Analysis
4. Applying Expand Operator: Now a new state is generated in the third step, and we will
compare this state with the goal state. After comparing the states there is still one difference
which is the size of the square, so, we will apply Expand operator, and finally, it will
generate the goal state.
START
1 2 3 4 5 6 7
WALK(R1) PICKUP(A) PUTDOWN(A) PICKUP(B) PUTDOWN(B) PUSH(D,R2) WALK (R1)
8 9 10 11 12 13 14
PICKUP(A) CARRY(A,R2) PUTDOWN(A) WALK(R1) PICKUP(B) CARRY (B,R2) PLACE(A,B )
GOAL
Eg.
Solution:
From first row of multiplication it is clear that B=1
as JE*B=JE
As in the multiplication, second row should start from 0
at tenth's place. So A = 0.
Now in the hundred's place, J + Something = 10.
When you add something to the single digit number that
results in
10. So J = 9.
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Cryptarithmatic Problem
Now J+E=10+D i.e 9+E=10+D . Here E can not be 0,1
as these digits are assigned to A and Bresp.
Assume E=2 which gives 9+2=11 means D=1 which is
not possible therefore E can not be 2
Assume E=3 which gives 9+3=12 hence D=2
Hence the solution is
Solution:
From the first row of multiplication, H =1 is clear, As HE x H =
HE.
Now, H+A=M i.e 1+A=10+M as there is carry over next level
Therefore A=9 ,M=0 and N=2
Now, HE*E=HHA i.e 1E*E=119 so by trial and error we get E=7
* *
* *
*
*
1 2 3 1 2 3 1 2 3
7 8 4 7 8 4 7 4
6 5 6 5 6 8 5
1 2 3
8 4
7 6 5
2 8 3
1 6 4
7 5
1 2 3
8 4
7 6 5
2 8 3 1 2 3
1 4 8 4
7 6 5 7 6 5
2 3 1 2 3
1 8 4 8 4
7 6 5 7 6 5
Solution:
Set of variables Xi=[Pune, Mumbai, Nasik, Jalgaon, Nagpur] Set
of
domain Di=[Red, Green, Blue] for each xi
Constraint: No adjacent city have the same color
Mrs.Harsha Patil, Dr. D. Y. Patil ACS College, Pimpri
Pune.
Map or GraphColoring
Problem
City/ Operation Pune Nasik Mumbai Nagpur Jalgaon
Initial Domain RGB RGB RGB RGB RGB
Assign Red to Pune R GB GB RGB RGB
Assign Green to Nasik R G B RG RG
Assign Red to Nagpur R G B R G
Assign Green to R G B R G
Jalgaon