SlideShare a Scribd company logo
1 of 11
General method
of
backtracking
seminar
Introductionof
backtracking
 Backtracking can be defined as a general algorithmic technique
that considers searching every possible combination in order to
solve a computational problem.
Introductionof
backtracking
algorithm
 Backtracking is an algorithmic technique for solving
problems recursively by trying to build a solution
incrementally, one piece at a time, removing those
solutions that fail to satisfy the constraints of the
problem at any point of time (by time, here, is referred
to the time elapsed till reaching any level of the search
tree).
Basic
terminologies
 Candidate: A candidate is a potential choice or element that can
be added to the current solution.
 Solution: The solution is a valid and complete configuration that
satisfies all problem constraints.
 Partial Solution: A partial solution is an intermediate or
incomplete configuration being constructed during the
backtracking process.
 Decision Space: The decision space is the set of all possible
candidates or choices at each decision point.
 Decision Point: A decision point is a specific step in the algorithm
where a candidate is chosen and added to the partial solution.
 Feasible Solution: A feasible solution is a partial or complete solution that adheres to all
constraints.
 Dead End: A dead end occurs when a partial solution cannot be extended without violating
constraints.
 Backtrack: Backtracking involves undoing previous decisions and returning to a prior
decision point.
 Search Space: The search space includes all possible combinations of candidates and
choices.
 Optimal Solution: In optimization problems, the optimal solution is the best possible
solution.
Typesofbacktracking
problems
Problems associated with backtracking can be
categorized into 3
categories:
 Decision Problems: Here, we search for a feasible
solution.
 Optimization Problems: For this type, we search for
the best solution.
 Enumeration Problems: We find set of all possible
feasible solutions to the problems of this type.
Applicationsof
backtracking
 Creating smart bots to play Board Games such as
Chess.
 Solving mazes and puzzles such as N-Queen problem.
 Network Routing and Congestion Control.
 Decryption
 Text Justification
EXAMPLE
We start with a start node. First, we move to node A. Since it
is not a feasible solution so we move to the next node, i.e., B is
also not a feasible solution, and it is a dead-end so we backtrack
from node B to node A.
Suppose another path exists from node A to node C. So, we
move from node A to node C. It is also a dead-end, so again
backtrack from node C to node A. We move from node A to the
starting node.
Now we will check any other path exists from the starting node. So, we move
from start node to the node D. Since it is not a feasible solution so we move
from node D to node E. The node E is also not a feasible solution. It is a dead
end so we backtrack from node E to node D.
Suppose another path exists from node D to node F. So, we move from node
D to node F. Since it is not a feasible solution and it's a dead-end, we check
for another path from node F.
 Suppose there is another path exists from the node F to
node G so move from node F to node G. The node G is a
success node.
Thetermsrelatedto
thebacktrackingare
•Live node: The nodes that can be further generated are known
as live nodes.
•E node: The nodes whose children are being generated and
become a success node.
•Success node: The node is said to be a success node if it provides
a feasible solution.
•Dead node: The node which cannot be further generated and
also does not provide a feasible solution is known as a dead node.
Many problems can be solved by backtracking strategy, and that
problems satisfy complex set of constraints, and these
constraints are of two types:
•Implicit constraint: It is a rule in which how each element in a
tuple is related.
•Explicit constraint: The rules that restrict each element to be
chosen from the given set.

More Related Content

Similar to General methodin Data Structure for UG.pptx

Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERmuthukrishnavinayaga
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxsatvikkushwaha1
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codehamza javed
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
Y11 m02 networks
Y11 m02  networksY11 m02  networks
Y11 m02 networksXu Wei
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesHema Kashyap
 
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdf
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdfLec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdf
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdfMAJDABDALLAH3
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................pptShilpaBhatia32
 
Dynamic programmng2
Dynamic programmng2Dynamic programmng2
Dynamic programmng2debolina13
 
Unit 3- Greedy Method.pptx
Unit 3- Greedy Method.pptxUnit 3- Greedy Method.pptx
Unit 3- Greedy Method.pptxMaryJacob24
 
An Introduction to the Finite Element Method
An Introduction to the Finite Element MethodAn Introduction to the Finite Element Method
An Introduction to the Finite Element MethodMohammad Tawfik
 
Satisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai PlanningSatisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai Planningahmad bassiouny
 

Similar to General methodin Data Structure for UG.pptx (20)

Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
35 algorithm-types
35 algorithm-types35 algorithm-types
35 algorithm-types
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
 
Backtracking
Backtracking  Backtracking
Backtracking
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Y11 m02 networks
Y11 m02  networksY11 m02  networks
Y11 m02 networks
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
DAA-Module-5.pptx
DAA-Module-5.pptxDAA-Module-5.pptx
DAA-Module-5.pptx
 
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdf
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdfLec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdf
Lec07-Greedy Algorithms.pdf Lec07-Greedy Algorithms.pdf
 
unit-1-l3.ppt
unit-1-l3.pptunit-1-l3.ppt
unit-1-l3.ppt
 
unit-1-l3AI..........................ppt
unit-1-l3AI..........................pptunit-1-l3AI..........................ppt
unit-1-l3AI..........................ppt
 
Dynamic programmng2
Dynamic programmng2Dynamic programmng2
Dynamic programmng2
 
Constraint Satisfaction.pdf
Constraint Satisfaction.pdfConstraint Satisfaction.pdf
Constraint Satisfaction.pdf
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Unit 3- Greedy Method.pptx
Unit 3- Greedy Method.pptxUnit 3- Greedy Method.pptx
Unit 3- Greedy Method.pptx
 
An Introduction to the Finite Element Method
An Introduction to the Finite Element MethodAn Introduction to the Finite Element Method
An Introduction to the Finite Element Method
 
Satisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai PlanningSatisfaction And Its Application To Ai Planning
Satisfaction And Its Application To Ai Planning
 

More from LakshmiSamivel

Greedy Algorithm for Computer Science.ppt
Greedy Algorithm for Computer Science.pptGreedy Algorithm for Computer Science.ppt
Greedy Algorithm for Computer Science.pptLakshmiSamivel
 
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptx
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptxDIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptx
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptxLakshmiSamivel
 
DataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptxDataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptxLakshmiSamivel
 
Basic Queue Operation in DataStructure.pptx
Basic Queue Operation in DataStructure.pptxBasic Queue Operation in DataStructure.pptx
Basic Queue Operation in DataStructure.pptxLakshmiSamivel
 
Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.pptLakshmiSamivel
 
Computer network notes
Computer network notesComputer network notes
Computer network notesLakshmiSamivel
 

More from LakshmiSamivel (15)

Greedy Algorithm for Computer Science.ppt
Greedy Algorithm for Computer Science.pptGreedy Algorithm for Computer Science.ppt
Greedy Algorithm for Computer Science.ppt
 
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptx
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptxDIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptx
DIVIDE AND CONQUERMETHOD IN DATASTRUCTURE.pptx
 
DataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptxDataSructure-Time and Space Complexity.pptx
DataSructure-Time and Space Complexity.pptx
 
Basic Queue Operation in DataStructure.pptx
Basic Queue Operation in DataStructure.pptxBasic Queue Operation in DataStructure.pptx
Basic Queue Operation in DataStructure.pptx
 
Presentation DM.pptx
Presentation DM.pptxPresentation DM.pptx
Presentation DM.pptx
 
Dos.pptx
Dos.pptxDos.pptx
Dos.pptx
 
Formatting tags
Formatting tagsFormatting tags
Formatting tags
 
Classification of datastructure.ppt
Classification of datastructure.pptClassification of datastructure.ppt
Classification of datastructure.ppt
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Semaphore
Semaphore Semaphore
Semaphore
 
Firewall ppt
Firewall pptFirewall ppt
Firewall ppt
 
View
ViewView
View
 
Procedures andcursors
Procedures andcursorsProcedures andcursors
Procedures andcursors
 
Computer network notes
Computer network notesComputer network notes
Computer network notes
 
OsI reference model
OsI reference modelOsI reference model
OsI reference model
 

Recently uploaded

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 

Recently uploaded (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 

General methodin Data Structure for UG.pptx

  • 2. Introductionof backtracking  Backtracking can be defined as a general algorithmic technique that considers searching every possible combination in order to solve a computational problem.
  • 3. Introductionof backtracking algorithm  Backtracking is an algorithmic technique for solving problems recursively by trying to build a solution incrementally, one piece at a time, removing those solutions that fail to satisfy the constraints of the problem at any point of time (by time, here, is referred to the time elapsed till reaching any level of the search tree).
  • 4. Basic terminologies  Candidate: A candidate is a potential choice or element that can be added to the current solution.  Solution: The solution is a valid and complete configuration that satisfies all problem constraints.  Partial Solution: A partial solution is an intermediate or incomplete configuration being constructed during the backtracking process.  Decision Space: The decision space is the set of all possible candidates or choices at each decision point.  Decision Point: A decision point is a specific step in the algorithm where a candidate is chosen and added to the partial solution.
  • 5.  Feasible Solution: A feasible solution is a partial or complete solution that adheres to all constraints.  Dead End: A dead end occurs when a partial solution cannot be extended without violating constraints.  Backtrack: Backtracking involves undoing previous decisions and returning to a prior decision point.  Search Space: The search space includes all possible combinations of candidates and choices.  Optimal Solution: In optimization problems, the optimal solution is the best possible solution.
  • 6. Typesofbacktracking problems Problems associated with backtracking can be categorized into 3 categories:  Decision Problems: Here, we search for a feasible solution.  Optimization Problems: For this type, we search for the best solution.  Enumeration Problems: We find set of all possible feasible solutions to the problems of this type.
  • 7. Applicationsof backtracking  Creating smart bots to play Board Games such as Chess.  Solving mazes and puzzles such as N-Queen problem.  Network Routing and Congestion Control.  Decryption  Text Justification
  • 8. EXAMPLE We start with a start node. First, we move to node A. Since it is not a feasible solution so we move to the next node, i.e., B is also not a feasible solution, and it is a dead-end so we backtrack from node B to node A. Suppose another path exists from node A to node C. So, we move from node A to node C. It is also a dead-end, so again backtrack from node C to node A. We move from node A to the starting node.
  • 9. Now we will check any other path exists from the starting node. So, we move from start node to the node D. Since it is not a feasible solution so we move from node D to node E. The node E is also not a feasible solution. It is a dead end so we backtrack from node E to node D. Suppose another path exists from node D to node F. So, we move from node D to node F. Since it is not a feasible solution and it's a dead-end, we check for another path from node F.
  • 10.  Suppose there is another path exists from the node F to node G so move from node F to node G. The node G is a success node.
  • 11. Thetermsrelatedto thebacktrackingare •Live node: The nodes that can be further generated are known as live nodes. •E node: The nodes whose children are being generated and become a success node. •Success node: The node is said to be a success node if it provides a feasible solution. •Dead node: The node which cannot be further generated and also does not provide a feasible solution is known as a dead node. Many problems can be solved by backtracking strategy, and that problems satisfy complex set of constraints, and these constraints are of two types: •Implicit constraint: It is a rule in which how each element in a tuple is related. •Explicit constraint: The rules that restrict each element to be chosen from the given set.