SlideShare a Scribd company logo
1 of 16
Model Checking For Puzzle Solving
By Anit Thapaliya
Software Engineering Lab
Department of Computer Science
Kyonggi University
Suwon, South Korea
Problem Background
A number based puzzle game where we
a. Must start at lowest number (1)
b. Must follow the sequence of number
c. Must cover all the plates
d. Finish at the higher number
Game Outline
Problem Formulation
Using Model Checking Tool
NuSMV
Consideration
1. Start from the lowest number
2. Follow sequence in order
3. Cover each plates
4. Finish at the highest number
Problem Formulation
Using Model Checking Tool
NuSMV
NuSMV requires the program to look for any solution whose number of transitions
is up to 47. Given my encoding of the problem, if no solution is found within 47
steps then we can safely conclude that there exists no possible solution for the input
table.
From our earlier solution it is clear to us that this is due to a rather poor encoding of
the problem (Our LTL property is overly complicated).
Problem Formulation
Using Model Checking Tool
NuSMV
•Modeling phase:
•Model the transition system under consideration
•Requirement 1: Visit every plates for which I consider a index of 0-47 for
identifying every available plates.
•Requirement 2: Follow the provided sequences for which I consider the
the given sequences in association with their relative indexing i.e. initial
lowest no 1 is in the index of 19.
•Requirement 3 : Avoid plates visiting twice for which I consider an array
of index 0-47 in Boolean form to represent whether the plates is visited
or not {0 for not visited & 1 for visited}
•Requiremt 4: Must start at lowest no and finish at highest no for which
our start point is the index having the lowest number and the end point is
the deadlock stage having the highest number.
Problem Solution
Using Model Checking Tool
NuSMV
MODULE main
VAR
index : 0..47; -- current position
sequence : {19, 43, 24, 25, 34, 21, 22, 28, 17, 1, 9};
plates : array 0..47 of { 0, 1 };
-- 0: plate not visited, 1: plate visited
Problem Solution
Our Goal: End Point
DEFINE
goal_state := sequence = 9 & index = 9 &
plates[0] = 1 & plates[1] = 1 & plates[2] = 1 & plates[3] = 1 &
plates[4] = 1 & plates[5] = 1 & plates[6] = 1 & plates[7] = 1 &
plates[8] = 1 & plates[9] = 1 & plates[10] = 1 & plates[11]=1 &
plates[12] = 1 & plates[13] = 1 & plates[14] = 1 & plates[15]= 1 &
plates[16] = 1 & plates[17] = 1 & plates[18] = 1 & plates[19]= 1 &
plates[20] = 1 & plates[21] = 1 & plates[22] = 1 & plates[23]= 1 &
plates[24] = 1 & plates[25] = 1 & plates[26] = 1 & plates[27]= 1 &
plates[28] = 1 & plates[29] = 1 & plates[30] = 1 & plates[31]= 1 &
plates[32] = 1 & plates[33] = 1 & plates[34] = 1 & plates[35]= 1 &
plates[36] = 1 & plates[37] = 1 & plates[38] = 1 & plates[39]= 1 &
plates[40] = 1 & plates[41] = 1 & plates[42] = 1 & plates[43]= 1 &
plates[44] = 1 & plates[45] = 1 & plates[46] = 1 & plates[47] = 1;
Problem Solution
ASSIGN
init(index) := 19;
init(sequence) := 19;
--initialize plate configuration
init(plates[0]) := 0;
init(plates[1]) := 0;
init(plates[2]) := 0;
init(plates[3]) := 0;
init(plates[4]) := 0;
…
init(plates[19]) := 1;
..
init(plates[47]) := 0;
Problem Solution
-- possible moves from any given plate, ignoring
-- the restriction over visiting the same plate
-- more than once
next(index) := case
index = 0 : {1, 8};
index = 1 : {0, 2, 9};
..
index = 8 : {0, 9, 16};
-- end plate: omitted (index 9: end plate)
index = 16 : {8, 17, 24};
index = 17 : {9, 16, 18, 25};
..
index = 47 : {39, 46};
TRUE : index;
esac;
Problem Solution
-- advance sequence only when we hit the correct plate on the table
next(sequence) := case
-- starting plate: omitted
sequence = 19 & next(index) = 43 : 43;
sequence = 43 & next(index) = 24 : 24;
sequence = 24 & next(index) = 25 : 25;
sequence = 25 & next(index) = 34 : 34;
sequence = 34 & next(index) = 21 : 21;
sequence = 21 & next(index) = 22 : 22;
sequence = 22 & next(index) = 28 : 28;
sequence = 28 & next(index) = 17 : 17;
sequence = 17 & next(index) = 1 : 1;
sequence = 1 & next(index) = 9 : 9;
TRUE : sequence;
esac;
Problem Solution
-- mark each plate as visited as soon as we move on it
next(plates[0]) := case next(index) =0 : 1; TRUE : plates[0]; esac;
next(plates[1]) := case next(index) =1 : 1; TRUE : plates[1]; esac;
next(plates[2]) := case next(index) =2 : 1; TRUE : plates[2]; esac;
next(plates[3]) := case next(index) =3 : 1; TRUE : plates[3]; esac;
next(plates[4]) := case next(index) =4 : 1; TRUE : plates[4]; esac;
next(plates[5]) := case next(index) =5 : 1; TRUE : plates[5]; esac;
next(plates[6]) := case next(index) =6 : 1; TRUE : plates[6]; esac;
next(plates[7]) := case next(index) =7 : 1; TRUE : plates[7]; esac;
next(plates[8]) := case next(index) =8 : 1; TRUE : plates[8]; esac;
next(plates[9]) := case next(index) =9 : 1; TRUE : plates[9]; esac;
…
next(plates[47]) := case next(index) =10 : 1; TRUE : plates[47]; esac;
Problem Solution
-- forbid stepping over an already visited plate,
-- unless it is the end plate
TRANS
(index = 9) | (plates[next(index)] != 1)
-- There is no possible path that reaches the goal state
LTLSPEC !(F goal_state)
Output
Results
Thank You

More Related Content

What's hot

Pemeriksan laboratorium imunologi
Pemeriksan laboratorium imunologiPemeriksan laboratorium imunologi
Pemeriksan laboratorium imunologitristyanto
 
Immunoassay berlabel
Immunoassay berlabelImmunoassay berlabel
Immunoassay berlabelrastukaryana1
 
Pemeriksaan demam berdarah dengue (ns1)
Pemeriksaan demam berdarah dengue (ns1)Pemeriksaan demam berdarah dengue (ns1)
Pemeriksaan demam berdarah dengue (ns1)materipptgc
 

What's hot (6)

Pemeriksan laboratorium imunologi
Pemeriksan laboratorium imunologiPemeriksan laboratorium imunologi
Pemeriksan laboratorium imunologi
 
Immunoassay berlabel
Immunoassay berlabelImmunoassay berlabel
Immunoassay berlabel
 
Pemeriksaan demam berdarah dengue (ns1)
Pemeriksaan demam berdarah dengue (ns1)Pemeriksaan demam berdarah dengue (ns1)
Pemeriksaan demam berdarah dengue (ns1)
 
Makalah urine analyzer
Makalah urine analyzerMakalah urine analyzer
Makalah urine analyzer
 
Tabm prak
Tabm prakTabm prak
Tabm prak
 
Identifikasi Bakteri Staphylococcus Aureus
Identifikasi Bakteri Staphylococcus AureusIdentifikasi Bakteri Staphylococcus Aureus
Identifikasi Bakteri Staphylococcus Aureus
 

Viewers also liked

Integrated 2 Section 3-3
Integrated 2 Section 3-3Integrated 2 Section 3-3
Integrated 2 Section 3-3Jimbo Lamb
 
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...Muhammad Yossi
 
Model Checking History
Model Checking History Model Checking History
Model Checking History Anit Thapaliya
 
Linear Temporal Logic LTL
Linear Temporal Logic LTLLinear Temporal Logic LTL
Linear Temporal Logic LTLAnit Thapaliya
 
Differential Geometry presentation
Differential Geometry presentationDifferential Geometry presentation
Differential Geometry presentationBed Dhakal
 
Rotasi - Geometri Transformasi
Rotasi - Geometri TransformasiRotasi - Geometri Transformasi
Rotasi - Geometri TransformasiRitsa Faiza
 
DILATASI Transformasi Geometri
DILATASI Transformasi GeometriDILATASI Transformasi Geometri
DILATASI Transformasi GeometriMilla Rachmana
 
Presentation translasi
Presentation translasiPresentation translasi
Presentation translasibagusajisaputt
 
Problem Solving in Mathematics Education
Problem Solving in Mathematics EducationProblem Solving in Mathematics Education
Problem Solving in Mathematics EducationJeff Suzuki
 
Transformasi(translasi rotasi-dilatasi)
Transformasi(translasi rotasi-dilatasi)Transformasi(translasi rotasi-dilatasi)
Transformasi(translasi rotasi-dilatasi)Tria Shei'yOuthea
 
Fractals in nature and science dfs
Fractals in nature and science dfsFractals in nature and science dfs
Fractals in nature and science dfsFarhana Shaheen
 

Viewers also liked (20)

Integrated 2 Section 3-3
Integrated 2 Section 3-3Integrated 2 Section 3-3
Integrated 2 Section 3-3
 
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...
Perkembangan Surat Kabar di Indonesia pada Masa Sebelum Kolonial sampai Kemer...
 
Mathematical problem solving
Mathematical problem solvingMathematical problem solving
Mathematical problem solving
 
Model Checking History
Model Checking History Model Checking History
Model Checking History
 
HungerCraft
HungerCraftHungerCraft
HungerCraft
 
Mathw6
Mathw6Mathw6
Mathw6
 
Translasi - Transformasi Geometri
Translasi - Transformasi GeometriTranslasi - Transformasi Geometri
Translasi - Transformasi Geometri
 
Linear Temporal Logic LTL
Linear Temporal Logic LTLLinear Temporal Logic LTL
Linear Temporal Logic LTL
 
Determinan dan Invers Matriks
Determinan dan Invers MatriksDeterminan dan Invers Matriks
Determinan dan Invers Matriks
 
Differential Geometry presentation
Differential Geometry presentationDifferential Geometry presentation
Differential Geometry presentation
 
Rotasi
RotasiRotasi
Rotasi
 
Rotasi - Geometri Transformasi
Rotasi - Geometri TransformasiRotasi - Geometri Transformasi
Rotasi - Geometri Transformasi
 
Rotasi
RotasiRotasi
Rotasi
 
Italy erasmus
Italy erasmusItaly erasmus
Italy erasmus
 
BSc08 Polya
BSc08 PolyaBSc08 Polya
BSc08 Polya
 
DILATASI Transformasi Geometri
DILATASI Transformasi GeometriDILATASI Transformasi Geometri
DILATASI Transformasi Geometri
 
Presentation translasi
Presentation translasiPresentation translasi
Presentation translasi
 
Problem Solving in Mathematics Education
Problem Solving in Mathematics EducationProblem Solving in Mathematics Education
Problem Solving in Mathematics Education
 
Transformasi(translasi rotasi-dilatasi)
Transformasi(translasi rotasi-dilatasi)Transformasi(translasi rotasi-dilatasi)
Transformasi(translasi rotasi-dilatasi)
 
Fractals in nature and science dfs
Fractals in nature and science dfsFractals in nature and science dfs
Fractals in nature and science dfs
 

Similar to Puzzle Solving Using Model Checking

chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................nourhandardeer3
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Pramit Kumar
 
[This sheet must be completed and attached to the last page of.docx
[This sheet must be completed and attached to the last page of.docx[This sheet must be completed and attached to the last page of.docx
[This sheet must be completed and attached to the last page of.docxhanneloremccaffery
 
UNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxUNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxRSathyaPriyaCSEKIOT
 
Dsoop (co 221) 1
Dsoop (co 221) 1Dsoop (co 221) 1
Dsoop (co 221) 1Puja Koch
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.pptEdFeranil
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Seq2grid aaai 2021
Seq2grid aaai 2021Seq2grid aaai 2021
Seq2grid aaai 2021segwangkim
 
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)Austin Benson
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structuresKàŕtheek Jåvvàjí
 
Insert Sort & Merge Sort Using C Programming
Insert Sort & Merge Sort Using C ProgrammingInsert Sort & Merge Sort Using C Programming
Insert Sort & Merge Sort Using C Programmingchandankumar364348
 
Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Ra'Fat Al-Msie'deen
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithmspppepito86
 
(Data Structure) Chapter11 searching & sorting
(Data Structure) Chapter11 searching & sorting(Data Structure) Chapter11 searching & sorting
(Data Structure) Chapter11 searching & sortingFadhil Ismail
 
Class13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdfClass13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdfAkashSingh625550
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Navin Kumar
 

Similar to Puzzle Solving Using Model Checking (20)

chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)
 
[This sheet must be completed and attached to the last page of.docx
[This sheet must be completed and attached to the last page of.docx[This sheet must be completed and attached to the last page of.docx
[This sheet must be completed and attached to the last page of.docx
 
UNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptxUNIT I_PSPP - Illustrative Problems (1).pptx
UNIT I_PSPP - Illustrative Problems (1).pptx
 
Dsoop (co 221) 1
Dsoop (co 221) 1Dsoop (co 221) 1
Dsoop (co 221) 1
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.ppt
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Seq2grid aaai 2021
Seq2grid aaai 2021Seq2grid aaai 2021
Seq2grid aaai 2021
 
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
 
Branch and bounding : Data structures
Branch and bounding : Data structuresBranch and bounding : Data structures
Branch and bounding : Data structures
 
Insert Sort & Merge Sort Using C Programming
Insert Sort & Merge Sort Using C ProgrammingInsert Sort & Merge Sort Using C Programming
Insert Sort & Merge Sort Using C Programming
 
Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"Algorithms - "Chapter 2 getting started"
Algorithms - "Chapter 2 getting started"
 
Mit6 094 iap10_lec03
Mit6 094 iap10_lec03Mit6 094 iap10_lec03
Mit6 094 iap10_lec03
 
Cis435 week06
Cis435 week06Cis435 week06
Cis435 week06
 
Introduction to Algorithms
Introduction to AlgorithmsIntroduction to Algorithms
Introduction to Algorithms
 
10. Recursion
10. Recursion10. Recursion
10. Recursion
 
(Data Structure) Chapter11 searching & sorting
(Data Structure) Chapter11 searching & sorting(Data Structure) Chapter11 searching & sorting
(Data Structure) Chapter11 searching & sorting
 
Class13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdfClass13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdf
 
07. Arrays
07. Arrays07. Arrays
07. Arrays
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 

More from Anit Thapaliya

A unified approach for uml based safety oriented level crossing using fta and...
A unified approach for uml based safety oriented level crossing using fta and...A unified approach for uml based safety oriented level crossing using fta and...
A unified approach for uml based safety oriented level crossing using fta and...Anit Thapaliya
 
Model Checking Tutorial
Model Checking TutorialModel Checking Tutorial
Model Checking TutorialAnit Thapaliya
 
Rotaract Club of Pashupati-Ktm Rota Year 2014-15
Rotaract Club of Pashupati-Ktm Rota Year 2014-15 Rotaract Club of Pashupati-Ktm Rota Year 2014-15
Rotaract Club of Pashupati-Ktm Rota Year 2014-15 Anit Thapaliya
 
Communication Network Comnet Report
Communication Network Comnet Report Communication Network Comnet Report
Communication Network Comnet Report Anit Thapaliya
 
Project Planning & Management
Project Planning & Management Project Planning & Management
Project Planning & Management Anit Thapaliya
 
Adventure Travel & Tours Website Design
Adventure Travel & Tours Website DesignAdventure Travel & Tours Website Design
Adventure Travel & Tours Website DesignAnit Thapaliya
 
Airlines Reservation System
Airlines Reservation SystemAirlines Reservation System
Airlines Reservation SystemAnit Thapaliya
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemAnit Thapaliya
 
Networking Devices & Its Advantages and Disadvantages
Networking Devices & Its Advantages and DisadvantagesNetworking Devices & Its Advantages and Disadvantages
Networking Devices & Its Advantages and DisadvantagesAnit Thapaliya
 
Software engineering II
Software engineering IISoftware engineering II
Software engineering IIAnit Thapaliya
 
Advanced System Analysis And Design
Advanced System Analysis And Design Advanced System Analysis And Design
Advanced System Analysis And Design Anit Thapaliya
 
Business intelligence In
Business intelligence InBusiness intelligence In
Business intelligence InAnit Thapaliya
 
A Study on 21st Century Business Intelligence
A Study on 21st Century Business Intelligence A Study on 21st Century Business Intelligence
A Study on 21st Century Business Intelligence Anit Thapaliya
 
Introduction of Biometrics
Introduction of BiometricsIntroduction of Biometrics
Introduction of BiometricsAnit Thapaliya
 
A Bidding System In Football "Football Fantasy"
A Bidding System In Football "Football Fantasy" A Bidding System In Football "Football Fantasy"
A Bidding System In Football "Football Fantasy" Anit Thapaliya
 
E-Business "A Comparative Study on Dell Business Model"
E-Business "A Comparative Study on Dell Business Model"E-Business "A Comparative Study on Dell Business Model"
E-Business "A Comparative Study on Dell Business Model"Anit Thapaliya
 

More from Anit Thapaliya (17)

A unified approach for uml based safety oriented level crossing using fta and...
A unified approach for uml based safety oriented level crossing using fta and...A unified approach for uml based safety oriented level crossing using fta and...
A unified approach for uml based safety oriented level crossing using fta and...
 
Model Checking Tutorial
Model Checking TutorialModel Checking Tutorial
Model Checking Tutorial
 
Rotaract Club of Pashupati-Ktm Rota Year 2014-15
Rotaract Club of Pashupati-Ktm Rota Year 2014-15 Rotaract Club of Pashupati-Ktm Rota Year 2014-15
Rotaract Club of Pashupati-Ktm Rota Year 2014-15
 
Communication Network Comnet Report
Communication Network Comnet Report Communication Network Comnet Report
Communication Network Comnet Report
 
Project Planning & Management
Project Planning & Management Project Planning & Management
Project Planning & Management
 
Rotaract Projects
Rotaract Projects Rotaract Projects
Rotaract Projects
 
Adventure Travel & Tours Website Design
Adventure Travel & Tours Website DesignAdventure Travel & Tours Website Design
Adventure Travel & Tours Website Design
 
Airlines Reservation System
Airlines Reservation SystemAirlines Reservation System
Airlines Reservation System
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
Networking Devices & Its Advantages and Disadvantages
Networking Devices & Its Advantages and DisadvantagesNetworking Devices & Its Advantages and Disadvantages
Networking Devices & Its Advantages and Disadvantages
 
Software engineering II
Software engineering IISoftware engineering II
Software engineering II
 
Advanced System Analysis And Design
Advanced System Analysis And Design Advanced System Analysis And Design
Advanced System Analysis And Design
 
Business intelligence In
Business intelligence InBusiness intelligence In
Business intelligence In
 
A Study on 21st Century Business Intelligence
A Study on 21st Century Business Intelligence A Study on 21st Century Business Intelligence
A Study on 21st Century Business Intelligence
 
Introduction of Biometrics
Introduction of BiometricsIntroduction of Biometrics
Introduction of Biometrics
 
A Bidding System In Football "Football Fantasy"
A Bidding System In Football "Football Fantasy" A Bidding System In Football "Football Fantasy"
A Bidding System In Football "Football Fantasy"
 
E-Business "A Comparative Study on Dell Business Model"
E-Business "A Comparative Study on Dell Business Model"E-Business "A Comparative Study on Dell Business Model"
E-Business "A Comparative Study on Dell Business Model"
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

Puzzle Solving Using Model Checking

  • 1. Model Checking For Puzzle Solving By Anit Thapaliya Software Engineering Lab Department of Computer Science Kyonggi University Suwon, South Korea
  • 2. Problem Background A number based puzzle game where we a. Must start at lowest number (1) b. Must follow the sequence of number c. Must cover all the plates d. Finish at the higher number Game Outline
  • 3. Problem Formulation Using Model Checking Tool NuSMV Consideration 1. Start from the lowest number 2. Follow sequence in order 3. Cover each plates 4. Finish at the highest number
  • 4. Problem Formulation Using Model Checking Tool NuSMV NuSMV requires the program to look for any solution whose number of transitions is up to 47. Given my encoding of the problem, if no solution is found within 47 steps then we can safely conclude that there exists no possible solution for the input table. From our earlier solution it is clear to us that this is due to a rather poor encoding of the problem (Our LTL property is overly complicated).
  • 5. Problem Formulation Using Model Checking Tool NuSMV •Modeling phase: •Model the transition system under consideration •Requirement 1: Visit every plates for which I consider a index of 0-47 for identifying every available plates. •Requirement 2: Follow the provided sequences for which I consider the the given sequences in association with their relative indexing i.e. initial lowest no 1 is in the index of 19. •Requirement 3 : Avoid plates visiting twice for which I consider an array of index 0-47 in Boolean form to represent whether the plates is visited or not {0 for not visited & 1 for visited} •Requiremt 4: Must start at lowest no and finish at highest no for which our start point is the index having the lowest number and the end point is the deadlock stage having the highest number.
  • 6. Problem Solution Using Model Checking Tool NuSMV MODULE main VAR index : 0..47; -- current position sequence : {19, 43, 24, 25, 34, 21, 22, 28, 17, 1, 9}; plates : array 0..47 of { 0, 1 }; -- 0: plate not visited, 1: plate visited
  • 7. Problem Solution Our Goal: End Point DEFINE goal_state := sequence = 9 & index = 9 & plates[0] = 1 & plates[1] = 1 & plates[2] = 1 & plates[3] = 1 & plates[4] = 1 & plates[5] = 1 & plates[6] = 1 & plates[7] = 1 & plates[8] = 1 & plates[9] = 1 & plates[10] = 1 & plates[11]=1 & plates[12] = 1 & plates[13] = 1 & plates[14] = 1 & plates[15]= 1 & plates[16] = 1 & plates[17] = 1 & plates[18] = 1 & plates[19]= 1 & plates[20] = 1 & plates[21] = 1 & plates[22] = 1 & plates[23]= 1 & plates[24] = 1 & plates[25] = 1 & plates[26] = 1 & plates[27]= 1 & plates[28] = 1 & plates[29] = 1 & plates[30] = 1 & plates[31]= 1 & plates[32] = 1 & plates[33] = 1 & plates[34] = 1 & plates[35]= 1 & plates[36] = 1 & plates[37] = 1 & plates[38] = 1 & plates[39]= 1 & plates[40] = 1 & plates[41] = 1 & plates[42] = 1 & plates[43]= 1 & plates[44] = 1 & plates[45] = 1 & plates[46] = 1 & plates[47] = 1;
  • 8. Problem Solution ASSIGN init(index) := 19; init(sequence) := 19; --initialize plate configuration init(plates[0]) := 0; init(plates[1]) := 0; init(plates[2]) := 0; init(plates[3]) := 0; init(plates[4]) := 0; … init(plates[19]) := 1; .. init(plates[47]) := 0;
  • 9. Problem Solution -- possible moves from any given plate, ignoring -- the restriction over visiting the same plate -- more than once next(index) := case index = 0 : {1, 8}; index = 1 : {0, 2, 9}; .. index = 8 : {0, 9, 16}; -- end plate: omitted (index 9: end plate) index = 16 : {8, 17, 24}; index = 17 : {9, 16, 18, 25}; .. index = 47 : {39, 46}; TRUE : index; esac;
  • 10. Problem Solution -- advance sequence only when we hit the correct plate on the table next(sequence) := case -- starting plate: omitted sequence = 19 & next(index) = 43 : 43; sequence = 43 & next(index) = 24 : 24; sequence = 24 & next(index) = 25 : 25; sequence = 25 & next(index) = 34 : 34; sequence = 34 & next(index) = 21 : 21; sequence = 21 & next(index) = 22 : 22; sequence = 22 & next(index) = 28 : 28; sequence = 28 & next(index) = 17 : 17; sequence = 17 & next(index) = 1 : 1; sequence = 1 & next(index) = 9 : 9; TRUE : sequence; esac;
  • 11. Problem Solution -- mark each plate as visited as soon as we move on it next(plates[0]) := case next(index) =0 : 1; TRUE : plates[0]; esac; next(plates[1]) := case next(index) =1 : 1; TRUE : plates[1]; esac; next(plates[2]) := case next(index) =2 : 1; TRUE : plates[2]; esac; next(plates[3]) := case next(index) =3 : 1; TRUE : plates[3]; esac; next(plates[4]) := case next(index) =4 : 1; TRUE : plates[4]; esac; next(plates[5]) := case next(index) =5 : 1; TRUE : plates[5]; esac; next(plates[6]) := case next(index) =6 : 1; TRUE : plates[6]; esac; next(plates[7]) := case next(index) =7 : 1; TRUE : plates[7]; esac; next(plates[8]) := case next(index) =8 : 1; TRUE : plates[8]; esac; next(plates[9]) := case next(index) =9 : 1; TRUE : plates[9]; esac; … next(plates[47]) := case next(index) =10 : 1; TRUE : plates[47]; esac;
  • 12. Problem Solution -- forbid stepping over an already visited plate, -- unless it is the end plate TRANS (index = 9) | (plates[next(index)] != 1) -- There is no possible path that reaches the goal state LTLSPEC !(F goal_state)
  • 14.