Skip to content

advaithcurpod/CopsAndRobbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

Cops and Robbers

Introduction

This is a simple example of a typical pursuit evasion problem where a bunch of pursuers strategise to nab the evaders. Before the pursuers proceed on nab the evaders, it is important for them to startegise the search to save time and manpower.

Problem Statement

Given a bounded, connected, undirected graph, is it possible for a cop to devise a startegy such that he is always successful in nabbing the robber (irrespective of the strategy choosen by the robber) in finite number of steps. Likewise, is it possible for the robber to devise a strategy to stay away from the cop, forever?

Implementation

A CLI application built in JAVA that determines if a graph is cop-win or robber-win

Input

  • Input the number of vertices (V) and number of edges (E) in the graph.
  • Then input each edge (a pair of 2 vertices) one by one. Note: Vertices are to be labelled as integers from (0 to V-1)

Output

  • Graph is cop-win or robber!
  • List all the pitfalls in the graph.

Contributors - Advaith Durga Dhruvil

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages